-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (24 loc) · 728 Bytes
/
main.cpp
File metadata and controls
33 lines (24 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "prefs.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTime t;
int msec = t.msec();
QSplashScreen *splash = new QSplashScreen( QPixmap(":ui/splash.png") );
splash->show();
MainWindow w;
int dt = t.msec()-(msec+2000);
//qDebug()<<"start.dt:"<<dt;
if (dt > 0)
QThread::msleep(dt);
w.show();
splash->finish(&w);
delete splash;
if (!Prefs::prefs()->isValidMonkeyPath) {
QMessageBox::warning( &w, "Invalid path", "Invalid root path!\n\nPlease select correct path from the 'File -- Options' dialog.", "Go to Options" );
w.onFilePrefs(true);
}
return a.exec();
}