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 <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-09-14 17:25:20 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent 4f5d707e44
commit eb0cedebfa
2 changed files with 4 additions and 18 deletions

View File

@ -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;

View File

@ -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 {