Fix various qml warnings
This commit is contained in:
committed by
Tobias Fella
parent
3f1ba8d067
commit
2bc8c6a379
@@ -61,10 +61,10 @@ Kirigami.Dialog {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
root.close();
|
||||
((root.QQC2.ApplicationWindow.window as Kirigami.ApplicationWindow).pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'), {}, {
|
||||
title: i18nc("@title:window", "Login")
|
||||
});
|
||||
root.close();
|
||||
}
|
||||
Keys.onUpPressed: {
|
||||
accountView.currentIndex = accountView.count - 1;
|
||||
|
||||
@@ -39,7 +39,7 @@ Kirigami.Page {
|
||||
icon.name: "document-edit"
|
||||
onTriggered: {
|
||||
root.room.setRoomState(root.type, root.stateKey, sourceTextArea.text);
|
||||
root.closeDialog();
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
}
|
||||
enabled: QmlUtils.isValidJson(sourceTextArea.text)
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ Kirigami.Dialog {
|
||||
return null;
|
||||
}
|
||||
if (isAlias()) {
|
||||
return root.connection.roomByAlias(text);
|
||||
return root.connection.roomByAlias(text) as NeoChatRoom;
|
||||
} else {
|
||||
return root.connection.room(text);
|
||||
return root.connection.room(text) as NeoChatRoom;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@ Kirigami.Page {
|
||||
formats: Prison.Format.QRCode | Prison.Format.Aztec
|
||||
onResultChanged: {
|
||||
if (result.text.length > 0 && result.text != scanner.previousText) {
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
RoomManager.resolveResource(result.text, "qr");
|
||||
scanner.previousText = result.text;
|
||||
}
|
||||
root.closeDialog();
|
||||
}
|
||||
videoSink: viewFinder.videoSink
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ Kirigami.Page {
|
||||
|
||||
QQC2.Action {
|
||||
shortcut: 'Escape'
|
||||
onTriggered: root.closeDialog()
|
||||
onTriggered: Kirigami.PageStack.closeDialog()
|
||||
}
|
||||
|
||||
Notification {
|
||||
@@ -53,20 +53,16 @@ Kirigami.Page {
|
||||
model: root.model
|
||||
anchors.fill: parent
|
||||
onStateChanged: {
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
if (state === Purpose.PurposeJobController.Finished) {
|
||||
if (jobView.job?.output?.url?.length > 0) {
|
||||
sharingSuccess.text = i18nc("@info", "Shared url for image is <a href='%1'>%1</a>", jobView.job.output.url);
|
||||
sharingSuccess.sendEvent();
|
||||
Clipboard.saveText(jobView.job.output.url);
|
||||
}
|
||||
root.closeDialog();
|
||||
} else if (state === Purpose.PurposeJobController.Error) {
|
||||
// Show failure notification
|
||||
sharingFailed.sendEvent();
|
||||
root.closeDialog();
|
||||
} else if (state === Purpose.PurposeJobController.Cancelled) {
|
||||
// Do nothing
|
||||
root.closeDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
class SupportContact
|
||||
{
|
||||
Q_GADGET
|
||||
QML_NAMED_ELEMENT(supportContact)
|
||||
QML_UNCREATABLE("")
|
||||
|
||||
Q_PROPERTY(QString role MEMBER role)
|
||||
Q_PROPERTY(QString matrixId MEMBER matrixId)
|
||||
|
||||
@@ -51,7 +51,7 @@ SearchPage {
|
||||
model: UserDirectoryListModel {
|
||||
id: userDictListModel
|
||||
|
||||
connection: root.room.connection
|
||||
connection: root.room.connection as NeoChatConnection
|
||||
}
|
||||
|
||||
modelDelegate: Delegates.RoundedItemDelegate {
|
||||
@@ -109,10 +109,10 @@ SearchPage {
|
||||
function openManualUserDialog(): void {
|
||||
let dialog = manualUserDialog.createObject(this, {
|
||||
connection: root.connection
|
||||
});
|
||||
}) as ManualUserDialog;
|
||||
dialog.parent = root.Window.window.overlay;
|
||||
dialog.accepted.connect(() => {
|
||||
root.closeDialog();
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
});
|
||||
dialog.userSelected.connect(userId => {
|
||||
root.room.inviteToRoom(userId)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ Kirigami.Page {
|
||||
}
|
||||
|
||||
function onCloseDialog(): void {
|
||||
root.closeDialog();
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ ecm_add_qml_module(MessageContent GENERATE_PLUGIN_SOURCE
|
||||
images/walk.svg
|
||||
DEPENDENCIES
|
||||
QtQuick
|
||||
org.kde.neochat.libneochat
|
||||
)
|
||||
|
||||
configure_file(config-neochat.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-neochat.h)
|
||||
|
||||
@@ -130,9 +130,6 @@ FormCard.FormCardPage {
|
||||
// Note: User::avatarUrl does not set user_id, and thus cannot be used directly here. Hence the makeMediaUrl.
|
||||
avatarSource: root.connection && (root.connection.localUser.avatarUrl.toString().length > 0 ? root.connection.makeMediaUrl(root.connection.localUser.avatarUrl) : "")
|
||||
});
|
||||
if (typeof root.closeDialog === "function") {
|
||||
root.closeDialog();
|
||||
}
|
||||
qrMax.open();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ ecm_add_qml_module(Timeline GENERATE_PLUGIN_SOURCE
|
||||
models/webshortcutmodel.cpp
|
||||
DEPENDENCIES
|
||||
QtQuick
|
||||
org.kde.neochat.libneochat
|
||||
)
|
||||
|
||||
target_include_directories(Timeline PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/enums ${CMAKE_CURRENT_SOURCE_DIR}/models)
|
||||
|
||||
Reference in New Issue
Block a user