Test compilation fails on latest version 0.25.8 (patch)
Hi,
I observed this compilation failure while updating the package in debian
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -DQUICK_TEST_SOURCE_DIR='"/build/reproducible-path/riseup-vpn-0.25.8+ds2/_build/src/0xacab.o
rg/leap/bitmask-vpn"' -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_QML_LIB -DQT_QMLINTEGRATION_LIB -DQT_NETWORK_LIB -DQT_QMLTEST_LIB -DQT_TESTLIB_LIB
-DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/build/reproducible-path/riseup-vpn-0.25.8+ds2/_build/src/0xacab.org/leap/bitmask-vpn/tests"' -I
../../bitmask-vpn -I. -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/
QtQml -I/usr/include/x86_64-linux-gnu/qt6/QtQmlIntegration -I/usr/include/x86_64-linux-gnu/qt6/QtNetwork -I/usr/include/x86_64-linux-gnu
/qt6/QtQuickTest -I/usr/include/x86_64-linux-gnu/qt6/QtTest -I/usr/include/x86_64-linux-gnu/qt6/QtCore -I. -I/usr/lib/x86_64-linux-gnu/q
t6/mkspecs/linux-g++ -o build/.obj/handlers.o ../gui/handlers.cpp
../gui/handlers.cpp:8:10: fatal error: QtConcurrent: No such file or directory
8 | #include <QtConcurrent>
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile.test:552: build/.obj/handlers.o] Error 1
make[2]: Leaving directory '/build/reproducible-path/riseup-vpn-0.25.8+ds2/_build/src/0xacab.org/leap/bitmask-vpn/tests'
This is because test.pro
includes gui/handlers.cpp
and this needs QtConcurrent header which is not defined properly in the .pro file.
Adding this patch fixed the problem for me. If this makes sense to you, please consider to commit this fix
--- a/test.pro
+++ b/test.pro
@@ -1,6 +1,8 @@
TEMPLATE = app
TARGET = test_ui
CONFIG += warn_on qmltestcase
+DEFINES += QT_CONCURRENT_LIB
+QT += concurrent
SOURCES += \
tests/test_ui.cpp \
/cc: @jkito