Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F325825
main.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
main.cpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
<immer/config.hpp>
// https://github.com/arximboldi/immer/issues/168
#include
<QApplication>
#include
<QQmlApplicationEngine>
#include
<QtQml>
#include
<QUrl>
#include
"matrix-sdk.hpp"
#include
"matrix-room-list.hpp"
#include
"matrix-room.hpp"
#include
"matrix-room-timeline.hpp"
#include
"matrix-room-member.hpp"
#include
"matrix-event.hpp"
#include
"l10n-provider.hpp"
#include
"kazv-config.hpp"
#include
"kazv-io.hpp"
#include
"kazv-io-manager.hpp"
#include
"shortcuts/shortcut-util.hpp"
Q_DECL_EXPORT
int
main
(
int
argc
,
char
*
argv
[])
{
QGuiApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
);
QApplication
app
(
argc
,
argv
);
QCoreApplication
::
setOrganizationName
(
"project-kazv"
);
QCoreApplication
::
setOrganizationDomain
(
"mxc.kazv.moe"
);
QCoreApplication
::
setApplicationName
(
"kazv"
);
QQmlApplicationEngine
engine
;
qmlRegisterType
<
MatrixSdk
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"MatrixSdk"
);
qmlRegisterType
<
L10nProvider
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"L10nProvider"
);
qmlRegisterType
<
KazvConfig
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"KazvConfig"
);
qmlRegisterType
<
KazvIO
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"KazvIO"
);
qmlRegisterType
<
KazvIOManager
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"KazvIOManager"
);
qmlRegisterUncreatableType
<
MatrixRoomList
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"MatrixRoomList"
,
""
);
qmlRegisterUncreatableType
<
MatrixRoom
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"MatrixRoom"
,
""
);
qmlRegisterUncreatableType
<
MatrixRoomMember
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"MatrixRoomMember"
,
""
);
qmlRegisterUncreatableType
<
MatrixRoomTimeline
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"MatrixRoomTimeline"
,
""
);
qmlRegisterUncreatableType
<
MatrixEvent
>
(
"moe.kazv.mxc.kazv"
,
0
,
0
,
"MatrixEvent"
,
""
);
qmlRegisterSingletonInstance
<
ShortcutUtil
>
(
"moe.kazv.mxc.kazvshortcuts"
,
0
,
0
,
"ShortcutUtil"
,
new
ShortcutUtil
());
engine
.
load
(
QUrl
(
QStringLiteral
(
"qrc:///main.qml"
)));
if
(
engine
.
rootObjects
().
isEmpty
())
{
return
-1
;
}
return
app
.
exec
();
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Thu, Apr 24, 4:25 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
92123
Default Alt Text
main.cpp (2 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment