diff --git a/doc/qtcreator/src/editors/creator-code-syntax.qdoc b/doc/qtcreator/src/editors/creator-code-syntax.qdoc index ae86067e9f8..f4f57e6488e 100644 --- a/doc/qtcreator/src/editors/creator-code-syntax.qdoc +++ b/doc/qtcreator/src/editors/creator-code-syntax.qdoc @@ -682,6 +682,20 @@ \li An import statement has been added twice. For more information, see \l{Import Statements}. + \row + \li M401 + \li Error + \li Do not reference the root item as alias + \li The alias property cannot reference the root component directly. + Create an instance of the component instead. + + \row + \li M402 + \li Warning + \li Avoid referencing the root item in a hierarchy + \li The alias property cannot reference the root component in a + hierarchy. Create an instance of the component instead. + \endtable \section1 Resetting the Code Model diff --git a/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc b/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc index d6aafd4469e..a9a94cd3df8 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc @@ -8,8 +8,8 @@ \title Using Squish - \l{https://doc.froglogic.com/squish/latest/}{Squish} is an automated GUI - testing framework for testing Android, iOS, Java, Qt, Tk, Windows, and + \l{https://www.qt.io/product/quality-assurance/squish}{Squish} is an automated GUI + testing framework for testing Android, iOS, Java, \macos, Qt, Tk, Windows, and XView applications, as well as HTML-based web applications running in browsers, such as Apple Safari, Mozilla Firefox, Google Chrome, and Microsoft Internet Explorer and Edge. diff --git a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc index efa148bfe25..2719aa3e4c8 100644 --- a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc +++ b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc @@ -175,19 +175,24 @@ \section1 Supported Qt for MCUs SDKs - Since version 7.0.0, \QC supports version 2.0 and later of the Qt for MCUs SDK. - For older versions, refer to the following table. + \note The Qt for MCUs SDK 2.3 requires \QC 9.0.0, or later. + + The following table lists the \QC versions you can use to develop + applications with particular Qt for MCUs SDK versions. \table \header \li \QC version \li Qt for MCUs SDK version \row - \li 7.0.0 or later + \li 9.0.0 or later \li 2.0 or later + \row + \li 7.0.0 up to 8.0.2 + \li 2.0 up to 2.2 \row \li 6.0.x - \li 1.3 or later, including 2.0 or later + \li 1.3 up to 2.2 \row \li 4.12.4 up to 5.0.3 \li 1.3 up to 1.9 diff --git a/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc b/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc index 6dfdf06c8e3..e7da4b12c7e 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc @@ -21,7 +21,7 @@ \li {3,1} Development Platform \header \li \l Linux - \li \l macOS + \li \l \macos \li \l Windows \row \li \l Android @@ -50,7 +50,7 @@ \li \row \li \l{Microcontroller Units (MCU)}{MCUs} - \li + \li \image ok.png \li \li \image ok.png \row diff --git a/share/qtcreator/debugger/mac_stdtypes.py b/share/qtcreator/debugger/mac_stdtypes.py index 9484e3d14bf..3f6fcbdb93c 100644 --- a/share/qtcreator/debugger/mac_stdtypes.py +++ b/share/qtcreator/debugger/mac_stdtypes.py @@ -165,8 +165,15 @@ def qdump__std____1__stack(d, value): def std_1_string_dumper(d, value): charType = value['__l']['__data_'].dereference().type + D = None - D = value[0][0][0][0] + try: # LLDB + D = value[0][0][0][0] + except: # GDB + try: # std::string + D = value[0].members(True)[0][0][0] + except: # std::u16string, std::u32string + D = value[2].members(True)[0][0][0] layoutDecider = D[0][0] if not layoutDecider: @@ -218,13 +225,14 @@ def std_1_string_dumper(d, value): if short_mode and location_sp: d.putCharArrayHelper(d.extractPointer(location_sp), size, - charType, d.currentItemFormat()) + charType, d.currentItemFormat()) else: d.putCharArrayHelper(location_sp.integer(), - size, charType, d.currentItemFormat()) + size, charType, d.currentItemFormat()) return + def qdump__std____1__string(d, value): std_1_string_dumper(d, value) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 8bfd982e27a..790c66800c7 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -124,19 +124,19 @@ CMakeProjectManager Initial Configuration - + Initiale Konfiguration Current Configuration - + Aktuelle Konfiguration Kit Configuration - + Kit-Konfiguration Edit the current kit's CMake configuration. - + Die CMake-Konfiguration des aktuellen Kits bearbeiten. Filter @@ -176,11 +176,11 @@ &Set - + &Setzen Set a value in the CMake configuration. - + Einen Wert in der CMake-Konfiguration setzen. &Unset @@ -200,11 +200,11 @@ Batch Edit... - + Als Text bearbeiten... Set or reset multiple values in the CMake configuration. - + Mehrere Variablen in der CMake-Konfiguration setzen oder zurücksetzen. Advanced @@ -212,63 +212,63 @@ Clear system environment - Systemumgebung löschen + Systemumgebung löschen Help - Hilfe + Hilfe Apply Kit Value - + Wert des Kits anwenden Apply Initial Configuration Value - + Wert der initialen Konfiguration anwenden Copy - Kopieren + Kopieren Change the build directory to "%1" and start with a basic CMake configuration? - + Wollen Sie das Build-Verzeichnis auf "%1" ändern und mit einer grundlegenden CMake-Konfiguration beginnen? The CMake flag for the development team - + Das CMake-Flag für das Entwicklerteam The CMake flag for the provisioning profile - + Das CMake-Flag für das Provisioning-Profil The CMake flag for the architecture on macOS - + Das CMake-Flag für die macOS-Architektur The CMake flag for QML debugging, if enabled - + Das CMake-Flag für QML-Debuggen, falls aktiviert Profile - Profile + Profile Clean Environment - Saubere Umgebung + Saubere Umgebung System Environment - Systemumgebung + Systemumgebung Additional CMake <a href="options">options</a>: - + Weitere CMake-<a href="options">Optionen</a>: Build type: - + Build-Typ: <UNSET> @@ -276,31 +276,31 @@ Enter one CMake <a href="variable">variable</a> per line.<br/>To set or change a variable, use -D&lt;variable&gt;:&lt;type&gt;=&lt;value&gt;.<br/>&lt;type&gt; can have one of the following values: FILEPATH, PATH, BOOL, INTERNAL, or STRING.<br/>To unset a variable, use -U&lt;variable&gt;.<br/> - + Geben Sie eine CMake-<a href="variable">Variable</a> pro Zeile ein.<br/>Um eine Variable zu setzen oder zu ändern, benutzen Sie -D&lt;Variable&gt;:&lt;Typ&gt;=&lt;Wert&gt;.<br/>&lt;Typ&gt; kann einer der folgenden Werte sein: FILEPATH, PATH, BOOL, INTERNAL oder STRING.<br/>Um eine Variable zurückzusetzen, benutzen Sie -U&lt;Variable&gt;.<br/> Re-configure with Initial Parameters - + Mit initialen Parametern neu konfigurieren Clear CMake configuration and configure with initial parameters? - + Die CMake-Konfiguration löschen und mit initialen Parametern konfigurieren? Do not ask again - Nicht noch einmal nachfragen + Nicht noch einmal nachfragen Kit CMake Configuration - + CMake-Konfiguration des Kits Configure - Konfigurieren + Konfigurieren Stop CMake - + CMake abbrechen bool @@ -336,7 +336,7 @@ Clear CMake Configuration - CMake-Konfiguration bereinigen + CMake-Konfiguration löschen Rescan Project @@ -372,15 +372,15 @@ CMakeUserPresets.json cannot re-define the %1 preset: %2 - + CMakeUserPresets.json kann das Preset %1 nicht erneut definieren: %2 Build preset %1 is missing a corresponding configure preset. - + Im Build-Preset %1 fehlt ein entsprechendes Configure-Preset. Failed to load %1: %2 - + %1 konnte nicht geladen werden: %2 yes @@ -416,35 +416,35 @@ Version: %1 - Version: %1 + Version: %1 Supports fileApi: %1 - + Unterstützt fileApi: %1 Detection source: "%1" - + Quelle: "%1" CMake executable path does not exist. - + Pfad für das CMake-Werkzeug existiert nicht. CMake executable path is not a file. - + Pfad für das CMake-Werkzeug ist keine Datei. CMake executable path is not executable. - + Pfad für das CMake-Werkzeug ist nicht ausführbar. CMake executable does not provide required IDE integration features. - + Ausführbare CMake-Datei unterstützt die benötigten Funktionen für die IDE-Integration nicht. Path - Pfad + Pfad Name: @@ -456,7 +456,7 @@ Version: - Version: + Version: Help file: @@ -496,27 +496,27 @@ Current executable - + Aktuelle ausführbare Datei Build the executable used in the active run configuration. Currently: %1 - + Die ausführbare Datei der aktiven Ausführungskonfiguration erstellen. Aktuell: %1 Target: %1 - + Ziel: %1 Enable automatic provisioning updates: - + Automatische Provisionierungsaktualisierungen aktivieren: Tells xcodebuild to create and download a provisioning profile if a valid one does not exist. - + Veranlasst xcodebuild, ein Provisionierungsprofil zu erstellen und herunterzuladen, wenn kein gültiges vorhanden ist. Target - Ziel + Ziel The build configuration is currently disabled. @@ -524,7 +524,7 @@ A CMake tool must be set up for building. Configure a CMake tool in the kit options. - Zum Erstellen muss ein CMake Tool eingestellt sein. Die Konfiguration erfolgt in den Kit Einstellungen. + Zum Erstellen muss ein CMake-Werkzeug eingestellt sein. Die Konfiguration erfolgt in den Kit Einstellungen. There is a CMakeCache.txt file in "%1", which suggest an in-source build was done before. You are now building in "%2", and the CMakeCache.txt file might confuse CMake. @@ -545,7 +545,7 @@ CMake Build Display name for CMakeProjectManager::CMakeBuildStep id. - Erstellen mit CMake + Erstellen mit CMake CMake arguments: @@ -558,7 +558,7 @@ Build ConfigWidget display name. - + Erstellen Targets: @@ -570,19 +570,19 @@ Kit: - Kit: + Kit: Initial Configuration: - + Initiale Konfiguration: Current Configuration: - + Aktuelle Konfiguration: Type: - Typ: + Typ: Value @@ -631,23 +631,23 @@ Package manager auto setup - + Automatisches Aufsetzen von Paketmanagern Add the CMAKE_PROJECT_INCLUDE_BEFORE variable pointing to a CMake script that will install dependencies from the conanfile.txt, conanfile.py, or vcpkg.json file from the project source directory. - + Setzt die Variable CMAKE_PROJECT_INCLUDE_BEFORE auf ein CMake-Script, das Abhängigkeiten von einer conanfile.txt, conanfile.py oder vcpkg.json-Datei im Quellverzeichnis des Projekts installiert. Ask before re-configuring with initial parameters - + Vor dem Neukonfigurieren mit initialen Parametern nachfragen Show subfolders inside source group folders - + Unterverzeichnisse in Sourcegruppen anzeigen General - Allgemein + Allgemein Adding Files @@ -675,12 +675,12 @@ Copy to Clipboard? - In die Zwischenablage kopieren? + In die Zwischenablage kopieren? Files are not automatically added to the CMakeLists.txt file of the CMake project. Copy the path to the source files to the clipboard? - Dateien werden nicht automatisch zur Datei CMakeLists.txt des CMake-Projekts hinzugefügt. + Dateien werden nicht automatisch zur Datei CMakeLists.txt des CMake-Projekts hinzugefügt. Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? @@ -689,15 +689,15 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? Run CMake with configuration changes? - + CMake mit Änderungen der Konfiguration ausführen? <b>CMake configuration failed<b><p>The backup of the previous configuration has been restored.</p><p>Issues and "Projects > Build" settings show more information about the failure.</p - + <b>CMake-Konfiguration ist fehlgeschlagen<b/><p>Das Backup der vorherigen Konfiguration wurde wiederhergestellt.</p><p>Details zu dem Problem finden Sie in "Probleme" und den Einstellungen in "Projekte > Erstellen".</p> <b>Failed to load project<b><p>Issues and "Projects > Build" settings show more information about the failure.</p - + <b>Laden des Projekts fehlgeschlagen</b><p>Details zu dem Problem finden Sie in "Probleme" und den Einstellungen in "Projekte > Erstellen".</p> Failed to create build directory "%1". @@ -705,11 +705,11 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? No CMake tool set up in kit. - + Im Kit ist kein CMake-Werkzeug eingerichtet. The remote CMake executable cannot write to the local build directory. - + Das entfernte CMake-Werkzeug kann nicht in das lokale Build-Verzeichnis schreiben. <No CMake Tool available> @@ -729,11 +729,11 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? Path to the cmake executable - Pfad zur ausführbaren Datei von cmake + Pfad zum CMake-Werkzeug CMake version %1 is unsupported. Update to version 3.14 (with file-api) or later. - + Die CMake-Version %1 wird nicht unterstützt. Aktualisieren Sie auf Version 3.14 (mit file-api) oder neuer. Change... @@ -749,11 +749,11 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? Platform - Plattform + Plattform Toolset - + Toolset Generator: @@ -777,11 +777,11 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? CMake Tool is unconfigured, CMake generator will be ignored. - Das CMake-Tool ist nicht konfiguriert. Der CMake-Generator wird ignoriert. + Das CMake-Werkzeug ist nicht konfiguriert. Der CMake-Generator wird ignoriert. CMake Tool does not support the configured generator. - Das CMake-Tool unterstützt den konfigurierten Generator nicht. + Das CMake-Werkzeug unterstützt den konfigurierten Generator nicht. Platform is not supported by the selected CMake generator. @@ -813,15 +813,15 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? CMake <a href="generator">generator</a> - + CMake-<a href="generator">Generator</a> The selected CMake binary does not support file-api. %1 will not be able to parse CMake projects. - + Das gewählte CMake-Werkzeug unterstützt file-api nicht. %1 wird nicht in der Lage sein, CMake-Projekte auszuwerten. Enter one CMake <a href="variable">variable</a> per line.<br/>To set a variable, use -D&lt;variable&gt;:&lt;type&gt;=&lt;value&gt;.<br/>&lt;type&gt; can have one of the following values: FILEPATH, PATH, BOOL, INTERNAL, or STRING. - + Geben Sie eine CMake-<a href="variable">Variable</a> pro Zeile ein.<br/>Um eine Variable zu setzen, benutzen Sie -D&lt;Variable&gt;:&lt;Typ&gt;=&lt;Wert&gt;.<br/>&lt;Typ&gt; kann einer der folgenden Werte sein: FILEPATH, PATH, BOOL, INTERNAL oder STRING. CMake Configuration @@ -877,7 +877,7 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? Builds a target of any open CMake project. - + Erstellt ein Ziel eines geöffneten CMake-Projekts. Open CMake target @@ -885,23 +885,23 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? Jumps to the definition of a target of any open CMake project. - + Springt zur Definition eines Ziels eines geöffneten CMake-Projekts. The source directory %1 is not reachable by the CMake executable %2. - + Das Quellverzeichnis %1 kann vom CMake-Werkzeug %2 nicht erreicht werden. The build directory %1 is not reachable by the CMake executable %2. - + Das Build-Verzeichnis %1 kann vom CMake-Werkzeug %2 nicht erreicht werden. The build directory "%1" does not exist - + Das Build-Verzeichnis "%1" existiert nicht CMake executable "%1" and build directory "%2" must be on the same device. - + Das CMake-Werkzeug "%1" und das Build-Verzeichnis "%2" müssen auf demselben Gerät liegen. Running %1 in %2. @@ -913,19 +913,19 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? CMake process failed to start. - + Der CMake-Prozess konnte nicht gestartet werden. CMake process was canceled by the user. - + Der CMake-Prozess wurde vom Benutzer abgebrochen. CMake process crashed. - + Der CMake-Prozess ist abgestürzt. CMake process exited with exit code %1. - + Der CMake-Prozess wurde mit dem Rückgabewert %1 beendet. <Build Directory> @@ -937,165 +937,167 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren? Unexpected source directory "%1", expected "%2". This can be correct in some situations, for example when importing a standalone Qt test, but usually this is an error. Import the build anyway? - + Unerwartetes Quellverzeichnis "%1", erwartet wurde "%2". Dies kann in einigen Situationen korrekt sein, zum Beispiel beim Importieren eines eigenständigen Qt-Tests, aber normalerweise ist es ein Fehler. Soll der Build trotzdem importiert werden? CMake Modules - CMake-Module + CMake-Module Target type: - Zieltyp: + Zieltyp: No build artifacts - Keine Build-Artefakte + Keine Build-Artefakte Build artifacts: - Build-Artefakte: + Build-Artefakte: Version not parseable - + Version kann nicht ausgewertet werden Searching CMake binaries... - + Suche CMake-Werkzeuge... Found "%1" - + "%1" gefunden Removing CMake entries... - + Entferne CMake-Einträge... Removed "%1" - + "%1" entfernt CMake: - + CMake: Failed to set up CMake file API support. %1 cannot extract project information. - + CMake file-api-Unterstützung konnte nicht aufgesetzt werden. %1 kann keine Projektinformationen auswerten. Invalid reply file created by CMake. - + CMake hat eine ungültige Antwortdatei erstellt. Invalid cache file generated by CMake. - + CMake hat eine ungültige Cache-Datei erstellt. Invalid cmakeFiles file generated by CMake. - + CMake hat ungültige "cmakeFiles" erstellt. Invalid codemodel file generated by CMake: No directories. - + CMake hat eine ungültige Codemodell-Datei erstellt: Keine Verzeichnisse. Invalid codemodel file generated by CMake: Empty directory object. - + CMake hat eine ungültige Codemodell-Datei erstellt: Leeres Verzeichnisobjekt. Invalid codemodel file generated by CMake: No projects. - + CMake hat eine ungültige Codemodell-Datei erstellt: Keine Projekte. Invalid codemodel file generated by CMake: Empty project object. - + CMake hat eine ungültige Codemodell-Datei erstellt: Leeres Projektobjekt. Invalid codemodel file generated by CMake: Broken project data. - + CMake hat eine ungültige Codemodell-Datei erstellt: Fehlerhafte Projektdaten. Invalid codemodel file generated by CMake: Empty target object. - + CMake hat eine ungültige Codemodell-Datei erstellt: Leeres Zielobjekt. Invalid codemodel file generated by CMake: Broken target data. - + CMake hat eine ungültige Codemodell-Datei erstellt: Fehlerhafte Zieldaten. Invalid codemodel file generated by CMake: No configurations. - + CMake hat eine ungültige Codemodell-Datei erstellt: Keine Konfigurationen. Invalid codemodel file generated by CMake: Empty configuration object. - + CMake hat eine ungültige Codemodell-Datei erstellt: Leeres Konfigurationsobjekt. Invalid codemodel file generated by CMake: Broken indexes in directories, projects, or targets. - + CMake hat eine ungültige Codemodell-Datei erstellt: Fehlerhafte Indizes in Verzeichnissen, Projekten oder Zielen. Invalid codemodel file generated by CMake. - + CMake hat eine ungültige Codemodell-Datei erstellt. Invalid target file: Information is missing. - + Ungültige Zieldatei: Information fehlt. Invalid target file generated by CMake: Broken indexes in target details. - + CMake hat eine ungültige Zieldatei erstellt: Fehlerhafte Indizes in den Zieldetails. CMake parsing was canceled. - + CMake-Auswertung wurde abgebrochen. No "%1" CMake configuration found. Available configurations: "%2". Make sure that CMAKE_CONFIGURATION_TYPES variable contains the "Build type" field. - + CMake-Konfiguration "%1 wurde nicht gefunden. Verfügbare Konfigurationen: "%2". +Stellen Sie sicher, dass der Wert des "Build-Typ"-Felds in der CMAKE_CONFIGURATION_TYPES-Variable enthalten ist. No "%1" CMake configuration found. Available configuration: "%2". Make sure that CMAKE_BUILD_TYPE variable matches the "Build type" field. - + CMake-Konfiguration "%1 wurde nicht gefunden. Verfügbare Konfigurationen: "%2". +Stellen Sie sicher, dass der Wert der CMAKE_BUILD_TYPE-Variable derselbe wie der des "Build-Typ"-Felds ist. CMake returned error code: %1 - + CMake hat einen Fehlerwert zurückgegeben: %1 Failed to rename %1 to %2. - + Umbenennen von %1 nach %2 ist fehlgeschlagen. Failed to copy %1 to %2. - + Kopieren von %1 nach %2 ist fehlgeschlagen. Failed to read %1 file - + Die Datei %1 konnte nicht gelesen werden Invalid %1 file - + Ungültige Datei %1 Invalid "version" in %1 file - + Ungültige "version" in Datei %1 Invalid "configurePresets" section in %1 file - + Ungültiger Abschnitt "configurePresets" in Datei %1 Invalid "buildPresets" section in %1 file - + Ungültiger Abschnitt "buildPresets" in Datei %1 <File System> - + <Dateisystem> @@ -52708,7 +52710,7 @@ in "%2" aus. CMakeProjectManager::Tr::Tr Tools - Werkzeuge + Werkzeuge diff --git a/src/app/main.cpp b/src/app/main.cpp index e197f17393a..bdd80ed34e2 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -494,6 +494,11 @@ int main(int argc, char **argv) qputenv("QT_ENABLE_REGEXP_JIT", "0"); } + if (Utils::HostOsInfo::isLinuxHost() && !qEnvironmentVariableIsSet("GTK_THEME")) + // Work around QTCREATORBUG-28497: + // Prevent Qt's GTK3 platform theme plugin from enforcing a dark palette + qputenv("GTK_THEME", ":light"); + #if defined(QTC_FORCE_XCB) if (Utils::HostOsInfo::isLinuxHost() && !qEnvironmentVariableIsSet("QT_QPA_PLATFORM")) { // Enforce XCB on Linux/Gnome, if the user didn't override via QT_QPA_PLATFORM diff --git a/src/libs/utils/infobar.cpp b/src/libs/utils/infobar.cpp index ad615502a2e..264267cf662 100644 --- a/src/libs/utils/infobar.cpp +++ b/src/libs/utils/infobar.cpp @@ -374,8 +374,10 @@ void InfoBarDisplay::update() if (infoWidgetCloseButton) hbox->addWidget(infoWidgetCloseButton); } else { - infoWidgetCloseButton->setText(info.m_cancelButtonText); - hbox->addWidget(infoWidgetCloseButton); + if (infoWidgetCloseButton) { + infoWidgetCloseButton->setText(info.m_cancelButtonText); + hbox->addWidget(infoWidgetCloseButton); + } if (infoWidgetSuppressButton) hbox->addWidget(infoWidgetSuppressButton); } diff --git a/src/plugins/clangtools/filterdialog.cpp b/src/plugins/clangtools/filterdialog.cpp index b1225270d8e..cd54add6b88 100644 --- a/src/plugins/clangtools/filterdialog.cpp +++ b/src/plugins/clangtools/filterdialog.cpp @@ -93,7 +93,7 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent) buttonBox, }.attachTo(this); - connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [&] { + connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [=] { const bool hasSelection = !m_view->selectionModel()->selectedRows().isEmpty(); buttonBox->button(QDialogButtonBox::Ok)->setEnabled(hasSelection); }); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 31ab93d8797..1f9829a2276 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -1623,10 +1623,24 @@ bool CMakeBuildConfiguration::fromMap(const QVariantMap &map) m_buildSystem->setInitialCMakeArguments(cmd.splitArguments()); } - d->m_clearSystemConfigureEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY)) - .toBool(); + // Upgrading from Qt Creator version <9 to 9, if the build environment is set + // apply the specific values to the configure environment + auto settingsKey = [map](const QLatin1String &configureKey, const QLatin1String &buildKey) { + if (!map.contains(configureKey) && map.contains(buildKey)) + return buildKey; + return configureKey; + }; + + const QLatin1String clearSystemEnvironmentKey + = settingsKey(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY), + QLatin1String(ProjectExplorer::Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY)); + const QLatin1String userEnvironmentChangesKey + = settingsKey(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY), + QLatin1String(ProjectExplorer::Constants::USER_ENVIRONMENT_CHANGES_KEY)); + + d->m_clearSystemConfigureEnvironment = map.value(clearSystemEnvironmentKey).toBool(); d->m_userConfigureEnvironmentChanges = EnvironmentItem::fromStringList( - map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList()); + map.value(userEnvironmentChangesKey).toStringList()); updateAndEmitConfigureEnvironmentChanged(); diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index ad4c685d3f5..ce490d17714 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -96,14 +96,24 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP for (const auto &p : presets) presetsHash.insert(p.name, p); - auto resolveInherits = [](const auto &presetsHash, auto &presetsList) { + auto resolveInherits = [](auto &presetsHash, auto &presetsList) { + Utils::sort(presetsList, [](const auto &left, const auto &right) { + if (left.inherits) { + if (left.inherits.value().contains(right.name)) + return false; + } + return true; + }); for (auto &p : presetsList) { if (!p.inherits) continue; - for (const QString &inheritFromName : p.inherits.value()) - if (presetsHash.contains(inheritFromName)) + for (const QString &inheritFromName : p.inherits.value()) { + if (presetsHash.contains(inheritFromName)) { p.inheritFrom(presetsHash[inheritFromName]); + presetsHash[p.name] = p; + } + } } }; diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp index fccdeb9af2f..1ed68ab5139 100644 --- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp +++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.cpp @@ -164,8 +164,8 @@ void CompilationDatabaseTests::testFilterArguments() {"RELATIVE_PLUGIN_PATH", "\"../lib/qtcreator/plugins\""}, {"QT_CREATOR", "1"}})); QCOMPARE(testData.fileKind, CppEditor::ProjectFile::Kind::CXXSource); - QCOMPARE(testData.sysRoot.toString(), HostOsInfo::isWindowsHost() ? QString("C:\\sysroot\\embedded") - : QString("/opt/sysroot/embedded")); + QCOMPARE(testData.sysRoot.toUserOutput(), HostOsInfo::isWindowsHost() + ? QString("C:\\sysroot\\embedded") : QString("/opt/sysroot/embedded")); } static QString kCmakeCommand diff --git a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp index 8af9c183dbe..3c87fa5e43c 100644 --- a/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp +++ b/src/plugins/coreplugin/dialogs/externaltoolconfig.cpp @@ -752,7 +752,7 @@ void ExternalToolConfig::showInfoForItem(const QModelIndex &index) static FilePath getUserFilePath(const QString &proposalFileName) { const FilePath resourceDir(ICore::userResourcePath()); - const FilePath externalToolsDir = resourceDir / "externalTools"; + const FilePath externalToolsDir = resourceDir / "externaltools"; if (!externalToolsDir.isDir()) externalToolsDir.createDir(); diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp index 9ce9959e525..b180eefbaca 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel.cpp +++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp @@ -79,7 +79,7 @@ int DocumentModelPrivate::rowCount(const QModelIndex &parent) const return 0; } -void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry) +DocumentModel::Entry *DocumentModelPrivate::addEntry(DocumentModel::Entry *entry) { const Utils::FilePath filePath = entry->filePath(); @@ -95,9 +95,8 @@ void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry) this, [this, document = previousEntry->document] { itemChanged(document); }); } delete entry; - entry = nullptr; disambiguateDisplayNames(previousEntry); - return; + return nullptr; } auto positions = positionEntry(m_entries, entry); @@ -115,6 +114,7 @@ void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry) itemChanged(document); }); endInsertRows(); + return entry; } bool DocumentModelPrivate::disambiguateDisplayNames(DocumentModel::Entry *entry) @@ -411,8 +411,7 @@ DocumentModel::Entry *DocumentModelPrivate::addSuspendedDocument(const FilePath entry->document->setPreferredDisplayName(displayName); entry->document->setId(id); entry->isSuspended = true; - d->addEntry(entry); - return entry; + return d->addEntry(entry); } DocumentModel::Entry *DocumentModelPrivate::firstSuspendedEntry() diff --git a/src/plugins/coreplugin/editormanager/documentmodel_p.h b/src/plugins/coreplugin/editormanager/documentmodel_p.h index 560dd0d0bd0..7d44172688c 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel_p.h +++ b/src/plugins/coreplugin/editormanager/documentmodel_p.h @@ -33,7 +33,7 @@ public: Qt::DropActions supportedDragActions() const override; QStringList mimeTypes() const override; - void addEntry(DocumentModel::Entry *entry); + DocumentModel::Entry *addEntry(DocumentModel::Entry *entry); void removeDocument(int idx); std::optional indexOfFilePath(const Utils::FilePath &filePath) const; diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 0ed4d4cc8a5..6d8a35b62c6 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -720,7 +720,9 @@ void ICore::raiseWindow(QWidget *widget) if (!widget) return; QWidget *window = widget->window(); - if (window && window == m_mainwindow) { + if (!window) + return; + if (window == m_mainwindow) { m_mainwindow->raiseWindow(); } else { window->raise(); diff --git a/src/plugins/cppeditor/cppcodestylesettingspage.cpp b/src/plugins/cppeditor/cppcodestylesettingspage.cpp index bc79c34f4a4..91c317180b7 100644 --- a/src/plugins/cppeditor/cppcodestylesettingspage.cpp +++ b/src/plugins/cppeditor/cppcodestylesettingspage.cpp @@ -356,8 +356,8 @@ void CppCodeStylePreferencesWidget::setCodeStyle(CppCodeStylePreferences *codeSt slotCurrentPreferencesChanged(currentPreferences); }); - setTabSettings(m_preferences->tabSettings()); - setCodeStyleSettings(m_preferences->codeStyleSettings(), false); + setTabSettings(m_preferences->currentTabSettings()); + setCodeStyleSettings(m_preferences->currentCodeStyleSettings(), false); slotCurrentPreferencesChanged(m_preferences->currentPreferences(), false); updatePreview(); diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 98d337fea07..643a3b3e2e0 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -12,7 +12,6 @@ #include "cppeditordocument.h" #include "cppeditorwidget.h" #include "cppfilesettingspage.h" -#include "cpphighlighter.h" #include "cppincludehierarchy.h" #include "cppmodelmanager.h" #include "cppoutline.h" @@ -260,42 +259,6 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err connect(openInNextSplitAction, &QAction::triggered, this, [] { CppModelManager::switchHeaderSource(true); }); - QAction * const showPreprocessedAction = new QAction(tr("Show Preprocessed Source"), this); - command = ActionManager::registerAction(showPreprocessedAction, - Constants::SHOW_PREPROCESSED_FILE, context); - mcpptools->addAction(command); - connect(showPreprocessedAction, &QAction::triggered, - this, [] { CppModelManager::showPreprocessedFile(false); }); - - QAction * const showPreprocessedInSplitAction = new QAction - (tr("Show Preprocessed Source in Next Split"), this); - command = ActionManager::registerAction(showPreprocessedInSplitAction, - Constants::SHOW_PREPROCESSED_FILE_SPLIT, context); - mcpptools->addAction(command); - connect(showPreprocessedInSplitAction, &QAction::triggered, - this, [] { CppModelManager::showPreprocessedFile(true); }); - - QAction * const findUnusedFunctionsAction = new QAction(tr("Find Unused Functions"), this); - command = ActionManager::registerAction(findUnusedFunctionsAction, - "CppTools.FindUnusedFunctions"); - mcpptools->addAction(command); - connect(findUnusedFunctionsAction, &QAction::triggered, - this, [] { CppModelManager::findUnusedFunctions({}); }); - QAction * const findUnusedFunctionsInSubProjectAction - = new QAction(tr("Find Unused C/C++ Functions"), this); - command = ActionManager::registerAction(findUnusedFunctionsInSubProjectAction, - "CppTools.FindUnusedFunctionsInSubProject"); - for (ActionContainer * const projectContextMenu : { - ActionManager::actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT), - ActionManager::actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT)}) { - projectContextMenu->addSeparator(ProjectExplorer::Constants::G_PROJECT_TREE); - projectContextMenu->addAction(command, ProjectExplorer::Constants::G_PROJECT_TREE); - } - connect(findUnusedFunctionsInSubProjectAction, &QAction::triggered, this, [] { - if (const Node * const node = ProjectTree::currentNode(); node && node->asFolderNode()) - CppModelManager::findUnusedFunctions(node->directory()); - }); - MacroExpander *expander = globalMacroExpander(); expander->registerVariable("Cpp:LicenseTemplate", tr("The license template."), @@ -336,9 +299,6 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST); touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_NAVIGATION); - cmd = ActionManager::command(Constants::SHOW_PREPROCESSED_FILE); - contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST); - cmd = ActionManager::command(TextEditor::Constants::FOLLOW_SYMBOL_UNDER_CURSOR); cmd->setTouchBarText(tr("Follow", "text on macOS touch bar")); contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST); @@ -418,6 +378,44 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST); cppToolsMenu->addAction(cmd); + QAction * const showPreprocessedAction = new QAction(tr("Show Preprocessed Source"), this); + command = ActionManager::registerAction(showPreprocessedAction, + Constants::SHOW_PREPROCESSED_FILE, context); + mcpptools->addAction(command); + contextMenu->addAction(command, Constants::G_CONTEXT_FIRST); + connect(showPreprocessedAction, &QAction::triggered, + this, [] { CppModelManager::showPreprocessedFile(false); }); + + QAction * const showPreprocessedInSplitAction = new QAction + (tr("Show Preprocessed Source in Next Split"), this); + command = ActionManager::registerAction(showPreprocessedInSplitAction, + Constants::SHOW_PREPROCESSED_FILE_SPLIT, context); + mcpptools->addAction(command); + connect(showPreprocessedInSplitAction, &QAction::triggered, + this, [] { CppModelManager::showPreprocessedFile(true); }); + + QAction *const findUnusedFunctionsAction = new QAction(tr("Find Unused Functions"), this); + command = ActionManager::registerAction(findUnusedFunctionsAction, + "CppTools.FindUnusedFunctions"); + mcpptools->addAction(command); + connect(findUnusedFunctionsAction, &QAction::triggered, this, [] { + CppModelManager::findUnusedFunctions({}); + }); + QAction *const findUnusedFunctionsInSubProjectAction + = new QAction(tr("Find Unused C/C++ Functions"), this); + command = ActionManager::registerAction(findUnusedFunctionsInSubProjectAction, + "CppTools.FindUnusedFunctionsInSubProject"); + for (ActionContainer *const projectContextMenu : + {ActionManager::actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT), + ActionManager::actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT)}) { + projectContextMenu->addSeparator(ProjectExplorer::Constants::G_PROJECT_TREE); + projectContextMenu->addAction(command, ProjectExplorer::Constants::G_PROJECT_TREE); + } + connect(findUnusedFunctionsInSubProjectAction, &QAction::triggered, this, [] { + if (const Node *const node = ProjectTree::currentNode(); node && node->asFolderNode()) + CppModelManager::findUnusedFunctions(node->directory()); + }); + d->m_openTypeHierarchyAction = new QAction(tr("Open Type Hierarchy"), this); cmd = ActionManager::registerAction(d->m_openTypeHierarchyAction, Constants::OPEN_TYPE_HIERARCHY, context); cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+T") : tr("Ctrl+Shift+T"))); diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 97e4ed1c77f..f2167c80c27 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2871,6 +2871,56 @@ static void formatCdbBreakPointResponse(int modelId, const QString &responseId, str << '\n'; } + +// Helper to retrieve an int child from GDBMI +static inline std::optional gdbmiChildToInt(const GdbMi &parent, const char *childName) +{ + const GdbMi childBA = parent[childName]; + if (childBA.isValid()) { + bool ok; + const int v = childBA.data().toInt(&ok); + if (ok) + return v; + } + return std::nullopt; +} + +// Helper to retrieve an bool child from GDBMI +static inline std::optional gdbmiChildToBool(const GdbMi &parent, const char *childName) +{ + const GdbMi childBA = parent[childName]; + return childBA.isValid() ? std::make_optional(childBA.data() == "true") : std::nullopt; +} + +// Parse extension command listing breakpoints. +// Note that not all fields are returned, since file, line, function are encoded +// in the expression (that is in addition deleted on resolving for a bp-type breakpoint). +BreakpointParameters CdbEngine::parseBreakPoint(const GdbMi &gdbmi) +{ + BreakpointParameters result; + result.enabled = gdbmiChildToBool(gdbmi, "enabled").value_or(result.enabled); + result.pending = gdbmiChildToBool(gdbmi, "deferred").value_or(result.pending); + const GdbMi moduleG = gdbmi["module"]; + if (moduleG.isValid()) + result.module = moduleG.data(); + const GdbMi sourceFileName = gdbmi["srcfile"]; + if (sourceFileName.isValid()) { + NormalizedSourceFileName mappedFile = sourceMapNormalizeFileNameFromDebugger( + sourceFileName.data()); + result.fileName = Utils::FilePath::fromUserInput(mappedFile.fileName); + const GdbMi lineNumber = gdbmi["srcline"]; + if (lineNumber.isValid()) + result.lineNumber = lineNumber.data().toULongLong(nullptr, 0); + } + const GdbMi addressG = gdbmi["address"]; + if (addressG.isValid()) + result.address = addressG.data().toULongLong(nullptr, 0); + if (const std::optional ignoreCount = gdbmiChildToInt(gdbmi, "passcount")) + result.ignoreCount = *ignoreCount - 1; + result.threadSpec = gdbmiChildToInt(gdbmi, "thread").value_or(result.threadSpec); + return result; +} + void CdbEngine::handleBreakPoints(const DebuggerResponse &response) { if (debugBreakpoints) { @@ -2896,8 +2946,7 @@ void CdbEngine::handleBreakPoints(const DebuggerResponse &response) for (const GdbMi &breakPointG : response.data) { // Might not be valid if there is not id const QString responseId = breakPointG["id"].data(); - BreakpointParameters reportedResponse; - parseBreakPoint(breakPointG, &reportedResponse); + BreakpointParameters reportedResponse = parseBreakPoint(breakPointG); if (debugBreakpoints) qDebug(" Parsed %s: pending=%d %s\n", qPrintable(responseId), reportedResponse.pending, diff --git a/src/plugins/debugger/cdb/cdbengine.h b/src/plugins/debugger/cdb/cdbengine.h index 108cc64d160..89c2fd63ec9 100644 --- a/src/plugins/debugger/cdb/cdbengine.h +++ b/src/plugins/debugger/cdb/cdbengine.h @@ -168,6 +168,7 @@ private: unsigned parseStackTrace(const GdbMi &data, bool sourceStepInto); void mergeStartParametersSourcePathMap(); void checkQtSdkPdbFiles(const QString &module); + BreakpointParameters parseBreakPoint(const GdbMi &gdbmi); const QString m_tokenPrefix; void handleSetupFailure(const QString &errorMessage); diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp index d8bf3996d8d..f9e2d371cba 100644 --- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp +++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp @@ -189,64 +189,6 @@ QString cdbClearBreakpointCommand(const Breakpoint &bp) return "bc " + QString::number(firstBreakPoint) + '-' + QString::number(lastBreakPoint); } -// Helper to retrieve an int child from GDBMI -static inline bool gdbmiChildToInt(const GdbMi &parent, const char *childName, int *target) -{ - const GdbMi childBA = parent[childName]; - if (childBA.isValid()) { - bool ok; - const int v = childBA.data().toInt(&ok); - if (ok) { - *target = v; - return true; - } - } - return false; -} - -// Helper to retrieve an bool child from GDBMI -static inline bool gdbmiChildToBool(const GdbMi &parent, const char *childName, bool *target) -{ - const GdbMi childBA = parent[childName]; - if (childBA.isValid()) { - *target = childBA.data() == "true"; - return true; - } - return false; -} - -// Parse extension command listing breakpoints. -// Note that not all fields are returned, since file, line, function are encoded -// in the expression (that is in addition deleted on resolving for a bp-type breakpoint). -void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r, - QString *expression /* = 0 */) -{ - gdbmiChildToBool(gdbmi, "enabled", &(r->enabled)); - gdbmiChildToBool(gdbmi, "deferred", &(r->pending)); - const GdbMi moduleG = gdbmi["module"]; - if (moduleG.isValid()) - r->module = moduleG.data(); - const GdbMi sourceFileName = gdbmi["srcfile"]; - if (sourceFileName.isValid()) { - r->fileName = Utils::FilePath::fromUserInput( - Utils::FileUtils::normalizedPathName(sourceFileName.data())); - const GdbMi lineNumber = gdbmi["srcline"]; - if (lineNumber.isValid()) - r->lineNumber = lineNumber.data().toULongLong(nullptr, 0); - } - if (expression) { - const GdbMi expressionG = gdbmi["expression"]; - if (expressionG.isValid()) - *expression = expressionG.data(); - } - const GdbMi addressG = gdbmi["address"]; - if (addressG.isValid()) - r->address = addressG.data().toULongLong(nullptr, 0); - if (gdbmiChildToInt(gdbmi, "passcount", &(r->ignoreCount))) - r->ignoreCount--; - gdbmiChildToInt(gdbmi, "thread", &(r->threadSpec)); -} - QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data) { QString cmd; diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.h b/src/plugins/debugger/cdb/cdbparsehelpers.h index 75018b08714..4c6a8170c9b 100644 --- a/src/plugins/debugger/cdb/cdbparsehelpers.h +++ b/src/plugins/debugger/cdb/cdbparsehelpers.h @@ -38,10 +38,6 @@ QString cdbAddBreakpointCommand(const BreakpointParameters &d, const QList > &sourcePathMapping, const QString &responseId = QString()); QString cdbClearBreakpointCommand(const Breakpoint &bp); -// Parse extension command listing breakpoints. -// Note that not all fields are returned, since file, line, function are encoded -// in the expression (that is in addition deleted on resolving for a bp-type breakpoint). -void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r, QString *expression = nullptr); // Write memory (f ...). QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data); diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index c05d96b1db2..a0f46fa86a5 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -249,8 +249,18 @@ void DebuggerKitAspect::fix(Kit *k) setup(k); return; } - const Abi tcAbi = ToolChainKitAspect::targetAbi(k); - if (item->matchTarget(tcAbi) != DebuggerItem::DoesNotMatch) + + Abi kitAbi; + if (ToolChainKitAspect::toolChains(k).isEmpty()) { + if (DeviceTypeKitAspect::deviceTypeId(k) + != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { + return; + } + kitAbi = Abi(Abi::UnknownArchitecture, Abi::hostAbi().os()); + } else { + kitAbi = ToolChainKitAspect::targetAbi(k); + } + if (item->matchTarget(kitAbi) != DebuggerItem::DoesNotMatch) return; k->setValue(DebuggerKitAspect::id(), QVariant()); setup(k); diff --git a/src/plugins/languageclient/languageclientmanager.cpp b/src/plugins/languageclient/languageclientmanager.cpp index d4f5c442642..60468ff12de 100644 --- a/src/plugins/languageclient/languageclientmanager.cpp +++ b/src/plugins/languageclient/languageclientmanager.cpp @@ -419,7 +419,7 @@ void LanguageClientManager::openDocumentWithClient(TextEditor::TextDocument *doc client->openDocument(document); else client->activateDocument(document); - } else if (Core::EditorManager::currentEditor()->document() == document) { + } else if (Core::EditorManager::currentDocument() == document) { TextEditor::IOutlineWidgetFactory::updateOutline(); } } diff --git a/src/plugins/mcusupport/test/armgcc_mimxrt1050_evk_freertos_json.h b/src/plugins/mcusupport/test/armgcc_mimxrt1050_evk_freertos_json.h index 4a7da4ccf93..8992d3f258d 100644 --- a/src/plugins/mcusupport/test/armgcc_mimxrt1050_evk_freertos_json.h +++ b/src/plugins/mcusupport/test/armgcc_mimxrt1050_evk_freertos_json.h @@ -63,7 +63,7 @@ constexpr auto armgcc_mimxrt1050_evk_freertos_json = R"( "id": "ARMGCC_CMAKE_TOOLCHAIN_FILE", "cmakeVar": "CMAKE_TOOLCHAIN_FILE", "type": "file", - "defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake", + "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake", "visible": false, "optional": false } diff --git a/src/plugins/mcusupport/test/armgcc_mimxrt1064_evk_freertos_json.h b/src/plugins/mcusupport/test/armgcc_mimxrt1064_evk_freertos_json.h index 592a84228d1..b4ad4c81cd9 100644 --- a/src/plugins/mcusupport/test/armgcc_mimxrt1064_evk_freertos_json.h +++ b/src/plugins/mcusupport/test/armgcc_mimxrt1064_evk_freertos_json.h @@ -63,7 +63,7 @@ constexpr auto armgcc_mimxrt1064_evk_freertos_json = R"( "id": "ARMGCC_CMAKE_TOOLCHAIN_FILE", "cmakeVar": "CMAKE_TOOLCHAIN_FILE", "type": "file", - "defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake", + "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake", "visible": false, "optional": false } diff --git a/src/plugins/mcusupport/test/armgcc_mimxrt1170_evk_freertos_json.h b/src/plugins/mcusupport/test/armgcc_mimxrt1170_evk_freertos_json.h index b7eb801cd60..6afb8df076f 100644 --- a/src/plugins/mcusupport/test/armgcc_mimxrt1170_evk_freertos_json.h +++ b/src/plugins/mcusupport/test/armgcc_mimxrt1170_evk_freertos_json.h @@ -63,7 +63,7 @@ constexpr auto armgcc_mimxrt1170_evk_freertos_json = R"( "id": "ARMGCC_CMAKE_TOOLCHAIN_FILE", "cmakeVar": "CMAKE_TOOLCHAIN_FILE", "type": "file", - "defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake", + "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake", "visible": false, "optional": false } diff --git a/src/plugins/mcusupport/test/armgcc_stm32f769i_discovery_freertos_json.h b/src/plugins/mcusupport/test/armgcc_stm32f769i_discovery_freertos_json.h index d6e28c6c429..e4bb862440f 100644 --- a/src/plugins/mcusupport/test/armgcc_stm32f769i_discovery_freertos_json.h +++ b/src/plugins/mcusupport/test/armgcc_stm32f769i_discovery_freertos_json.h @@ -62,7 +62,7 @@ constexpr auto armgcc_stm32f769i_discovery_freertos_json = R"( "id": "ARMGCC_CMAKE_TOOLCHAIN_FILE", "cmakeVar": "CMAKE_TOOLCHAIN_FILE", "type": "file", - "defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake", + "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake", "visible": false, "optional": false } diff --git a/src/plugins/mcusupport/test/armgcc_stm32h750b_discovery_baremetal_json.h b/src/plugins/mcusupport/test/armgcc_stm32h750b_discovery_baremetal_json.h index a2819c8cf8a..4ef64b2a200 100644 --- a/src/plugins/mcusupport/test/armgcc_stm32h750b_discovery_baremetal_json.h +++ b/src/plugins/mcusupport/test/armgcc_stm32h750b_discovery_baremetal_json.h @@ -62,7 +62,7 @@ constexpr auto armgcc_stm32h750b_discovery_baremetal_json = R"( "id": "ARMGCC_CMAKE_TOOLCHAIN_FILE", "cmakeVar": "CMAKE_TOOLCHAIN_FILE", "type": "file", - "defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake", + "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake", "visible": false, "optional": false } diff --git a/src/plugins/perfprofiler/perfrunconfigurationaspect.h b/src/plugins/perfprofiler/perfrunconfigurationaspect.h index b0c06fa88d2..eaa4c4b7251 100644 --- a/src/plugins/perfprofiler/perfrunconfigurationaspect.h +++ b/src/plugins/perfprofiler/perfrunconfigurationaspect.h @@ -14,6 +14,7 @@ namespace PerfProfiler { class PERFPROFILER_EXPORT PerfRunConfigurationAspect : public ProjectExplorer::GlobalOrProjectAspect { + Q_OBJECT public: PerfRunConfigurationAspect(ProjectExplorer::Target *target); }; diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp index b858fdb4d46..a812eb13b2d 100644 --- a/src/plugins/projectexplorer/buildconfiguration.cpp +++ b/src/plugins/projectexplorer/buildconfiguration.cpp @@ -46,8 +46,6 @@ using namespace Utils; const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount"; const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList."; -const char CLEAR_SYSTEM_ENVIRONMENT_KEY[] = "ProjectExplorer.BuildConfiguration.ClearSystemEnvironment"; -const char USER_ENVIRONMENT_CHANGES_KEY[] = "ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"; const char CUSTOM_PARSERS_KEY[] = "ProjectExplorer.BuildConfiguration.CustomParsers"; const char PARSE_STD_OUT_KEY[] = "ProjectExplorer.BuildConfiguration.ParseStandardOutput"; @@ -378,8 +376,9 @@ QVariantMap BuildConfiguration::toMap() const { QVariantMap map = ProjectConfiguration::toMap(); - map.insert(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY), d->m_clearSystemEnvironment); - map.insert(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY), EnvironmentItem::toStringList(d->m_userEnvironmentChanges)); + map.insert(QLatin1String(Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY), d->m_clearSystemEnvironment); + map.insert(QLatin1String(Constants::USER_ENVIRONMENT_CHANGES_KEY), + EnvironmentItem::toStringList(d->m_userEnvironmentChanges)); map.insert(QLatin1String(BUILD_STEP_LIST_COUNT), 2); map.insert(QLatin1String(BUILD_STEP_LIST_PREFIX) + QString::number(0), d->m_buildSteps.toMap()); @@ -393,8 +392,10 @@ QVariantMap BuildConfiguration::toMap() const bool BuildConfiguration::fromMap(const QVariantMap &map) { - d->m_clearSystemEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY)).toBool(); - d->m_userEnvironmentChanges = EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList()); + d->m_clearSystemEnvironment = map.value(QLatin1String(Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY)) + .toBool(); + d->m_userEnvironmentChanges = EnvironmentItem::fromStringList( + map.value(QLatin1String(Constants::USER_ENVIRONMENT_CHANGES_KEY)).toStringList()); updateCacheAndEmitEnvironmentChanged(); diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 6c50b4893e8..e98da070a9f 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -220,6 +220,8 @@ const char SETTINGS_MENU_HIDE_BUILD[] = "Menu/HideBuild"; const char SETTINGS_MENU_HIDE_DEBUG[] = "Menu/HideDebug"; const char SETTINGS_MENU_HIDE_ANALYZE[] = "Menu/HideAnalyze"; const char SESSION_TASKFILE_KEY[] = "TaskList.File"; +const char CLEAR_SYSTEM_ENVIRONMENT_KEY[] = "ProjectExplorer.BuildConfiguration.ClearSystemEnvironment"; +const char USER_ENVIRONMENT_CHANGES_KEY[] = "ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"; // UI texts PROJECTEXPLORER_EXPORT QString msgAutoDetected(); diff --git a/src/plugins/squish/squishxmloutputhandler.cpp b/src/plugins/squish/squishxmloutputhandler.cpp index 4c70f6e8761..c2e06babe6e 100644 --- a/src/plugins/squish/squishxmloutputhandler.cpp +++ b/src/plugins/squish/squishxmloutputhandler.cpp @@ -92,7 +92,7 @@ void SquishXmlOutputHandler::mergeResultFiles(const Utils::FilePaths &reportFile // and finally write test tag (case name) - the prolog tag (for test case) // will be written outside the if const QXmlStreamAttributes testAttributes = reader.attributes(); - QXmlStreamReader::TokenType token; + QXmlStreamReader::TokenType token = QXmlStreamReader::NoToken; while (!reader.atEnd()) { token = reader.readNext(); if (token != QXmlStreamReader::Characters) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 74a0f9db43f..efa5d6198b0 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -5889,7 +5889,7 @@ void TextEditorWidget::extraAreaMouseEvent(QMouseEvent *e) { QTextCursor cursor = cursorForPosition(QPoint(0, e->pos().y())); - int markWidth; + int markWidth = 0; extraAreaWidth(&markWidth); const bool inMarkArea = e->pos().x() <= markWidth && e->pos().x() >= 0; diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 39ec743104c..752b22c2aa6 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4061,15 +4061,15 @@ void tst_Dumpers::dumper_data() + Check("list.0", "[0]", "1", "int") + Check("list.1", "[1]", "2", "int") + Check("list.2", "[2]", "3", "int") - + Check("v3", "", "@QVariant (@QList)") % Qt5 + + Check("v3", "", "@QVariant (@QList)") % NeedsInferiorCall % Qt5 + Check("v3.data", "<3 items>", TypePattern(".*QList")) % NeedsInferiorCall % Qt5 + Check("v3.data.0", "[0]", "1", "int") % NeedsInferiorCall % Qt5 + Check("v3.data.1", "[1]", "2", "int") % NeedsInferiorCall % Qt5 + Check("v3.data.2", "[2]", "3", "int") % NeedsInferiorCall % Qt5 + Check("v3", "<3 items>", "@QVariant (@QList)") % Qt6 - + Check("v3.0", "[0]", "1", "int") % NeedsInferiorCall % Qt6 - + Check("v3.1", "[1]", "2", "int") % NeedsInferiorCall % Qt6 - + Check("v3.2", "[2]", "3", "int") % NeedsInferiorCall % Qt6; + + Check("v3.0", "[0]", "1", "int") % Qt6 + + Check("v3.1", "[1]", "2", "int") % Qt6 + + Check("v3.2", "[2]", "3", "int") % Qt6; QTest::newRow("QVariant2") diff --git a/tests/auto/debugger/tst_gdb.cpp b/tests/auto/debugger/tst_gdb.cpp index 804c7d63394..f4d5ffa6925 100644 --- a/tests/auto/debugger/tst_gdb.cpp +++ b/tests/auto/debugger/tst_gdb.cpp @@ -115,6 +115,14 @@ void tst_gdb::version_data() QTest::newRow("Debian 7.12 git") << "GNU gdb (Debian 7.12-6) 7.12.0.20161007-git" << 71200 << 6 << false << false; + + QTest::newRow("Debian 10.1 git") + << "GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git" + << 100100 << 1 << false << false; + + QTest::newRow("Ubuntu 22.04") + << "GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1" + << 120100 << 0 << false << false; } static QString chopConst(QString type)