-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathmain.cpp
61 lines (52 loc) · 1.75 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/****************************************************************************
**
** Copyright (C) VCreate Logic Pvt. Ltd. Bengaluru
** Author: Prashanth N Udupa ([email protected])
**
** This code is distributed under GPL v3. Complete text of the license
** can be found here: https://www.gnu.org/licenses/gpl-3.0.txt
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#include "user.h"
#include "appwindow.h"
#include "application.h"
#include "shortcutsmodel.h"
#include "scritedocument.h"
#include "crashpadmodule.h"
#include "documentfilesystem.h"
#include "scritedocumentvault.h"
#include "notificationmanager.h"
#include <QQuickStyle>
int main(int argc, char **argv)
{
if (CrashpadModule::isAvailable()) {
if (!CrashpadModule::prepare())
return 0;
if (CrashpadModule::initialize()) {
#ifdef ENABLE_CRASHPAD_CRASH_TEST
qInfo() << "Crashpad Initialized";
#endif
}
}
#ifndef Q_OS_WINDOWS
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
Application scriteApp(argc, argv, Application::prepare());
User::instance();
TransliterationEngine::instance();
SystemTextInputManager::instance();
NotificationManager::instance();
DocumentFileSystem::setMarker(QByteArrayLiteral("SCRITE"));
ShortcutsModel::instance();
ScriteDocument::instance();
ScriteDocumentVault::instance();
AppWindow scriteWindow;
QTimer::singleShot(0, &scriteWindow, [&scriteWindow]() {
scriteWindow.setSource(QUrl("qrc:/main.qml"));
scriteWindow.show();
});
return scriteApp.exec();
}