From a374588604374d6de8bdec2ced8f91eb2c36e48a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 12 Dec 2023 09:34:35 +0100 Subject: [PATCH 1/7] QmlDesigner/editor3d: Fix build with Qt 6.7 rendercontextcore is now a public header (qtquick3d 89ca37fb914c6539334df62b38ea8cee80dade9d) Fixes: QTCREATORBUG-30052 Change-Id: I58ac699ed81e958c0a0fccd14385b3359be1fb08 Reviewed-by: Miikka Heikkinen --- src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp | 7 ++++++- .../qml2puppet/editor3d/selectionboxgeometry.cpp | 7 ++++++- .../qml2puppet/instances/qt5nodeinstanceserver.cpp | 5 +++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp b/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp index f1b4b795e47..250629107a4 100644 --- a/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp +++ b/src/tools/qml2puppet/qml2puppet/editor3d/generalhelper.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -25,6 +24,12 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) +#include +#else +#include +#endif + #ifdef QUICK3D_PARTICLES_MODULE #include #include diff --git a/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp b/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp index 64c3c25a2ab..14efba3b9e0 100644 --- a/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp +++ b/src/tools/qml2puppet/qml2puppet/editor3d/selectionboxgeometry.cpp @@ -6,7 +6,6 @@ #include "selectionboxgeometry.h" #include -#include #include #include #include @@ -14,6 +13,12 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) +#include +#else +#include +#endif + #include namespace QmlDesigner { diff --git a/src/tools/qml2puppet/qml2puppet/instances/qt5nodeinstanceserver.cpp b/src/tools/qml2puppet/qml2puppet/instances/qt5nodeinstanceserver.cpp index 2f905d21cf7..4c163bf69ff 100644 --- a/src/tools/qml2puppet/qml2puppet/instances/qt5nodeinstanceserver.cpp +++ b/src/tools/qml2puppet/qml2puppet/instances/qt5nodeinstanceserver.cpp @@ -46,7 +46,12 @@ #define USE_PIPELINE_CACHE 1 #if defined(QUICK3D_MODULE) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 2) +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) #include +#else +#include +#include +#endif #include #define USE_SHADER_CACHE 1 #endif From f8cdcfd70ccdd9d558dbb665726002c98f48bd08 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 11 Dec 2023 13:47:57 +0100 Subject: [PATCH 2/7] ProjectExplorer: Fix shutting down unreachable remote processes We forgot to reset the state, which gave us a permanently broken run control, preventing re-starting the application, among other things. Change-Id: I7c168e31e015fdf7002c57aba0ed2178437a15ae Reviewed-by: Qt CI Bot Reviewed-by: Jarek Kobus --- src/plugins/projectexplorer/runcontrol.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp index 76eed5c5c2c..eac873875c6 100644 --- a/src/plugins/projectexplorer/runcontrol.cpp +++ b/src/plugins/projectexplorer/runcontrol.cpp @@ -1305,16 +1305,18 @@ void SimpleTargetRunnerPrivate::stop() m_stopRequested = true; q->appendMessage(Tr::tr("User requested stop. Shutting down..."), NormalMessageFormat); switch (m_state) { - case Run: - m_process.stop(); - if (!m_process.waitForFinished(2000)) { // TODO: it may freeze on some devices - QTC_CHECK(false); // Shouldn't happen, just emergency handling - m_process.close(); - forwardDone(); - } - break; - case Inactive: - break; + case Run: + m_process.stop(); + if (!m_process.waitForFinished(2000)) { // TODO: it may freeze on some devices + q->appendMessage(Tr::tr("Remote process did not finish in time. " + "Connectivity lost?"), ErrorMessageFormat); + m_process.close(); + m_state = Inactive; + forwardDone(); + } + break; + case Inactive: + break; } } } From cf16ef31395942faf5cfd4db52120ba0a82814b5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 11 Dec 2023 14:20:50 +0100 Subject: [PATCH 3/7] RemoteLinux: Shut down an unresponsive SSH master connection Otherwise, all subsequent ssh operations will silently fail. Fixes: QTCREATORBUG-29982 Change-Id: I781aafcf408a9cb216f632e2beef92ec38652f57 Reviewed-by: Jarek Kobus Reviewed-by: Reviewed-by: Qt CI Bot --- src/plugins/remotelinux/linuxdevice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 3f875f1ef4b..efafbaef40a 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -185,6 +185,7 @@ void SshSharedConnection::connectToHost() }); QStringList args = QStringList{"-M", "-N", "-o", "ControlPersist=no", + "-o", "ServerAliveInterval=10", // TODO: Make configurable? "-o", "PermitLocalCommand=yes", // Enable local command "-o", "LocalCommand=echo"} // Local command is executed after successfully // connecting to the server. "echo" will print "\n" From 3a8314f7938c2e8b8db940e2a5626cd40346f6cd Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 12 Dec 2023 16:06:25 +0100 Subject: [PATCH 4/7] WebAssembly: Support emsdk path with spaces on Linux/macOS The command passed to bash as argument needs to be quoted. Task-number: QTCREATORBUG-29981 Change-Id: I0e91ab4c088f8cd4e5a2df82604ea86cf73369fc Reviewed-by: Alessandro Portale --- src/plugins/webassembly/webassemblyemsdk.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/webassembly/webassemblyemsdk.cpp b/src/plugins/webassembly/webassemblyemsdk.cpp index 4ba3563c2ec..12c4d649678 100644 --- a/src/plugins/webassembly/webassemblyemsdk.cpp +++ b/src/plugins/webassembly/webassemblyemsdk.cpp @@ -51,7 +51,9 @@ static QString emSdkEnvOutput(const FilePath &sdkRoot) emSdkEnv.setCommand(CommandLine(scriptFile)); } else { // File needs to be source'd, not executed. - emSdkEnv.setCommand({sdkRoot.withNewPath("bash"), {"-c", ". " + scriptFile.path()}}); + CommandLine cmd{sdkRoot.withNewPath("bash"), {"-c"}}; + cmd.addCommandLineAsSingleArg({".", {scriptFile.path()}}); + emSdkEnv.setCommand(cmd); } emSdkEnv.runBlocking(); const QString result = emSdkEnv.allOutput(); From 32c389a5562cd8d5b8d66e88e59eef1e00f95425 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Mon, 11 Dec 2023 18:25:45 +0100 Subject: [PATCH 5/7] CMakePM: Do not reconfigure during build On Windows upon a CMake file change and save during a build, the reconfiguration would fail due to the inability to save the build.ninja file. Fixes: QTCREATORBUG-30048 Change-Id: I68bec70b0a95bc4256b736a1c4caf1b4d706e43b Reviewed-by: Eike Ziller Reviewed-by: --- src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 6f7461799bd..4c93e3150d9 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -1299,7 +1300,8 @@ void CMakeBuildSystem::wireUpConnections() }); connect(project(), &Project::projectFileIsDirty, this, [this] { - if (buildConfiguration()->isActive() && !isParsing()) { + const bool isBuilding = BuildManager::isBuilding(project()); + if (buildConfiguration()->isActive() && !isParsing() && !isBuilding) { if (settings().autorunCMake()) { qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file"; reparse(CMakeBuildSystem::REPARSE_FORCE_CMAKE_RUN); From 828f78ccd3cccb0eebe1da183a543cf3c716ba6c Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 13 Dec 2023 17:48:48 +0100 Subject: [PATCH 6/7] KillAppStep: Always finish the step with success Fixes: QTCREATORBUG-30024 Change-Id: I7f2f3167bd3620a5a313fe6359c4ee58ff0d9e03 Reviewed-by: Christian Kandeler --- src/plugins/remotelinux/killappstep.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/remotelinux/killappstep.cpp b/src/plugins/remotelinux/killappstep.cpp index b70e597fb84..80c86584200 100644 --- a/src/plugins/remotelinux/killappstep.cpp +++ b/src/plugins/remotelinux/killappstep.cpp @@ -58,7 +58,11 @@ GroupItem KillAppStep::deployRecipe() addProgressMessage(Tr::tr("Failed to kill remote application. " "Assuming it was not running.")); }; - return DeviceProcessKillerTask(setupHandler, doneHandler, errorHandler); + const Group root { + finishAllAndDone, + DeviceProcessKillerTask(setupHandler, doneHandler, errorHandler) + }; + return root; } KillAppStepFactory::KillAppStepFactory() From d24e5752782c037bb17090afd43c9b63fba1bc29 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 13 Dec 2023 10:10:15 +0100 Subject: [PATCH 7/7] LanguageClient: fix crash in completion assist Check m_processor again after starting. There is a callback resetting the processor and we cannot ensure that starting the processor does not result in calling this callback. Change-Id: I4dca31399fb5224234c81df36edcb7b75d9ceaef Reviewed-by: hjk Reviewed-by: Eike Ziller --- src/plugins/languageclient/languageclientcompletionassist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/languageclient/languageclientcompletionassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp index 96aebde7850..56ac11bdede 100644 --- a/src/plugins/languageclient/languageclientcompletionassist.cpp +++ b/src/plugins/languageclient/languageclientcompletionassist.cpp @@ -317,7 +317,7 @@ public: }); setProposal(m_processor->start(std::move(interface)), prefix); - if (!m_processor->running()) { + if (m_processor && !m_processor->running()) { delete m_processor; m_processor = nullptr; }