Reorder QML files to follow coding conventions

https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
This commit is contained in:
miruka
2020-07-12 00:25:57 -04:00
parent 229fbee298
commit 3c7b78d4ca
131 changed files with 1022 additions and 1122 deletions

View File

@@ -8,7 +8,6 @@ import "../../../Base"
HColumnLayout {
id: transfer
property bool cancelPending: false
property int msLeft: model.time_left
@@ -18,7 +17,6 @@ HColumnLayout {
readonly property string status: model.status
readonly property bool paused: model.paused
function cancel() {
cancelPending = true
// Python will delete this model item on cancel
@@ -51,6 +49,15 @@ HColumnLayout {
HLabel {
id: statusLabel
property bool expand: status === "Error"
readonly property string fileName:
model.filepath.split("/").slice(-1)[0]
readonly property string filePath:
model.filepath.replace(/^file:\/\//, "")
elide: expand ? Text.ElideNone : Text.ElideRight
wrapMode: expand ? Text.Wrap : Text.NoWrap
@@ -92,16 +99,6 @@ HColumnLayout {
Layout.fillWidth: true
property bool expand: status === "Error"
readonly property string fileName:
model.filepath.split("/").slice(-1)[0]
readonly property string filePath:
model.filepath.replace(/^file:\/\//, "")
HoverHandler { id: statusLabelHover }
HToolTip {

View File

@@ -5,13 +5,6 @@ import "../../.."
import "../../../Base"
Rectangle {
implicitWidth: 800
implicitHeight: firstDelegate ? firstDelegate.height : 0
color: theme.chat.fileTransfer.background
opacity: implicitHeight ? 1 : 0
clip: true
property int delegateHeight: 0
readonly property var firstDelegate:
@@ -20,6 +13,12 @@ Rectangle {
readonly property alias transferCount: transferList.count
implicitWidth: 800
implicitHeight: firstDelegate ? firstDelegate.height : 0
color: theme.chat.fileTransfer.background
opacity: implicitHeight ? 1 : 0
clip: true
Behavior on implicitHeight { HNumberAnimation {} }
HListView {