-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (29 loc) · 1.3 KB
/
main.cpp
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
38
39
40
#include <QApplication>
#include <QDir>
#include "qml/BSComponents/mactoolbar.h"
#include "Quiver.h"
#include "quiverlauncher.h"
//
// FIXME: Command+W hides application window. Clicking app dock icon opens window
// SEE: https://github.com/KDAB/Charm/blob/c6244ad730057ec8f89ca4b4555df3c386756209/Charm/MacApplicationCore.mm
// SEE: https://github.com/petroules/petroules-utilities-qt/blob/d05e0c6312b47a2d870d9e6d515ab1142dda9630/src/integratedapplication_mac.mm
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QCoreApplication::setOrganizationName("BSCM");
QCoreApplication::setOrganizationDomain("bscmdesign.com");
QCoreApplication::setApplicationName("Quiver");
QCoreApplication::setApplicationVersion("1");
QDir::setCurrent(QCoreApplication::applicationDirPath());
MacToolBar::registerTypes();
Quiver quiver;
auto client = new QuiverLauncher;
quiver.addProperty("instance", client);
#ifdef Q_OS_MAC
bool deploy = quiver.deploy();
deploy = false; //override what quiver thinks - for working on quiver-app in qt creator
quiver.setDeploy(deploy);
QDir::setCurrent(deploy ? "../Resources" : "../../../../quiver-app");
#endif
quiver.setSource("qml");
return app.exec();
}