From f64ccc5f535857fd5945f4029b41d2c099e96a79 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 25 Mar 2021 21:24:52 +0100 Subject: [PATCH 1/3] Make find_package in configure.cmake a hard error qt3d/9a473a3c9b246f4895ae73d7060745b8b199a6c5 introduced a find_package call in a configure.cmake file, very subtly breaking top-level builds with configure. The find_package call results in errors of the cmake call that runs QtProcessConfigureArgs.cmake (see bug report for details). Create a find_package stub that errors out with a helpful message. Task-number: QTBUG-92163 Change-Id: I06db0bf219b965e93b78c690e9f7ad868196ddb9 Reviewed-by: Alexandru Croitor --- cmake/QtProcessConfigureArgs.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index cecf7a681f8..cab1db7f04e 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -114,6 +114,11 @@ function(qt_feature feature) set_property(GLOBAL PROPERTY COMMANDLINE_FEATURE_SECTION_${feature} "${arg_SECTION}") endfunction() +function(find_package) + message(FATAL_ERROR "find_package must not be used directly in configure.cmake. " + "Use qt_find_package or guard the call with an if(NOT QT_CONFIGURE_RUNNING) block.") +endfunction() + macro(defstub name) function(${name}) endfunction() From f584356eefc7723fb6326b47e41d72dd2217b6ed Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 31 Mar 2021 11:11:31 +0200 Subject: [PATCH 2/3] Fix DESTDIR support on Windows for versioned hard-links On Windows, we need to strip drive letter and colon before prepending DESTDIR when creating our versioned hard links. This fixes CI submodule updates. Change-Id: I41bc5f27b714ef74d3fadc4a0fb16c3d8b20da1a Reviewed-by: Alexandru Croitor (cherry picked from commit 88886f193230292f38987ac4f1503753f50786f0) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtInstallHelpers.cmake | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cmake/QtInstallHelpers.cmake b/cmake/QtInstallHelpers.cmake index 1f1fb84634c..30962b84e2c 100644 --- a/cmake/QtInstallHelpers.cmake +++ b/cmake/QtInstallHelpers.cmake @@ -136,13 +136,25 @@ function(qt_internal_install_versioned_link install_dir target) return() endif() - qt_path_join(install_base_file_path "$ENV\{DESTDIR}$\{CMAKE_INSTALL_PREFIX}" + qt_path_join(install_base_file_path "$\{qt_full_install_prefix}" "${install_dir}" "$") set(original "${install_base_file_path}$") set(linkname "${install_base_file_path}${PROJECT_VERSION_MAJOR}$") - set(code - "message(STATUS \"Creating hard link ${original} -> ${linkname}\")" - "file(CREATE_LINK \"${original}\" \"${linkname}\" COPY_ON_ERROR)") + set(code "set(qt_full_install_prefix \"$\{CMAKE_INSTALL_PREFIX}\")" + " if(NOT \"$ENV\{DESTDIR}\" STREQUAL \"\")" + ) + if(CMAKE_HOST_WIN32) + list(APPEND code + " if(qt_full_install_prefix MATCHES \"^[a-zA-Z]:\")" + " string(SUBSTRING \"$\{qt_full_install_prefix}\" 2 -1 qt_full_install_prefix)" + " endif()" + ) + endif() + list(APPEND code + " string(PREPEND qt_full_install_prefix \"$ENV\{DESTDIR}\")" + " endif()" + " message(STATUS \"Creating hard link ${original} -> ${linkname}\")" + " file(CREATE_LINK \"${original}\" \"${linkname}\" COPY_ON_ERROR)") if(QT_GENERATOR_IS_MULTI_CONFIG) # Wrap the code in a configuration check, From 15b0809f069ef29320d13936a1aed7ed422a8b43 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 29 Mar 2021 14:04:08 +0200 Subject: [PATCH 3/3] Remove QEXPECT_FAIL for tests that pass now on Android Fixes: QTBUG-69214 Fixes: QTBUG-69218 Fixes: QTBUG-69220 Change-Id: I8b780db8d9dad1a877bc16e802e6ae92de0c8f23 Reviewed-by: Qt CI Bot Reviewed-by: Assam Boudjelthia --- tests/auto/gui/text/qfont/tst_qfont.cpp | 3 --- tests/auto/gui/text/qstatictext/tst_qstatictext.cpp | 6 ------ 2 files changed, 9 deletions(-) diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index aa9f8a8ce48..fb71ff7b38e 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -347,9 +347,6 @@ void tst_QFont::resetFont() QCOMPARE(firstChild.font().resolveMask(), QFont::SizeResolved); QCOMPARE(secondChild.font().resolveMask(), QFont::SizeResolved); -#ifdef Q_OS_ANDROID - QEXPECT_FAIL("", "QTBUG-69214", Continue); -#endif QCOMPARE(firstChild.font().pointSize(), parent.font().pointSize()); QCOMPARE(secondChild.font().pointSize(), parent.font().pointSize()); QVERIFY(parent.font().resolveMask() != 0); diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp index fe7396ae4cc..b55257533a0 100644 --- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp @@ -461,9 +461,6 @@ void tst_QStaticText::rotatedPainter() QVERIFY(imageDrawText.toImage() != m_whiteSquare); -#ifdef Q_OS_ANDROID - QEXPECT_FAIL("", "QTBUG-69218", Continue); -#endif if (!supportsTransformations()) QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort); QCOMPARE(imageDrawStaticText, imageDrawText); @@ -621,9 +618,6 @@ void tst_QStaticText::transformationChanged() QVERIFY(imageDrawText.toImage() != m_whiteSquare); -#ifdef Q_OS_ANDROID - QEXPECT_FAIL("", "QTBUG-69220", Continue); -#endif if (!supportsTransformations()) QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort); QCOMPARE(imageDrawStaticText, imageDrawText);