-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (27 loc) · 790 Bytes
/
main.cpp
File metadata and controls
37 lines (27 loc) · 790 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
34
35
36
37
#include "mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QDebug>
#include <QSettings>
#include "systempaths.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("ChemView");
a.setApplicationDisplayName("ChemView");
a.setOrganizationDomain("danielsabo.bitbucket.org");
#ifdef Q_OS_MAC
QSettings::setDefaultFormat(QSettings::NativeFormat);
//TODO: PlatformHelpers::macDisableAutoTabBar();
#else
QSettings::setDefaultFormat(QSettings::IniFormat);
#endif
QCommandLineParser parser;
parser.process(a);
SystemPaths::setupEnviroment();
MainWindow w;
w.show();
for (const auto &filename: parser.positionalArguments())
w.openFile(filename);
return a.exec();
}