qmlfrontend/main.cpp
changeset 15238 b32c52c76977
parent 14936 a3ad06ac390e
child 16039 a73b9770467a
--- a/qmlfrontend/main.cpp	Fri Jul 05 23:40:03 2019 +0300
+++ b/qmlfrontend/main.cpp	Sat Jul 06 00:31:54 2019 +0200
@@ -23,10 +23,10 @@
 
   QQmlApplicationEngine engine;
 
-  qRegisterMetaType<EngineInstance::SimpleEventType>();
-  qRegisterMetaType<EngineInstance::LongEventType>();
-  qRegisterMetaType<EngineInstance::LongEventState>();
-  qRegisterMetaType<EngineInstance::PositionedEventType>();
+  qRegisterMetaType<Engine::SimpleEventType>();
+  qRegisterMetaType<Engine::LongEventType>();
+  qRegisterMetaType<Engine::LongEventState>();
+  qRegisterMetaType<Engine::PositionedEventType>();
 
   qmlRegisterSingletonType<PreviewAcceptor>(
       "Hedgewars.Engine", 1, 0, "PreviewAcceptor",
@@ -38,6 +38,9 @@
                                              "EngineInstance",
                                              "Create by HWEngine run methods");
 
+  qmlRegisterUncreatableMetaObject(Engine::staticMetaObject, "Hedgewars.Engine",
+                                   1, 0, "Engine", "Namespace: only enums");
+
   engine.load(QUrl(QLatin1String("qrc:/main.qml")));
   if (engine.rootObjects().isEmpty()) return -1;