Skip to content

Commit 94bae76

Browse files
committed
Update qmlfmt to one that support 5.15 syntax.
This requires downloading some Qt 6.X runtime dependencies.
1 parent a8a2699 commit 94bae76

File tree

11 files changed

+52
-47
lines changed

11 files changed

+52
-47
lines changed

cookiecutter/init_repo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ git add .
1919

2020
git add -f AppImage_staging/.do_not_format
2121
git add -f dl_third_party/.do_not_format
22-
git add -f dl_third_party/Qt_desktop/5.15.0/clang_64/extrabin/macos/qmlfmt
23-
git add -f dl_third_party/Qt_desktop/5.15.0/gcc_64/extrabin/qmlfmt
22+
git add -f dl_third_party/Qt_desktop/6.2.2/clang_64/extrabin/macos/qmlfmt
23+
git add -f dl_third_party/Qt_desktop/6.2.2/gcc_64/extrabin/qmlfmt
2424
git add -f dl_third_party/Qt_desktop/5.15.0/ios/mkspecs/qconfig.pri
2525
git add -f dl_third_party/Qt_desktop/5.15.0/msvc2019_64/mkspecs/qconfig.pri
2626
git add -f dl_third_party/android_kits/commandlinetools-linux-6200805_latest.zip.sha256
-6.4 MB
Binary file not shown.
9.27 MB
Binary file not shown.

path_to_qmake.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ elif [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
2121
export WINALLQML="${DL_FOLDER}/Qt_desktop/5.15.0/msvc2019_64/qml"
2222
else
2323
if [[ -n ${MYAPP_TEMPLATE_QT6-} ]]; then
24-
export PATH="$DL_FOLDER/Qt_desktop/6.0.0/gcc_64/bin/:$PATH"
24+
export PATH="$DL_FOLDER/Qt_desktop/6.2.2/gcc_64/bin/:$PATH"
2525
else
2626
export PATH="$DL_FOLDER/Qt_desktop/5.15.0/gcc_64/bin/:$PATH"
2727
fi

src/app/imports.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
Declaration of QML Imports required by the app.
34
@@ -20,5 +21,4 @@ import QtQuick.Dialogs 1.3
2021
import QtQuick.Layouts 1.14
2122
import QtQuick.Window 2.1
2223

23-
QtObject {
24-
}
24+
QtObject {}

src/lib_app/qml/main.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ ApplicationWindow {
159159
Label {
160160
text: "SPACEBAR (on logo): rotates logo"
161161

162-
DebugRectangle {
163-
// To make the DebugRectangle show up in the GUI, change your environment:
162+
DebugRectangle {// To make the DebugRectangle show up in the GUI, change your environment:
164163
// export QT_QUICK_CONTROLS_MATERIAL_ACCENT="#0B610B"
165164
// (See comments in DebugRectangle.qml for more information.)
166165
}

src/lib_app/qml/viewColorPalette.qml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ ApplicationWindow {
2727

2828
// qmlfmt formats this map in a weird way, but the code is fine
2929
property var primarySwatches: {
30-
0: Theme.primaryDark,
31-
1: Theme.primaryMediumDark,
32-
2: Theme.primaryMedium,
33-
3: Theme.primaryMediumLight,
34-
4: Theme.primaryLight
30+
"0": Theme.primaryDark,
31+
"1": Theme.primaryMediumDark,
32+
"2": Theme.primaryMedium,
33+
"3": Theme.primaryMediumLight,
34+
"4": Theme.primaryLight
3535
}
3636

3737
Repeater {
@@ -50,11 +50,11 @@ ApplicationWindow {
5050

5151
// qmlfmt formats this map in a weird way, but the code is fine
5252
property var secondarySwatches: {
53-
0: Theme.secondaryDark,
54-
1: Theme.secondaryMediumDark,
55-
2: Theme.secondaryMedium,
56-
3: Theme.secondaryMediumLight,
57-
4: Theme.secondaryLight
53+
"0": Theme.secondaryDark,
54+
"1": Theme.secondaryMediumDark,
55+
"2": Theme.secondaryMedium,
56+
"3": Theme.secondaryMediumLight,
57+
"4": Theme.secondaryLight
5858
}
5959

6060
Repeater {
@@ -73,11 +73,11 @@ ApplicationWindow {
7373

7474
// qmlfmt formats this map in a weird way, but the code is fine
7575
property var neutralSwatches: {
76-
0: Theme.neutralDark,
77-
1: Theme.neutralMediumDark,
78-
2: Theme.neutralMedium,
79-
3: Theme.neutralMediumLight,
80-
4: Theme.neutralLight
76+
"0": Theme.neutralDark,
77+
"1": Theme.neutralMediumDark,
78+
"2": Theme.neutralMedium,
79+
"3": Theme.neutralMediumLight,
80+
"4": Theme.neutralLight
8181
}
8282

8383
Repeater {
@@ -96,11 +96,11 @@ ApplicationWindow {
9696

9797
// qmlfmt formats this map in a weird way, but the code is fine
9898
property var accentSwatches: {
99-
0: Theme.accentDark,
100-
1: Theme.accentMediumDark,
101-
2: Theme.accentMedium,
102-
3: Theme.accentMediumLight,
103-
4: Theme.accentLight
99+
"0": Theme.accentDark,
100+
"1": Theme.accentMediumDark,
101+
"2": Theme.accentMedium,
102+
"3": Theme.accentMediumLight,
103+
"4": Theme.accentLight
104104
}
105105

106106
Repeater {
@@ -119,11 +119,11 @@ ApplicationWindow {
119119

120120
// qmlfmt formats this map in a weird way, but the code is fine
121121
property var accentOtherSwatches: {
122-
0: Theme.accentOtherDark,
123-
1: Theme.accentOtherMediumDark,
124-
2: Theme.accentOtherMedium,
125-
3: Theme.accentOtherMediumLight,
126-
4: Theme.accentOtherLight
122+
"0": Theme.accentOtherDark,
123+
"1": Theme.accentOtherMediumDark,
124+
"2": Theme.accentOtherMedium,
125+
"3": Theme.accentOtherMediumLight,
126+
"4": Theme.accentOtherLight
127127
}
128128

129129
Repeater {

src/libstyles/imports/libstyles/Theme.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import QtQuick 2.12
55
// Software | Electrical | Mechanical | Product Design
66
pragma Singleton
77

8-
98
// If we need to expand this or make it configurable, then refer to:
109
// https://stackoverflow.com/questions/44389883/dynamically-change-qml-theme-at-runtime-on-mouseclick
1110
Item {

tools/ci/get_qt_libs.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ pip3 install --upgrade pip
2828
pip3 install setuptools
2929
pip3 install -r ${DIR}/for_pip/requirements.txt # install aqtinstall
3030

31-
if [ -d $DL_FOLDER/Qt_desktop/5.15.0/gcc_64/bin ]; then
32-
echo "no need to download qt5 for desktop"
31+
if [ -d $DL_FOLDER/Qt_desktop/6.2.2/gcc_64/bin ]; then
32+
echo "no need to download qt for desktop"
3333
else
3434

3535
if [[ -n ${MYAPP_TEMPLATE_QT6-} ]]; then
3636
# https://github.com/miurahr/aqtinstall/issues/126 "Installing smaller subset of the libraries"
37-
python3 -m aqt install-qt --base "${QTSIXMIRROR}" --outputdir $DL_FOLDER/Qt_desktop linux desktop 6.0.0 --archives \
37+
python3 -m aqt install-qt --base "${QTSIXMIRROR}" --outputdir $DL_FOLDER/Qt_desktop linux desktop 6.2.2 --archives \
3838
icu \
3939
qtbase \
4040
qtconnectivity \
@@ -45,12 +45,6 @@ else
4545
qtquickcontrols2 \
4646
qtsvg \
4747
qttools
48-
49-
# we still need qt5 in order to execute qmlfmt. (until we can recompile qmlfmt with qt6)
50-
# https://github.com/miurahr/aqtinstall/issues/126 "Installing smaller subset of the libraries"
51-
python3 -m aqt install-qt --base "${QTMIRROR}" --outputdir $DL_FOLDER/Qt_desktop linux desktop 5.15.0 --archives \
52-
icu \
53-
qtbase
5448
else
5549
# https://github.com/miurahr/aqtinstall/issues/126 "Installing smaller subset of the libraries"
5650
python3 -m aqt install-qt --base "${QTMIRROR}" --outputdir $DL_FOLDER/Qt_desktop linux desktop 5.15.0 --archives \
@@ -64,6 +58,13 @@ else
6458
qtquickcontrols2 \
6559
qtsvg \
6660
qttools
61+
62+
# we still need qt6 in order to execute qmlfmt.
63+
# https://github.com/miurahr/aqtinstall/issues/126 "Installing smaller subset of the libraries"
64+
python3 -m aqt install-qt --base "${QTMIRROR}" --outputdir $DL_FOLDER/Qt_desktop linux desktop 6.2.2 --archives \
65+
icu \
66+
qtbase \
67+
qt5compat
6768
fi
6869

6970
fi

tools/ci/get_qt_libs_mac.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ else
2929
qtsvg \
3030
qttools
3131

32+
bash -x $CUR_GIT_ROOT/tools/ci/install-qt.sh \
33+
--directory $DL_FOLDER/Qt_desktop \
34+
--version 6.2.2 \
35+
qtbase \
36+
qt5compat
37+
3238
fi
3339

3440
if [ -d $DL_FOLDER/Qt_desktop/5.15.0/ios/bin ]; then

0 commit comments

Comments
 (0)