From c45d2212a5a3d4323902ca6cfa26b8742e268875 Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Sun, 8 Dec 2019 20:18:03 +0100 Subject: [PATCH] Removal of init.qml plus minor fixes Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/gui/systray.cpp | 2 +- src/gui/tray/init.qml | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 src/gui/tray/init.qml diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 8c2700980..caabd6c29 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -41,7 +41,7 @@ Systray::Systray() // TODO: make singleton, provide ::instance() // Create QML tray engine, build component, set C++ backend context used in window.qml // Use pointer instead of engine() helper function until Qt 5.12 is minimum standard QQmlEngine *engine = new QQmlEngine; - QQmlComponent systray(engine, QUrl(QStringLiteral("qrc:/qml/src/gui/tray/init.qml"))); + QQmlComponent systray(engine, QUrl(QStringLiteral("qrc:/qml/src/gui/tray/window.qml"))); _trayContext = engine->contextForObject(systray.create()); _accountMenuModel = UserModel::instance(); diff --git a/src/gui/tray/init.qml b/src/gui/tray/init.qml deleted file mode 100644 index c918fd980..000000000 --- a/src/gui/tray/init.qml +++ /dev/null @@ -1,20 +0,0 @@ -import QtQuick 2.0 -import Qt.labs.platform 1.1 - -SystemTrayIcon { - visible: true - //icon.source: "qrc:/client/theme/colored/state-offline-32.png" - icon.source: "qrc:/client/theme/colored/state-sync-32.png"; - - Component.onCompleted: { - showMessage("Desktop Client 2.7", "New QML menu!", 1000) - } - - onActivated: { - var component = Qt.createComponent("qrc:/qml/src/gui/tray/window.qml") - var win = component.createObject() - win.show() - win.raise() - win.requestActivate() - } -}