From a6fd8d2f60bdd46d1cbdfdb5598fac4f9f651e49 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 30 May 2023 16:35:41 +0200 Subject: [PATCH 1/9] Update qbs submodule to HEAD of 2.0 branch Change-Id: I962397da7fa19d4ba0948550a0cf35c9278637c8 Reviewed-by: Christian Stenger Reviewed-by: --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index eaeba4a45e7..1a575d27436 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit eaeba4a45e7d95b7bb3f4fe907e862d947faf092 +Subproject commit 1a575d27436ef71e999c709b11e6d7a24e57916e From 7a37a9c76c7a88364d37cf9ddd59e6b1194d42cc Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 30 May 2023 16:18:06 +0200 Subject: [PATCH 2/9] ProjectExplorer: Consider the case of no active target ... in BuildManager. Fixes: QTCREATORBUG-29207 Change-Id: Icbcdc957cd9105f7c4b9bc27fc9feb34dd547955 Reviewed-by: Reviewed-by: Christian Stenger Reviewed-by: Qt CI Bot --- src/plugins/projectexplorer/buildmanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index 57bfde6e46a..1f0e0fb1483 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -61,7 +61,9 @@ static const QList targetsForSelection(const Project *project, { if (targetSelection == ConfigSelection::All) return project->targets(); - return {project->activeTarget()}; + if (project->activeTarget()) + return {project->activeTarget()}; + return {}; } static const QList buildConfigsForSelection(const Target *target, From 65a7d3a200279518217bd61b723708f389bad3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20Kr=C3=B8vel?= Date: Tue, 4 Apr 2023 13:10:32 +0200 Subject: [PATCH 3/9] McuSupport: Update test data Change-Id: I56a82274bd34ac9a34a785c43cc066ca6598fbaa Reviewed-by: Eike Ziller Reviewed-by: Reviewed-by: Christian Stenger Reviewed-by: Yasser Grimes --- src/plugins/mcusupport/test/unittest.cpp | 58 +++++++++++++++++++++--- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/src/plugins/mcusupport/test/unittest.cpp b/src/plugins/mcusupport/test/unittest.cpp index b9fc108ef76..0804a1cbf05 100644 --- a/src/plugins/mcusupport/test/unittest.cpp +++ b/src/plugins/mcusupport/test/unittest.cpp @@ -146,9 +146,9 @@ const QString stmCubeProgrammerDetectionPath{HostOsInfo::isWindowsHost() ? QString("bin/STM32_Programmer_CLI.exe") : QString("bin/STM32_Programmer.sh")}; -const char renesasProgrammerSetting[]{"FlashProgrammerPath"}; +const char renesasProgrammerSetting[]{"RenesasFlashProgrammer"}; const char renesasProgrammerCmakeVar[]{"RENESAS_FLASH_PROGRAMMER_PATH"}; -const QString renesasProgrammerEnvVar{"RenesasFlashProgrammer_PATH"}; +const char renesasProgrammerEnvVar[]{"RENESAS_FLASH_PROGRAMMER_PATH"}; const char renesasProgrammerLabel[]{"Renesas Flash Programmer"}; const QString renesasProgrammerDetectionPath{HostOsInfo::withExecutableSuffix("rfp-cli")}; @@ -1543,9 +1543,9 @@ void McuSupportTest::test_legacy_createThirdPartyPackage_data() << PackageCreator{[this]() { return Legacy::createRenesasProgrammerPackage(settingsMockPtr); }} - << ghs_rh850_d1m1a_baremetal_json << defaultToolPath << defaultToolPath - << renesasProgrammerSetting << renesasProgrammerCmakeVar << renesasProgrammerEnvVar - << renesasProgrammerLabel << renesasProgrammerDetectionPath; + << ghs_rh850_d1m1a_baremetal_json << empty << empty << renesasProgrammerSetting + << renesasProgrammerCmakeVar << renesasProgrammerEnvVar << renesasProgrammerLabel + << renesasProgrammerDetectionPath; } void McuSupportTest::test_legacy_createThirdPartyPackage() @@ -1578,7 +1578,53 @@ void McuSupportTest::test_legacy_createThirdPartyPackage() void McuSupportTest::test_createThirdPartyPackage_data() { - test_legacy_createThirdPartyPackage_data(); + QTest::addColumn("json"); + QTest::addColumn("path"); + QTest::addColumn("defaultPath"); + QTest::addColumn("setting"); + QTest::addColumn("cmakeVar"); + QTest::addColumn("envVar"); + QTest::addColumn("label"); + QTest::addColumn("detectionPath"); + + // Sometimes the jsons have different values than the legacy packages + // Enter the expected values from the jsons here when they diverge from legacy values + QString programFiles = qtcEnvironmentVariable("Env:PROGRAMFILES(x86)"); + const QString renesasProgrammerDefaultPath = { + HostOsInfo::isWindowsHost() + ? QString("%1/Renesas Electronics/Programming Tools/Renesas " + "Flash Programmer V3.09").arg(programFiles) + : QString("")}; + + QTest::newRow("armgcc_mimxrt1050_evk_freertos_json mcuXpresso") + << armgcc_mimxrt1050_evk_freertos_json << xpressoIdePath << xpressoIdePath + << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel + << xpressoIdeDetectionPath; + + QTest::newRow("armgcc_mimxrt1064_evk_freertos_json mcuXpresso") + << armgcc_mimxrt1064_evk_freertos_json << xpressoIdePath << xpressoIdePath + << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel + << xpressoIdeDetectionPath; + + QTest::newRow("armgcc_mimxrt1170_evk_freertos_json mcuXpresso") + << armgcc_mimxrt1170_evk_freertos_json << xpressoIdePath << xpressoIdePath + << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel + << xpressoIdeDetectionPath; + + QTest::newRow("armgcc_stm32h750b_discovery_baremetal_json stmCubeProgrammer") + << armgcc_stm32h750b_discovery_baremetal_json << stmCubeProgrammerPath + << stmCubeProgrammerPath << stmCubeProgrammerSetting << empty << empty + << stmCubeProgrammerLabel << stmCubeProgrammerDetectionPath; + + QTest::newRow("armgcc_stm32f769i_discovery_freertos_json stmCubeProgrammer") + << armgcc_stm32f769i_discovery_freertos_json << stmCubeProgrammerPath + << stmCubeProgrammerPath << stmCubeProgrammerSetting << empty << empty + << stmCubeProgrammerLabel << stmCubeProgrammerDetectionPath; + + QTest::newRow("ghs_rh850_d1m1a_baremetal_json renesasProgrammer") + << ghs_rh850_d1m1a_baremetal_json << renesasProgrammerDefaultPath << empty + << "FlashProgrammerPath" << renesasProgrammerCmakeVar << "RenesasFlashProgrammer_PATH" + << renesasProgrammerLabel << renesasProgrammerDetectionPath; } void McuSupportTest::test_createThirdPartyPackage() From c2d008a3228d2862de692a16a5274b0472b60451 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 2 Jun 2023 09:59:27 +0200 Subject: [PATCH 4/9] ClangFormat: use fromUserInput to prevent asserts Change-Id: I9f33c8e8ef276d771d727a6678cf72e80e7d46d9 Reviewed-by: Qt CI Bot Reviewed-by: Qt CI Patch Build Bot Reviewed-by: Christian Kandeler --- src/plugins/clangformat/llvmfilesystem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/clangformat/llvmfilesystem.h b/src/plugins/clangformat/llvmfilesystem.h index 675791f349e..fface01fc08 100644 --- a/src/plugins/clangformat/llvmfilesystem.h +++ b/src/plugins/clangformat/llvmfilesystem.h @@ -50,7 +50,7 @@ public: Q_UNUSED(RequiresNullTerminator); Q_UNUSED(IsVolatile); - const FilePath path = FilePath::fromString(QString::fromStdString(Name.str())); + const FilePath path = FilePath::fromUserInput(QString::fromStdString(Name.str())); const expected_str contents = path.fileContents(FileSize, 0); QTC_ASSERT_EXPECTED(contents, return std::error_code()); @@ -72,7 +72,7 @@ public: ErrorOr status(const Twine &Path) override { - const Utils::FilePath path = FilePath::fromString(QString::fromStdString(Path.str())); + const FilePath path = FilePath::fromUserInput(QString::fromStdString(Path.str())); QFileInfo fInfo(QString::fromStdString(Path.str())); if (!fInfo.exists()) From f939f19b9dfc524fd99ea606955f05115eed158f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Wed, 7 Jun 2023 22:55:12 +0200 Subject: [PATCH 5/9] SquishTests: Update tst_opencreator_qbs for Python3 Change-Id: If0e03204c49e80eb2bfca6e0d14413aad9d790f4 Reviewed-by: Christian Stenger Reviewed-by: --- tests/system/suite_general/tst_opencreator_qbs/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_general/tst_opencreator_qbs/test.py b/tests/system/suite_general/tst_opencreator_qbs/test.py index 555e1437582..88c39f57533 100644 --- a/tests/system/suite_general/tst_opencreator_qbs/test.py +++ b/tests/system/suite_general/tst_opencreator_qbs/test.py @@ -25,8 +25,8 @@ def main(): test.warning("Parsing project timed out") compareProjectTree(rootNodeTemplate % "Qt Creator", "projecttree_creator.tsv") buildIssuesTexts = map(lambda i: str(i[3]), getBuildIssues()) - deprecationWarnings = filter(lambda s: "deprecated" in s, buildIssuesTexts) + deprecationWarnings = "\n".join(set(filter(lambda s: "deprecated" in s, buildIssuesTexts))) if deprecationWarnings: test.warning("Creator claims that the .qbs file uses deprecated features.", - "\n".join(set(deprecationWarnings))) + deprecationWarnings) invokeMenuItem("File", "Exit") From 27a61d482f4e8e04c503783229b5ea5eb2143805 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 8 Jun 2023 12:42:21 +0200 Subject: [PATCH 6/9] ClangFormat: Fix that formatting was wrongly disabled After starting Qt Creator with the Beautifier plugin, turning its automatic format on save option on, and restarting Qt Creator _without_ the Beautifier plugin, clang format was no longer formatting on save. The clang format based formatting is supposed to be disabled if - the Beautifier plugin is enabled, and - its automatic format on save option is enabled. Fix the check for the first condition, the plugin can be present but disabled, explicitly check if it is enabled. Change-Id: I5c9c270dd47ceec665aebca5b613f0c4a5357d72 Reviewed-by: Artem Sokolovskii Reviewed-by: Reviewed-by: Christian Kandeler --- src/plugins/clangformat/clangformatindenter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangformat/clangformatindenter.cpp b/src/plugins/clangformat/clangformatindenter.cpp index 94e0fafd8e0..fa3a9d5d636 100644 --- a/src/plugins/clangformat/clangformatindenter.cpp +++ b/src/plugins/clangformat/clangformatindenter.cpp @@ -32,7 +32,7 @@ static bool isBeautifierPluginActivated() return std::find_if(specs.begin(), specs.end(), [](ExtensionSystem::PluginSpec *spec) { - return spec->name() == "Beautifier"; + return spec->name() == "Beautifier" && spec->isEffectivelyEnabled(); }) != specs.end(); } From 0f3a92b45a8a5eda32a600f108a2dc2c028b71a8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 9 Jun 2023 10:37:49 +0200 Subject: [PATCH 7/9] Update qbs submodule to HEAD of 2.0 branch Change-Id: I65d713ee07c4b7c74623b39cd77367e7eb72b623 Reviewed-by: Qt CI Bot Reviewed-by: Christian Stenger --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 1a575d27436..134d6b6666c 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 1a575d27436ef71e999c709b11e6d7a24e57916e +Subproject commit 134d6b6666c1d121b6134a02c4766576705700aa From 6652996503ba6e57a660f645b7bcf0df0367cfcb Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 20 Apr 2023 15:26:09 +0300 Subject: [PATCH 8/9] QmlDesigner: Fix puppet build after quick3d private API changes Change-Id: I3668853886306fe00d5da916aa458559964a9af0 Reviewed-by: Mahmoud Badri Reviewed-by: Qt CI Bot (cherry picked from commit 9817df63fb9eae342d5bf6f28f526aa09b17e8de) Reviewed-by: Miikka Heikkinen Reviewed-by: Eike Ziller --- .../qml2puppet/editor3d/generalhelper.cpp | 16 ++++++++++++++-- .../qml2puppet/editor3d/selectionboxgeometry.cpp | 10 ++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp b/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp index 829a6f0edbc..52a3f6d74aa 100644 --- a/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp +++ b/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp @@ -215,6 +215,7 @@ QVector4D GeneralHelper::focusNodesToCamera(QQuick3DCamera *camera, float defaul if (auto renderModel = static_cast(targetPriv->spatialNode)) { QWindow *window = static_cast(viewPort->window()); if (window) { +#if QT_VERSION < QT_VERSION_CHECK(6, 5, 1) QSSGRef context; #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) context = QSSGRenderContextInterface::getRenderContextInterface(quintptr(window)); @@ -222,12 +223,17 @@ QVector4D GeneralHelper::focusNodesToCamera(QQuick3DCamera *camera, float defaul context = targetPriv->sceneManager->rci; #endif if (!context.isNull()) { +#else + const auto &sm = targetPriv->sceneManager; + auto context = sm->wattached ? sm->wattached->rci().get() : nullptr; + if (context) { +#endif QSSGBounds3 bounds; auto geometry = qobject_cast(model->geometry()); if (geometry) { bounds = geometry->bounds(); } else { - auto bufferManager = context->bufferManager(); + const auto &bufferManager(context->bufferManager()); #if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) bounds = renderModel->getModelBounds(bufferManager); #else @@ -889,6 +895,7 @@ bool GeneralHelper::getBounds(QQuick3DViewport *view3D, QQuick3DNode *node, QVec if (auto renderModel = static_cast(renderNode)) { QWindow *window = static_cast(view3D->window()); if (window) { +#if QT_VERSION < QT_VERSION_CHECK(6, 5, 1) QSSGRef context; #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) context = QSSGRenderContextInterface::getRenderContextInterface(quintptr(window)); @@ -896,7 +903,12 @@ bool GeneralHelper::getBounds(QQuick3DViewport *view3D, QQuick3DNode *node, QVec context = QQuick3DObjectPrivate::get(node)->sceneManager->rci; #endif if (!context.isNull()) { - auto bufferManager = context->bufferManager(); +#else + const auto &sm = QQuick3DObjectPrivate::get(node)->sceneManager; + auto context = sm->wattached ? sm->wattached->rci().get() : nullptr; + if (context) { +#endif + const auto &bufferManager(context->bufferManager()); #if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) QSSGBounds3 bounds = renderModel->getModelBounds(bufferManager); #else diff --git a/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp b/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp index f7e2757e608..03f37e8902e 100644 --- a/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp +++ b/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp @@ -287,14 +287,20 @@ void SelectionBoxGeometry::getBounds( if (auto renderModel = static_cast(renderNode)) { QWindow *window = static_cast(m_view3D->window()); if (window) { +#if QT_VERSION < QT_VERSION_CHECK(6, 5, 1) QSSGRef context; #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) context = QSSGRenderContextInterface::getRenderContextInterface(quintptr(window)); -#else +#elif QT_VERSION < QT_VERSION_CHECK(6, 5, 1) context = QQuick3DObjectPrivate::get(this)->sceneManager->rci; #endif if (!context.isNull()) { - auto bufferManager = context->bufferManager(); +#else + const auto &sm = QQuick3DObjectPrivate::get(this)->sceneManager; + auto context = sm->wattached ? sm->wattached->rci().get() : nullptr; + if (context) { +#endif + const auto &bufferManager(context->bufferManager()); #if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) QSSGBounds3 bounds = renderModel->getModelBounds(bufferManager); #else From b1e4ed3b7c31f1a19b50974ccf7a76019ac922de Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 13 Jun 2023 12:54:22 +0200 Subject: [PATCH 9/9] Add change log for 10.0.2 Change-Id: I88edcb5e93f689b0a835e4952083a7b958b845c3 Reviewed-by: Leena Miettinen --- dist/changelog/changes-10.0.2.md | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 dist/changelog/changes-10.0.2.md diff --git a/dist/changelog/changes-10.0.2.md b/dist/changelog/changes-10.0.2.md new file mode 100644 index 00000000000..baf99955de7 --- /dev/null +++ b/dist/changelog/changes-10.0.2.md @@ -0,0 +1,76 @@ +Qt Creator 10.0.2 +================= + +Qt Creator version 10.0.2 contains bug fixes. + +The most important changes are listed in this document. For a complete list of +changes, see the Git log for the Qt Creator sources that you can check out from +the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline origin/v10.0.1..v10.0.2 + +General +------- + +* Fixed freezes due to excessive file watching (QTCREATORBUG-28957) + +Editing +------- + +### C++ + +* Fixed a crash when following symbols (QTCREATORBUG-28989) +* Fixed the highlighting of raw string literals with empty lines + (QTCREATORBUG-29200) +* Clang Format + * Fixed the editing of custom code styles (QTCREATORBUG-29129) + * Fixed that the wrong code style could be used (QTCREATORBUG-29145) + +Projects +-------- + +* Fixed a crash when triggering a build with unconfigured projects present + (QTCREATORBUG-29207) + +### CMake + +* Fixed that the global `Autorun CMake` option could be overridden by old + settings +* Fixed the `Build CMake Target` locator filter in case a build is already + running (QTCREATORBUG-26699) +* Presets + * Added the expansion of `${hostSystemName}` (QTCREATORBUG-28935) + * Fixed the Qt detection when `CMAKE_TOOLCHAIN_FILE` and `CMAKE_PREFIX_PATH` + are set + +Debugging +--------- + +* Fixed that debugger tooltips in the editor vanished after expanding + (QTCREATORBUG-29083) + +Test Integration +---------------- + +* GoogleTest + * Fixed the reporting of failed tests (QTCREATORBUG-29146) + +Credits for these changes go to: +-------------------------------- +Alessandro Portale +André Pönitz +Artem Sokolovskii +Björn Schäpers +Christian Kandeler +Christian Stenger +Cristian Adam +David Schulz +Eike Ziller +Jaroslaw Kobus +Karim Abdelrahman +Leena Miettinen +Miikka Heikkinen +Patrik Teivonen +Robert Löhning +Sivert Krøvel