Skip to content

Commit 00df30d

Browse files
committed
QML: Always use named import for Fluid modules
For example 'import Fluid.Controls 1.0 as FluidControls' rather than 'import FluidControls 1.0'. We had a mix of both styles. Also remove an unused Fluid.Effects import.
1 parent b9f2164 commit 00df30d

File tree

4 files changed

+31
-32
lines changed

4 files changed

+31
-32
lines changed

DownloadInfo.qml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import QtQuick 2.0
1919
import QtQuick.Controls 2.1
2020
import QtQuick.Controls.Material 2.0
21-
import Fluid.Controls 1.0
22-
import Fluid.Material 1.0
21+
import Fluid.Controls 1.0 as FluidControls
22+
import Fluid.Material 1.0 as FluidMaterial
2323
import QmlDownloader 1.0
2424
import "utils.js" as Utils
2525

@@ -33,7 +33,7 @@ Item {
3333
bottomMargin: 60
3434
}
3535

36-
Card {
36+
FluidControls.Card {
3737
anchors {
3838
right: parent.right
3939
}
@@ -50,7 +50,7 @@ Item {
5050
width: parent.width
5151
height: parent.height
5252

53-
BodyLabel {
53+
FluidControls.BodyLabel {
5454
id: instruction
5555

5656
anchors {
@@ -85,78 +85,78 @@ Item {
8585

8686
visible: false
8787

88-
BodyLabel {
88+
FluidControls.BodyLabel {
8989
width: 5
9090
}
9191

92-
BodyLabel {
92+
FluidControls.BodyLabel {
9393
id: completedDownload
9494
text: Utils.humanSize(downloader.completedSize)
9595
font.pixelSize: 17
9696
}
9797

98-
BodyLabel {
98+
FluidControls.BodyLabel {
9999
text: " / "
100100
font.pixelSize: 17
101101
}
102102

103-
BodyLabel {
103+
FluidControls.BodyLabel {
104104
id: totalDownload
105105
text: Utils.humanSize(downloader.totalSize)
106106
font.pixelSize: 17
107107
}
108108

109-
BodyLabel {
109+
FluidControls.BodyLabel {
110110
width: 20
111111
}
112112

113-
BodyLabel {
113+
FluidControls.BodyLabel {
114114
id: eta
115115
text: Utils.humanTime(downloader.eta)
116116
font.pixelSize: 17
117117
}
118118

119-
BodyLabel {
119+
FluidControls.BodyLabel {
120120
width: 20
121121
}
122122

123-
BodyLabel {
123+
FluidControls.BodyLabel {
124124
text: "DL: "
125125
font.pixelSize: 17
126126
}
127127

128-
BodyLabel {
128+
FluidControls.BodyLabel {
129129
id: downloadSpeed
130130
text: Utils.humanSize(downloader.downloadSpeed)
131131
font.pixelSize: 17
132132
}
133133

134-
BodyLabel {
134+
FluidControls.BodyLabel {
135135
width: 20
136136
text: "/s"
137137
font.pixelSize: 17
138138
}
139139

140-
BodyLabel {
140+
FluidControls.BodyLabel {
141141
text: "UL: "
142142
font.pixelSize: 17
143143
}
144144

145-
BodyLabel {
145+
FluidControls.BodyLabel {
146146
id: uploadSpeed
147147
text: Utils.humanSize(downloader.uploadSpeed)
148148
font.pixelSize: 17
149149
}
150150

151-
BodyLabel {
151+
FluidControls.BodyLabel {
152152
text: "/s"
153153
font.pixelSize: 17
154154
}
155155
}
156156
}
157157
}
158158

159-
ActionButton {
159+
FluidMaterial.ActionButton {
160160
id: downloadAction
161161

162162
anchors {

News.qml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import QtQuick 2.0
1919
import QtQuick.Controls 2.1
2020
import QtQuick.Controls.Material 2.0
21-
import Fluid.Controls 1.0
22-
import Fluid.Material 1.0
21+
import Fluid.Controls 1.0 as FluidControls
22+
import Fluid.Material 1.0 as FluidMaterial
2323

2424
Item {
2525
width: parent.width
@@ -142,7 +142,7 @@ Item {
142142
}
143143
}
144144

145-
ActionButton {
145+
FluidMaterial.ActionButton {
146146
id: leftButton
147147

148148
anchors.left: parent.left
@@ -157,7 +157,7 @@ Item {
157157
opacity: enabled ? 1 : 0.38
158158
}
159159

160-
ActionButton {
160+
FluidMaterial.ActionButton {
161161
id: rightButton
162162

163163
anchors.right: parent.right

NewsCard.qml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
import QtQuick 2.0
1919
import QtQuick.Controls 2.0
2020
import QtQuick.Controls.Material 2.0
21-
import Fluid.Controls 1.0
22-
import Fluid.Effects 1.0
21+
import Fluid.Controls 1.0 as FluidControls
2322
import QtQuick.Layouts 1.3
2423

2524
Flickable {
@@ -111,7 +110,7 @@ Flickable {
111110
}
112111
}
113112

114-
Card {
113+
FluidControls.Card {
115114
anchors {
116115
right: parent.right
117116
top: parent.top
@@ -141,9 +140,9 @@ Flickable {
141140

142141
width: parent.width
143142
height: parent.height
144-
spacing: Units.smallSpacing * 2
143+
spacing: FluidControls.Units.smallSpacing * 2
145144

146-
TitleLabel {
145+
FluidControls.TitleLabel {
147146
id: title
148147

149148
width: parent.width
@@ -156,7 +155,7 @@ Flickable {
156155
font.bold: true
157156
}
158157

159-
BodyLabel {
158+
FluidControls.BodyLabel {
160159
id: summary
161160

162161
width: parent.width
@@ -189,9 +188,9 @@ Flickable {
189188

190189
width: parent.width
191190
height: parent.height
192-
spacing: Units.smallSpacing * 2
191+
spacing: FluidControls.Units.smallSpacing * 2
193192

194-
BodyLabel {
193+
FluidControls.BodyLabel {
195194
id: link
196195

197196
width: parent.width

splash.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import QtQuick 2.0
1919
import QtQuick.Controls 2.0
2020
import QtQuick.Controls.Material 2.0
2121
import Fluid.Controls 1.0 as FluidControls
22-
import Fluid.Material 1.0
22+
import Fluid.Material 1.0 as FluidMaterial
2323

2424
ApplicationWindow {
2525
visible: true
@@ -120,7 +120,7 @@ ApplicationWindow {
120120
font.pixelSize: 17
121121
}
122122

123-
ActionButton {
123+
FluidMaterial.ActionButton {
124124
id: settingsAction
125125

126126
anchors {

0 commit comments

Comments
 (0)