Always include QtQuick.Controls as QQC2
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import org.kde.kirigami 2.15 as Kirigami
|
||||
@@ -104,7 +104,7 @@ Kirigami.ScrollablePage {
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
Label {
|
||||
QQC2.Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
@@ -115,7 +115,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
QQC2.ToolButton {
|
||||
visible: !inRoom
|
||||
icon.name: "document-send"
|
||||
text: i18n("Send invitation")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Layouts 1.15
|
||||
import Qt.labs.qmlmodels 1.0
|
||||
|
||||
@@ -22,7 +22,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
Component.onCompleted: identifierField.forceActiveFocus()
|
||||
|
||||
header: Control {
|
||||
header: QQC2.Control {
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
contentItem: RowLayout {
|
||||
Kirigami.SearchField {
|
||||
@@ -36,7 +36,7 @@ Kirigami.ScrollablePage {
|
||||
placeholderText: i18n("Find a room...")
|
||||
}
|
||||
|
||||
Button {
|
||||
QQC2.Button {
|
||||
id: joinButton
|
||||
|
||||
visible: identifierField.isRoomAlias
|
||||
@@ -53,7 +53,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
QQC2.ComboBox {
|
||||
id: serverField
|
||||
|
||||
// TODO: in KF6 we should be able to switch to using implicitContentWidthPolicy
|
||||
@@ -77,12 +77,12 @@ Kirigami.ScrollablePage {
|
||||
addServerSheet.open()
|
||||
}
|
||||
|
||||
trailing: ToolButton {
|
||||
trailing: QQC2.ToolButton {
|
||||
visible: isAddServerDelegate || isDeletable
|
||||
icon.name: isAddServerDelegate ? "list-add" : "dialog-close"
|
||||
text: i18n("Add new server")
|
||||
Accessible.name: text
|
||||
display: AbstractButton.IconOnly
|
||||
display: QQC2.AbstractButton.IconOnly
|
||||
|
||||
onClicked: {
|
||||
if (serverField.currentIndex === index && isDeletable) {
|
||||
@@ -121,13 +121,13 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
|
||||
contentItem: Kirigami.FormLayout {
|
||||
Label {
|
||||
QQC2.Label {
|
||||
Layout.minimumWidth: Kirigami.Units.gridUnit * 20
|
||||
|
||||
text: serverUrlField.length > 0 ? (serverUrlField.acceptableInput ? (serverUrlField.isValidServer ? i18n("Valid server entered") : i18n("This server cannot be resolved or has already been added")) : i18n("The entered text is not a valid url")) : i18n("Enter server url e.g. kde.org")
|
||||
color: serverUrlField.length > 0 ? (serverUrlField.acceptableInput ? (serverUrlField.isValidServer ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.negativeTextColor) : Kirigami.Theme.negativeTextColor) : Kirigami.Theme.textColor
|
||||
}
|
||||
TextField {
|
||||
QQC2.TextField {
|
||||
id: serverUrlField
|
||||
|
||||
property bool isValidServer: false
|
||||
@@ -153,7 +153,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
QQC2.Button {
|
||||
id: okButton
|
||||
|
||||
text: i18nc("@action:button", "Ok")
|
||||
@@ -222,13 +222,13 @@ Kirigami.ScrollablePage {
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
Label {
|
||||
QQC2.Label {
|
||||
visible: isJoined || justJoined
|
||||
text: i18n("Joined")
|
||||
color: Kirigami.Theme.linkColor
|
||||
}
|
||||
}
|
||||
Label {
|
||||
QQC2.Label {
|
||||
Layout.fillWidth: true
|
||||
visible: text
|
||||
text: topic ? topic.replace(/(\r\n\t|\n|\r\t)/gm," ") : ""
|
||||
@@ -244,7 +244,7 @@ Kirigami.ScrollablePage {
|
||||
implicitHeight: Kirigami.Units.iconSizes.small
|
||||
implicitWidth: Kirigami.Units.iconSizes.small
|
||||
}
|
||||
Label {
|
||||
QQC2.Label {
|
||||
text: memberCount + " " + (alias ?? roomID)
|
||||
color: Kirigami.Theme.disabledTextColor
|
||||
elide: Text.ElideRight
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import org.kde.kirigami 2.15 as Kirigami
|
||||
@@ -17,7 +17,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
title: i18n("Start a Chat")
|
||||
|
||||
header: Control {
|
||||
header: QQC2.Control {
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
contentItem: RowLayout {
|
||||
Kirigami.SearchField {
|
||||
@@ -32,7 +32,7 @@ Kirigami.ScrollablePage {
|
||||
onAccepted: userDictListModel.search()
|
||||
}
|
||||
|
||||
Button {
|
||||
QQC2.Button {
|
||||
visible: identifierField.isUserID
|
||||
|
||||
text: i18n("Chat")
|
||||
@@ -89,7 +89,7 @@ Kirigami.ScrollablePage {
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
Label {
|
||||
QQC2.Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
@@ -100,7 +100,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
QQC2.Button {
|
||||
id: joinChatButton
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: directChats && directChats.length > 0
|
||||
@@ -112,7 +112,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
QQC2.Button {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
icon.name: "irc-join-channel"
|
||||
// We wants to make sure an user can't start more than one
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import org.kde.kirigami 2.15 as Kirigami
|
||||
@@ -16,7 +16,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
title: module.item.title ?? i18n("Welcome")
|
||||
|
||||
header: Controls.Control {
|
||||
header: QQC2.Control {
|
||||
contentItem: Kirigami.InlineMessage {
|
||||
id: headerMessage
|
||||
type: Kirigami.MessageType.Error
|
||||
@@ -49,7 +49,7 @@ Kirigami.ScrollablePage {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 16
|
||||
}
|
||||
Controls.Label {
|
||||
QQC2.Label {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: 25
|
||||
@@ -68,7 +68,7 @@ Kirigami.ScrollablePage {
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
Controls.Button {
|
||||
QQC2.Button {
|
||||
text: i18nc("@action:button", "Back")
|
||||
|
||||
enabled: welcomePage.currentStep.previousUrl !== ""
|
||||
@@ -79,7 +79,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Button {
|
||||
QQC2.Button {
|
||||
id: continueButton
|
||||
enabled: welcomePage.currentStep.acceptable
|
||||
visible: welcomePage.currentStep.showContinueButton
|
||||
|
||||
Reference in New Issue
Block a user