diff options
author | Eike Ziller <eike.ziller@qt.io> | 2023-12-06 16:50:15 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2023-12-06 16:50:15 +0100 |
commit | 2e280e1c50d6fb1ac76d84703a060955f0b0a9fa (patch) | |
tree | 12b0260951cf3bf83ebbfcca1a21d4b22793f3ab | |
parent | 6a97b66592ff0bf76d236f6120cd94e2604283a4 (diff) | |
parent | d1ac2fe45a9a7986bfb9217f14bfc1ca22a9cdd9 (diff) |
Merge remote-tracking branch 'origin/12.0'
Conflicts:
src/plugins/clangcodemodel/clangdfollowsymbol.cpp
src/plugins/debugger/debuggerruncontrol.cpp
src/plugins/projectexplorer/miniprojecttargetselector.cpp
Change-Id: I45b7fee1a1d784c44f2139fb1ede69190d23d6fd
31 files changed, 329 insertions, 119 deletions
diff --git a/dist/changelog/changes-12.0.1.md b/dist/changelog/changes-12.0.1.md new file mode 100644 index 0000000000..0883f18602 --- /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 diff --git a/share/qtcreator/debugger/pdbbridge.py b/share/qtcreator/debugger/pdbbridge.py index 228f4c8c1f..a245a58814 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/app/main.cpp b/src/app/main.cpp index ef5f5a1eb4..db5b46c437 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -478,6 +478,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); @@ -600,9 +647,13 @@ int main(int argc, char **argv) int numberOfArguments = static_cast<int>(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<ShowInGuiHandler>(); std::unique_ptr<SharedTools::QtSingleApplication> 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)); diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index 0452cf2a9c..259df76057 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -1979,6 +1979,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; } diff --git a/src/plugins/boot2qt/device-detection/devicedetector.cpp b/src/plugins/boot2qt/device-detection/devicedetector.cpp index 10faa4fb3c..abe06bc566 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 <projectexplorer/devicesupport/devicemanager.h> +#include <projectexplorer/projectexplorerconstants.h> #include <utils/qtcassert.h> @@ -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); diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp index df1b5458f3..35e1c71514 100644 --- a/src/plugins/boot2qt/qdbplugin.cpp +++ b/src/plugins/boot2qt/qdbplugin.cpp @@ -115,7 +115,11 @@ public: && prj->hasMakeInstallEquivalent(); }); addInitialStep(Qdb::Constants::QdbStopApplicationStepId); +#ifdef Q_OS_WIN + addInitialStep(RemoteLinux::Constants::DirectUploadStepId); +#else addInitialStep(RemoteLinux::Constants::GenericDeployStepId); +#endif } }; diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index 3d14d1687e..5fdebdcf9f 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -1137,14 +1137,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(); diff --git a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp index 701b72d58b..0da02cba33 100644 --- a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp +++ b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp @@ -460,7 +460,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); @@ -488,6 +488,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); diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index de4633ea61..11e2dc721d 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) { - m_lastTask.file = m_callStack.value().last().file; - m_lastTask.line = m_callStack.value().last().line; + if (m_callStack.has_value() && !m_callStack.value().isEmpty()) { + 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; diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp index 10f0313385..b82ffc4e3c 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp @@ -120,6 +120,10 @@ public: m_tooltip += "<br>" + 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; diff --git a/src/plugins/compilerexplorer/api/compile.cpp b/src/plugins/compilerexplorer/api/compile.cpp index 8a159dcf36..1c73c49647 100644 --- a/src/plugins/compilerexplorer/api/compile.cpp +++ b/src/plugins/compilerexplorer/api/compile.cpp @@ -10,13 +10,9 @@ QFuture<CompileResult> 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<CompileResult>( 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 9bc7a57033..5578023449 100644 --- a/src/plugins/compilerexplorer/api/compiler.cpp +++ b/src/plugins/compilerexplorer/api/compiler.cpp @@ -32,9 +32,6 @@ QFuture<Compilers> 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> compilers(const Config &config, return result; }; - return jsonRequest<Compilers>(config.networkManager, req, fromJson); + return jsonRequest<Compilers>(config.networkManager, url, fromJson); } } // namespace CompilerExplorer::Api diff --git a/src/plugins/compilerexplorer/api/language.cpp b/src/plugins/compilerexplorer/api/language.cpp index 0b95c7d2be..aa162390b1 100644 --- a/src/plugins/compilerexplorer/api/language.cpp +++ b/src/plugins/compilerexplorer/api/language.cpp @@ -13,10 +13,8 @@ QFuture<Languages> 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<Languages>(config.networkManager, req, [](const QJsonDocument &doc) { + return jsonRequest<Languages>(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 8015beced7..579074811e 100644 --- a/src/plugins/compilerexplorer/api/library.cpp +++ b/src/plugins/compilerexplorer/api/library.cpp @@ -17,10 +17,7 @@ QFuture<Libraries> 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<Libraries>(config.networkManager, req, [](const QJsonDocument &doc) { + return jsonRequest<Libraries>(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 dc55ab80b6..af21b8a114 100644 --- a/src/plugins/compilerexplorer/api/request.h +++ b/src/plugins/compilerexplorer/api/request.h @@ -14,6 +14,8 @@ #include <QPromise> #include <QString> +#include <utils/appinfo.h> + static Q_LOGGING_CATEGORY(apiLog, "qtc.compilerexplorer.api", QtWarningMsg); namespace CompilerExplorer::Api { @@ -45,11 +47,18 @@ static int debugRequestId = 0; template<typename Result> QFuture<Result> request( QNetworkAccessManager *networkManager, - const QNetworkRequest &req, + QNetworkRequest &req, std::function<void(const QByteArray &, QSharedPointer<QPromise<Result>>)> 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<QPromise<Result>> p(new QPromise<Result>); p->start(); @@ -58,12 +67,12 @@ QFuture<Result> 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<Result> 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<Result> request( template<typename Result> QFuture<Result> jsonRequest(QNetworkAccessManager *networkManager, - const QNetworkRequest &req, + const QUrl &url, std::function<Result(QJsonDocument)> 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<Result>( networkManager, req, @@ -135,7 +148,7 @@ QFuture<Result> jsonRequest(QNetworkAccessManager *networkManager, promise->addResult(callback(doc)); }, op, - outData); + payload); } } // namespace CompilerExplorer::Api diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index ca92b3b9c6..def8100180 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -52,6 +52,7 @@ #include <utils/algorithm.h> #include <utils/appinfo.h> #include <utils/checkablemessagebox.h> +#include <utils/dropsupport.h> #include <utils/environment.h> #include <utils/fileutils.h> #include <utils/fsengine/fileiconprovider.h> @@ -1318,12 +1319,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); diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index aa112e0b48..2d8a699727 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -1134,6 +1134,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; diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index d43a7af990..5adcc2e4df 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -536,8 +536,6 @@ void DebuggerRunTool::start() if (!interpreter.isEmpty() && mainScript.endsWith(".py")) { m_runParameters.mainScript = mainScript; m_runParameters.interpreter = interpreter; - if (auto args = runControl()->aspect<ArgumentsAspect>()) - m_runParameters.inferior.command.addArgs(args->arguments, CommandLine::Raw); } } } diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index 9c7c9bcac3..b58a1f4ba3 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); diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 3f8c55b18d..24441a0a26 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)); }; diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp index f777b77f8e..9b89943933 100644 --- a/src/plugins/mcusupport/mcukitmanager.cpp +++ b/src/plugins/mcusupport/mcukitmanager.cpp @@ -30,7 +30,6 @@ #include <utils/algorithm.h> -#include <QCoreApplication> #include <QMessageBox> #include <QPushButton> #include <QRegularExpression> @@ -433,7 +432,7 @@ QList<Kit *> 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<QString, QStringList> upgradable_to = { + static const QMap<QString, QStringList> 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 faef32b61b..84cc80f7aa 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 <utils/algorithm.h> @@ -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(); } diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 7922b3f3a6..97d2f657aa 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -152,8 +152,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) diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index 4279e2287b..a92ee5d8ec 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -564,6 +564,9 @@ public: : QWidget(parent) { connect(KitManager::instance(), &KitManager::kitUpdated, this, &KitAreaWidget::updateKit); + auto layout = new QVBoxLayout; + layout->setContentsMargins({}); + setLayout(layout); } ~KitAreaWidget() override { setKit(nullptr); } @@ -572,24 +575,23 @@ public: { 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()); - 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()); @@ -625,6 +627,7 @@ private: } Kit *m_kit = nullptr; + QWidget *m_gridWidget = nullptr; QList<KitAspect *> m_kitAspects; }; diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 99eb12d63e..5ae96e446e 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -690,7 +690,7 @@ bool FixedRunConfigurationFactory::supportsBuildKey(Target *target, const QStrin { Q_UNUSED(target) Q_UNUSED(key) - return false; + return true; } } // namespace ProjectExplorer diff --git a/src/plugins/remotelinux/genericdeploystep.cpp b/src/plugins/remotelinux/genericdeploystep.cpp index 77aef3d522..df1fcf572f 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.")); diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index 8254f9284b..c2324887b6 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 diff --git a/src/shared/qbs b/src/shared/qbs -Subproject 7867c6aaa375e6c7ff3affb67dc6af56df1ecdf +Subproject 36e230e0bafdbe11bd31bd294ae745403c553c7 diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index bd827d5351..f5e0f5845f 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: diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py index 945dc5cdf5..9ce6f00a13 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('<span\s+id="resolution-val".*?>(?P<resolution>.*?)</span>') resolution = resPattern.search(data) 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 82a7ae6ac8..30cfdfe43b 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" "<Other Locations>" "1" "manual.qrc" "3" "/manual" "4" |