diff --git a/app/qml/DevicePage.qml b/app/qml/DevicePage.qml index 259d957fc..ed5c5a611 100644 --- a/app/qml/DevicePage.qml +++ b/app/qml/DevicePage.qml @@ -4,15 +4,14 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -import QtQuick 2.2 -import QtQuick.Controls 2.1 -import QtQuick.Layouts 1.1 +import QtQuick 2.15 +import QtQuick.Controls 2.15 as QQC2 +import QtQuick.Layouts 1.15 import QtQuick.Dialogs 1.0 -import org.kde.kirigami 2.12 as Kirigami +import org.kde.kirigami 2.20 as Kirigami import org.kde.kdeconnect 1.0 -Kirigami.ScrollablePage -{ +Kirigami.ScrollablePage { id: root property QtObject currentDevice title: currentDevice.name @@ -46,7 +45,6 @@ Kirigami.ScrollablePage ] ListView { - model: plugins delegate: Kirigami.BasicListItem { label: name @@ -57,8 +55,7 @@ Kirigami.ScrollablePage onClicked: onClick() } - property list plugins : [ - + property list plugins: [ PluginItem { name: i18nd("kdeconnect-app", "Multimedia control") interfaceFactory: MprisDbusInterfaceFactory @@ -127,24 +124,19 @@ Kirigami.ScrollablePage } } - Column { - visible: root.currentDevice.hasPairingRequests + Kirigami.PlaceholderMessage { + text: i18n("Pair requested") + visible: root.currentDevice && root.currentDevice.hasPairingRequests anchors.centerIn: parent spacing: Kirigami.Units.largeSpacing - - Kirigami.PlaceholderMessage { - text: i18n("Pair requested") - anchors.horizontalCenter: parent.horizontalCenter - } - RowLayout { - Button { + QQC2.Button { text: i18nd("kdeconnect-app", "Accept") icon.name:"dialog-ok" onClicked: root.currentDevice.acceptPairing() } - Button { + QQC2.Button { text: i18nd("kdeconnect-app", "Reject") icon.name:"dialog-cancel" onClicked: root.currentDevice.rejectPairing() diff --git a/app/qml/PluginInfoPage.qml b/app/qml/PluginInfoPage.qml index 87a1f61b0..d43d0b970 100644 --- a/app/qml/PluginInfoPage.qml +++ b/app/qml/PluginInfoPage.qml @@ -4,32 +4,26 @@ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -import QtQuick 2.2 -import QtQuick.Controls 2.2 -import org.kde.kirigami 2.0 as Kirigami +import QtQuick 2.15 +import org.kde.kirigami 2.20 as Kirigami -Kirigami.Page -{ +Kirigami.Page { id: root property string configFile property string device actions.main: loader.item.action - onConfigFileChanged: { - loader.setSource(configFile, { - device: root.device - }) - } + onConfigFileChanged: loader.setSource(configFile, { + device: root.device + }) Loader { anchors.fill: parent id: loader - Component.onCompleted: { - setSource(configFile, { - device: root.device - }) - } + Component.onCompleted: setSource(configFile, { + device: root.device + }) } }