From a3c1b35475965f78bd39e050ae5dbcfcab582ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Mon, 19 Dec 2022 16:23:49 +0100 Subject: [PATCH 1/7] SquishTests: Update tst_designer_autocomplete ui_mainwindow.h is being created on first build. While there seems to be some workaround for qmake-based projects, cmake-based projects can't be parsed properly before the file was written. Change-Id: I0e9802f79b60d7d07ed92ca0ae9b93e53249b61f Reviewed-by: Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_designer_autocomplete/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_tools/tst_designer_autocomplete/test.py b/tests/system/suite_tools/tst_designer_autocomplete/test.py index 903ca01156a..f9e6b0bdc05 100644 --- a/tests/system/suite_tools/tst_designer_autocomplete/test.py +++ b/tests/system/suite_tools/tst_designer_autocomplete/test.py @@ -7,7 +7,9 @@ def main(): startQC() if not startedWithoutPluginError(): return - createProject_Qt_GUI(tempDir(), "DesignerTestApp") + projectName = "DesignerTestApp" + createProject_Qt_GUI(tempDir(), projectName) + invokeMenuItem('Build', 'Build Project "%s"' % projectName) selectFromLocator("mainwindow.ui") dragAndDrop(waitForObject("{container=':qdesigner_internal::WidgetBoxCategoryListView'" "text='Push Button' type='QModelIndex'}"), 5, 5, From bd679b61d119ab516c907e134dfb146fd609fcab Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 2 Jan 2023 15:00:55 +0100 Subject: [PATCH 2/7] German translation: Fix error message when installing plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit %1 resolves to "Qt Creator" or "Design Studio", and the message means that no plugin for that application was found in the extracted zip. Change-Id: I1f07a3557bdac7dcabf26206aa12fabac0ca272d Reviewed-by: Reviewed-by: Robert Löhning --- share/qtcreator/translations/qtcreator_de.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index eeb1f1091f4..fa440e48882 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -48247,7 +48247,7 @@ Useful if build directory is corrupted or when rebuilding with a newer version o Did not find %1 plugin. - Konnte das Plugin %1 nicht finden. + Konnte kein %1 Plugin finden. Install Location From f0dba78f4837b33dd83450e841b39aaa233da301 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 2 Jan 2023 12:22:42 +0100 Subject: [PATCH 3/7] Editor: fix crashing on updating snippet selections The final selection is not tracked in m_selections and needs to be handled explicitly. Also add an assert preventing unconditionally accessing an out of bounds element of m_selections. Fixes: QTCREATORBUG-28631 Change-Id: I1898418b1126bdaffccbdf0e483e2c659d191917 Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/texteditor/snippets/snippetoverlay.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/texteditor/snippets/snippetoverlay.cpp b/src/plugins/texteditor/snippets/snippetoverlay.cpp index 6824c0470ac..f7b3cf80c91 100644 --- a/src/plugins/texteditor/snippets/snippetoverlay.cpp +++ b/src/plugins/texteditor/snippets/snippetoverlay.cpp @@ -38,8 +38,13 @@ void SnippetOverlay::setFinalSelection(const QTextCursor &cursor, const QColor & void SnippetOverlay::updateEquivalentSelections(const QTextCursor &cursor) { const int ¤tIndex = indexForCursor(cursor); + if (currentIndex == m_finalSelectionIndex) { + accept(); + return; + } if (currentIndex < 0) return; + QTC_ASSERT(currentIndex < m_selections.size(), return); const QString ¤tText = cursorForIndex(currentIndex).selectedText(); const QList &equivalents = m_variables.value(m_selections[currentIndex].variableIndex); for (int i : equivalents) { From 5344bec59b344bcb46a040e8b6dbe6e263705503 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 6 Oct 2022 15:59:51 +0200 Subject: [PATCH 4/7] Add support for plugin paths set by the installer This is important on macOS, where we cannot install optional plugins into the app bundle, because that would break code signing. Instead the install settings in the signed bundle sets a custom plugin path outside the bundle, and the installer puts optional plugins there. Task-number: QTCREATORBUG-26705 Change-Id: I8b36752471d16dfc5828e87e20254f39ab985ca2 Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/app/main.cpp | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index bdd80ed34e2..74d1ccec9e6 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -217,16 +217,37 @@ static inline QStringList getPluginPaths() return rc; } -static void setupInstallSettings(QString &installSettingspath) +// Returns plugin path that is set in install settings. +// The installer (or rather the packaging) can write that to load optional plugins from +// outside the application bundle on macOS, because installing optional plugins into +// the application bundle would break code signing. +static QStringList getInstallPluginPaths() +{ + // uses SystemScope because this really must be an "installation" setting + QSettings installSettings(QSettings::IniFormat, + QSettings::SystemScope, + QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR), + QLatin1String(Core::Constants::IDE_CASED_ID)); + return Utils::transform(installSettings.value("Settings/InstallPluginPaths").toStringList(), + [](const QString &path) -> QString { + if (QDir::isRelativePath(path)) + return applicationDirPath() + '/' + path; + return path; + }); +} + +static void setupInstallSettings(QString &installSettingspath, bool redirect = true) { if (!installSettingspath.isEmpty() && !QFileInfo(installSettingspath).isDir()) { displayError(QString("-installsettingspath \"%0\" needs to be the path where a %1/%2.ini exist.").arg(installSettingspath, QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR), QLatin1String(Core::Constants::IDE_CASED_ID))); installSettingspath.clear(); } - static const char kInstallSettingsKey[] = "Settings/InstallSettings"; - QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, - installSettingspath.isEmpty() ? resourcePath() : installSettingspath); + QSettings::setPath(QSettings::IniFormat, + QSettings::SystemScope, + installSettingspath.isEmpty() ? resourcePath() : installSettingspath); + if (!redirect) // ignore redirection via Settings/InstallSettings + return; // Check if the default install settings contain a setting for the actual install settings. // This can be an absolute path, or a path relative to applicationDirPath(). @@ -236,6 +257,7 @@ static void setupInstallSettings(QString &installSettingspath) // yet a second time. So try this a few times. // (Only the first time with QSettings::UserScope, to allow setting the install settings path // in the user settings.) + static const char kInstallSettingsKey[] = "Settings/InstallSettings"; QSettings::Scope scope = QSettings::UserScope; int count = 0; bool containsInstallSettingsKey = false; @@ -542,9 +564,11 @@ int main(int argc, char **argv) // Must be done before any QSettings class is created QSettings::setDefaultFormat(QSettings::IniFormat); - setupInstallSettings(options.installSettingsPath); - // plugin manager takes control of this settings object + // HiDPI variables need to be set before creating QApplication. + // Since we do not have a QApplication yet, we cannot rely on QApplication::applicationDirPath() + // though. So we set up install settings with a educated guess here, and re-setup it later. + setupInstallSettings(options.installSettingsPath); setHighDpiEnvironmentVariable(); SharedTools::QtSingleApplication::setAttribute(Qt::AA_ShareOpenGLContexts); @@ -563,7 +587,11 @@ int main(int argc, char **argv) const QStringList pluginArguments = app.arguments(); - /*Initialize global settings and resetup install settings with QApplication::applicationDirPath */ + // Re-setup install settings with QApplication::applicationDirPath() available, but + // first read install plugin paths from original install settings, without redirection + setupInstallSettings(options.installSettingsPath, /*redirect=*/false); + const QStringList installPluginPaths = getInstallPluginPaths(); + // Re-setup install settings for real setupInstallSettings(options.installSettingsPath); Utils::QtcSettings *settings = createUserSettings(); Utils::QtcSettings *globalSettings @@ -645,7 +673,8 @@ int main(int argc, char **argv) QNetworkProxyFactory::setUseSystemConfiguration(true); // Load - const QStringList pluginPaths = getPluginPaths() + options.customPluginPaths; + const QStringList pluginPaths = getPluginPaths() + installPluginPaths + + options.customPluginPaths; PluginManager::setPluginPaths(pluginPaths); QMap foundAppOptions; if (pluginArguments.size() > 1) { From 38a6ab6cd6e53b33142e2a0d1ebd1dcc799bee7a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Jan 2023 08:19:47 +0100 Subject: [PATCH 5/7] AdvancedDockingSystem: Fix file licenses Amends a7956df3ca which accidentally dropped the (L)GPL part. Change-Id: I22e3f5cdb12b15ee777524cac04aa888606026c3 Reviewed-by: Eike Ziller --- src/libs/advanceddockingsystem/ads_globals.cpp | 2 +- src/libs/advanceddockingsystem/ads_globals.h | 2 +- src/libs/advanceddockingsystem/dockareatabbar.cpp | 2 +- src/libs/advanceddockingsystem/dockareatabbar.h | 2 +- src/libs/advanceddockingsystem/dockareatitlebar.cpp | 2 +- src/libs/advanceddockingsystem/dockareatitlebar.h | 2 +- src/libs/advanceddockingsystem/dockareawidget.cpp | 2 +- src/libs/advanceddockingsystem/dockareawidget.h | 2 +- src/libs/advanceddockingsystem/dockcomponentsfactory.cpp | 2 +- src/libs/advanceddockingsystem/dockcomponentsfactory.h | 2 +- src/libs/advanceddockingsystem/dockcontainerwidget.cpp | 2 +- src/libs/advanceddockingsystem/dockcontainerwidget.h | 2 +- src/libs/advanceddockingsystem/dockfocuscontroller.cpp | 2 +- src/libs/advanceddockingsystem/dockfocuscontroller.h | 2 +- src/libs/advanceddockingsystem/dockingstatereader.cpp | 2 +- src/libs/advanceddockingsystem/dockingstatereader.h | 2 +- src/libs/advanceddockingsystem/dockmanager.cpp | 2 +- src/libs/advanceddockingsystem/dockmanager.h | 2 +- src/libs/advanceddockingsystem/dockoverlay.cpp | 2 +- src/libs/advanceddockingsystem/dockoverlay.h | 2 +- src/libs/advanceddockingsystem/docksplitter.cpp | 2 +- src/libs/advanceddockingsystem/docksplitter.h | 2 +- src/libs/advanceddockingsystem/dockwidget.cpp | 2 +- src/libs/advanceddockingsystem/dockwidget.h | 2 +- src/libs/advanceddockingsystem/dockwidgettab.cpp | 2 +- src/libs/advanceddockingsystem/dockwidgettab.h | 2 +- src/libs/advanceddockingsystem/elidinglabel.cpp | 2 +- src/libs/advanceddockingsystem/elidinglabel.h | 2 +- src/libs/advanceddockingsystem/floatingdockcontainer.cpp | 2 +- src/libs/advanceddockingsystem/floatingdockcontainer.h | 2 +- src/libs/advanceddockingsystem/floatingdragpreview.cpp | 2 +- src/libs/advanceddockingsystem/floatingdragpreview.h | 2 +- src/libs/advanceddockingsystem/iconprovider.cpp | 2 +- src/libs/advanceddockingsystem/iconprovider.h | 2 +- src/libs/advanceddockingsystem/workspacedialog.cpp | 2 +- src/libs/advanceddockingsystem/workspacedialog.h | 2 +- src/libs/advanceddockingsystem/workspacemodel.cpp | 2 +- src/libs/advanceddockingsystem/workspacemodel.h | 2 +- src/libs/advanceddockingsystem/workspaceview.cpp | 2 +- src/libs/advanceddockingsystem/workspaceview.h | 2 +- 40 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/libs/advanceddockingsystem/ads_globals.cpp b/src/libs/advanceddockingsystem/ads_globals.cpp index 1dbd1f7c056..252a31f9d30 100644 --- a/src/libs/advanceddockingsystem/ads_globals.cpp +++ b/src/libs/advanceddockingsystem/ads_globals.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "ads_globals.h" diff --git a/src/libs/advanceddockingsystem/ads_globals.h b/src/libs/advanceddockingsystem/ads_globals.h index 07246cfc535..d2f882d8e71 100644 --- a/src/libs/advanceddockingsystem/ads_globals.h +++ b/src/libs/advanceddockingsystem/ads_globals.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockareatabbar.cpp b/src/libs/advanceddockingsystem/dockareatabbar.cpp index 06b067168f6..ec1bf782ff0 100644 --- a/src/libs/advanceddockingsystem/dockareatabbar.cpp +++ b/src/libs/advanceddockingsystem/dockareatabbar.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockareatabbar.h" diff --git a/src/libs/advanceddockingsystem/dockareatabbar.h b/src/libs/advanceddockingsystem/dockareatabbar.h index eb7d1fc1853..956300e07f0 100644 --- a/src/libs/advanceddockingsystem/dockareatabbar.h +++ b/src/libs/advanceddockingsystem/dockareatabbar.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockareatitlebar.cpp b/src/libs/advanceddockingsystem/dockareatitlebar.cpp index 039b33eaaf4..ace2c4e1211 100644 --- a/src/libs/advanceddockingsystem/dockareatitlebar.cpp +++ b/src/libs/advanceddockingsystem/dockareatitlebar.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockareatitlebar.h" diff --git a/src/libs/advanceddockingsystem/dockareatitlebar.h b/src/libs/advanceddockingsystem/dockareatitlebar.h index 61190000f04..888e3736af7 100644 --- a/src/libs/advanceddockingsystem/dockareatitlebar.h +++ b/src/libs/advanceddockingsystem/dockareatitlebar.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockareawidget.cpp b/src/libs/advanceddockingsystem/dockareawidget.cpp index 4c00839c0e0..b4c21f71198 100644 --- a/src/libs/advanceddockingsystem/dockareawidget.cpp +++ b/src/libs/advanceddockingsystem/dockareawidget.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockareawidget.h" diff --git a/src/libs/advanceddockingsystem/dockareawidget.h b/src/libs/advanceddockingsystem/dockareawidget.h index 02b536a8f6a..a0482136bf5 100644 --- a/src/libs/advanceddockingsystem/dockareawidget.h +++ b/src/libs/advanceddockingsystem/dockareawidget.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockcomponentsfactory.cpp b/src/libs/advanceddockingsystem/dockcomponentsfactory.cpp index ca2222e1251..76afb45d2c9 100644 --- a/src/libs/advanceddockingsystem/dockcomponentsfactory.cpp +++ b/src/libs/advanceddockingsystem/dockcomponentsfactory.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockcomponentsfactory.h" diff --git a/src/libs/advanceddockingsystem/dockcomponentsfactory.h b/src/libs/advanceddockingsystem/dockcomponentsfactory.h index 2c02d1d1320..ce5c656ac04 100644 --- a/src/libs/advanceddockingsystem/dockcomponentsfactory.h +++ b/src/libs/advanceddockingsystem/dockcomponentsfactory.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockcontainerwidget.cpp b/src/libs/advanceddockingsystem/dockcontainerwidget.cpp index eff53f33186..0f8f683ddec 100644 --- a/src/libs/advanceddockingsystem/dockcontainerwidget.cpp +++ b/src/libs/advanceddockingsystem/dockcontainerwidget.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockcontainerwidget.h" diff --git a/src/libs/advanceddockingsystem/dockcontainerwidget.h b/src/libs/advanceddockingsystem/dockcontainerwidget.h index 0738a39f09f..5020b98bf13 100644 --- a/src/libs/advanceddockingsystem/dockcontainerwidget.h +++ b/src/libs/advanceddockingsystem/dockcontainerwidget.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockfocuscontroller.cpp b/src/libs/advanceddockingsystem/dockfocuscontroller.cpp index 176632beadb..79b6c6cad29 100644 --- a/src/libs/advanceddockingsystem/dockfocuscontroller.cpp +++ b/src/libs/advanceddockingsystem/dockfocuscontroller.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockfocuscontroller.h" diff --git a/src/libs/advanceddockingsystem/dockfocuscontroller.h b/src/libs/advanceddockingsystem/dockfocuscontroller.h index b06b1fec6ec..c108d0d5591 100644 --- a/src/libs/advanceddockingsystem/dockfocuscontroller.h +++ b/src/libs/advanceddockingsystem/dockfocuscontroller.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockingstatereader.cpp b/src/libs/advanceddockingsystem/dockingstatereader.cpp index 3d0628751c8..f5db34c6c0d 100644 --- a/src/libs/advanceddockingsystem/dockingstatereader.cpp +++ b/src/libs/advanceddockingsystem/dockingstatereader.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockingstatereader.h" diff --git a/src/libs/advanceddockingsystem/dockingstatereader.h b/src/libs/advanceddockingsystem/dockingstatereader.h index 5dd892386cd..99198332dc2 100644 --- a/src/libs/advanceddockingsystem/dockingstatereader.h +++ b/src/libs/advanceddockingsystem/dockingstatereader.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockmanager.cpp b/src/libs/advanceddockingsystem/dockmanager.cpp index 5771241dc33..b470a50140a 100644 --- a/src/libs/advanceddockingsystem/dockmanager.cpp +++ b/src/libs/advanceddockingsystem/dockmanager.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockmanager.h" diff --git a/src/libs/advanceddockingsystem/dockmanager.h b/src/libs/advanceddockingsystem/dockmanager.h index ada8960a05f..9dbfc30cda3 100644 --- a/src/libs/advanceddockingsystem/dockmanager.h +++ b/src/libs/advanceddockingsystem/dockmanager.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockoverlay.cpp b/src/libs/advanceddockingsystem/dockoverlay.cpp index 7b680abea90..3a3e9b5b0b0 100644 --- a/src/libs/advanceddockingsystem/dockoverlay.cpp +++ b/src/libs/advanceddockingsystem/dockoverlay.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockoverlay.h" diff --git a/src/libs/advanceddockingsystem/dockoverlay.h b/src/libs/advanceddockingsystem/dockoverlay.h index 2d388fedfcc..abdee68b5d2 100644 --- a/src/libs/advanceddockingsystem/dockoverlay.h +++ b/src/libs/advanceddockingsystem/dockoverlay.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/docksplitter.cpp b/src/libs/advanceddockingsystem/docksplitter.cpp index 1d345e565c8..e8537dbd775 100644 --- a/src/libs/advanceddockingsystem/docksplitter.cpp +++ b/src/libs/advanceddockingsystem/docksplitter.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "docksplitter.h" diff --git a/src/libs/advanceddockingsystem/docksplitter.h b/src/libs/advanceddockingsystem/docksplitter.h index 3d145fa1db3..8dffc234ad4 100644 --- a/src/libs/advanceddockingsystem/docksplitter.h +++ b/src/libs/advanceddockingsystem/docksplitter.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockwidget.cpp b/src/libs/advanceddockingsystem/dockwidget.cpp index 33ffe36b847..b39c58f4c2d 100644 --- a/src/libs/advanceddockingsystem/dockwidget.cpp +++ b/src/libs/advanceddockingsystem/dockwidget.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockwidget.h" diff --git a/src/libs/advanceddockingsystem/dockwidget.h b/src/libs/advanceddockingsystem/dockwidget.h index 9565faef36c..7820b88d17d 100644 --- a/src/libs/advanceddockingsystem/dockwidget.h +++ b/src/libs/advanceddockingsystem/dockwidget.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/dockwidgettab.cpp b/src/libs/advanceddockingsystem/dockwidgettab.cpp index 69bed0c7dc8..a3fd47d3901 100644 --- a/src/libs/advanceddockingsystem/dockwidgettab.cpp +++ b/src/libs/advanceddockingsystem/dockwidgettab.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "dockwidgettab.h" diff --git a/src/libs/advanceddockingsystem/dockwidgettab.h b/src/libs/advanceddockingsystem/dockwidgettab.h index 48103ebc122..49909c6374b 100644 --- a/src/libs/advanceddockingsystem/dockwidgettab.h +++ b/src/libs/advanceddockingsystem/dockwidgettab.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/elidinglabel.cpp b/src/libs/advanceddockingsystem/elidinglabel.cpp index 01cadb4de33..1942b5b1878 100644 --- a/src/libs/advanceddockingsystem/elidinglabel.cpp +++ b/src/libs/advanceddockingsystem/elidinglabel.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "elidinglabel.h" diff --git a/src/libs/advanceddockingsystem/elidinglabel.h b/src/libs/advanceddockingsystem/elidinglabel.h index 4e34c606194..8ee2e9bf8af 100644 --- a/src/libs/advanceddockingsystem/elidinglabel.h +++ b/src/libs/advanceddockingsystem/elidinglabel.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp index 16909e351cb..4b8ae0913dd 100644 --- a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp +++ b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "floatingdockcontainer.h" diff --git a/src/libs/advanceddockingsystem/floatingdockcontainer.h b/src/libs/advanceddockingsystem/floatingdockcontainer.h index c7827349486..e19ce428492 100644 --- a/src/libs/advanceddockingsystem/floatingdockcontainer.h +++ b/src/libs/advanceddockingsystem/floatingdockcontainer.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/floatingdragpreview.cpp b/src/libs/advanceddockingsystem/floatingdragpreview.cpp index 3d4f12ee436..f427ab85edf 100644 --- a/src/libs/advanceddockingsystem/floatingdragpreview.cpp +++ b/src/libs/advanceddockingsystem/floatingdragpreview.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "floatingdragpreview.h" diff --git a/src/libs/advanceddockingsystem/floatingdragpreview.h b/src/libs/advanceddockingsystem/floatingdragpreview.h index f7150fdc10f..ed578da993a 100644 --- a/src/libs/advanceddockingsystem/floatingdragpreview.h +++ b/src/libs/advanceddockingsystem/floatingdragpreview.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/iconprovider.cpp b/src/libs/advanceddockingsystem/iconprovider.cpp index 9b8a5ba8138..b1db84c56ff 100644 --- a/src/libs/advanceddockingsystem/iconprovider.cpp +++ b/src/libs/advanceddockingsystem/iconprovider.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "iconprovider.h" diff --git a/src/libs/advanceddockingsystem/iconprovider.h b/src/libs/advanceddockingsystem/iconprovider.h index 8e02348b895..ec72121ae9a 100644 --- a/src/libs/advanceddockingsystem/iconprovider.h +++ b/src/libs/advanceddockingsystem/iconprovider.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 Uwe Kindler -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/workspacedialog.cpp b/src/libs/advanceddockingsystem/workspacedialog.cpp index 6594e05d7ca..0c6bd548768 100644 --- a/src/libs/advanceddockingsystem/workspacedialog.cpp +++ b/src/libs/advanceddockingsystem/workspacedialog.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "workspacedialog.h" diff --git a/src/libs/advanceddockingsystem/workspacedialog.h b/src/libs/advanceddockingsystem/workspacedialog.h index 3a6f1f27b1b..a0880429dcb 100644 --- a/src/libs/advanceddockingsystem/workspacedialog.h +++ b/src/libs/advanceddockingsystem/workspacedialog.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/workspacemodel.cpp b/src/libs/advanceddockingsystem/workspacemodel.cpp index af3823f4148..a92b3079e66 100644 --- a/src/libs/advanceddockingsystem/workspacemodel.cpp +++ b/src/libs/advanceddockingsystem/workspacemodel.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "workspacemodel.h" diff --git a/src/libs/advanceddockingsystem/workspacemodel.h b/src/libs/advanceddockingsystem/workspacemodel.h index c7e6cfe1308..38386ad348b 100644 --- a/src/libs/advanceddockingsystem/workspacemodel.h +++ b/src/libs/advanceddockingsystem/workspacemodel.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once diff --git a/src/libs/advanceddockingsystem/workspaceview.cpp b/src/libs/advanceddockingsystem/workspaceview.cpp index 41d0dfb28ab..be3ee1fbb94 100644 --- a/src/libs/advanceddockingsystem/workspaceview.cpp +++ b/src/libs/advanceddockingsystem/workspaceview.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #include "workspaceview.h" diff --git a/src/libs/advanceddockingsystem/workspaceview.h b/src/libs/advanceddockingsystem/workspaceview.h index 615678512fc..a2bef81e771 100644 --- a/src/libs/advanceddockingsystem/workspaceview.h +++ b/src/libs/advanceddockingsystem/workspaceview.h @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later #pragma once From fffd732edc49adc328470cf37a4e18ab5a78be47 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Jan 2023 08:33:14 +0100 Subject: [PATCH 6/7] GLSL: Fix file licenses Amends a7956df3ca which accidentally dropped the (L)GPL part. Change-Id: I75ab5013925bac6563a782c5e19676d39accc1e0 Reviewed-by: Eike Ziller --- src/libs/glsl/glslparsertable.cpp | 2 +- src/libs/glsl/glslparsertable_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/glsl/glslparsertable.cpp b/src/libs/glsl/glslparsertable.cpp index dce78522eb4..485b3b20943 100644 --- a/src/libs/glsl/glslparsertable.cpp +++ b/src/libs/glsl/glslparsertable.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later // This file was generated by qlalr - DO NOT EDIT! #include "glslparsertable_p.h" diff --git a/src/libs/glsl/glslparsertable_p.h b/src/libs/glsl/glslparsertable_p.h index a9a3e5408b5..dc409144583 100644 --- a/src/libs/glsl/glslparsertable_p.h +++ b/src/libs/glsl/glslparsertable_p.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later // // W A R N I N G From 0a74a1e99e37e6685e627577dd52d4f06e3c2832 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 23 Dec 2022 11:32:27 +0100 Subject: [PATCH 7/7] Properly support relative paths in Link with Qt UI Relative paths are resolved based on the applicationDirPath, so reflect that in the path chooser too. Also, do not resolve relative paths in the path chooser to absolute paths when writing to the settings. Change-Id: Iaeffa2cad1e145adbbc5c918b5f8ff14f6f2b31e Reviewed-by: Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/plugins/qtsupport/qtoptionspage.cpp | 38 ++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index f1cbc250b3b..b1f3c129712 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -930,29 +930,32 @@ static QStringList qtversionFilesToCheck() return Utils::transform(kSubdirsToCheck, [](const QString &dir) { return qtVersionsFile(dir); }); } -static std::optional settingsDirForQtDir(const QString &qtDir) +static std::optional settingsDirForQtDir(const FilePath &baseDirectory, + const FilePath &qtDir) { - const QStringList dirsToCheck = Utils::transform(kSubdirsToCheck, [qtDir](const QString &dir) { - return QString(qtDir + '/' + dir); + const FilePaths dirsToCheck = Utils::transform(kSubdirsToCheck, [qtDir](const QString &dir) { + return qtDir / dir; }); - const QString validDir = Utils::findOrDefault(dirsToCheck, [](const QString &dir) { - return QFile::exists(settingsFile(dir)) || QFile::exists(qtVersionsFile(dir)); + const FilePath validDir = Utils::findOrDefault(dirsToCheck, [baseDirectory](const FilePath &dir) { + return QFile::exists(settingsFile(baseDirectory.resolvePath(dir).toString())) + || QFile::exists(qtVersionsFile(baseDirectory.resolvePath(dir).toString())); }); if (!validDir.isEmpty()) return validDir; return {}; } -static bool validateQtInstallDir(FancyLineEdit *input, QString *errorString) +static bool validateQtInstallDir(PathChooser *input, QString *errorString) { - const QString qtDir = input->text(); - if (!settingsDirForQtDir(qtDir)) { + const FilePath qtDir = input->rawFilePath(); + if (!settingsDirForQtDir(input->baseDirectory(), qtDir)) { if (errorString) { const QStringList filesToCheck = settingsFilesToCheck() + qtversionFilesToCheck(); - *errorString = "" + Tr::tr( - "Qt installation information was not found in \"%1\". " - "Choose a directory that contains one of the files %2") - .arg(qtDir, "
" + filesToCheck.join('\n') + "
"); + *errorString = "" + + Tr::tr("Qt installation information was not found in \"%1\". " + "Choose a directory that contains one of the files %2") + .arg(qtDir.toUserOutput(), + "
" + filesToCheck.join('\n') + "
"); } return false; } @@ -988,13 +991,14 @@ void QtOptionsPageWidget::linkWithQt() auto pathInput = new PathChooser; pathLayout->addWidget(pathInput); pathInput->setExpectedKind(PathChooser::ExistingDirectory); + pathInput->setBaseDirectory(FilePath::fromString(QCoreApplication::applicationDirPath())); pathInput->setPromptDialogTitle(title); pathInput->setMacroExpander(nullptr); pathInput->setValidationFunction([pathInput](FancyLineEdit *input, QString *errorString) { if (pathInput->defaultValidationFunction() && !pathInput->defaultValidationFunction()(input, errorString)) return false; - return validateQtInstallDir(input, errorString); + return validateQtInstallDir(pathInput, errorString); }); const std::optional currentLink = currentlyLinkedQtDir(nullptr); pathInput->setFilePath(currentLink ? *currentLink : defaultQtInstallationPath()); @@ -1027,10 +1031,12 @@ void QtOptionsPageWidget::linkWithQt() dialog.exec(); if (dialog.result() == QDialog::Accepted) { - const std::optional settingsDir = settingsDirForQtDir(pathInput->rawFilePath().toString()); + const std::optional settingsDir = settingsDirForQtDir(pathInput->baseDirectory(), + pathInput->rawFilePath()); if (QTC_GUARD(settingsDir)) { - QSettings(settingsFile(Core::ICore::resourcePath().toString()), QSettings::IniFormat) - .setValue(kInstallSettingsKey, *settingsDir); + QSettings settings(settingsFile(Core::ICore::resourcePath().toString()), + QSettings::IniFormat); + settings.setValue(kInstallSettingsKey, settingsDir->toVariant()); askForRestart = true; } }