Fix various qmllint warnings

This commit is contained in:
Tobias Fella
2025-09-01 23:06:46 +02:00
parent 4d91ae96e3
commit e7b204b9fd
6 changed files with 17 additions and 17 deletions

View File

@@ -2,14 +2,12 @@
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.delegates as Delegates
import org.kde.neochat
import org.kde.neochat.chatbar
/**
* @brief A component to show a reply button for threads in a message bubble.

View File

@@ -2,9 +2,11 @@
// SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-3.0-only
pragma ComponentBehavior: Bound
import QtCore
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
@@ -157,7 +159,7 @@ Item {
if (_private.downloaded) {
openSavedFile();
} else {
openOnFinished = true;
root.openOnFinished = true;
Message.room.downloadFile(root.eventId, StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/" + root.eventId.replace(":", "_").replace("/", "_").replace("+", "_") + Message.room.fileNameToDownload(root.eventId));
}
}

View File

@@ -55,7 +55,7 @@ ColumnLayout {
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.text: text
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
onClicked: itineraryModel.sendToItinerary()
onClicked: root.itineraryModel.sendToItinerary()
visible: itinerary.count > 0
}
}

View File

@@ -46,24 +46,24 @@ Item {
Kirigami.ShadowedRectangle {
id: line
x: root.lineWidth / 2
y: isDeparture? parent.height-height:0
y: root.isDeparture ? parent.height-height:0
width: root.lineWidth
color: root.lineColor
corners {
topRightRadius: isDeparture ? Math.round(width / 2) : 0
topLeftRadius: isDeparture ? Math.round(width / 2) : 0
topRightRadius: root.isDeparture ? Math.round(width / 2) : 0
topLeftRadius: root.isDeparture ? Math.round(width / 2) : 0
bottomRightRadius: isArrival ? Math.round(width / 2) : 0
bottomLeftRadius: isArrival ? Math.round(width / 2) : 0
bottomRightRadius: root.isArrival ? Math.round(width / 2) : 0
bottomLeftRadius: root.isArrival ? Math.round(width / 2) : 0
}
height:
if (isArrival) {
Math.round(parent.height / 2) + root.lineWidth / 2
} else if (isDeparture) {
Math.round(parent.height / 2) + root.lineWidth / 2
if (root.isArrival) {
return Math.round(parent.height / 2) + root.lineWidth / 2
} else if (root.isDeparture) {
return Math.round(parent.height / 2) + root.lineWidth / 2
} else {
parent.height
return parent.height
}
}

View File

@@ -111,7 +111,7 @@ QQC2.Control {
Layout.fillWidth: true
Layout.maximumHeight: maximizeButton.checked ? -1 : root.defaultHeight - linkPreviewTitle.height - column.spacing
visible: linkPreviewTitle.height + column.spacing + font.pointSize <= root.defaultHeight || maximizeButton.checked
text: linkPreviewer.description
text: root.linkPreviewer.description
wrapMode: Text.Wrap
elide: Text.ElideRight
}

View File

@@ -79,7 +79,7 @@ ColumnLayout {
}
Connections {
target: mapView.map
function onCopyrightLinkActivated() {
function onCopyrightLinkActivated(link: string) {
Qt.openUrlExternally(link);
}
}