Fix various qmllint warnings
This commit is contained in:
@@ -2,14 +2,12 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as QQC2
|
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.kirigamiaddons.delegates as Delegates
|
import org.kde.kirigamiaddons.delegates as Delegates
|
||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
import org.kde.neochat.chatbar
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A component to show a reply button for threads in a message bubble.
|
* @brief A component to show a reply button for threads in a message bubble.
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
// SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
|
// SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
|
import QtCore
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as QQC2
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
@@ -157,7 +159,7 @@ Item {
|
|||||||
if (_private.downloaded) {
|
if (_private.downloaded) {
|
||||||
openSavedFile();
|
openSavedFile();
|
||||||
} else {
|
} 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));
|
Message.room.downloadFile(root.eventId, StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/" + root.eventId.replace(":", "_").replace("/", "_").replace("+", "_") + Message.room.fileNameToDownload(root.eventId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ ColumnLayout {
|
|||||||
QQC2.ToolTip.visible: hovered
|
QQC2.ToolTip.visible: hovered
|
||||||
QQC2.ToolTip.text: text
|
QQC2.ToolTip.text: text
|
||||||
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||||
onClicked: itineraryModel.sendToItinerary()
|
onClicked: root.itineraryModel.sendToItinerary()
|
||||||
visible: itinerary.count > 0
|
visible: itinerary.count > 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,24 +46,24 @@ Item {
|
|||||||
Kirigami.ShadowedRectangle {
|
Kirigami.ShadowedRectangle {
|
||||||
id: line
|
id: line
|
||||||
x: root.lineWidth / 2
|
x: root.lineWidth / 2
|
||||||
y: isDeparture? parent.height-height:0
|
y: root.isDeparture ? parent.height-height:0
|
||||||
width: root.lineWidth
|
width: root.lineWidth
|
||||||
color: root.lineColor
|
color: root.lineColor
|
||||||
|
|
||||||
corners {
|
corners {
|
||||||
topRightRadius: isDeparture ? Math.round(width / 2) : 0
|
topRightRadius: root.isDeparture ? Math.round(width / 2) : 0
|
||||||
topLeftRadius: isDeparture ? Math.round(width / 2) : 0
|
topLeftRadius: root.isDeparture ? Math.round(width / 2) : 0
|
||||||
|
|
||||||
bottomRightRadius: isArrival ? Math.round(width / 2) : 0
|
bottomRightRadius: root.isArrival ? Math.round(width / 2) : 0
|
||||||
bottomLeftRadius: isArrival ? Math.round(width / 2) : 0
|
bottomLeftRadius: root.isArrival ? Math.round(width / 2) : 0
|
||||||
}
|
}
|
||||||
height:
|
height:
|
||||||
if (isArrival) {
|
if (root.isArrival) {
|
||||||
Math.round(parent.height / 2) + root.lineWidth / 2
|
return Math.round(parent.height / 2) + root.lineWidth / 2
|
||||||
} else if (isDeparture) {
|
} else if (root.isDeparture) {
|
||||||
Math.round(parent.height / 2) + root.lineWidth / 2
|
return Math.round(parent.height / 2) + root.lineWidth / 2
|
||||||
} else {
|
} else {
|
||||||
parent.height
|
return parent.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ QQC2.Control {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: maximizeButton.checked ? -1 : root.defaultHeight - linkPreviewTitle.height - column.spacing
|
Layout.maximumHeight: maximizeButton.checked ? -1 : root.defaultHeight - linkPreviewTitle.height - column.spacing
|
||||||
visible: linkPreviewTitle.height + column.spacing + font.pointSize <= root.defaultHeight || maximizeButton.checked
|
visible: linkPreviewTitle.height + column.spacing + font.pointSize <= root.defaultHeight || maximizeButton.checked
|
||||||
text: linkPreviewer.description
|
text: root.linkPreviewer.description
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: mapView.map
|
target: mapView.map
|
||||||
function onCopyrightLinkActivated() {
|
function onCopyrightLinkActivated(link: string) {
|
||||||
Qt.openUrlExternally(link);
|
Qt.openUrlExternally(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user