From 41ac635ca6e20d64d3237eed98ebfd7a3976785c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 27 Nov 2023 12:10:27 +0100 Subject: [PATCH 01/27] ProjectExplorer: Fix restoring kits data Another fallout of Utils::Store. Fixes: QTCREATORBUG-29970 Change-Id: I2b696b83980c451d5312ac8a874d9f3dc86361c9 Reviewed-by: hjk --- src/plugins/projectexplorer/kit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index a43ca8f3816..891d43b287a 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -149,8 +149,10 @@ Kit::Kit(const Store &data) Store extra = storeFromVariant(data.value(DATA_KEY)); d->m_data.clear(); // remove default values const Store::ConstIterator cend = extra.constEnd(); - for (Store::ConstIterator it = extra.constBegin(); it != cend; ++it) - d->m_data.insert(Id::fromString(stringFromKey(it.key())), it.value()); + for (Store::ConstIterator it = extra.constBegin(); it != cend; ++it) { + d->m_data.insert(Id::fromString(stringFromKey(it.key())), + mapEntryFromStoreEntry(it.value())); + } const QStringList mutableInfoList = data.value(MUTABLE_INFO_KEY).toStringList(); for (const QString &mutableInfo : mutableInfoList) From 1079204a3e45af2eae1df713f6732b486680f8b4 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 14 Nov 2023 13:30:13 +0100 Subject: [PATCH 02/27] Utils: Fix updating BoolAspect::action() checked state Task-number: QTCREATORBUG-29949 Change-Id: I1c12bd59855ecf13f06fdb16bf8e0937768527b1 Reviewed-by: Christian Stenger --- src/libs/utils/aspects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index 73d37a2eace..f17f49b95b1 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -1838,6 +1838,8 @@ QAction *BoolAspect::action() connect(act, &QAction::triggered, this, [this](bool newValue) { setValue(newValue); }); + connect(this, &BoolAspect::changed, act, [act, this] { act->setChecked(m_internal); }); + return act; } From b26d7b0f481919243b721e1f17b85b19c011387c Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 27 Nov 2023 14:34:58 +0100 Subject: [PATCH 03/27] RemoteLinux: Preserve TransferMethod setting Change-Id: I265831c4a552caa258417952bd418a284734fd4b Reviewed-by: hjk --- src/plugins/remotelinux/genericdeploystep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/remotelinux/genericdeploystep.cpp b/src/plugins/remotelinux/genericdeploystep.cpp index 4ae804689c2..3a425e23aae 100644 --- a/src/plugins/remotelinux/genericdeploystep.cpp +++ b/src/plugins/remotelinux/genericdeploystep.cpp @@ -45,6 +45,7 @@ public: ignoreMissingFiles.setLabelText(Tr::tr("Ignore missing files:")); ignoreMissingFiles.setLabelPlacement(BoolAspect::LabelPlacement::InExtraLabel); + method.setSettingsKey("RemoteLinux.RsyncDeployStep.TransferMethod"); method.setDisplayStyle(SelectionAspect::DisplayStyle::ComboBox); method.setDisplayName(Tr::tr("Transfer method:")); method.addOption(Tr::tr("Use rsync if available. Otherwise use default transfer.")); From 0f8a057beaefa15250411b36fbf16136abefc01d Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 23 Nov 2023 13:28:11 +0100 Subject: [PATCH 04/27] Valgrind: Fix stopping the Valgrind process Fixes: QTCREATORBUG-29948 Change-Id: Idb7f113bee6706283c7fdea66d9f9dfccbd6cdb4 Reviewed-by: Qt CI Bot Reviewed-by: hjk --- src/plugins/valgrind/valgrindengine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index 8254f9284bd..c2324887b66 100644 --- a/src/plugins/valgrind/valgrindengine.cpp +++ b/src/plugins/valgrind/valgrindengine.cpp @@ -87,6 +87,9 @@ void ValgrindToolRunner::stop() { m_isStopping = true; m_runner.stop(); + appendMessage(Tr::tr("Process terminated."), ErrorMessageFormat); + m_progress.reportFinished(); + reportStopped(); } QStringList ValgrindToolRunner::genericToolArguments() const From ed4dadfcc1769bde2ede5d9f715bc9e561a4bdda Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 27 Nov 2023 10:51:07 +0200 Subject: [PATCH 05/27] boot2qt: use DirectUploadStep on Windows GenericUploadStep doesn't set execute rights to the binary when deployed from Windows host. Switch back to DirectUploadStep until support is available. Task-number: QTCREATORBUG-29971 Change-Id: I253210d44c5587d529f1f7082cac3e9a2ead59c1 Reviewed-by: hjk Reviewed-by: Jarek Kobus Reviewed-by: Christian Kandeler --- src/plugins/boot2qt/qdbplugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp index de1a7557c83..1b2887a2044 100644 --- a/src/plugins/boot2qt/qdbplugin.cpp +++ b/src/plugins/boot2qt/qdbplugin.cpp @@ -124,7 +124,11 @@ public: && prj->hasMakeInstallEquivalent(); }); addInitialStep(Qdb::Constants::QdbStopApplicationStepId); +#ifdef Q_OS_WIN + addInitialStep(RemoteLinux::Constants::DirectUploadStepId); +#else addInitialStep(RemoteLinux::Constants::GenericDeployStepId); +#endif } }; From a27aceb5583ea043609b023c2f907d67a642df51 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Mon, 27 Nov 2023 07:40:20 +0100 Subject: [PATCH 06/27] CompilerExplorer: Add user-agent Change-Id: Ia2193a1cf9bd0b3542313162d6befe14649efe97 Reviewed-by: Reviewed-by: Cristian Adam --- src/plugins/compilerexplorer/api/compile.cpp | 6 +--- src/plugins/compilerexplorer/api/compiler.cpp | 5 +-- src/plugins/compilerexplorer/api/language.cpp | 4 +-- src/plugins/compilerexplorer/api/library.cpp | 5 +-- src/plugins/compilerexplorer/api/request.h | 31 +++++++++++++------ 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/plugins/compilerexplorer/api/compile.cpp b/src/plugins/compilerexplorer/api/compile.cpp index 8a159dcf369..1c73c496471 100644 --- a/src/plugins/compilerexplorer/api/compile.cpp +++ b/src/plugins/compilerexplorer/api/compile.cpp @@ -10,13 +10,9 @@ QFuture compile(const Config &config, const CompileParameters &pa { const QUrl url = config.url({"api/compiler", parameters.compilerId, "compile"}); - QNetworkRequest req(url); - req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - req.setRawHeader("Accept", "application/json"); - return jsonRequest( config.networkManager, - req, + url, [](const QJsonDocument &response) { CompileResult result; diff --git a/src/plugins/compilerexplorer/api/compiler.cpp b/src/plugins/compilerexplorer/api/compiler.cpp index 9bc7a57033d..55780234491 100644 --- a/src/plugins/compilerexplorer/api/compiler.cpp +++ b/src/plugins/compilerexplorer/api/compiler.cpp @@ -32,9 +32,6 @@ QFuture compilers(const Config &config, if (!fieldParam.isEmpty()) url.setQuery(QUrlQuery{{"fields", fieldParam}}); - QNetworkRequest req(url); - req.setRawHeader("Accept", "application/json"); - auto fromJson = [extraFields](const QJsonDocument &doc) { QJsonArray compilers = doc.array(); Compilers result; @@ -59,7 +56,7 @@ QFuture compilers(const Config &config, return result; }; - return jsonRequest(config.networkManager, req, fromJson); + return jsonRequest(config.networkManager, url, fromJson); } } // namespace CompilerExplorer::Api diff --git a/src/plugins/compilerexplorer/api/language.cpp b/src/plugins/compilerexplorer/api/language.cpp index 0b95c7d2be6..aa162390b1c 100644 --- a/src/plugins/compilerexplorer/api/language.cpp +++ b/src/plugins/compilerexplorer/api/language.cpp @@ -13,10 +13,8 @@ QFuture languages(const Config &config) { QUrl url = config.url({"api/languages"}); url.setQuery(QUrlQuery{{"fields", "id,name,extensions,logoUrl"}}); - QNetworkRequest req(url); - req.setRawHeader("Accept", "application/json"); - return jsonRequest(config.networkManager, req, [](const QJsonDocument &doc) { + return jsonRequest(config.networkManager, url, [](const QJsonDocument &doc) { QJsonArray languages = doc.array(); Languages result; for (const auto &language : languages) { diff --git a/src/plugins/compilerexplorer/api/library.cpp b/src/plugins/compilerexplorer/api/library.cpp index 8015beced73..579074811e4 100644 --- a/src/plugins/compilerexplorer/api/library.cpp +++ b/src/plugins/compilerexplorer/api/library.cpp @@ -17,10 +17,7 @@ QFuture libraries(const Config &config, const QString &languageId) const QUrl url = config.url({"api/libraries", languageId}); - QNetworkRequest req(url); - req.setRawHeader("Accept", "application/json"); - - return jsonRequest(config.networkManager, req, [](const QJsonDocument &doc) { + return jsonRequest(config.networkManager, url, [](const QJsonDocument &doc) { QJsonArray libraries = doc.array(); Libraries result; diff --git a/src/plugins/compilerexplorer/api/request.h b/src/plugins/compilerexplorer/api/request.h index dc55ab80b6e..af21b8a1140 100644 --- a/src/plugins/compilerexplorer/api/request.h +++ b/src/plugins/compilerexplorer/api/request.h @@ -14,6 +14,8 @@ #include #include +#include + static Q_LOGGING_CATEGORY(apiLog, "qtc.compilerexplorer.api", QtWarningMsg); namespace CompilerExplorer::Api { @@ -45,11 +47,18 @@ static int debugRequestId = 0; template QFuture request( QNetworkAccessManager *networkManager, - const QNetworkRequest &req, + QNetworkRequest &req, std::function>)> callback, QNetworkAccessManager::Operation op = QNetworkAccessManager::GetOperation, - const QByteArray &outData = {}) + const QByteArray &payload = {}) { + static const QByteArray userAgent = QString("%1/%2 (%3)") + .arg(QCoreApplication::applicationName()) + .arg(QCoreApplication::applicationVersion()) + .arg(Utils::appInfo().author) + .toUtf8(); + req.setRawHeader("User-Agent", userAgent); + QSharedPointer> p(new QPromise); p->start(); @@ -58,12 +67,12 @@ QFuture request( const auto reqId = [r = debugRequestId] { return QString("[%1]").arg(r); }; - if (outData.isEmpty()) + if (payload.isEmpty()) qCDebug(apiLog).noquote() << reqId() << "Requesting" << toString(op) << req.url().toString(); else qCDebug(apiLog).noquote() << reqId() << "Requesting" << toString(op) << req.url().toString() - << "with payload:" << QString::fromUtf8(outData); + << "with payload:" << QString::fromUtf8(payload); QNetworkReply *reply = nullptr; @@ -72,10 +81,10 @@ QFuture request( reply = networkManager->get(req); break; case QNetworkAccessManager::PostOperation: - reply = networkManager->post(req, outData); + reply = networkManager->post(req, payload); break; case QNetworkAccessManager::PutOperation: - reply = networkManager->put(req, outData); + reply = networkManager->put(req, payload); break; case QNetworkAccessManager::DeleteOperation: reply = networkManager->deleteResource(req); @@ -115,12 +124,16 @@ QFuture request( template QFuture jsonRequest(QNetworkAccessManager *networkManager, - const QNetworkRequest &req, + const QUrl &url, std::function callback, QNetworkAccessManager::Operation op = QNetworkAccessManager::GetOperation, - const QByteArray &outData = {}) + const QByteArray &payload = {}) { + QNetworkRequest req(url); + req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); + req.setRawHeader("Accept", "application/json"); + return request( networkManager, req, @@ -135,7 +148,7 @@ QFuture jsonRequest(QNetworkAccessManager *networkManager, promise->addResult(callback(doc)); }, op, - outData); + payload); } } // namespace CompilerExplorer::Api From a71b33944b46ef147b301c07de9ec39e0e398bb7 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 28 Nov 2023 13:43:09 +0100 Subject: [PATCH 07/27] Core: Restore opening of files that are dropped on the MainWindow The code to handle dropping unintentionally got commented out, then fixed, then commented out again. This change restores it. Amends: e5f74d217b8c8c469ba16afd38c723be5e156555 ..which amended: 5da1f149034590626171308b5d74c9df15739b2d ..which amended: e34762c84436c9b8b3d35f119a893dcd6cb4f4db Fixes: QTCREATORBUG-29961 Change-Id: Iccc8a9b7bc24bc3475ed4fa37a7c231a1f575c1c Reviewed-by: Marcus Tillmanns Reviewed-by: Eike Ziller --- src/plugins/coreplugin/icore.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 1c04ebd2b6d..f3962d8e12b 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -1264,12 +1265,11 @@ void ICorePrivate::init() m_modeStack->statusBar()->setProperty("p_styled", true); - /*auto dropSupport = new DropSupport(this, [](QDropEvent *event, DropSupport *) { + auto dropSupport = new DropSupport(m_mainwindow, [](QDropEvent *event, DropSupport *) { return event->source() == nullptr; // only accept drops from the "outside" (e.g. file manager) }); - connect(dropSupport, &DropSupport::filesDropped, - this, &MainWindow::openDroppedFiles); -*/ + connect(dropSupport, &DropSupport::filesDropped, this, &ICorePrivate::openDroppedFiles); + if (HostOsInfo::isLinuxHost()) { m_trimTimer.setSingleShot(true); m_trimTimer.setInterval(60000); From 6ed456ed9e243db72f5800f5f1e1677a7f6adc4e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 27 Nov 2023 12:48:08 +0100 Subject: [PATCH 08/27] ClangCodeModel: Fix check for strings that look like file paths Backslashes in the markup string are escaped with another backslash, so we need to check for two consecutive ones on Windows. Otherwise, qdoc/doxygen commands such as "\note" are interpreted as files and trigger expensive I/O operations. Fixes: QTCREATORBUG-29975 Change-Id: I822f57a8612274ff4112063928cab21b9d7ca792 Reviewed-by: David Schulz --- src/plugins/clangcodemodel/clangdclient.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index 565c8306a0b..09fa96c6e17 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -1139,14 +1139,15 @@ void ClangdClient::gatherHelpItemForTooltip(const HoverRequest::Response &hoverR for (const QString &line : lines) { const QString possibleFilePath = line.simplified(); const auto looksLikeFilePath = [&] { - if (possibleFilePath.length() < 3) + if (possibleFilePath.length() < 4) return false; if (osType() == OsTypeWindows) { - if (possibleFilePath.startsWith(R"(\\)")) + if (possibleFilePath.startsWith(R"(\\\\)")) return true; return possibleFilePath.front().isLetter() && possibleFilePath.at(1) == ':' - && possibleFilePath.at(2) == '\\'; + && possibleFilePath.at(2) == '\\' + && possibleFilePath.at(3) == '\\'; } return possibleFilePath.front() == '/' && possibleFilePath.at(1).isLetterOrNumber(); From c20129a973f43864ecbef11ed1cd3c611e1505b1 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 21 Nov 2023 11:09:10 +0100 Subject: [PATCH 09/27] ClangCodeModel: Make VirtualFunctionAssistProcessor more safe Let's not access the object state after emitting ClangdFollowSymbol::done(), in case the receiver deletes us. Can happen in test code. Change-Id: Ia6c691c0f88b16476da1a6be1cedd106d9da2d53 Reviewed-by: Reviewed-by: David Schulz --- src/plugins/clangcodemodel/clangdfollowsymbol.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp index 8be15c7327d..a975c787368 100644 --- a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp +++ b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp @@ -310,9 +310,10 @@ void ClangdFollowSymbol::VirtualFunctionAssistProcessor::resetData(bool resetFol if (!m_followSymbol) return; m_followSymbol->d->virtualFuncAssistProcessor = nullptr; - if (resetFollowSymbolData) - m_followSymbol->emitDone(); + ClangdFollowSymbol * const followSymbol = m_followSymbol; m_followSymbol = nullptr; + if (resetFollowSymbolData) + followSymbol->emitDone(); } IAssistProposal *ClangdFollowSymbol::VirtualFunctionAssistProcessor::createProposal(bool final) From 3b6dc15e0480405d89a0eff452e84390224e23a0 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 29 Nov 2023 14:05:18 +0100 Subject: [PATCH 10/27] Fix that target selector accumulated labels again It was previously fixed in 1a43983ea63cd675c1ecfbd673618b391c5a03bb Since then, adding the aspect to grid adds a label itself, so the self- created label in setKit is irrelevant (it adds some empty space), and the labels that are created for the aspects are accumulated again. Instead of trying to delete the labels, create a wrapping QWidget. Deleting this widget gets rid of any widgets that might have been added when creating the grid of mutable aspects. Fixes: QTCREATORBUG-29990 Change-Id: I5f2aebf9a865e532c9e24a29ec5979b11d17d43a Reviewed-by: Christian Kandeler --- .../miniprojecttargetselector.cpp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index 3fa03df9583..e875d87d0f6 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -565,35 +565,34 @@ public: : QWidget(parent) { connect(KitManager::instance(), &KitManager::kitUpdated, this, &KitAreaWidget::updateKit); + auto layout = new QVBoxLayout; + layout->setContentsMargins({}); + setLayout(layout); } ~KitAreaWidget() override { setKit(nullptr); } void setKit(Kit *k) { - qDeleteAll(m_labels); - m_labels.clear(); qDeleteAll(m_kitAspects); m_kitAspects.clear(); + delete m_gridWidget; + m_gridWidget = nullptr; if (!k) return; - delete layout(); - Layouting::Grid grid; for (KitAspectFactory *factory : KitManager::kitAspectFactories()) { if (k && k->isMutable(factory->id())) { KitAspect *aspect = factory->createKitAspect(k); m_kitAspects << aspect; - auto label = new QLabel(aspect->displayName()); - m_labels << label; - grid.addItems({label, aspect, Layouting::br}); + grid.addItems({aspect, Layouting::br}); } } - grid.attachTo(this); - layout()->setContentsMargins(3, 3, 3, 3); - + m_gridWidget = grid.emerge(); + m_gridWidget->layout()->setContentsMargins(3, 3, 3, 3); + layout()->addWidget(m_gridWidget); m_kit = k; setHidden(m_kitAspects.isEmpty()); @@ -629,7 +628,7 @@ private: } Kit *m_kit = nullptr; - QList m_labels; + QWidget *m_gridWidget = nullptr; QList m_kitAspects; }; From b757ca9f7a9546a5564f8670d3f7c3bfd4989f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Fri, 17 Nov 2023 14:08:52 +0100 Subject: [PATCH 11/27] SquishTests: Update expected tree for tst_cmake_speedcrunch Change-Id: I13df997c6b265ba8795c7f1f3024c5deef5e2cad Reviewed-by: Christian Stenger --- .../testdata/projecttree_speedcrunch.tsv | 103 +++++++++--------- 1 file changed, 53 insertions(+), 50 deletions(-) diff --git a/tests/system/suite_general/tst_cmake_speedcrunch/testdata/projecttree_speedcrunch.tsv b/tests/system/suite_general/tst_cmake_speedcrunch/testdata/projecttree_speedcrunch.tsv index 82a7ae6ac84..30cfdfe43b4 100644 --- a/tests/system/suite_general/tst_cmake_speedcrunch/testdata/projecttree_speedcrunch.tsv +++ b/tests/system/suite_general/tst_cmake_speedcrunch/testdata/projecttree_speedcrunch.tsv @@ -1,7 +1,8 @@ "text" "nestinglevel" "CMakeLists.txt" "0" "Header Files" "1" -"genericdock.h" "2" +"gui" "2" +"genericdock.h" "3" "Source Files" "1" "core" "2" "book.cpp" "3" @@ -58,55 +59,57 @@ "rational.cpp" "3" "units.cpp" "3" "main.cpp" "2" -"/" "2" -"color-schemes" "3" -"Solarized Dark.json" "4" -"Solarized Light.json" "4" -"Standard.json" "4" -"Sublime.json" "4" -"Terminal.json" "4" -"Tomorrow Night Blue.json" "4" -"Tomorrow Night Bright.json" "4" -"Tomorrow Night Eighties.json" "4" -"Tomorrow Night.json" "4" -"Tomorrow.json" "4" -"locale" "3" -"ar.qm" "4" -"ca_ES.qm" "4" -"cs_CZ.qm" "4" -"da.qm" "4" -"de_DE.qm" "4" -"el.qm" "4" -"en_GB.qm" "4" -"en_US.qm" "4" -"es_AR.qm" "4" -"es_ES.qm" "4" -"et_EE.qm" "4" -"eu_ES.qm" "4" -"fi_FI.qm" "4" -"fr_FR.qm" "4" -"he_IL.qm" "4" -"hu_HU.qm" "4" -"id_ID.qm" "4" -"it_IT.qm" "4" -"ja_JP.qm" "4" -"ko_KR.qm" "4" -"lt.qm" "4" -"lv_LV.qm" "4" -"nb_NO.qm" "4" -"nl_NL.qm" "4" -"pl_PL.qm" "4" -"pt_BR.qm" "4" -"pt_PT.qm" "4" -"ro_RO.qm" "4" -"ru_RU.qm" "4" -"sk.qm" "4" -"sv_SE.qm" "4" -"tr_TR.qm" "4" -"uz_Latn_UZ.qm" "4" -"vi.qm" "4" -"zh_CN.qm" "4" -"speedcrunch.png" "3" +"resources" "1" +"speedcrunch.qrc" "2" +"/" "3" +"color-schemes" "4" +"Solarized Dark.json" "5" +"Solarized Light.json" "5" +"Standard.json" "5" +"Sublime.json" "5" +"Terminal.json" "5" +"Tomorrow Night Blue.json" "5" +"Tomorrow Night Bright.json" "5" +"Tomorrow Night Eighties.json" "5" +"Tomorrow Night.json" "5" +"Tomorrow.json" "5" +"locale" "4" +"ar.qm" "5" +"ca_ES.qm" "5" +"cs_CZ.qm" "5" +"da.qm" "5" +"de_DE.qm" "5" +"el.qm" "5" +"en_GB.qm" "5" +"en_US.qm" "5" +"es_AR.qm" "5" +"es_ES.qm" "5" +"et_EE.qm" "5" +"eu_ES.qm" "5" +"fi_FI.qm" "5" +"fr_FR.qm" "5" +"he_IL.qm" "5" +"hu_HU.qm" "5" +"id_ID.qm" "5" +"it_IT.qm" "5" +"ja_JP.qm" "5" +"ko_KR.qm" "5" +"lt.qm" "5" +"lv_LV.qm" "5" +"nb_NO.qm" "5" +"nl_NL.qm" "5" +"pl_PL.qm" "5" +"pt_BR.qm" "5" +"pt_PT.qm" "5" +"ro_RO.qm" "5" +"ru_RU.qm" "5" +"sk.qm" "5" +"sv_SE.qm" "5" +"tr_TR.qm" "5" +"uz_Latn_UZ.qm" "5" +"vi.qm" "5" +"zh_CN.qm" "5" +"speedcrunch.png" "4" "" "1" "manual.qrc" "3" "/manual" "4" From 81c39da7d05a7bf02883eda70a5e025a3c10be52 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 1 Dec 2023 10:49:28 +0100 Subject: [PATCH 12/27] Update qbs submodule to HEAD of 2.2 branch Change-Id: Ief8758531017292fd87ac93a9653dc73b3ccbd3e Reviewed-by: 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 7867c6aaa37..36e230e0baf 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 7867c6aaa375e6c7ff3affb67dc6af56df1ecdf4 +Subproject commit 36e230e0bafdbe11bd31bd294ae745403c553c74 From 3204002055a30721b7dc0d820169e348482432be Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Sat, 2 Dec 2023 11:13:16 +0100 Subject: [PATCH 13/27] CMakePM: Check if the callStack optional has value Amends edf4280bd97aceb692ead83ac30ecc6d49a93f6b Task-number: QTCREATORBUG-29965 Change-Id: I7deb6d5952cceaa1f238cdd02393a369c56e0376 Reviewed-by: Jarek Kobus --- src/plugins/cmakeprojectmanager/cmakeparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index de4633ea617..fed1a3ffa14 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -206,7 +206,7 @@ void CMakeParser::flush() m_lastTask.summary = m_lastTask.details.takeFirst(); m_lines += m_lastTask.details.count(); - if (m_callStack) { + if (m_callStack.has_value() && !m_callStack.value().isEmpty()) { m_lastTask.file = m_callStack.value().last().file; m_lastTask.line = m_callStack.value().last().line; From f073db7f4c3cf06b4a1a2c5270c93a72986d80c8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 28 Nov 2023 18:19:48 +0100 Subject: [PATCH 14/27] ProjectExplorer: Fix "unavailable" annotation of fixed run configs Amends 058a931d271ee544ffce48654ff1c21f67da47e1. Fixes: QTCREATORBUG-29983 Change-Id: I4db546d1370909b55d6662d403be10e263c4e878 Reviewed-by: Reviewed-by: hjk --- src/plugins/projectexplorer/runconfiguration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 4a1e03d031d..8c74b331db6 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -689,7 +689,7 @@ bool FixedRunConfigurationFactory::supportsBuildKey(Target *target, const QStrin { Q_UNUSED(target) Q_UNUSED(key) - return false; + return true; } } // namespace ProjectExplorer From c0d783502204989be8710957380a7161652415ee Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Fri, 1 Dec 2023 13:03:31 +0100 Subject: [PATCH 15/27] Git: Stop Instant Blame when git returns empty blame data That can happen for example, when having a file with active Instant Blame open and choosing "Save As" to save a copy of that file in a folder not under version control. Also fix the related case, when the file is saved in the same folder, but is not under version control yet. In this case, let's remove the blame mark, otherwise it will stay forever as we only stopped the cursor connection. Fixes: QTCREATORBUG-29991 Change-Id: I6ffed869c18334ba87dbcded409d31ead21f4b25 Reviewed-by: Orgad Shaneh Reviewed-by: --- src/plugins/git/gitplugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 3f8c55b18d4..24441a0a264 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1592,10 +1592,14 @@ void GitPluginPrivate::instantBlame() const auto commandHandler = [this, filePath, line](const CommandResult &result) { if (result.result() == ProcessResult::FinishedWithError && result.cleanedStdErr().contains("no such path")) { - disconnect(m_blameCursorPosConn); + stopInstantBlame(); return; } const QString output = result.cleanedStdOut(); + if (output.isEmpty()) { + stopInstantBlame(); + return; + } const CommitInfo info = parseBlameOutput(output.split('\n'), filePath, m_author); m_blameMark.reset(new BlameMark(filePath, line, info)); }; From e8262ed9307726fe3311db3b338c63dcec4a8511 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Sat, 2 Dec 2023 12:02:40 +0100 Subject: [PATCH 16/27] CMakePM: Fix crash (potential) on CMakeParser::flush Use the Task copy for the inversal of the call stack. Amends edf4280bd97aceb692ead83ac30ecc6d49a93f6b Fixes: QTCREATORBUG-29965 Change-Id: I6119e03c75ff5a7d44f86e91cc93e6417fea1689 Reviewed-by: Eike Ziller Reviewed-by: --- .../cmakeprojectmanager/cmakeparser.cpp | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index fed1a3ffa14..11e2dc721df 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -202,22 +202,25 @@ void CMakeParser::flush() if (m_lastTask.isNull()) return; - if (m_lastTask.summary.isEmpty() && !m_lastTask.details.isEmpty()) - m_lastTask.summary = m_lastTask.details.takeFirst(); - m_lines += m_lastTask.details.count(); + Task t = m_lastTask; + m_lastTask.clear(); + + if (t.summary.isEmpty() && !t.details.isEmpty()) + t.summary = t.details.takeFirst(); + m_lines += t.details.count(); if (m_callStack.has_value() && !m_callStack.value().isEmpty()) { - m_lastTask.file = m_callStack.value().last().file; - m_lastTask.line = m_callStack.value().last().line; + t.file = m_callStack.value().last().file; + t.line = m_callStack.value().last().line; LinkSpecs specs; - m_lastTask.details << QString(); - m_lastTask.details << Tr::tr("Call stack:"); + t.details << QString(); + t.details << Tr::tr("Call stack:"); m_lines += 2; m_callStack->push_front(m_errorOrWarningLine); - int offset = m_lastTask.details.join('\n').size(); + int offset = t.details.join('\n').size(); Utils::reverseForeach(m_callStack.value(), [&](const auto &line) { const QString fileAndLine = QString("%1:%2").arg(line.file.path()).arg(line.line); const QString completeLine = QString(" %1%2").arg(fileAndLine).arg(line.function); @@ -228,16 +231,14 @@ void CMakeParser::flush() int(fileAndLine.length()), createLinkTarget(line.file, line.line, -1)}); - m_lastTask.details << completeLine; + t.details << completeLine; offset += completeLine.length() - 2; ++m_lines; }); - setDetailsFormat(m_lastTask, specs); + setDetailsFormat(t, specs); } - Task t = m_lastTask; - m_lastTask.clear(); scheduleTask(t, m_lines, 1); m_lines = 0; From c0d1975ff9a6e791172858c4265943a597799132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Mon, 7 Aug 2023 16:38:50 +0200 Subject: [PATCH 17/27] SquishTests: Fix fetching Jira status Change-Id: If01b08673f88588eee9370488a429a6f633d93db Reviewed-by: Christian Stenger --- tests/system/shared/workarounds.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py index 945dc5cdf50..9ce6f00a134 100644 --- a/tests/system/shared/workarounds.py +++ b/tests/system/shared/workarounds.py @@ -99,8 +99,7 @@ class JIRA: test.fatal("No resolution info for %s" % bug) self._resolution = 'Done' else: - if isinstance(data, (bytes)): - data = str(data) + data = stringify(data) data = data.replace("\r", "").replace("\n", "") resPattern = re.compile('(?P.*?)') resolution = resPattern.search(data) From 5460a0d5f6a229aefc0e75ef0ea75c77db6c6dce Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 19 Oct 2023 16:11:31 +0300 Subject: [PATCH 18/27] boot2qt: QDB devices support rsync and sftp Users don't add QDB device themselves and therefore device test isn't run. This means neither rsync or sftp is available with GenericUpload deployment. Ideally, we should run the device test in the background but that would require larger code refactoring to support it. For now, set all QDB devices with support for both rsync and sftp. Host's support will still determine if either one can be used. Change-Id: I1f73508b9255e0984ca48c763dcaf49b931e0e21 Reviewed-by: hjk Reviewed-by: Ari Parkkila Reviewed-by: Christian Kandeler --- src/plugins/boot2qt/device-detection/devicedetector.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/boot2qt/device-detection/devicedetector.cpp b/src/plugins/boot2qt/device-detection/devicedetector.cpp index 10faa4fb3ca..abe06bc566b 100644 --- a/src/plugins/boot2qt/device-detection/devicedetector.cpp +++ b/src/plugins/boot2qt/device-detection/devicedetector.cpp @@ -9,6 +9,7 @@ #include "../qdbutils.h" #include +#include #include @@ -85,6 +86,8 @@ void DeviceDetector::handleDeviceEvent(QdbDeviceTracker::DeviceEventType eventTy device->settings()->displayName.setValue(name); device->setType(Qdb::Constants::QdbLinuxOsType); device->setMachineType(IDevice::Hardware); + device->setExtraData(ProjectExplorer::Constants::SUPPORTS_RSYNC, true); + device->setExtraData(ProjectExplorer::Constants::SUPPORTS_SFTP, true); const QString ipAddress = info["ipAddress"]; device->setupDefaultNetworkSettings(ipAddress); From 9a364811de9e53e3df544ac963bbeafa0d58380c Mon Sep 17 00:00:00 2001 From: Yasser Grimes Date: Mon, 27 Nov 2023 14:58:37 +0200 Subject: [PATCH 19/27] McuSupport: Ignore resetting QtMCUs package on target update QtMCUs package is part of every target with the same pointer address across all targets, when reseting the target packages to default this will cause inconsistensy as the default path for QtMCUs package is the home directory. Fixes: QTCREATORBUG-29960 Change-Id: I2fcc6b631355928bc883e9072b0f3f3c12737c37 Reviewed-by: Alessandro Portale Reviewed-by: Karim Abdelrahman --- src/plugins/mcusupport/mcukitmanager.cpp | 3 +-- src/plugins/mcusupport/mcutarget.cpp | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp index 2cc2311e693..fd2ce79486e 100644 --- a/src/plugins/mcusupport/mcukitmanager.cpp +++ b/src/plugins/mcusupport/mcukitmanager.cpp @@ -30,7 +30,6 @@ #include -#include #include #include #include @@ -433,7 +432,7 @@ QList existingKits(const McuTarget *mcuTarget) using namespace Constants; // some models have compatible name changes that refere to the same supported board across versions. // name changes are tracked here to recognize the corresponding kits as upgradable. - static QMap upgradable_to = { + static const QMap upgradable_to = { {"MIMXRT1170-EVK-FREERTOS", {"MIMXRT1170-EVKB-FREERTOS"}}}; return Utils::filtered(KitManager::kits(), [mcuTarget](Kit *kit) { return kit->value(KIT_MCUTARGET_KITVERSION_KEY) == KIT_VERSION diff --git a/src/plugins/mcusupport/mcutarget.cpp b/src/plugins/mcusupport/mcutarget.cpp index faef32b61ba..84cc80f7aa0 100644 --- a/src/plugins/mcusupport/mcutarget.cpp +++ b/src/plugins/mcusupport/mcutarget.cpp @@ -7,6 +7,7 @@ #include "mcusupport_global.h" #include "mcusupportplugin.h" #include "mcusupporttr.h" +#include "mcusupportconstants.h" #include @@ -115,12 +116,13 @@ void McuTarget::handlePackageProblems(MessagesList &messages) const void McuTarget::resetInvalidPathsToDefault() { - for (McuPackagePtr package : std::as_const(m_packages)) { if (!package) continue; if (package->isValidStatus()) continue; + if (package->settingsKey() == Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK) + continue; package->setPath(package->defaultPath()); package->writeToSettings(); } From a6a95420b6be814096394b004268219727beb354 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 4 Dec 2023 14:44:03 +0100 Subject: [PATCH 20/27] Main: Show a GUI message if platform plugin fails to load If the Qt platform plugin fails to load, most famously xcb on systems that do not have libxcb-cursor0 installed, the interesting messages are only written to a terminal, and not visible when running Qt Creator from e.g. the installer or dock. Temporarily install a special Qt message handler that scribbles along the qWarnings and qFatals while creating the QGuiApplication, and make it output the messages via xmessage in case a qFatal is received (and xmessage is available). On macOS show a dialog with osascript. Windows already gets a dialog from Qt proper. Also add the explicit message about (lib)xcb-cursor0 for Qt versions that do not have it yet. Fixes: QTCREATORBUG-30004 Task-number: QTBUG-108796 Task-number: QTCREATORBUG-29873 Change-Id: I5e5dafb398db6a72178413c8b883325c56d9a016 Reviewed-by: Cristian Adam --- src/app/main.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 036d169c063..819e0f11890 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -477,6 +477,53 @@ bool startCrashpad(const QString &libexecPath, bool crashReportingEnabled) } #endif +class ShowInGuiHandler +{ +public: + ShowInGuiHandler() + { + instance = this; + oldHandler = qInstallMessageHandler(log); + } + ~ShowInGuiHandler() { qInstallMessageHandler(oldHandler); }; + +private: + static void log(QtMsgType type, const QMessageLogContext &context, const QString &msg) + { + instance->messages += msg; + if (type == QtFatalMsg) { + // Show some kind of GUI with collected messages before exiting. + // For Windows, Qt already uses a dialog. + if (Utils::HostOsInfo::isLinuxHost()) { +#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && QT_VERSION < QT_VERSION_CHECK(6, 5, 3)) \ + || (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) && QT_VERSION < QT_VERSION_CHECK(6, 6, 1)) + // Information about potentially missing libxcb-cursor0 is printed by Qt since Qt 6.5.3 and Qt 6.6.1 + // Add it manually for other versions >= 6.5.0 + instance->messages.prepend("From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to " + "load the Qt xcb platform plugin."); +#endif + if (QFile::exists("/usr/bin/xmessage")) + QProcess::startDetached("/usr/bin/xmessage", {instance->messages.join("\n")}); + } else if (Utils::HostOsInfo::isMacHost()) { + QProcess::startDetached("/usr/bin/osascript", + {"-e", + "display dialog \"" + + instance->messages.join("\n").replace("\"", "\\\"") + + "\" buttons \"OK\" with title \"" + + Core::Constants::IDE_DISPLAY_NAME + + " Failed to Start\""}); + } + } + instance->oldHandler(type, context, msg); + }; + + static ShowInGuiHandler *instance; + QStringList messages; + QtMessageHandler oldHandler = nullptr; +}; + +ShowInGuiHandler *ShowInGuiHandler::instance = nullptr; + int main(int argc, char **argv) { Restarter restarter(argc, argv); @@ -590,9 +637,13 @@ int main(int argc, char **argv) int numberOfArguments = static_cast(options.appArguments.size()); + // create a custom Qt message handler that shows messages in a bare bones UI + // if creation of the QGuiApplication fails. + auto handler = std::make_unique(); std::unique_ptr appPtr(SharedTools::createApplication(QLatin1String(Core::Constants::IDE_DISPLAY_NAME), numberOfArguments, options.appArguments.data())); + handler.reset(); SharedTools::QtSingleApplication &app = *appPtr; QCoreApplication::setApplicationName(Core::Constants::IDE_CASED_ID); QCoreApplication::setApplicationVersion(QLatin1String(Core::Constants::IDE_VERSION_LONG)); From 5c1b8dee32cae5ca55a280c75e5a4bf2d53b3ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Wed, 26 Jul 2023 16:19:57 +0200 Subject: [PATCH 21/27] SquishTests: Simplify and stabilize special handling of Mac menus - Check condition only once - Make sure correct length is being used Change-Id: I8c9627d91b4f022d60bae039c0478248cc30d183 Reviewed-by: Christian Stenger --- tests/system/shared/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 77b493b32a0..be1f474c6e7 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -171,11 +171,13 @@ def invokeMenuItem(menu, item, *subItems): numberedPrefix = "%d | " for subItem in subItems: # we might have numbered sub items (e.g. "Recent Files") - these have this special prefix - # but on macOS we don't add these prefixes - if platform.system() == 'Darwin' and subItem.startswith(numberedPrefix): - subItem = subItem[5:] + hasNumPrefix = subItem.startswith(numberedPrefix) + if hasNumPrefix and platform.system() == 'Darwin': + # on macOS we don't add these prefixes + subItem = subItem[len(numberedPrefix):] + hasNumPrefix = False - if subItem.startswith(numberedPrefix): + if hasNumPrefix: triggered = False for i in range(1, 10): try: From 6d101cd8120a88a5e6f5ec0487d3cd70c0882b0b Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 4 Dec 2023 10:53:32 +0100 Subject: [PATCH 22/27] ClangCodeModel: Fix following virtual functions We used to follow a Goto Implementation request with a Goto Definition request, because the latter gave us the declaration instead of the definition. This has changed in clangd 17, which means we now called Goto Definition on a definition, which clangd interprets as switching to the declaration. We now do the right thing for all supported clangd versions. Change-Id: I1c0acd2c8d5c942f7e25dedb1da953bb4f8d8d13 Reviewed-by: Christian Stenger --- src/plugins/clangcodemodel/clangdfollowsymbol.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp index a975c787368..ed74dac0d9d 100644 --- a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp +++ b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp @@ -464,7 +464,7 @@ void ClangdFollowSymbol::Private::handleGotoImplementationResult( // Also get the AST for the base declaration, so we can find out whether it's // pure virtual and mark it accordingly. // In addition, we need to follow all override links, because for these, clangd - // gives us the declaration instead of the definition. + // gives us the declaration instead of the definition (until clangd 16). for (const Link &link : std::as_const(allLinks)) { if (!client->documentForFilePath(link.targetFilePath) && addOpenFile(link.targetFilePath)) client->openExtraFile(link.targetFilePath); @@ -492,6 +492,9 @@ void ClangdFollowSymbol::Private::handleGotoImplementationResult( if (link == defLink) continue; + if (client->versionNumber().majorVersion() >= 17) + continue; + const TextDocumentIdentifier doc(client->hostPathToServerUri(link.targetFilePath)); const TextDocumentPositionParams params(doc, pos); GotoDefinitionRequest defReq(params); From ade5ebd95f118a2462cf303f71b134bdfd44dc06 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 6 Dec 2023 13:00:56 +0100 Subject: [PATCH 23/27] Add change log for 12.0.1 Change-Id: I077362b4ddb4fc09d66e682c9e12775a33d822b7 Reviewed-by: Leena Miettinen --- dist/changelog/changes-12.0.1.md | 97 ++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 dist/changelog/changes-12.0.1.md diff --git a/dist/changelog/changes-12.0.1.md b/dist/changelog/changes-12.0.1.md new file mode 100644 index 00000000000..0883f186020 --- /dev/null +++ b/dist/changelog/changes-12.0.1.md @@ -0,0 +1,97 @@ +Qt Creator 12.0.1 +================= + +Qt Creator version 12.0.1 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/v12.0.0..v12.0.1 + +General +------- + +* Fixed opening files with drag and drop on Qt Creator + (QTCREATORBUG-29961) + +Editing +------- + +### C++ + +* Fixed a crash while parsing + (QTCREATORBUG-29847) +* Fixed a freeze when hovering over a class declaration + (QTCREATORBUG-29975) +* Fixed the renaming of virtual functions +* Fixed `Select Block Up` for string literals + (QTCREATORBUG-29844) +* Fixed the conversion between comment styles for certain indented comments + +Projects +-------- + +* Fixed the restoring of custom Kit data + (QTCREATORBUG-29970) +* Fixed overlapping labels in the target selector + (QTCREATORBUG-29990) +* Fixed the label for `Custom Executable` run configurations + (QTCREATORBUG-29983) + +### CMake + +* Fixed a crash when opening projects + (QTCREATORBUG-29965) + +Analyzer +-------- + +### Valgrind + +* Fixed stopping the Valgrind process + (QTCREATORBUG-29948) + +Version Control Systems +----------------------- + +### Git + +* Fixed that empty blame annotations are shown after saving a file outside of + the version control directory + (QTCREATORBUG-29991) + +Platforms +--------- + +### Linux + +* Added an error dialog for errors when loading the Qt platform plugin + (QTCREATORBUG-30004) + +### Boot2Qt + +* Fixed deployment on Windows + (QTCREATORBUG-29971) + +### MCU + +* Fixed `Replace existing kits` after changing MCU SDK path + (QTCREATORBUG-29960) + +Credits for these changes go to: +-------------------------------- +Alessandro Portale +Andre Hartmann +Christian Kandeler +Christian Stenger +Cristian Adam +Eike Ziller +Jaroslaw Kobus +Marcus Tillmanns +Orgad Shaneh +Robert Löhning +Samuli Piippo +Tor Arne Vestbø +Yasser Grimes From 332a742e0b07a831b8e11796513b3929e918c844 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 29 Nov 2023 12:14:52 +0100 Subject: [PATCH 24/27] pdb: Fix command line arguments pdbbridge uses exec() on the main file which causes the inferior to use its sys.argv. Inferiors using argparse would then fail since they cannot make use of the working directory passed. To fix this, append the inferior arguments separated by "--" and change sys.argv accordingly. Change-Id: I35caf4b3ec19c5259c0d4235787c03a3e592768a Reviewed-by: Christian Stenger Reviewed-by: --- share/qtcreator/debugger/pdbbridge.py | 9 ++++++++- src/plugins/debugger/pdb/pdbengine.cpp | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/pdbbridge.py b/share/qtcreator/debugger/pdbbridge.py index 228f4c8c1fc..a245a588140 100644 --- a/share/qtcreator/debugger/pdbbridge.py +++ b/share/qtcreator/debugger/pdbbridge.py @@ -704,13 +704,20 @@ class QtcInternalDumper(): def runit(self): print('DIR: %s' % dir()) + print('ARGV: %s' % sys.argv) if sys.argv[0] == '-c': sys.argv = sys.argv[2:] else: sys.argv = sys.argv[1:] - print('ARGV: %s' % sys.argv) mainpyfile = sys.argv[0] # Get script filename sys.path.append(os.path.dirname(mainpyfile)) + # Delete arguments superfluous to the inferior + try: + args_pos = sys.argv.index("--") + sys.argv = [sys.argv[0]] + sys.argv[args_pos + 1:] + except ValueError: + pass + print('INFERIOR ARGV: %s' % sys.argv) print('MAIN: %s' % mainpyfile) while True: diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index 9c7c9bcac35..b58a1f4ba34 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -114,6 +114,13 @@ void PdbEngine::setupEngine() CommandLine cmd{m_interpreter, {bridge, scriptFile.path()}}; cmd.addArg(runParameters().inferior.workingDirectory.path()); + cmd.addArg("--"); + QStringList arguments = runParameters().inferior.command.splitArguments(); + if (!arguments.isEmpty() && arguments.constFirst() == "-u") + arguments.removeFirst(); // unbuffered added by run config + if (!arguments.isEmpty()) + arguments.removeFirst(); // file added by run config + cmd.addArgs(arguments); showMessage("STARTING " + cmd.toUserOutput()); m_proc.setEnvironment(runParameters().debugger.environment); m_proc.setCommand(cmd); From 5b28043d462824c4702feaff393172c87582f776 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 29 Nov 2023 15:16:08 +0100 Subject: [PATCH 25/27] pdb: Fix duplication of command line arguments They are already added by the Python run configuration. Change-Id: Icfea32e00209a690901cf672a17a8ef5c23b909d Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerruncontrol.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index a12c8cec40d..5bdfb8c60a7 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -915,8 +915,6 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm if (!interpreter.isEmpty() && mainScript.endsWith(".py")) { m_runParameters.mainScript = mainScript; m_runParameters.interpreter = interpreter; - if (auto args = runControl->aspect()) - m_runParameters.inferior.command.addArgs(args->arguments, CommandLine::Raw); if (runControl->runMode() == ProjectExplorer::Constants::DEBUG_RUN_MODE) m_engine = createPdbEngine(); } From b360776b1f96dea4f74250ea09c79cfc77d9ed63 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 5 Dec 2023 21:41:42 +0100 Subject: [PATCH 26/27] CMakePM: Always display the right CMake version Qt SDK installs Qt SDK is using the following parameters for sdktool: "--name", "CMake %CMAKE_VERSION% (Qt)" This effectively hardcodes the CMake version for the Qt SDK forever. Fixes: QTCREATORBUG-30019 Fixes: QTCREATORBUG-29973 Fixes: QTCREATORBUG-28437 Change-Id: I05408442ea26d390f60a123be4fbf71f7018b150 Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/cmakesettingspage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp index 10f03133850..b82ffc4e3c8 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp @@ -120,6 +120,10 @@ public: m_tooltip += "
" + Tr::tr("Detection source: \"%1\"").arg(m_detectionSource); m_versionDisplay = cmake.versionDisplay(); + + // Make sure to always have the right version in the name for Qt SDK CMake installations + if (m_name.startsWith("CMake") && m_name.endsWith("(Qt)")) + m_name = QString("CMake %1 (Qt)").arg(m_versionDisplay); } CMakeToolTreeItem() = default; From d1ac2fe45a9a7986bfb9217f14bfc1ca22a9cdd9 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 6 Dec 2023 09:56:47 +0100 Subject: [PATCH 27/27] Adjust position of refactor submenu Fixes: QTCREATORBUG-30010 Change-Id: Idf4ce4e3bc4d0af3d40460c8f2e27f52c90f2454 Reviewed-by: Christian Kandeler --- src/plugins/cppeditor/cppeditorwidget.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index 8f06a363ea8..b25150ddb71 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -1126,6 +1126,19 @@ QMenu *CppEditorWidget::createRefactorMenu(QWidget *parent) const case CppUseSelectionsUpdater::RunnerInfo::Invalid: QTC_CHECK(false && "Unexpected CppUseSelectionsUpdater runner result"); } + QMetaObject::invokeMethod(menu, [menu](){ + if (auto mainWin = ICore::mainWindow()) { + menu->adjustSize(); + if (QTC_GUARD(menu->parentWidget())) { + QPoint p = menu->pos(); + const int w = menu->width(); + if (p.x() + w > mainWin->screen()->geometry().width()) { + p.setX(menu->parentWidget()->x() - w); + menu->move(p); + } + } + } + }, Qt::QueuedConnection); }); return menu;