diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-04 11:34:55 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-04 11:35:55 +0100 |
| commit | 628db7e656ce515c394765923293f33205f1e2e8 (patch) | |
| tree | 44ac87f78586d99e3c1619a8c7fa51c31d874e06 | |
| parent | b934e6b0fdcc56f2cca1cca9ebce289cebaaafa2 (diff) | |
| download | yachat6-628db7e656ce515c394765923293f33205f1e2e8.tar.gz | |
main.cpp: Do not rely on qmlRegisterSingletonType
Defining the Yc type as a QML_SINGLETON is apparently enough.
| -rw-r--r-- | main.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -3,8 +3,6 @@ #include <QQmlContext> #include <QObject> #include <QVariant> -#include <memory> -#include "yc.h" int main(int argc, char *argv[]) { @@ -12,12 +10,5 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); QQmlApplicationEngine engine("qrc:/org/yachat/app/Main.qml"); - qmlRegisterSingletonType<Yc>(uri, 1, 0, "Yc", - [](QQmlEngine *, QJSEngine *) -> QObject * - { - return std::make_unique<Yc>().release(); - } - ); - return app.exec(); } |
