From f1fd60077c8281c2b65a2d76b02cc8c50feeac47 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 14 Jun 2024 11:11:44 +0200 Subject: [PATCH 01/19] Doc: Add example of Convert Function Call to Qt Meta-Method Invocation Task-number: QTCREATORBUG-30604 Change-Id: I9245b4eb35f6cc951ba70583a628870b53040e7b Reviewed-by: Christian Stenger --- .../creator-only/creator-cpp-quick-fixes.qdoc | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc b/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc index 1a38c359292..310ab84aabd 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc @@ -411,8 +411,59 @@ \inlineimage icons/refactormarker.png \row \li Convert Function Call to Qt Meta-Method Invocation - \li Converts a normal function call into a meta method invocation, if - the function is marked as invokable. + \li Converts an invokable function call into a meta method + invocation. This applies to signals and slots in general, + as well as functions explicitly marked with \c Q_INVOKABLE. + For example, for the following class: + \code + class Foo : public QObject + { + Q_OBJECT + public: + explicit Foo(QObject *parent = nullptr); + + Q_SLOT void pubBar(int i); + + private: + Q_INVOKABLE void bar(int i, const QString &c); + }; + \endcode + + rewrites + + \code + Foo::Foo(QObject *parent) + : QObject{parent} + { + this->bar(42, QString("answer")); + } + \endcode + + as + + \code + Foo::Foo(QObject *parent) + : QObject{parent} + { + QMetaObject::invokeMethod(this, "bar", Q_ARG(int, 42), Q_ARG(QString, QString("answer"))); + } + \endcode + + The quick fix also works on invokable methods outside the class that are + visible from the location where they are called from. For example, it + rewrites: + + \code + Foo f; + f.pubBar(123); + \endcode + + as + + \code + Foo f; + QMetaObject::invokeMethod(&f, "pubBar", Q_ARG(int, 123)); + \endcode \row \li Move Definition Here \li Moves an existing function definition to its declaration. From 834e0867b08f2407b28d6510f3637b0fc04dfa15 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 14 Jun 2024 10:25:00 +0200 Subject: [PATCH 02/19] Update qbs submodule to HEAD of 2.4 branch Change-Id: I21173a7408dd40dbe12a142d01956cbb784d4ce7 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 7ca1715dd49..f67d43fc24b 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 7ca1715dd49a33215068e5e701ae4c851d3716e5 +Subproject commit f67d43fc24bec11a6b599d46304ea06e15218acd From 8a7402c7cd415a9c4af6cb13761e20be1f82ff71 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 14 Jun 2024 11:23:42 +0200 Subject: [PATCH 03/19] Debugger: Allow GDB/LLDB DAP debugger as native C++ debugger This would allow manual registration of a GDB/LLDB DAP debugger from a CMake configure preset as follows: ``` "vendor": { "qt.io/QtCreator/1.0": { "debugger": { "DisplayName": "LLDB Dap 18.1.7 Debugger", "Abis": ["arm-darwin-generic-mach_o-64bit"], "Binary": "/Users/cristian/llvm/clang/bin/lldb-dap", "EngineType": 1024, "Version": "18.1.7" } } } ``` This way I can configure a project with a toolchain that uses a DAP debugger (not every gdb/lldb has python bindings) and have debugging working out of the box. Change-Id: Id9bff26b6544b7af99caccb18cdbe0edb334218a Reviewed-by: Artem Sokolovskii Reviewed-by: hjk --- src/plugins/debugger/debuggerconstants.h | 2 ++ src/plugins/debugger/debuggerengine.cpp | 2 ++ src/plugins/debugger/debuggeritem.cpp | 4 ++++ src/plugins/debugger/debuggerruncontrol.cpp | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h index 2011c3d7a3a..186e2120378 100644 --- a/src/plugins/debugger/debuggerconstants.h +++ b/src/plugins/debugger/debuggerconstants.h @@ -100,6 +100,8 @@ enum DebuggerEngineType GdbEngineType = 0x001, CdbEngineType = 0x004, LldbEngineType = 0x100, + GdbDapEngineType = 0x200, + LldbDapEngineType = 0x400, UvscEngineType = 0x1000 }; diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index b0ff79f5d1e..0acda44b33b 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -2625,6 +2625,8 @@ bool DebuggerRunParameters::isCppDebugging() const return cppEngineType == GdbEngineType || cppEngineType == LldbEngineType || cppEngineType == CdbEngineType + || cppEngineType == GdbDapEngineType + || cppEngineType == LldbDapEngineType || cppEngineType == UvscEngineType; } diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 6cf45ac13e1..9cd855c148e 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -271,6 +271,10 @@ QString DebuggerItem::engineTypeName() const return QLatin1String("CDB"); case LldbEngineType: return QLatin1String("LLDB"); + case GdbDapEngineType: + return QLatin1String("GDB DAP"); + case LldbDapEngineType: + return QLatin1String("LLDB DAP"); case UvscEngineType: return QLatin1String("UVSC"); default: diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index b14e9ee30b0..2ff53099e4b 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -494,6 +494,12 @@ void DebuggerRunTool::start() case LldbEngineType: m_engines << createLldbEngine(); break; + case GdbDapEngineType: + m_engines << createDapEngine(ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE); + break; + case LldbDapEngineType: + m_engines << createDapEngine(ProjectExplorer::Constants::DAP_LLDB_DEBUG_RUN_MODE); + break; case UvscEngineType: m_engines << createUvscEngine(); break; From 36531a10680ef9dbf42faf719e7e677997013d04 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 14 Jun 2024 09:05:49 +0200 Subject: [PATCH 04/19] Cppcheck: Fix handling of settings We need to distinguish between the global settings and the settings used for a manual analyzer run. Fixes: QTCREATORBUG-28951 Fixes: QTCREATORBUG-30615 Change-Id: Ic2dabd14e4d06d77bebcedd9e653f54a4d179c82 Reviewed-by: Marcus Tillmanns --- .../cppcheck/cppcheckmanualrundialog.cpp | 4 +- .../cppcheck/cppcheckmanualrundialog.h | 4 ++ src/plugins/cppcheck/cppcheckplugin.cpp | 8 ++-- src/plugins/cppcheck/cppchecktool.cpp | 38 +++++++++---------- src/plugins/cppcheck/cppchecktool.h | 5 ++- 5 files changed, 31 insertions(+), 28 deletions(-) diff --git a/src/plugins/cppcheck/cppcheckmanualrundialog.cpp b/src/plugins/cppcheck/cppcheckmanualrundialog.cpp index 35a057ccffd..f5d5f687581 100644 --- a/src/plugins/cppcheck/cppcheckmanualrundialog.cpp +++ b/src/plugins/cppcheck/cppcheckmanualrundialog.cpp @@ -52,7 +52,9 @@ ManualRunDialog::ManualRunDialog(const ProjectExplorer::Project *project) analyzeButton->setEnabled(m_model->hasCheckedFiles()); }); - auto optionsWidget = settings().layouter()().emerge(); + m_manualRunSettings.readSettings(); + m_manualRunSettings.setAutoApply(true); + auto optionsWidget = m_manualRunSettings.layouter()().emerge(); auto layout = new QVBoxLayout(this); layout->addWidget(optionsWidget); diff --git a/src/plugins/cppcheck/cppcheckmanualrundialog.h b/src/plugins/cppcheck/cppcheckmanualrundialog.h index 76206578e34..fe5b920ee23 100644 --- a/src/plugins/cppcheck/cppcheckmanualrundialog.h +++ b/src/plugins/cppcheck/cppcheckmanualrundialog.h @@ -3,6 +3,8 @@ #pragma once +#include "cppchecksettings.h" + #include namespace Utils { @@ -25,8 +27,10 @@ public: Utils::FilePaths filePaths() const; QSize sizeHint() const override; + const CppcheckSettings &manualRunSettings() const { return m_manualRunSettings; } private: ProjectExplorer::SelectableFilesFromDirModel *m_model; + CppcheckSettings m_manualRunSettings; }; } // Cppcheck::Internal diff --git a/src/plugins/cppcheck/cppcheckplugin.cpp b/src/plugins/cppcheck/cppcheckplugin.cpp index 30ee2c2d67c..5bc99e54efb 100644 --- a/src/plugins/cppcheck/cppcheckplugin.cpp +++ b/src/plugins/cppcheck/cppcheckplugin.cpp @@ -56,9 +56,9 @@ public: CppcheckPluginPrivate::CppcheckPluginPrivate() { - tool.updateOptions(); + tool.updateOptions(settings()); connect(&settings(), &AspectContainer::changed, this, [this] { - tool.updateOptions(); + tool.updateOptions(settings()); trigger.recheck(); }); @@ -112,8 +112,6 @@ void CppcheckPluginPrivate::startManualRun() if (!project) return; - manualRunTool.updateOptions(); - ManualRunDialog dialog(project); if (dialog.exec() == ManualRunDialog::Rejected) return; @@ -125,7 +123,7 @@ void CppcheckPluginPrivate::startManualRun() return; manualRunTool.setProject(project); - manualRunTool.updateOptions(); + manualRunTool.updateOptions(dialog.manualRunSettings()); manualRunTool.check(files); perspective.select(); } diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp index 85a17d92df4..e91e5a2ca05 100644 --- a/src/plugins/cppcheck/cppchecktool.cpp +++ b/src/plugins/cppcheck/cppchecktool.cpp @@ -39,10 +39,10 @@ CppcheckTool::CppcheckTool(CppcheckDiagnosticManager &manager, const Id &progres CppcheckTool::~CppcheckTool() = default; -void CppcheckTool::updateOptions() +void CppcheckTool::updateOptions(const CppcheckSettings &settings) { m_filters.clear(); - for (const QString &pattern : settings().ignoredPatterns().split(',')) { + for (const QString &pattern : settings.ignoredPatterns().split(',')) { const QString trimmedPattern = pattern.trimmed(); if (trimmedPattern.isEmpty()) continue; @@ -52,56 +52,54 @@ void CppcheckTool::updateOptions() m_filters.push_back(re); } - updateArguments(); + updateArguments(settings); } void CppcheckTool::setProject(ProjectExplorer::Project *project) { m_project = project; - updateArguments(); + updateArguments(settings()); } -void CppcheckTool::updateArguments() +void CppcheckTool::updateArguments(const CppcheckSettings &settings) { if (!m_project) return; m_cachedAdditionalArguments.clear(); - CppcheckSettings &s = settings(); - QStringList arguments; - if (!s.customArguments().isEmpty()) { + if (!settings.customArguments().isEmpty()) { Utils::MacroExpander *expander = Utils::globalMacroExpander(); - const QString expanded = expander->expand(s.customArguments()); + const QString expanded = expander->expand(settings.customArguments()); arguments.push_back(expanded); } - if (s.warning()) + if (settings.warning()) arguments.push_back("--enable=warning"); - if (s.style()) + if (settings.style()) arguments.push_back("--enable=style"); - if (s.performance()) + if (settings.performance()) arguments.push_back("--enable=performance"); - if (s.portability()) + if (settings.portability()) arguments.push_back("--enable=portability"); - if (s.information()) + if (settings.information()) arguments.push_back("--enable=information"); - if (s.unusedFunction()) + if (settings.unusedFunction()) arguments.push_back("--enable=unusedFunction"); - if (s.missingInclude()) + if (settings.missingInclude()) arguments.push_back("--enable=missingInclude"); - if (s.inconclusive()) + if (settings.inconclusive()) arguments.push_back("--inconclusive"); - if (s.forceDefines()) + if (settings.forceDefines()) arguments.push_back("--force"); - if (!s.unusedFunction() && !s.customArguments().contains("-j ")) + if (!settings.unusedFunction() && !settings.customArguments().contains("-j ")) arguments.push_back("-j " + QString::number(QThread::idealThreadCount())); arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\""); - m_runner->reconfigure(s.binary.effectiveBinary(), arguments.join(' ')); + m_runner->reconfigure(settings.binary.effectiveBinary(), arguments.join(' ')); } QStringList CppcheckTool::additionalArguments(const CppEditor::ProjectPart &part) const diff --git a/src/plugins/cppcheck/cppchecktool.h b/src/plugins/cppcheck/cppchecktool.h index e8e61efaef9..cf36bb18525 100644 --- a/src/plugins/cppcheck/cppchecktool.h +++ b/src/plugins/cppcheck/cppchecktool.h @@ -24,6 +24,7 @@ namespace Cppcheck::Internal { class CppcheckRunner; class CppcheckDiagnosticManager; +class CppcheckSettings; class CppcheckTool final : public QObject { @@ -33,7 +34,7 @@ public: CppcheckTool(CppcheckDiagnosticManager &manager, const Utils::Id &progressId); ~CppcheckTool() override; - void updateOptions(); + void updateOptions(const CppcheckSettings &settings); void setProject(ProjectExplorer::Project *project); void check(const Utils::FilePaths &files); void stop(const Utils::FilePaths &files); @@ -45,7 +46,7 @@ public: void finishWithFail(const QString &exitMessage); private: - void updateArguments(); + void updateArguments(const CppcheckSettings &settings); void addToQueue(const Utils::FilePaths &files, const CppEditor::ProjectPart &part); QStringList additionalArguments(const CppEditor::ProjectPart &part) const; From 625fd895cea56f417dad8f9f34ebb151564e360e Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 23 May 2024 17:13:58 +0200 Subject: [PATCH 05/19] Fix more metatype related deprecation warnings QT_DEPRECATED_VERSION_6_0 static int type(const QT_PREPEND_NAMESPACE(QByteArray) &typeName) Change-Id: I6a085c6d370b6d65193dc09d4318765de81a8ce3 Reviewed-by: Christian Stenger --- src/libs/utils/persistentsettings.cpp | 2 +- .../edit3d/bakelightsconnectionmanager.cpp | 2 +- .../imagecacheconnectionmanager.cpp | 2 +- .../instances/baseconnectionmanager.cpp | 4 +-- .../interactiveconnectionmanager.cpp | 2 +- .../instances/nodeinstanceserverproxy.cpp | 26 +++++++++---------- .../designercore/model/propertyparser.cpp | 4 +-- .../designercore/model/texttomodelmerger.cpp | 20 +++++++------- .../instances/nodeinstanceclientproxy.cpp | 4 +-- .../qml/qmldesigner/testconnectionmanager.cpp | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp index 3702ecf960b..a9888356f4b 100644 --- a/src/libs/utils/persistentsettings.cpp +++ b/src/libs/utils/persistentsettings.cpp @@ -283,7 +283,7 @@ QVariant ParseContext::readSimpleValue(QXmlStreamReader &r, const QXmlStreamAttr } QVariant value; value.setValue(text); - value.convert(QMetaType::type(type.toLatin1().constData())); + value.convert(QMetaType::fromName(type.toLatin1().constData())); return value; } diff --git a/src/plugins/qmldesigner/components/edit3d/bakelightsconnectionmanager.cpp b/src/plugins/qmldesigner/components/edit3d/bakelightsconnectionmanager.cpp index e8faa42833d..92caab65edd 100644 --- a/src/plugins/qmldesigner/components/edit3d/bakelightsconnectionmanager.cpp +++ b/src/plugins/qmldesigner/components/edit3d/bakelightsconnectionmanager.cpp @@ -27,7 +27,7 @@ void BakeLightsConnectionManager::setFinishedCallback(Callback callback) void BakeLightsConnectionManager::dispatchCommand(const QVariant &command, ConnectionManagerInterface::Connection &) { - static const int commandType = QMetaType::type("PuppetToCreatorCommand"); + static const int commandType = QMetaType::fromName("PuppetToCreatorCommand").id(); if (command.typeId() == commandType) { auto cmd = command.value(); diff --git a/src/plugins/qmldesigner/designercore/imagecache/imagecacheconnectionmanager.cpp b/src/plugins/qmldesigner/designercore/imagecache/imagecacheconnectionmanager.cpp index 20728b445e4..f8a41b620bb 100644 --- a/src/plugins/qmldesigner/designercore/imagecache/imagecacheconnectionmanager.cpp +++ b/src/plugins/qmldesigner/designercore/imagecache/imagecacheconnectionmanager.cpp @@ -45,7 +45,7 @@ bool ImageCacheConnectionManager::waitForCapturedData() void ImageCacheConnectionManager::dispatchCommand(const QVariant &command, ConnectionManagerInterface::Connection &) { - static const int capturedDataCommandType = QMetaType::type("CapturedDataCommand"); + static const int capturedDataCommandType = QMetaType::fromName("CapturedDataCommand").id(); if (command.typeId() == capturedDataCommandType) { m_captureCallback(command.value().image); diff --git a/src/plugins/qmldesigner/designercore/instances/baseconnectionmanager.cpp b/src/plugins/qmldesigner/designercore/instances/baseconnectionmanager.cpp index 713a61abf3d..0c64bba23c0 100644 --- a/src/plugins/qmldesigner/designercore/instances/baseconnectionmanager.cpp +++ b/src/plugins/qmldesigner/designercore/instances/baseconnectionmanager.cpp @@ -107,8 +107,8 @@ void BaseConnectionManager::readDataStream(Connection &connection) connection.blockSize = 0; #ifdef NANOTRACE_DESIGNSTUDIO_ENABLED - if (command.typeId() != QMetaType::type("PuppetAliveCommand")) { - if (command.typeId() == QMetaType::type("SyncNanotraceCommand")) { + if (command.typeId() != QMetaType::fromName("PuppetAliveCommand").id()) { + if (command.typeId() == QMetaType::fromName("SyncNanotraceCommand").id()) { SyncNanotraceCommand cmd = command.value(); NANOTRACE_INSTANT_ARGS("Sync", "readCommand", {"name", cmd.name().toStdString()}, diff --git a/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp b/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp index cd36cac76da..07ae483d9a1 100644 --- a/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp +++ b/src/plugins/qmldesigner/designercore/instances/interactiveconnectionmanager.cpp @@ -68,7 +68,7 @@ void InteractiveConnectionManager::showCannotConnectToPuppetWarningAndSwitchToEd void InteractiveConnectionManager::dispatchCommand(const QVariant &command, Connection &connection) { - static const int puppetAliveCommandType = QMetaType::type("PuppetAliveCommand"); + static const int puppetAliveCommandType = QMetaType::fromName("PuppetAliveCommand").id(); if (command.typeId() == puppetAliveCommandType) { puppetAlive(connection); diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp index a519531d3cc..ab8cca8e16c 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp @@ -93,18 +93,18 @@ void NodeInstanceServerProxy::dispatchCommand(const QVariant &command) { NANOTRACE_SCOPE_ARGS("Update", "dispatchCommand", {"name", command.typeName()}); - static const int informationChangedCommandType = QMetaType::type("InformationChangedCommand"); - static const int valuesChangedCommandType = QMetaType::type("ValuesChangedCommand"); - static const int valuesModifiedCommandType = QMetaType::type("ValuesModifiedCommand"); - static const int pixmapChangedCommandType = QMetaType::type("PixmapChangedCommand"); - static const int childrenChangedCommandType = QMetaType::type("ChildrenChangedCommand"); - static const int statePreviewImageChangedCommandType = QMetaType::type("StatePreviewImageChangedCommand"); - static const int componentCompletedCommandType = QMetaType::type("ComponentCompletedCommand"); - static const int tokenCommandType = QMetaType::type("TokenCommand"); - static const int debugOutputCommandType = QMetaType::type("DebugOutputCommand"); - static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand"); - static const int puppetToCreatorCommandType = QMetaType::type("PuppetToCreatorCommand"); - static const int SyncNanotraceCommandType = QMetaType::type("SyncNanotraceCommand"); + static const int informationChangedCommandType = QMetaType::fromName("InformationChangedCommand").id(); + static const int valuesChangedCommandType = QMetaType::fromName("ValuesChangedCommand").id(); + static const int valuesModifiedCommandType = QMetaType::fromName("ValuesModifiedCommand").id(); + static const int pixmapChangedCommandType = QMetaType::fromName("PixmapChangedCommand").id(); + static const int childrenChangedCommandType = QMetaType::fromName("ChildrenChangedCommand").id(); + static const int statePreviewImageChangedCommandType = QMetaType::fromName("StatePreviewImageChangedCommand").id(); + static const int componentCompletedCommandType = QMetaType::fromName("ComponentCompletedCommand").id(); + static const int tokenCommandType = QMetaType::fromName("TokenCommand").id(); + static const int debugOutputCommandType = QMetaType::fromName("DebugOutputCommand").id(); + static const int changeSelectionCommandType = QMetaType::fromName("ChangeSelectionCommand").id(); + static const int puppetToCreatorCommandType = QMetaType::fromName("PuppetToCreatorCommand").id(); + static const int SyncNanotraceCommandType = QMetaType::fromName("SyncNanotraceCommand").id(); qCInfo(instanceViewBenchmark) << "dispatching command" << command.typeId() << command.typeName(); if (command.typeId() == informationChangedCommandType) { @@ -173,7 +173,7 @@ QString NodeInstanceServerProxy::qrcMappingString() const void NodeInstanceServerProxy::writeCommand(const QVariant &command) { #ifdef NANOTRACE_DESIGNSTUDIO_ENABLED - if (command.typeId() == QMetaType::type("SyncNanotraceCommand")) { + if (command.typeId() == QMetaType::fromName("SyncNanotraceCommand").id()) { SyncNanotraceCommand cmd = command.value(); NANOTRACE_INSTANT_ARGS("Sync", "writeCommand", {"name", cmd.name().toStdString()}, diff --git a/src/plugins/qmldesigner/designercore/model/propertyparser.cpp b/src/plugins/qmldesigner/designercore/model/propertyparser.cpp index 264c944feab..f1199425d30 100644 --- a/src/plugins/qmldesigner/designercore/model/propertyparser.cpp +++ b/src/plugins/qmldesigner/designercore/model/propertyparser.cpp @@ -201,7 +201,7 @@ QVariant read(const QString &typeStr, const QString &str, const MetaInfo &) QVariant read(const QString &typeStr, const QString &str) { - int type = QMetaType::fromName(typeStr.toUtf8().constData()).id(); + int type = QMetaType::fromName(typeStr.toUtf8()).id(); if (type == 0) { if (typeStr != "binding"_L1 && typeStr != "enum"_L1) { qWarning() << "Type " << typeStr @@ -266,7 +266,7 @@ QVariant read(int variantType, const QString &str) value = vector3DFromString(str, &conversionOk); break; default: { - if (variantType == QMetaType::type("Enumeration")) { + if (variantType == QMetaType::fromName("Enumeration").id()) { value = QVariant::fromValue(enumerationFromString(str, &conversionOk)); } else { value = QVariant(str); diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index ded7fbc5ef4..5e82c3545ab 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -242,23 +242,23 @@ bool isLiteralValue(AST::UiScriptBinding *script) int propertyType(const QString &typeName) { if (typeName == u"bool") - return QMetaType::type("bool"); + return QMetaType::fromName("bool").id(); else if (typeName == u"color") - return QMetaType::type("QColor"); + return QMetaType::fromName("QColor").id(); else if (typeName == u"date") - return QMetaType::type("QDate"); + return QMetaType::fromName("QDate").id(); else if (typeName == u"int") - return QMetaType::type("int"); + return QMetaType::fromName("int").id(); else if (typeName == u"real") - return QMetaType::type("double"); + return QMetaType::fromName("double").id(); else if (typeName == u"double") - return QMetaType::type("double"); + return QMetaType::fromName("double").id(); else if (typeName == u"string") - return QMetaType::type("QString"); + return QMetaType::fromName("QString").id(); else if (typeName == u"url") - return QMetaType::type("QUrl"); + return QMetaType::fromName("QUrl").id(); else if (typeName == u"var" || typeName == u"variant") - return QMetaType::type("QVariant"); + return QMetaType::fromName("QVariant").id(); else return -1; } @@ -272,7 +272,7 @@ QVariant convertDynamicPropertyValueToVariant(const QString &astValue, return QString(); const int type = propertyType(astType); - if (type == QMetaType::type("QVariant")) { + if (type == QMetaType::fromName("QVariant").id()) { if (cleanedValue.isNull()) // Explicitly isNull, NOT isEmpty! return QVariant(static_cast(type)); else diff --git a/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp b/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp index de07782d1cf..47a5bfedaab 100644 --- a/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp +++ b/src/tools/qml2puppet/instances/nodeinstanceclientproxy.cpp @@ -391,8 +391,8 @@ void NodeInstanceClientProxy::readDataStream() QVariant command = readCommandFromIOStream(m_inputIoDevice, &readCommandCounter, &blockSize); #ifdef NANOTRACE_DESIGNSTUDIO_ENABLED - if (command.typeId() != QMetaType::type("EndNanotraceCommand")) { - if (command.typeId() == QMetaType::type("SyncNanotraceCommand")) { + if (command.typeId() != QMetaType::fromName("EndNanotraceCommand").id()) { + if (command.typeId() == QMetaType::fromName("SyncNanotraceCommand").id()) { SyncNanotraceCommand cmd = command.value(); NANOTRACE_INSTANT_ARGS("Sync", "readCommand", {"name", cmd.name().toStdString()}, diff --git a/tests/auto/qml/qmldesigner/testconnectionmanager.cpp b/tests/auto/qml/qmldesigner/testconnectionmanager.cpp index 9341d39a454..78a0417b82f 100644 --- a/tests/auto/qml/qmldesigner/testconnectionmanager.cpp +++ b/tests/auto/qml/qmldesigner/testconnectionmanager.cpp @@ -38,7 +38,7 @@ void TestConnectionManager::writeCommand(const QVariant &command) void TestConnectionManager::dispatchCommand(const QVariant &command, Connection &connection) { - static const int synchronizeCommandType = QMetaType::type("SynchronizeCommand"); + static const int synchronizeCommandType = QMetaType::fromName("SynchronizeCommand").id(); if (command.typeId() == synchronizeCommandType) { SynchronizeCommand synchronizeCommand = command.value(); From a3a543a55f5bf17e925335928f7f60f2eaae420e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 14 Jun 2024 13:08:05 +0200 Subject: [PATCH 06/19] Doc: Add use cases for Add Curly Braces quick fix - Update and add examples - Make punctuation in the topic more consistent - Add a link to the docs to the change log Task-number: QTCREATORBUG-30604 Change-Id: I723af29117a4b35a70eed61058c5d43da285242d Reviewed-by: Christian Stenger --- dist/changelog/changes-14.0.0.md | 4 +- .../creator-only/creator-cpp-quick-fixes.qdoc | 80 +++++++++++++++---- 2 files changed, 68 insertions(+), 16 deletions(-) diff --git a/dist/changelog/changes-14.0.0.md b/dist/changelog/changes-14.0.0.md index 03ca70c6284..6347b3d819a 100644 --- a/dist/changelog/changes-14.0.0.md +++ b/dist/changelog/changes-14.0.0.md @@ -51,9 +51,11 @@ Editing ([QTCREATORBUG-12190](https://bugreports.qt.io/browse/QTCREATORBUG-12190)) * Added `Re-order Member Function Definitions According to Declaration Order` ([QTCREATORBUG-6199](https://bugreports.qt.io/browse/QTCREATORBUG-6199)) - * Added triggers for `Add Curly Braces` + * Added `Add Curly Braces` for do, while, and for loops * Fixed issues with macros ([QTCREATORBUG-10279](https://bugreports.qt.io/browse/QTCREATORBUG-10279)) + + [Documentation](https://doc.qt.io/qtcreator/creator-reference-cpp-quick-fixes.html) * Clangd * Increased the minimum version to LLVM 17 * Added the `Per-project index location` and `Per-session index location` diff --git a/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc b/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc index 310ab84aabd..ad5577b7a9b 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-cpp-quick-fixes.qdoc @@ -115,7 +115,7 @@ \row \li Assign to Local Variable \li Adds a local variable which stores the return value of a - function call or a new expression. For example, rewrites: + function call or a new expression. For example, rewrites \code QString s; @@ -195,7 +195,7 @@ \row \li Move All Function Definitions \li Moves all function definitions to the implementation file or - outside the class. For example, rewrites: + outside the class. For example, rewrites \code class Foo { @@ -281,12 +281,14 @@ \li Description \row \li Add Curly Braces - \li Adds curly braces to an if statement that does not have a - compound statement. For example, rewrites + \li Adds curly braces to an if clause or to a do, while, or for + loop. For example, rewrites an if clause \code if (a) b; + else + c; \endcode as @@ -294,6 +296,54 @@ \code if (a) { b; + } else { + c; + } + \endcode + + Rewrites a do loop + + \code + do + ++i; + while (i < 10); + \endcode + + as + + \code + do { + ++i; + } while (i < 10); + \endcode + + Rewrites a while loop + + \code + while (i > 0) + --i; + \endcode + + as + + \code + while (i > 0) { + --i; + } + \endcode + + Rewrites a for loop + + \code + for (int i = 0; i < 10; ++i) + func(i); + \endcode + + as + + \code + for (int i = 0; i < 10; ++i) { + func(i); } \endcode \row @@ -321,7 +371,7 @@ post-decrement operators as pre-decrement operators. It also moves other than string or numeric literals and id expressions from the condition of a for loop to its initializer. For - example, rewrites: + example, rewrites \code for (int i = 0; i < 3 * 2; i++) @@ -451,7 +501,7 @@ The quick fix also works on invokable methods outside the class that are visible from the location where they are called from. For example, it - rewrites: + rewrites \code Foo f; @@ -470,7 +520,7 @@ \row \li Move Function Definition \li Moves a function definition to the implementation file, outside - the class or back to its declaration. For example, rewrites: + the class or back to its declaration. For example, rewrites \code class Foo { @@ -555,7 +605,7 @@ \row \li Rewrite Condition Using || \li Rewrites the expression according to De Morgan's laws. For - example, rewrites: + example, rewrites \code !a && !b \endcode @@ -569,7 +619,7 @@ \row \li Rewrite Using \e operator \li Rewrites an expression negating it and using the inverse - operator. For example, rewrites: + operator. For example, rewrites \list @@ -609,7 +659,7 @@ \row \li Split if Statement \li Splits an if statement into several statements. For example, - rewrites: + rewrites \code if (something && something_else) { @@ -645,7 +695,7 @@ \row \li Swap Operands \li Rewrites an expression in the inverse order using the inverse - operator. For example, rewrites: + operator. For example, rewrites \code a op b \endcode @@ -801,7 +851,7 @@ \row \li Convert to Pointer \li Converts the selected stack variable to a pointer. For example, - rewrites: + rewrites \code QByteArray foo = "foo"; @@ -822,7 +872,7 @@ \row \li Convert to Stack Variable \li Converts the selected pointer to a stack variable. For example, - rewrites: + rewrites \code QByteArray *foo = new QByteArray("foo"); @@ -847,7 +897,7 @@ project is open, the current global code style settings are used. - For example, rewrites: + For example, rewrites \code char*s; @@ -867,7 +917,7 @@ \row \li Split Declaration \li Splits a simple declaration into several declarations. For - example, rewrites: + example, rewrites \code int *a, b; \endcode From f22660facbb8dd4cab83a21a092f7207df675e17 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 14 Jun 2024 12:39:45 +0200 Subject: [PATCH 07/19] Bump version to 14.0.0-beta2 Change-Id: I1ca19c9cb6f7d8bfec665300c23389ba22e93c1e Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 6 +++--- qbs/modules/qtc/qtc.qbs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index e37467b6616..9ad3bf4f135 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,6 +1,6 @@ -set(IDE_VERSION "13.0.82") # The IDE version. -set(IDE_VERSION_COMPAT "13.0.82") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "14.0.0-beta1") # The IDE display version. +set(IDE_VERSION "13.0.83") # The IDE version. +set(IDE_VERSION_COMPAT "13.0.83") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "14.0.0-beta2") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2024") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 8b399722dbe..55b365edca9 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,16 +4,16 @@ import qbs.FileInfo import qbs.Utilities Module { - property string qtcreator_display_version: '14.0.0-beta1' + property string qtcreator_display_version: '14.0.0-beta2' property string ide_version_major: '13' property string ide_version_minor: '0' - property string ide_version_release: '82' + property string ide_version_release: '83' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '13' property string ide_compat_version_minor: '0' - property string ide_compat_version_release: '82' + property string ide_compat_version_release: '83' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release From 81ed27682882473575c8dce257973c711ae90cb0 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 13 Jun 2024 14:35:25 +0200 Subject: [PATCH 08/19] IosToolHandler: Don't call stop() from the other thread Task-number: QTCREATORBUG-30633 Change-Id: I0ddb354dbd3be685919b98589a5f0d534bd30dbe Reviewed-by: Eike Ziller --- src/plugins/ios/iostoolhandler.cpp | 35 ++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index 2f3fe4f288d..420e119e741 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -848,6 +848,16 @@ void IosSimulatorToolHandlerPrivate::installAppOnSimulator() futureSynchronizer.addFuture(Utils::onResultReady(installFuture, q, onResponseAppInstall)); } +#ifdef Q_OS_UNIX +static void monitorPid(QPromise &promise, qint64 pid) +{ + do { + // Poll every 1 sec to check whether the app is running. + QThread::msleep(1000); + } while (!promise.isCanceled() && kill(pid, 0) == 0); +} +#endif + void IosSimulatorToolHandlerPrivate::launchAppOnSimulator(const QStringList &extraArgs) { const QString bundleId = SimulatorControl::bundleIdentifier(m_bundlePath); @@ -871,21 +881,7 @@ void IosSimulatorToolHandlerPrivate::launchAppOnSimulator(const QStringList &ext "Install Xcode 8 or later.").arg(bundleId)); } - auto monitorPid = [this](QPromise &promise, qint64 pid) { -#ifdef Q_OS_UNIX - do { - // Poll every 1 sec to check whether the app is running. - QThread::msleep(1000); - } while (!promise.isCanceled() && kill(pid, 0) == 0); -#else - Q_UNUSED(pid) -#endif - // Future is cancelled if the app is stopped from the qt creator. - if (!promise.isCanceled()) - stop(0); - }; - - auto onResponseAppLaunch = [this, captureConsole, monitorPid, stdoutFile, stderrFile]( + auto onResponseAppLaunch = [this, captureConsole, stdoutFile, stderrFile]( const SimulatorControl::Response &response) { if (response) { if (!isResponseValid(*response)) @@ -893,8 +889,15 @@ void IosSimulatorToolHandlerPrivate::launchAppOnSimulator(const QStringList &ext m_pid = response->inferiorPid; gotInferiorPid(m_bundlePath, m_deviceId, response->inferiorPid); didStartApp(m_bundlePath, m_deviceId, Ios::IosToolHandler::Success); +#ifdef Q_OS_UNIX // Start monitoring app's life signs. - futureSynchronizer.addFuture(Utils::asyncRun(monitorPid, response->inferiorPid)); + futureSynchronizer.addFuture(Utils::onFinished( + Utils::asyncRun(monitorPid, response->inferiorPid), q, + [this](const QFuture &future) { + if (!future.isCanceled()) + stop(0); + })); +#endif if (captureConsole) futureSynchronizer.addFuture(Utils::asyncRun(&LogTailFiles::exec, &outputLogger, stdoutFile, stderrFile)); From ba73e3e50a50fd33d61583cd181be1a2190b8ebb Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 10 Jun 2024 13:45:26 +0200 Subject: [PATCH 09/19] SubDirFileContainer: Add optional filtering function Change-Id: Icf972babadc87dbc681ca282984b82484afc68c4 Reviewed-by: Eike Ziller --- src/libs/utils/filesearch.cpp | 49 +++++++++++++------ src/libs/utils/filesearch.h | 13 +++-- .../projectexplorer/allprojectsfind.cpp | 2 +- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp index f97934cde40..c023ccab9b9 100644 --- a/src/libs/utils/filesearch.cpp +++ b/src/libs/utils/filesearch.cpp @@ -462,14 +462,17 @@ static bool isFileIncluded(const QList &filterRegs, return isIncluded && (exclusionRegs.isEmpty() || !matches(exclusionRegs, filePath)); } -std::function filterFilesFunction(const QStringList &filters, - const QStringList &exclusionFilters) +FilterFilesFunction filterFilesFunction(const QStringList &filters, + const QStringList &exclusionFilters, + const FilterFileFunction &filterFileFuntion) { const QList filterRegs = filtersToRegExps(filters); const QList exclusionRegs = filtersToRegExps(exclusionFilters); - return [filterRegs, exclusionRegs](const FilePaths &filePaths) { - return Utils::filtered(filePaths, [&filterRegs, &exclusionRegs](const FilePath &filePath) { - return isFileIncluded(filterRegs, exclusionRegs, filePath); + return [filterRegs, exclusionRegs, filterFileFuntion](const FilePaths &filePaths) { + return Utils::filtered(filePaths, [&filterRegs, &exclusionRegs, filterFileFuntion]( + const FilePath &filePath) { + return isFileIncluded(filterRegs, exclusionRegs, filePath) && + (!filterFileFuntion || filterFileFuntion(filePath)); }); }; } @@ -583,12 +586,14 @@ const int s_progressMaximum = 1000; struct SubDirCache { SubDirCache(const FilePaths &directories, const QStringList &filters, - const QStringList &exclusionFilters, QTextCodec *encoding); + const QStringList &exclusionFilters, + const FilterFileFunction &filterFileFuntion, QTextCodec *encoding); std::optional updateCache(int advanceIntoIndex, const SubDirCache &initialCache); - std::function m_filterFiles; + FilterFilesFunction m_filterFilesFunction; + FilterFileFunction m_filterFileFunction; QTextCodec *m_encoding = nullptr; QStack m_dirs; QSet m_knownDirs; @@ -606,8 +611,10 @@ struct SubDirCache }; SubDirCache::SubDirCache(const FilePaths &directories, const QStringList &filters, - const QStringList &exclusionFilters, QTextCodec *encoding) - : m_filterFiles(filterFilesFunction(filters, exclusionFilters)) + const QStringList &exclusionFilters, + const FilterFileFunction &filterFileFuntion, QTextCodec *encoding) + : m_filterFilesFunction(filterFilesFunction(filters, exclusionFilters, filterFileFuntion)) + , m_filterFileFunction(filterFileFuntion) , m_encoding(encoding == nullptr ? QTextCodec::codecForLocale() : encoding) { const qreal maxPer = qreal(s_progressMaximum) / directories.count(); @@ -642,7 +649,7 @@ std::optional SubDirCache::updateCache(int advanceI const FilePath dir = m_dirs.pop(); const qreal dirProgressMax = m_progressValues.pop(); const bool processed = m_processedValues.pop(); - if (dir.exists()) { + if (dir.exists() && (!m_filterFileFunction || m_filterFileFunction(dir))) { using Dir = FilePath; using CanonicalDir = FilePath; std::vector> subDirs; @@ -657,7 +664,7 @@ std::optional SubDirCache::updateCache(int advanceI } if (subDirs.empty()) { const FilePaths allFilePaths = dir.dirEntries(QDir::Files | QDir::Hidden); - const FilePaths filePaths = m_filterFiles(allFilePaths); + const FilePaths filePaths = m_filterFilesFunction(allFilePaths); m_items.reserve(m_items.size() + filePaths.size()); Utils::reverseForeach(filePaths, [this](const FilePath &file) { m_items.append({file, m_encoding}); @@ -706,15 +713,25 @@ static FileContainerIterator::Advancer subDirAdvancer(const SubDirCache &initial } static FileContainer::AdvancerProvider subDirAdvancerProvider(const FilePaths &directories, - const QStringList &filters, const QStringList &exclusionFilters, QTextCodec *encoding) + const QStringList &filters, const QStringList &exclusionFilters, + const FilterFileFunction &filterFileFuntion, QTextCodec *encoding) { - const SubDirCache initialCache(directories, filters, exclusionFilters, encoding); - return [=] { return subDirAdvancer(initialCache); }; + const SubDirCache initialCache(directories, filters, exclusionFilters, filterFileFuntion, + encoding); + return [initialCache] { return subDirAdvancer(initialCache); }; } SubDirFileContainer::SubDirFileContainer(const FilePaths &directories, const QStringList &filters, const QStringList &exclusionFilters, QTextCodec *encoding) - : FileContainer(subDirAdvancerProvider(directories, filters, exclusionFilters, encoding), - s_progressMaximum) {} + : FileContainer(subDirAdvancerProvider(directories, filters, exclusionFilters, {}, encoding), + s_progressMaximum) +{} + +SubDirFileContainer::SubDirFileContainer(const FilePaths &directories, + const FilterFileFunction &filterFileFuntion, + QTextCodec *encoding) + : FileContainer(subDirAdvancerProvider(directories, {}, {}, filterFileFuntion, encoding), + s_progressMaximum) +{} } // namespace Utils diff --git a/src/libs/utils/filesearch.h b/src/libs/utils/filesearch.h index 2d2155a723c..08a0a3a981a 100644 --- a/src/libs/utils/filesearch.h +++ b/src/libs/utils/filesearch.h @@ -31,6 +31,9 @@ enum FindFlag { }; Q_DECLARE_FLAGS(FindFlags, FindFlag) +using FilterFileFunction = std::function; +using FilterFilesFunction = std::function; + QTCREATOR_UTILS_EXPORT QTextDocument::FindFlags textDocumentFlagsForFindFlags(FindFlags flags); @@ -39,8 +42,9 @@ void searchInContents(QPromise &promise, const QString &searc FindFlags flags, const FilePath &filePath, const QString &contents); QTCREATOR_UTILS_EXPORT -std::function filterFilesFunction(const QStringList &filters, - const QStringList &exclusionFilters); +FilterFilesFunction filterFilesFunction(const QStringList &filters, + const QStringList &exclusionFilters, + const FilterFileFunction &filterFileFuntion = {}); QTCREATOR_UTILS_EXPORT QStringList splitFilterUiText(const QString &text); @@ -150,9 +154,10 @@ public: class QTCREATOR_UTILS_EXPORT SubDirFileContainer : public FileContainer { public: + SubDirFileContainer(const FilePaths &directories, const QStringList &filters, + const QStringList &exclusionFilters, QTextCodec *encoding = nullptr); SubDirFileContainer(const FilePaths &directories, - const QStringList &filters, - const QStringList &exclusionFilters, + const FilterFileFunction &filterFileFuntion = {}, QTextCodec *encoding = nullptr); }; diff --git a/src/plugins/projectexplorer/allprojectsfind.cpp b/src/plugins/projectexplorer/allprojectsfind.cpp index 5d8f285b001..b20ebe3dc5e 100644 --- a/src/plugins/projectexplorer/allprojectsfind.cpp +++ b/src/plugins/projectexplorer/allprojectsfind.cpp @@ -55,7 +55,7 @@ FileContainer AllProjectsFind::filesForProjects(const QStringList &nameFilters, const QStringList &exclusionFilters, const QList &projects) { - std::function filterFiles + const FilterFilesFunction filterFiles = Utils::filterFilesFunction(nameFilters, exclusionFilters); const QMap openEditorEncodings = TextDocument::openedTextDocumentEncodings(); From 0cb8760338f832f449955e3b91508b83179a22ca Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 14 Jun 2024 14:41:40 +0200 Subject: [PATCH 10/19] Debugger: Fix LLDB-DAP attach to process Change-Id: I464db537d85de7bce943334379b6ce499b32dc2b Reviewed-by: Artem Sokolovskii --- src/plugins/debugger/dap/dapclient.cpp | 2 ++ src/plugins/debugger/dap/dapclient.h | 1 + src/plugins/debugger/dap/dapengine.cpp | 3 +++ src/plugins/debugger/dap/lldbdapengine.cpp | 13 +++++++++---- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/dap/dapclient.cpp b/src/plugins/debugger/dap/dapclient.cpp index 00fe60da022..b67d7ec4754 100644 --- a/src/plugins/debugger/dap/dapclient.cpp +++ b/src/plugins/debugger/dap/dapclient.cpp @@ -237,6 +237,8 @@ void DapClient::emitSignals(const QJsonDocument &doc) type = DapResponseType::SetBreakpoints; } else if (command == "setFunctionBreakpoints") { type = DapResponseType::SetFunctionBreakpoints; + } else if (command == "attach") { + type = DapResponseType::Attach; } emit responseReady(type, ob); return; diff --git a/src/plugins/debugger/dap/dapclient.h b/src/plugins/debugger/dap/dapclient.h index 92acb0ddb1a..f4c3df2ef3a 100644 --- a/src/plugins/debugger/dap/dapclient.h +++ b/src/plugins/debugger/dap/dapclient.h @@ -54,6 +54,7 @@ enum class DapResponseType Evaluate, SetBreakpoints, SetFunctionBreakpoints, + Attach, Unknown }; diff --git a/src/plugins/debugger/dap/dapengine.cpp b/src/plugins/debugger/dap/dapengine.cpp index e311bb36822..f19ab2aacd1 100644 --- a/src/plugins/debugger/dap/dapengine.cpp +++ b/src/plugins/debugger/dap/dapengine.cpp @@ -692,6 +692,9 @@ void DapEngine::handleResponse(DapResponseType type, const QJsonObject &response case DapResponseType::SetBreakpoints: handleBreakpointResponse(response); break; + case DapResponseType::Attach: + notifyInferiorRunOk(); + break; default: showMessage("UNKNOWN RESPONSE:" + command); }; diff --git a/src/plugins/debugger/dap/lldbdapengine.cpp b/src/plugins/debugger/dap/lldbdapengine.cpp index 32a85c89d41..58622cf8a4f 100644 --- a/src/plugins/debugger/dap/lldbdapengine.cpp +++ b/src/plugins/debugger/dap/lldbdapengine.cpp @@ -120,7 +120,15 @@ void LldbDapEngine::handleDapInitialize() } QTC_ASSERT(state() == EngineRunRequested, qCDebug(logCategory()) << state()); - m_dapClient->postRequest("attach", QJsonObject{{"__restart", ""}}); + + const DebuggerRunParameters &rp = runParameters(); + m_dapClient->postRequest( + "attach", + QJsonObject{ + {"program", rp.inferior.command.executable().path()}, + {"pid", QString::number(rp.attachPID.pid())}, + {"__restart", ""}}); + qCDebug(logCategory()) << "handleDapAttach"; } @@ -146,9 +154,6 @@ void LldbDapEngine::setupEngine() const DebuggerRunParameters &rp = runParameters(); CommandLine cmd{rp.debugger.command.executable()}; - if (isLocalAttachEngine()) - cmd.addArgs({"--debugger-pid", QString::number(rp.attachPID.pid())}); - IDataProvider *dataProvider = new ProcessDataProvider(rp, cmd, this); m_dapClient = new LldbDapClient(dataProvider, this); From 096c4ae18d80f6960852755bc95f19fc3d2180d7 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 14 Jun 2024 14:53:59 +0200 Subject: [PATCH 11/19] Doc: Describe Open With > Qt Design Studio for .ui.qml.files Task-number: QTCREATORBUG-30604 Change-Id: I4049e6717cb3e0811bed78a15a9be9c1fdda28d2 Reviewed-by: Eike Ziller --- dist/changelog/changes-14.0.0.md | 4 +++- doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dist/changelog/changes-14.0.0.md b/dist/changelog/changes-14.0.0.md index 6347b3d819a..803db565eec 100644 --- a/dist/changelog/changes-14.0.0.md +++ b/dist/changelog/changes-14.0.0.md @@ -56,6 +56,7 @@ Editing ([QTCREATORBUG-10279](https://bugreports.qt.io/browse/QTCREATORBUG-10279)) [Documentation](https://doc.qt.io/qtcreator/creator-reference-cpp-quick-fixes.html) + * Clangd * Increased the minimum version to LLVM 17 * Added the `Per-project index location` and `Per-session index location` @@ -85,7 +86,8 @@ Editing * Improved support for enums ([QTCREATORBUG-19226](https://bugreports.qt.io/browse/QTCREATORBUG-19226)) -* Added `Qt Design Studio` to `Open With` for `.ui.qml`-files +* Added `Qt Design Studio` to `Open With` for `.ui.qml` files + ([Documentation](https://doc.qt.io/qtcreator/creator-quick-ui-forms.html)) * Language Server * Switched on by default * Added option for generating `qmlls.ini` files for CMake projects diff --git a/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc b/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc index 1cfa1505441..7ff6d416d02 100644 --- a/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-ui-forms.qdoc @@ -23,14 +23,18 @@ \brief Limitations of \QDS UI files (.ui.qml). \if defined(qtdesignstudio) - You can use \QDS wizards to create UI files that have the filename - extension \e .ui.qml. The UI files can be edited in the \l {2D} view. - If you use the \l {Code} view to add code that is not supported - by the \uicontrol {2D} view, \QDS displays error messages. + \QDS wizards create UI files that have the filename extension \e .ui.qml. + Edit the UI files in the \l {2D} view. + + If you use the \l {Code} view to add code that the \uicontrol {2D} view does + not support, \QDS displays error messages. \else If you switch between \QC and \QDS or cooperate with designers on a project, you might encounter UI files (.ui.qml). They are intended to be edited in \QDS only. + + To open UI files with \QDS, select \uicontrol {Open With} > + \uicontrol {\QDS} in the context menu for the file. \endif From 70941abad9bbcb49cd10db8ab4b5e69d4d5198a0 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 14 Jun 2024 16:17:17 +0200 Subject: [PATCH 12/19] Doc: Add Type Hierarchy to the list of supported LSP features Task-number: QTCREATORBUG-30604 Change-Id: Ic8925e990a14a38383f465295d857d15221693df Reviewed-by: David Schulz --- .../src/editors/creator-only/creator-language-server.qdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 27a632955c3..225cf9f2eaa 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -36,6 +36,7 @@ \l{Outline} view or in the \uicontrol Symbols list on the \l{Edit Mode}{editor toolbar} \li \l{Call Hierarchy}{Viewing the callers and callees of a function} + \li \l{Type Hierarchy}{Viewing the base classes and derived classes of a class} \li \l{Find references to a symbol}{Finding references to symbols} \li \l{Rename symbols}{Renaming the symbol under the cursor} \li Code actions From 4ff0f93abc1a3662eb9c738c4f4abc4d6d22f344 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 14 Jun 2024 14:27:53 +0200 Subject: [PATCH 13/19] QbsPM: Be less aggressive when providing proposals Change-Id: I3826651030a3ec1c8293625c4c99c0ee31a97a5f Reviewed-by: Christian Kandeler --- src/plugins/qbsprojectmanager/qbseditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbseditor.cpp b/src/plugins/qbsprojectmanager/qbseditor.cpp index 08f6e0a8725..592c74a8cb4 100644 --- a/src/plugins/qbsprojectmanager/qbseditor.cpp +++ b/src/plugins/qbsprojectmanager/qbseditor.cpp @@ -149,7 +149,7 @@ IAssistProposal *MergedCompletionAssistProcessor::perform() }); m_qbsProcessor->start(std::make_unique(m_interface->cursor(), m_interface->filePath(), - ExplicitlyInvoked)); + m_interface->reason())); } else { m_qbsProposal = nullptr; } @@ -162,7 +162,7 @@ IAssistProposal *MergedCompletionAssistProcessor::perform() return m_qmlProcessor->start( std::make_unique(qmlJsIface->cursor(), qmlJsIface->filePath(), - ExplicitlyInvoked, + m_interface->reason(), qmlJsIface->semanticInfo())); } From 963e55f3db248878169ba909b9d83bb6f8692ad3 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 14 Jun 2024 12:09:21 +0200 Subject: [PATCH 14/19] Debugger: remove unneeded size cache lookup Change-Id: I1d16c4d8d1436fe252269439e4059c6cd9886d81 Reviewed-by: hjk --- share/qtcreator/debugger/dumper.py | 1 - 1 file changed, 1 deletion(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index eb45d918be4..6a232124cbe 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1072,7 +1072,6 @@ class DumperBase(): def check_typeid(self, typeid): if not isinstance(typeid, int): - size = self.type_size_cache.get(typeid, None) raise RuntimeError('WRONG TYPE FOR TYPEID: %s %s' % (str(typeid), type(typeid))) def checkRef(self, ref): From 32fdd72f14dc29b023eb9d747703510c31f4a178 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 17 Jun 2024 07:41:17 +0200 Subject: [PATCH 15/19] ASM: Fix build on windows Change-Id: Iee491d09aca54160ea59a34b12f2ce061852b51e Reviewed-by: Christian Stenger --- src/plugins/appstatisticsmonitor/idataprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/appstatisticsmonitor/idataprovider.cpp b/src/plugins/appstatisticsmonitor/idataprovider.cpp index 8b149caf5cd..23d443c76e2 100644 --- a/src/plugins/appstatisticsmonitor/idataprovider.cpp +++ b/src/plugins/appstatisticsmonitor/idataprovider.cpp @@ -16,8 +16,8 @@ #endif #ifdef Q_OS_WIN -#include #include +#include #endif #ifdef Q_OS_MACOS From 76e176afe6bcc855461b8fea027c061c8bb82160 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Tue, 11 Jun 2024 14:34:27 +0200 Subject: [PATCH 16/19] Core: Fix "Show All Kits" button appears after configure project "Show All Kits" now button appears when project has been just configured. Change-Id: I68c61aa56aca27c98afb60ada4a4d900db404a6c Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/projectwindow.h | 3 ++- .../projectexplorer/targetsettingspanel.cpp | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/projectwindow.h b/src/plugins/projectexplorer/projectwindow.h index ed88f4403e6..692cc5a287e 100644 --- a/src/plugins/projectexplorer/projectwindow.h +++ b/src/plugins/projectexplorer/projectwindow.h @@ -30,7 +30,8 @@ enum { ItemUpdatedFromBelowRole, // A subitem got updated, re-expansion is necessary. ActiveItemRole, // The index of the currently selected item in the tree view KitIdRole, // The kit id in case the item is associated with a kit. - PanelWidgetRole // This item's widget to be shown as central widget. + PanelWidgetRole, // This item's widget to be shown as central widget. + IsShowMoreRole // This item is a "show more" item. }; class ProjectWindowPrivate; diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index aba55e7a6d0..bfcb274ac1a 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -170,6 +170,7 @@ public: void ensureWidget(); void rebuildContents(); + void ensureShowMoreItem(); void setShowAllKits(bool showAllKits) { @@ -206,6 +207,10 @@ public: if (role == Qt::DisplayRole) { return !m_p->showAllKits() ? Tr::tr("Show All Kits") : Tr::tr("Hide Inactive Kits"); } + + if (role == IsShowMoreRole) + return true; + return {}; } @@ -814,6 +819,14 @@ void TargetItem::updateSubItems() } } +void TargetGroupItemPrivate::ensureShowMoreItem() +{ + if (q->findAnyChild([](TreeItem *item) { return item->data(0, IsShowMoreRole).toBool(); })) + return; + + q->appendChild(new ShowMoreItem(this)); +} + void TargetGroupItemPrivate::rebuildContents() { QGuiApplication::setOverrideCursor(Qt::WaitCursor); @@ -829,7 +842,7 @@ void TargetGroupItemPrivate::rebuildContents() } if (isAnyKitNotEnabled) - q->appendChild(new ShowMoreItem(this)); + ensureShowMoreItem(); if (q->parent()) { q->parent() @@ -843,6 +856,7 @@ void TargetGroupItemPrivate::handleTargetAdded(Target *target) { if (TargetItem *item = q->targetItem(target)) item->updateSubItems(); + ensureShowMoreItem(); q->update(); } @@ -850,6 +864,7 @@ void TargetGroupItemPrivate::handleTargetRemoved(Target *target) { if (TargetItem *item = q->targetItem(target)) item->updateSubItems(); + ensureShowMoreItem(); q->parent()->setData(0, QVariant::fromValue(static_cast(q)), ItemDeactivatedFromBelowRole); } @@ -858,6 +873,7 @@ void TargetGroupItemPrivate::handleTargetChanged(Target *target) { if (TargetItem *item = q->targetItem(target)) item->updateSubItems(); + ensureShowMoreItem(); q->setData(0, QVariant(), ItemActivatedFromBelowRole); } From 1ba52d1daa979fc9ec374c89d0a0a1aba74a3881 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Sat, 15 Jun 2024 14:08:54 +0200 Subject: [PATCH 17/19] LLDB-DAP: Handle source mapping and additional debugger startup commands This way we can step into Qt source code, and run startup commands like `process handle SIGSEGV --notify true --pass true --stop true` Change-Id: I495c1ef1554157989f4013473c22217e2d980053 Reviewed-by: Artem Sokolovskii --- src/plugins/debugger/dap/lldbdapengine.cpp | 55 ++++++++++++++++++++-- src/plugins/debugger/dap/lldbdapengine.h | 3 ++ 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/dap/lldbdapengine.cpp b/src/plugins/debugger/dap/lldbdapengine.cpp index 58622cf8a4f..a42573c2a6a 100644 --- a/src/plugins/debugger/dap/lldbdapengine.cpp +++ b/src/plugins/debugger/dap/lldbdapengine.cpp @@ -7,7 +7,9 @@ #include +#include #include +#include #include #include @@ -18,6 +20,7 @@ #include #include +#include #include #include @@ -112,22 +115,68 @@ LldbDapEngine::LldbDapEngine() setDebuggerType("DAP"); } +QJsonArray LldbDapEngine::sourceMap() const +{ + QJsonArray sourcePathMapping; + const SourcePathMap sourcePathMap + = mergePlatformQtPath(runParameters(), settings().sourcePathMap()); + for (auto it = sourcePathMap.constBegin(), cend = sourcePathMap.constEnd(); it != cend; ++it) { + sourcePathMapping.append(QJsonArray{ + {it.key(), expand(it.value())}, + }); + } + return sourcePathMapping; +} + +QJsonArray LldbDapEngine::preRunCommands() const +{ + const QStringList lines = settings().gdbStartupCommands().split('\n') + + runParameters().additionalStartupCommands.split('\n'); + QJsonArray result; + for (const QString &line : lines) { + const QString trimmed = line.trimmed(); + if (!trimmed.isEmpty() && !trimmed.startsWith('#')) + result.append(trimmed); + } + return result; +} + void LldbDapEngine::handleDapInitialize() { + // Documentation at: + // * https://github.com/llvm/llvm-project/tree/main/lldb/tools/lldb-dap#lldb-dap + // * https://github.com/llvm/llvm-project/blob/main/lldb/tools/lldb-dap/package.json + + const DebuggerRunParameters &rp = runParameters(); + if (!isLocalAttachEngine()) { - DapEngine::handleDapInitialize(); + m_dapClient->postRequest( + "launch", + QJsonObject{ + {"noDebug", false}, + {"program", rp.inferior.command.executable().path()}, + {"args", rp.inferior.command.arguments()}, + {"cwd", rp.inferior.workingDirectory.path()}, + {"sourceMap", sourceMap()}, + {"preRunCommands", preRunCommands()}, + {"__restart", ""}, + }); + + qCDebug(logCategory()) << "handleDapLaunch"; return; } QTC_ASSERT(state() == EngineRunRequested, qCDebug(logCategory()) << state()); - const DebuggerRunParameters &rp = runParameters(); m_dapClient->postRequest( "attach", QJsonObject{ {"program", rp.inferior.command.executable().path()}, {"pid", QString::number(rp.attachPID.pid())}, - {"__restart", ""}}); + {"sourceMap", sourceMap()}, + {"preRunCommands", preRunCommands()}, + {"__restart", ""}, + }); qCDebug(logCategory()) << "handleDapAttach"; } diff --git a/src/plugins/debugger/dap/lldbdapengine.h b/src/plugins/debugger/dap/lldbdapengine.h index 276714dccd5..0ebeb2d2ee1 100644 --- a/src/plugins/debugger/dap/lldbdapengine.h +++ b/src/plugins/debugger/dap/lldbdapengine.h @@ -21,6 +21,9 @@ private: bool isLocalAttachEngine() const; bool acceptsBreakpoint(const BreakpointParameters &bp) const override; const QLoggingCategory &logCategory() override; + + QJsonArray sourceMap() const; + QJsonArray preRunCommands() const; }; } // Debugger::Internal From e8a85f9974dfba5933bf4501f86d8128b54e28b5 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 14 Jun 2024 16:00:00 +0200 Subject: [PATCH 18/19] Doc: Describe options for updating Python Language Server Task-number: QTCREATORBUG-30604 Change-Id: Ie41a971271e3f350218d45777ed081bc23167f91 Reviewed-by: David Schulz --- dist/changelog/changes-14.0.0.md | 3 ++- ...qtcreator-python-update-language-server.webp | Bin 0 -> 10174 bytes .../creator-only/creator-language-server.qdoc | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 doc/qtcreator/images/qtcreator-python-update-language-server.webp diff --git a/dist/changelog/changes-14.0.0.md b/dist/changelog/changes-14.0.0.md index 803db565eec..e5dc688e599 100644 --- a/dist/changelog/changes-14.0.0.md +++ b/dist/changelog/changes-14.0.0.md @@ -98,7 +98,8 @@ Editing ### Python -* Added the option to install Python LSP updates +* Added options for updating Python Language Server + ([Documentation] (https://doc-snapshots.qt.io/qtcreator-14.0/creator-language-servers.html)) ### Language Server Protocol diff --git a/doc/qtcreator/images/qtcreator-python-update-language-server.webp b/doc/qtcreator/images/qtcreator-python-update-language-server.webp new file mode 100644 index 0000000000000000000000000000000000000000..99b9ad2b92ee77bdbc8679acb92669dc63f3fecc GIT binary patch literal 10174 zcmWIYbaUIL&cG1v>J$(bVBxb$oq<8W@sI_B(x3DHY^UFPas97#)&0r$q+cFQ&1qAy z*n8l{jft|;OPD4q>`hkLq`LP&(#icx4{W@0d9tN_p8o%X|8AB4wVD6^d*!|7wdv2! z6pG6okC0rQbyDnc$5x$d4_tUyD!0A2n&P2+>qo{JA?1e?(|#+>FKId0nPxgG&?xD2 z&d0*<50nHe(tk6}GCcS)o%7|%iYE&sjosdBbSQ4#=KR6o^-cS&g{9ZuA2?$WdN^v! z;$3$-9|v5IR7*GaJN33{&&oU9nmX2+pI4k((tdvF*ZfmH#ToCk{&2NxPFk89e%tN! zJ;zDwX1uoN$>ZHLr%gF}+aaE18muQTbFS8uJ)80T@gdFdEOnlzSxe3t9FCm&Qf}Ab zm-f0Ila6jXYtzZM(!Jn)K?Og~^;97n7sZ_0{*CXQ{1zyJo+8c>LxWD;AsB ziTyo%wfuVYgVM9#x82F{P7VCLckTMij}n*neS5$EL{72U-@g&79-uft$Uxni>=-6z3oNj-rPl*^E-ci(du&RuF_n{|Ekd4lYhrG+2fI( z!kV%RuGO8?(y#v4)};I{_pz^j&6k?L2N%9JuXs{^*8Ts_56&pSG#U;1=o&+gK1zSq(ezijSkG@Z_q$NB%?qT}cP#~w6gPA$)See2!7 z$Gn>kTi4Cqomc;-UaW4$f#vTnW@_7Z3nn&RHn%p53rfmVE(s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6qkdC&^y5 z+xNG~PW#}?7tHN*?A~n<=}+8oZ)G@-g_6w6x6^Js=(u6os;whZQOmvi&XEJEbzgX; zI3Df2DK4`;{{;8x|313}?tfkH6#wB#%O`>PJQMzB+_)ebm-*W6ra>y@4Ls}0mXm}+y382~RC1{44Q literal 0 HcmV?d00001 diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 225cf9f2eaa..b9b4b1bc735 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -91,6 +91,19 @@ To remove language servers from the list, select \uicontrol Delete. + \section1 Updating Python Language Server + + \QC offers to update the Python language server when you open a Python + file in the editor. + + \image qtcreator-python-update-language-server.webp {Message about updating Python Language Server} + + To update the language server, select \uicontrol Update. To save your choice, + select \uicontrol {Always Update}. + + To skip updating and hide the message for future updates, select + \uicontrol Never. + \section1 Supported Locator Filters The locator enables you to browse not only files, but any items defined by From 29ce8fa009a015b6108f29800f78bcb79e66b901 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Mon, 17 Jun 2024 09:49:18 +0200 Subject: [PATCH 19/19] LLDB-DAP: Fix assert messages Amends 0cb8760338f832f449955e3b91508b83179a22ca The assert messages look like this: ``` Debugger::Internal::DebuggerEngine(0x3170607a0, name = "LldbDapEngine") "EngineRunRequested" SOFT ASSERT [09:46:50.984]: "state() == EngineRunRequested" in /Users/ cristian/Projects/QtCreator/repo/src/plugins/debugger/dap/dapengine.cpp: 205 SOFT ASSERT [09:46:51.313]: "state() == EngineRunRequested" in /Users/ cristian/Projects/QtCreator/repo/src/plugins/debugger/ debuggerengine.cpp:1300 Debugger::Internal::DebuggerEngine(0x3170607a0, name = "LldbDapEngine") "InferiorRunOk" ``` Change-Id: Iceb7350c1997c9ce5d07818aff7a1f39c2abe271 Reviewed-by: Artem Sokolovskii --- src/plugins/debugger/dap/dapengine.cpp | 3 --- src/plugins/debugger/dap/lldbdapengine.cpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/debugger/dap/dapengine.cpp b/src/plugins/debugger/dap/dapengine.cpp index f19ab2aacd1..e311bb36822 100644 --- a/src/plugins/debugger/dap/dapengine.cpp +++ b/src/plugins/debugger/dap/dapengine.cpp @@ -692,9 +692,6 @@ void DapEngine::handleResponse(DapResponseType type, const QJsonObject &response case DapResponseType::SetBreakpoints: handleBreakpointResponse(response); break; - case DapResponseType::Attach: - notifyInferiorRunOk(); - break; default: showMessage("UNKNOWN RESPONSE:" + command); }; diff --git a/src/plugins/debugger/dap/lldbdapengine.cpp b/src/plugins/debugger/dap/lldbdapengine.cpp index a42573c2a6a..4dc38ca857e 100644 --- a/src/plugins/debugger/dap/lldbdapengine.cpp +++ b/src/plugins/debugger/dap/lldbdapengine.cpp @@ -193,7 +193,7 @@ void LldbDapEngine::handleDapConfigurationDone() return; } - notifyEngineRunAndInferiorStopOk(); + notifyEngineRunAndInferiorRunOk(); } void LldbDapEngine::setupEngine()