From: Kevin Ottens Date: Mon, 14 Sep 2020 15:25:20 +0000 (+0200) Subject: Remove pre-QQC2.3 workaround X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~169^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eb0cedebfaedb1c9ffd686aaac8da0c87e84296a;p=nextcloud-desktop.git Remove pre-QQC2.3 workaround Now that we depend on Qt 5.12 anyway, the count property is available just fine on the Menu item. Signed-off-by: Kevin Ottens --- diff --git a/src/gui/tray/UserModel.cpp b/src/gui/tray/UserModel.cpp index b092fbdb1..c0da8137b 100644 --- a/src/gui/tray/UserModel.cpp +++ b/src/gui/tray/UserModel.cpp @@ -654,9 +654,6 @@ Q_INVOKABLE void UserModel::openCurrentAccountTalk() Q_INVOKABLE void UserModel::openCurrentAccountServer() { - // Don't open this URL when the QML appMenu pops up on click (see Window.qml) - if (appList().count() > 0) - return; if (_users.isEmpty()) return; diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index ee2bff841..b0a324645 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -2,7 +2,7 @@ import QtQml 2.1 import QtQml.Models 2.1 import QtQuick 2.9 import QtQuick.Window 2.3 -import QtQuick.Controls 2.2 +import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import QtGraphicalEffects 1.0 @@ -387,22 +387,11 @@ Window { id: trayWindowAppsButton icon.source: "qrc:///client/theme/white/more-apps.svg" onClicked: { - /* - // The count() property was introduced in QtQuick.Controls 2.3 (Qt 5.10) - // so we handle this with UserModel.openCurrentAccountServer() - // - // See UserModel::openCurrentAccountServer() to disable this workaround - // in the future for Qt >= 5.10 - - if(appsMenu.count() > 0) { - appsMenu.popup(); + if(appsMenu.count > 0) { + appsMenu.open() } else { - UserModel.openCurrentAccountServer(); + UserModel.openCurrentAccountServer() } - */ - - appsMenu.open(); - UserModel.openCurrentAccountServer(); } Menu {