/**
* Stores media image containers, including the media images included
* to database.
+*
+* Throws EmuFrontException
*/
void DbMediaImageContainer::storeContainers(QList<MediaImageContainer *> lst, FilePathObject *fpo)
{
MainWindow::MainWindow(bool reset)
{
if (!testDB(reset)) close();
+ errorMessage = new QErrorMessage(this);
setWindowTitle("EmuFront");
tmpDirFilePath = DbConfig::getTmpDir();
if (tmpDirFilePath.isEmpty())
createDB();
}
catch (EmuFrontException e) {
- qDebug() << e.what();
- QMessageBox::critical(this, "Exception", e.what());
+ errorMessage->showMessage(e.what());
}
}
}
catch (EmuFrontException e) {
qDebug() << e.what();
- QMessageBox::critical(this, "Exception", e.what());
+ errorMessage->showMessage(e.what());
return false;
}
}
-/* Throws EmuFrontException */
void MainWindow::createDB() const
{
try
catch (QString str) {
QString msg(tr("Exception while trying to create"
" EmuFront database: %s").arg(str));
- throw EmuFrontException(msg);
+ errorMessage->showMessage(msg);
}
}
class EmuFrontDialog;
class EmuLauncher;
class DatFileUtil;
+class QErrorMessage;
class MainWindow : public QMainWindow
{
DatabaseManager *dbManager;
EmuLauncher *launcher;
QString tmpDirFilePath;
+ QErrorMessage *errorMessage;
};
#endif