Commit 97d68050 authored by Langella Olivier's avatar Langella Olivier
Browse files

more reliable masschroq gui when launching it

parent f4a0f3fa
......@@ -12,33 +12,17 @@ main(int argc, char **argv)
ConsoleOut::setCout(new QTextStream(stdout, QIODevice::WriteOnly));
ConsoleOut::setCerr(new QTextStream(stderr, QIODevice::WriteOnly));
try
{
QCoreApplication::setOrganizationName("PAPPSO");
QCoreApplication::setOrganizationDomain("pappso.inra.fr");
QCoreApplication::setApplicationName("masschroq");
QCoreApplication::setOrganizationName("PAPPSO");
QCoreApplication::setOrganizationDomain("pappso.inra.fr");
QCoreApplication::setApplicationName("masschroq");
qRegisterMetaType<MassChroqRun>("MassChroqRun");
LauncherMainWindow window;
window.show();
qRegisterMetaType<MassChroqRun>("MassChroqRun");
LauncherMainWindow window;
window.show();
// This code will start the messaging engine in QT and in
// 10ms it will start the execution in the MainClass.run routine;
QTimer::singleShot(10, &window, SLOT(run()));
// This code will start the messaging engine in QT and in
// 10ms it will start the execution in the MainClass.run routine;
QTimer::singleShot(10, &window, SLOT(run()));
return app.exec();
}
catch(pappso::PappsoException &error)
{
mcqerr() << "Oops! an error occurred in MassChroQ. Dont Panic :" << endl;
mcqerr() << error.qwhat() << endl;
app.exit(1);
}
catch(std::exception &error)
{
mcqerr() << "Oops! an error occurred in MassChroQ. Dont Panic :" << endl;
mcqerr() << error.what() << endl;
app.exit(1);
}
return app.exec();
}
......@@ -44,8 +44,16 @@ LauncherMainWindow::LauncherMainWindow(QWidget *parent)
QSettings settings;
QString tmp_dir = settings.value("path/tmp_dir", QDir::tempPath()).toString();
McqSession::getInstance().setTmpDir(tmp_dir);
try
{
McqSession::getInstance().setTmpDir(tmp_dir);
}
catch(pappso::PappsoException &error)
{
qDebug();
mcqerr() << "Oops! an error occurred in MassChroQ. Dont Panic :" << endl;
mcqerr() << error.qwhat() << endl;
}
this->initialiseMassChroqRunningThread();
ui->actionQuit->setShortcuts(QKeySequence::Quit);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment