diff --git a/imports/Spectral/Font/qmldir b/imports/Spectral/Font/qmldir
new file mode 100644
index 0000000..57fb41f
--- /dev/null
+++ b/imports/Spectral/Font/qmldir
@@ -0,0 +1,3 @@
+module Spectral.Font
+singleton MaterialFont 0.1 MaterialFont.qml
+
diff --git a/imports/Spectral/Setting/qmldir b/imports/Spectral/Setting/qmldir
new file mode 100644
index 0000000..5e1c2a7
--- /dev/null
+++ b/imports/Spectral/Setting/qmldir
@@ -0,0 +1,3 @@
+module Spectral.Setting
+singleton MSettings 0.1 Setting.qml
+
diff --git a/res.qrc b/res.qrc
index 6841644..560dcb0 100644
--- a/res.qrc
+++ b/res.qrc
@@ -39,5 +39,7 @@
assets/img/icon.png
imports/Spectral/Setting/Setting.qml
imports/Spectral/Font/MaterialFont.qml
+ imports/Spectral/Font/qmldir
+ imports/Spectral/Setting/qmldir
diff --git a/spectral.pro b/spectral.pro
index 651143a..0367427 100644
--- a/spectral.pro
+++ b/spectral.pro
@@ -3,9 +3,6 @@ CONFIG += c++14
CONFIG += object_parallel_to_source
CONFIG += link_pkgconfig
-# Enable this to use QtQuick Compiler.
-#CONFIG += qtquickcompiler
-
TARGET = spectral
isEmpty(USE_SYSTEM_SORTFILTERPROXYMODEL) {
diff --git a/src/main.cpp b/src/main.cpp
index 5a165ce..189e186 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -48,25 +48,14 @@ int main(int argc, char *argv[]) {
"RoomMessageEvent", "ENUM");
qmlRegisterUncreatableType("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;
engine.addImportPath("qrc:/imports");
-
ImageProvider *m_provider = new ImageProvider();
-
engine.rootContext()->setContextProperty("imageProvider", m_provider);
-
engine.addImageProvider(QLatin1String("mxc"), m_provider);
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
-
if (engine.rootObjects().isEmpty()) return -1;
return app.exec();