mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 19:58:56 +03:00
Replaced .engine() by pointer access b/c of backward compatibility
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
parent
ae7eddf7c9
commit
66bfccc738
1 changed files with 4 additions and 3 deletions
|
@ -39,14 +39,15 @@ Systray::Systray() // TODO: make singleton, provide ::instance()
|
|||
, _accountMenuModel(nullptr)
|
||||
{
|
||||
// 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")));
|
||||
_trayContext = engine->contextForObject(systray.create());
|
||||
|
||||
_accountMenuModel = UserModel::instance();
|
||||
systray.engine()->addImageProvider("avatars", new ImageProvider);
|
||||
systray.engine()->rootContext()->setContextProperty("systrayBackend", _accountMenuModel);
|
||||
|
||||
|
||||
engine->addImageProvider("avatars", new ImageProvider);
|
||||
engine->rootContext()->setContextProperty("systrayBackend", _accountMenuModel);
|
||||
|
||||
// TODO: hack to pass the icon to QML
|
||||
//ctxt->setContextProperty("theme", QLatin1String("colored"));
|
||||
|
|
Loading…
Reference in a new issue