Removal of init.qml plus minor fixes

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
Dominique Fuchs 2019-12-08 20:18:03 +01:00
parent 66bfccc738
commit c45d2212a5
2 changed files with 1 additions and 21 deletions

View file

@ -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 // 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 // Use pointer instead of engine() helper function until Qt 5.12 is minimum standard
QQmlEngine *engine = new QQmlEngine; 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()); _trayContext = engine->contextForObject(systray.create());
_accountMenuModel = UserModel::instance(); _accountMenuModel = UserModel::instance();

View file

@ -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()
}
}