Skip to content

Commit 0078d2c

Browse files
committed
Merge #77: build, doc: Ditch QtQuick.Controls 1
7dc95a0 doc: Drop unneeded runtime dependencies (Hennadii Stepanov) 48fb724 Revert "build, qml: Add qtquickcontrols module" (Hennadii Stepanov) 4734e5a qml: Replace QtQuick.Dialogs with QtQuick.Controls 2 Dialog (Hennadii Stepanov) Pull request description: On the main branch (da6ae1c) the QtQuick.Controls 1 are required only in the `initerrormessage.qml`, which is certainly unimportant for the UX. This PR suggests a new implementation of the `initerrormessage.qml` without dependencies on QtQuick.Controls 1. Closes #39. An alternative to #63. [![Windows](https://svgshare.com/i/ZhY.svg)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/Win64%20\[unit%20tests,%20no%20gui%20tests,%20no%20boost::process,%20no%20functional%20tests\]%20\[focal\]/insecure_win_gui.zip?branch=pull/77) [![macOS](https://svgshare.com/i/ZjP.svg)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macOS%2010.15%20\[gui,%20no%20tests\]%20\[focal\]/insecure_mac_gui.zip?branch=pull/77) ACKs for top commit: promag: Tested ACK 7dc95a0. Built depends aarch64-apple-darwin20.3.0 and checked that app loads and works as expected. Tree-SHA512: 6dc572f81d489f74310a335009d51f7c9fea778bcb7c3ba364fffab391176fa55f188fbce5888502faae47087e5620c0e72bceb9319cbe06bf9cc6c68a28fcc5
2 parents b72a31e + 7dc95a0 commit 0078d2c

File tree

6 files changed

+19
-29
lines changed

6 files changed

+19
-29
lines changed

build-aux/m4/bitcoin_qt.m4

-8
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,9 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
140140
if test -d "$qt_plugin_path/platforms/android"; then
141141
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL"
142142
fi
143-
if test -d "$qt_plugin_path/../qml/QtQuick/Controls"; then
144-
QT_LIBS="$QT_LIBS -L$qt_plugin_path/../qml/QtQuick/Controls"
145-
fi
146143
if test -d "$qt_plugin_path/../qml/QtQuick/Controls.2"; then
147144
QT_LIBS="$QT_LIBS -L$qt_plugin_path/../qml/QtQuick/Controls.2"
148145
fi
149-
if test -d "$qt_plugin_path/../qml/QtQuick/Dialogs"; then
150-
QT_LIBS="$QT_LIBS -L$qt_plugin_path/../qml/QtQuick/Dialogs"
151-
fi
152146
if test -d "$qt_plugin_path/../qml/QtQuick/Layouts"; then
153147
QT_LIBS="$QT_LIBS -L$qt_plugin_path/../qml/QtQuick/Layouts"
154148
fi
@@ -193,10 +187,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
193187
AC_DEFINE(QT_QPA_PLATFORM_ANDROID, 1, [Define this symbol if the qt platform is android])
194188
fi
195189
if test "x$use_qml" != xno; then
196-
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuick2DialogsPlugin], [-ldialogplugin])
197190
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuick2Plugin], [-lqtquick2plugin])
198191
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuick2WindowPlugin], [-lwindowplugin])
199-
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuickControls1Plugin], [-lqtquickcontrolsplugin])
200192
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuickControls2Plugin], [-lqtquickcontrols2plugin])
201193
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuickLayoutsPlugin], [-lqquicklayoutsplugin])
202194
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuickTemplates2Plugin], [-lqtquicktemplates2plugin])

depends/packages/qt.mk

-9
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ $(package)_qtdeclarative_sha256_hash = 1267e029abc8424424c419bc1681db069ec76e512
2121
$(package)_qtgraphicaleffects_file_name = qtgraphicaleffects-$($(package)_suffix)
2222
$(package)_qtgraphicaleffects_sha256_hash = d84490104965fb5e831b3d1b9ce72786071e9bdd8080deb07ee1ed189f3eda0a
2323

24-
$(package)_qtquickcontrols_file_name = qtquickcontrols-$($(package)_suffix)
25-
$(package)_qtquickcontrols_sha256_hash = cd6b81fda691ab15d25ac60b6a3437667a892e401438e07a64c88cadd3481389
26-
2724
$(package)_qtquickcontrols2_file_name = qtquickcontrols2-$($(package)_suffix)
2825
$(package)_qtquickcontrols2_sha256_hash = c05585f42db7c17fb7f344f8a9cabd38a4e9dff17b3d04ec35e8edab7ead355c
2926

@@ -35,7 +32,6 @@ $(package)_qttools_sha256_hash=98b2aaca230458f65996f3534fd471d2ffd038dd58ac997c0
3532

3633
$(package)_extra_sources += $($(package)_qtdeclarative_file_name)
3734
$(package)_extra_sources += $($(package)_qtgraphicaleffects_file_name)
38-
$(package)_extra_sources += $($(package)_qtquickcontrols_file_name)
3935
$(package)_extra_sources += $($(package)_qtquickcontrols2_file_name)
4036
$(package)_extra_sources += $($(package)_qttranslations_file_name)
4137
$(package)_extra_sources += $($(package)_qttools_file_name)
@@ -201,7 +197,6 @@ define $(package)_fetch_cmds
201197
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
202198
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtdeclarative_file_name),$($(package)_qtdeclarative_file_name),$($(package)_qtdeclarative_sha256_hash)) && \
203199
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtgraphicaleffects_file_name),$($(package)_qtgraphicaleffects_file_name),$($(package)_qtgraphicaleffects_sha256_hash)) && \
204-
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtquickcontrols_file_name),$($(package)_qtquickcontrols_file_name),$($(package)_qtquickcontrols_sha256_hash)) && \
205200
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtquickcontrols2_file_name),$($(package)_qtquickcontrols2_file_name),$($(package)_qtquickcontrols2_sha256_hash)) && \
206201
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
207202
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
@@ -212,7 +207,6 @@ define $(package)_extract_cmds
212207
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
213208
echo "$($(package)_qtdeclarative_sha256_hash) $($(package)_source_dir)/$($(package)_qtdeclarative_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
214209
echo "$($(package)_qtgraphicaleffects_sha256_hash) $($(package)_source_dir)/$($(package)_qtgraphicaleffects_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
215-
echo "$($(package)_qtquickcontrols_sha256_hash) $($(package)_source_dir)/$($(package)_qtquickcontrols_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
216210
echo "$($(package)_qtquickcontrols2_sha256_hash) $($(package)_source_dir)/$($(package)_qtquickcontrols2_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
217211
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
218212
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
@@ -223,8 +217,6 @@ define $(package)_extract_cmds
223217
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtdeclarative_file_name) -C qtdeclarative && \
224218
mkdir qtgraphicaleffects && \
225219
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtgraphicaleffects_file_name) -C qtgraphicaleffects && \
226-
mkdir qtquickcontrols && \
227-
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtquickcontrols_file_name) -C qtquickcontrols && \
228220
mkdir qtquickcontrols2 && \
229221
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtquickcontrols2_file_name) -C qtquickcontrols2 && \
230222
mkdir qttranslations && \
@@ -297,7 +289,6 @@ define $(package)_stage_cmds
297289
export PATH && \
298290
$(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \
299291
$(MAKE) -C qtdeclarative INSTALL_ROOT=$($(package)_staging_dir) sub-src-install_subtargets && \
300-
$(MAKE) -C qtquickcontrols INSTALL_ROOT=$($(package)_staging_dir) install && \
301292
$(MAKE) -C qtquickcontrols2 INSTALL_ROOT=$($(package)_staging_dir) sub-src-install_subtargets && \
302293
$(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \
303294
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets

depends/patches/qt/qt.pro

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ CONFIG += $$prl
88
cache(CONFIG, add stash, prl)
99

1010
TEMPLATE = subdirs
11-
SUBDIRS = qtbase qtdeclarative qtgraphicaleffects qtquickcontrols qtquickcontrols2 qttools qttranslations
11+
SUBDIRS = qtbase qtdeclarative qtgraphicaleffects qtquickcontrols2 qttools qttranslations
1212

1313
qtdeclarative.depends = qtbase
1414
qtgraphicaleffects.depends = qtdeclarative
15-
qtquickcontrols.depends = qtdeclarative
1615
qtquickcontrols2.depends = qtgraphicaleffects
1716
qttools.depends = qtbase
1817
qttranslations.depends = qttools

src/qml/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The following runtime dependencies are also required for dynamic builds;
5555
they are not needed for static builds:
5656

5757
```
58-
sudo apt install qml-module-qtquick2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-window2
58+
sudo apt install qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-window2
5959
```
6060

6161
No additional dependencies, besides those in [build-osx.md](../../doc/build-osx.md), are needed for macOS.

src/qml/bitcoin.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ QT_END_NAMESPACE
4242

4343
#if defined(QT_STATICPLUGIN)
4444
#include <QtPlugin>
45-
Q_IMPORT_PLUGIN(QtQuick2DialogsPlugin);
4645
Q_IMPORT_PLUGIN(QtQuick2Plugin);
4746
Q_IMPORT_PLUGIN(QtQuick2WindowPlugin);
48-
Q_IMPORT_PLUGIN(QtQuickControls1Plugin);
4947
Q_IMPORT_PLUGIN(QtQuickControls2Plugin);
5048
Q_IMPORT_PLUGIN(QtQuickLayoutsPlugin);
5149
Q_IMPORT_PLUGIN(QtQuickTemplates2Plugin);

src/qml/pages/initerrormessage.qml

+17-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
import QtQuick 2.12
6-
import QtQuick.Dialogs 1.3
6+
import QtQuick.Controls 2.12
77

8-
MessageDialog {
9-
id: messageDialog
8+
ApplicationWindow {
109
title: "Bitcoin Core TnG"
11-
icon: StandardIcon.Critical
12-
text: message
13-
onAccepted: Qt.quit()
14-
Component.onCompleted: visible = true
10+
visible: true
11+
minimumWidth: 500
12+
minimumHeight: 200
13+
14+
Dialog {
15+
anchors.centerIn: parent
16+
title: qsTr("Error")
17+
contentItem:
18+
Label {
19+
text: message
20+
}
21+
visible: true
22+
standardButtons: Dialog.Ok
23+
onAccepted: Qt.quit()
24+
}
1525
}

0 commit comments

Comments
 (0)