mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
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:
parent
4f5d707e44
commit
eb0cedebfa
@ -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;
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user