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