More clean up.
This commit is contained in:
parent
385135a658
commit
551e370410
|
@ -0,0 +1,3 @@
|
||||||
|
module Spectral.Font
|
||||||
|
singleton MaterialFont 0.1 MaterialFont.qml
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
module Spectral.Setting
|
||||||
|
singleton MSettings 0.1 Setting.qml
|
||||||
|
|
2
res.qrc
2
res.qrc
|
@ -39,5 +39,7 @@
|
||||||
<file>assets/img/icon.png</file>
|
<file>assets/img/icon.png</file>
|
||||||
<file>imports/Spectral/Setting/Setting.qml</file>
|
<file>imports/Spectral/Setting/Setting.qml</file>
|
||||||
<file>imports/Spectral/Font/MaterialFont.qml</file>
|
<file>imports/Spectral/Font/MaterialFont.qml</file>
|
||||||
|
<file>imports/Spectral/Font/qmldir</file>
|
||||||
|
<file>imports/Spectral/Setting/qmldir</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -3,9 +3,6 @@ CONFIG += c++14
|
||||||
CONFIG += object_parallel_to_source
|
CONFIG += object_parallel_to_source
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
|
|
||||||
# Enable this to use QtQuick Compiler.
|
|
||||||
#CONFIG += qtquickcompiler
|
|
||||||
|
|
||||||
TARGET = spectral
|
TARGET = spectral
|
||||||
|
|
||||||
isEmpty(USE_SYSTEM_SORTFILTERPROXYMODEL) {
|
isEmpty(USE_SYSTEM_SORTFILTERPROXYMODEL) {
|
||||||
|
|
11
src/main.cpp
11
src/main.cpp
|
@ -48,25 +48,14 @@ int main(int argc, char *argv[]) {
|
||||||
"RoomMessageEvent", "ENUM");
|
"RoomMessageEvent", "ENUM");
|
||||||
qmlRegisterUncreatableType<RoomType>("Spectral", 0, 1, "RoomType", "ENUM");
|
qmlRegisterUncreatableType<RoomType>("Spectral", 0, 1, "RoomType", "ENUM");
|
||||||
|
|
||||||
qmlRegisterSingletonType(QUrl("qrc:/imports/Spectral/Setting/Setting.qml"),
|
|
||||||
"Spectral.Setting", 0, 1, "MSettings");
|
|
||||||
qmlRegisterSingletonType(
|
|
||||||
QUrl("qrc:/imports/Spectral/Font/MaterialFont.qml"), "Spectral.Font",
|
|
||||||
0, 1, "MaterialFont");
|
|
||||||
qmlRegisterModule("qrc:/qml/component", 2, 0);
|
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
|
|
||||||
engine.addImportPath("qrc:/imports");
|
engine.addImportPath("qrc:/imports");
|
||||||
|
|
||||||
ImageProvider *m_provider = new ImageProvider();
|
ImageProvider *m_provider = new ImageProvider();
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("imageProvider", m_provider);
|
engine.rootContext()->setContextProperty("imageProvider", m_provider);
|
||||||
|
|
||||||
engine.addImageProvider(QLatin1String("mxc"), m_provider);
|
engine.addImageProvider(QLatin1String("mxc"), m_provider);
|
||||||
|
|
||||||
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
|
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
|
||||||
|
|
||||||
if (engine.rootObjects().isEmpty()) return -1;
|
if (engine.rootObjects().isEmpty()) return -1;
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|
Loading…
Reference in New Issue