-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improving exception handling * Fixing CMakeList.txt * Set filesize of flasher to 16k and launcher-os to 8k
- Loading branch information
Showing
14 changed files
with
187 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef _CONFIG_H | ||
#define _CONFIG_H | ||
|
||
#define __VERSION__ "0.2.0" | ||
#define __VERSION__ "0.2.1" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/**************************************************************************** | ||
* * | ||
* P2000T-FAT-READER * | ||
* Copyright (C) 2023 Ivo Filot <ivo@ivofilot.nl> * | ||
* * | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU Lesser General Public License as * | ||
* published by the Free Software Foundation, either version 3 of the * | ||
* License, or (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public license * | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. * | ||
* * | ||
****************************************************************************/ | ||
|
||
#include "fatflashergui.h" | ||
|
||
/** | ||
* @brief Default constructor | ||
* @param argc number of command line argument | ||
* @param argv command line arguments | ||
*/ | ||
FATFlasherGUI::FATFlasherGUI(int& argc, char** argv) : | ||
QApplication(argc, argv) {} | ||
|
||
/** | ||
* @brief notify | ||
* @param receiver | ||
* @param event | ||
* @return | ||
*/ | ||
bool FATFlasherGUI::notify(QObject* receiver, QEvent* event) { | ||
bool done = true; | ||
try { | ||
done = QApplication::notify(receiver, event); | ||
} catch (const std::exception& e) { | ||
this->throw_message_window(tr("Uncaught exception was thrown."), | ||
tr("An uncaught exception was thrown by the program. This is undiserable behavior and " | ||
"the program will be terminated. Please carefully read the error message " | ||
"and consult the manual or contact one of the developers.\n\nError:\n") + e.what()); | ||
throw(e); | ||
} | ||
return done; | ||
} | ||
|
||
|
||
void FATFlasherGUI::throw_message_window(const QString& title, const QString& message) { | ||
QMessageBox message_box; | ||
message_box.setText(message); | ||
message_box.setIcon(QMessageBox::Critical); | ||
message_box.setWindowTitle(title); | ||
message_box.setWindowIcon(QIcon(ICON_PATH)); | ||
message_box.exec(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/**************************************************************************** | ||
* * | ||
* P2000T-FAT-READER * | ||
* Copyright (C) 2023 Ivo Filot <ivo@ivofilot.nl> * | ||
* * | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU Lesser General Public License as * | ||
* published by the Free Software Foundation, either version 3 of the * | ||
* License, or (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public license * | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. * | ||
* * | ||
****************************************************************************/ | ||
|
||
#ifndef FATFLASHERGUI_H | ||
#define FATFLASHERGUI_H | ||
|
||
#include <QApplication> | ||
#include <QMessageBox> | ||
#include <QIcon> | ||
|
||
#include "config.h" | ||
|
||
class FATFlasherGUI : public QApplication | ||
{ | ||
public: | ||
/** | ||
* @brief Default constructor | ||
* @param argc number of command line argument | ||
* @param argv command line arguments | ||
*/ | ||
FATFlasherGUI(int& argc, char** argv); | ||
|
||
/** | ||
* @brief notify | ||
* @param receiver | ||
* @param event | ||
* @return | ||
*/ | ||
bool notify(QObject* receiver, QEvent* event); | ||
|
||
private: | ||
void throw_message_window(const QString& title, const QString& message); | ||
}; | ||
|
||
#endif // FATFLASHERGUI_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.