From b7167838a3808d89a5f32831bac2ec3aba2bb435 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 2 Sep 2024 13:51:59 +0200 Subject: [PATCH 1/6] Fix issues with Design mode and multiple editor windows Amends 6f56310e31b8d6440e06f376fff66261b1ed0384 That change makes sure that we most of the time have a "current editor view" that is visible. Changing the current editor view implicitly means changing the "current editor". When switching to a .ui file in edit mode in the main window, that switches to Design mode. That hides the main editor view, so the code above switches the current editor view to an external editor window, if that exists and was ever active. Which in turn switches the current editor which disables Design mode (if that isn't a different .ui file). That made it impossible to open a .ui file in Design mode via switching to it in Edit mode. This adds a hack/workaround that disables the logic from the previous change, if the current view is hidden and Design mode is active. It would be better if Design mode was not so tightly coupled to the current editor. Fixes: QTCREATORBUG-31378 Change-Id: I9120fcda9752125eb8c7b653ca406960e7101397 Reviewed-by: David Schulz --- .../coreplugin/editormanager/editormanager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 91871b20e16..1112620431f 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1870,6 +1870,18 @@ void EditorManagerPrivate::addEditorArea(EditorArea *area) }; if (isReallyVisibile(area)) return; + + // Hack for the case that the hidden area has the current editor, + // and that is currently shown in Design mode. We may not switch the + // current editor (so not switch the current view) in that case. + // QTCREATORBUG-31378 + // It would be good if the Design mode didn't rely on the current + // editor, instead. + if (area->currentView() == currentEditorView() + && ModeManager::currentModeId() == Constants::MODE_DESIGN) { + return; + } + // In case the hidden editor area has the current view, look for a view // that is not hidden, iterating through the history of current views. // This could be the first==current view (which results in a no-op). From b718adfe2b7d7cdca2aeedebe043990f7af9fc29 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 2 Sep 2024 14:54:31 +0200 Subject: [PATCH 2/6] Remove duplicate "English" item from language list Amends 3f47819893856702789d51d68a192952adb04639 Fixes: QTCREATORBUG-31394 Change-Id: Ia41b6a48b663ca3b8a4e687d95c26142e886d0c0 Reviewed-by: Christian Stenger --- src/plugins/coreplugin/generalsettings.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 1ff36dc8051..3299ce15bec 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -233,6 +233,10 @@ void GeneralSettingsWidget::fillLanguageBox() const for (const FilePath &languageFile : languageFiles) { const QString name = languageFile.fileName(); + // Ignore english ts file that is for temporary spelling fixes only. + // We have the "English" item that is explicitly added at the top. + if (name == "qtcreator_en.qm") + continue; int start = name.indexOf('_') + 1; int end = name.lastIndexOf('.'); const QString locale = name.mid(start, end - start); From 711d49cd51b7edede89347cf33d918dd44230e75 Mon Sep 17 00:00:00 2001 From: Sami Shalayel Date: Tue, 3 Sep 2024 09:05:12 +0200 Subject: [PATCH 3/6] Do not run qmllint on each loaded/created project Amends 1b57e95c14d78119bbf8358bb52dfc1be0cde140 that called qmllint for each semantic message update. Instead, only call qmllint when explicitly calling QML/JS > Run Checks instead of calling it when projects are loaded or created. The former do call updateSemanticMessagesNow() while the latter call updateMessagesNow(), so move the qmllint calling code into updateSemanticMessagesNow(). Task-number: QTCREATORBUG-31410 Fixes: QTCREATORBUG-31512 Change-Id: Ic98634eec18e28be1d1b934e58fe4ba1429d2bbc Reviewed-by: Marcus Tillmanns Reviewed-by: hjk --- src/plugins/qmljseditor/qmltaskmanager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp index 5a4828d88b2..1bbf7c21003 100644 --- a/src/plugins/qmljseditor/qmltaskmanager.cpp +++ b/src/plugins/qmljseditor/qmltaskmanager.cpp @@ -112,18 +112,13 @@ void QmlTaskManager::updateMessages() m_updateDelay.start(); } -void QmlTaskManager::updateSemanticMessagesNow() -{ - updateMessagesNow(true); -} - static void triggerQmllintCMakeTarget() { if (ProjectManager::startupProject()) ProjectManager::startupProject()->buildTarget(Constants::QMLLINT_BUILD_TARGET); } -void QmlTaskManager::updateMessagesNow(bool updateSemantic) +void QmlTaskManager::updateSemanticMessagesNow() { // heuristic: qmllint will output meaningful warnings if qmlls is enabled if (QmllsSettingsManager::instance()->lastSettings().useQmlls) { @@ -134,6 +129,11 @@ void QmlTaskManager::updateMessagesNow(bool updateSemantic) return; } + updateMessagesNow(true); +} + +void QmlTaskManager::updateMessagesNow(bool updateSemantic) +{ // clear out the qmllint warnings when qmlls was disabled after being enabled TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE); From 51280914101657839bcdf1288677f7d0e2821e07 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 4 Sep 2024 11:05:38 +0200 Subject: [PATCH 4/6] Designer: Fix crash when renaming symbols Apparently, CPlusPlus::Symbol might have a null name. Guard against that. Fixes: QTCREATORBUG-31519 Change-Id: I62ee5793e58a34d7341f09051566ba9637775b5b Reviewed-by: Friedemann Kleint --- src/plugins/designer/qtcreatorintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index d0b80e66360..5039a014d24 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -822,7 +822,7 @@ void QtCreatorIntegration::handleSymbolRenameStage2( Symbol * const symbol = scope->memberAt(i); if (const Scope * const s = symbol->asScope()) scopes << s; - if (symbol->asNamespace()) + if (symbol->asNamespace() || !symbol->name()) continue; qCDebug(log) << '\t' << Overview().prettyName(symbol->name()); if (!symbol->name()->match(&oldIdentifier)) From 6dec846750139c9976457be0616776b632862f0e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 5 Sep 2024 10:54:10 +0200 Subject: [PATCH 5/6] Doc: Fix link to MIME type specifications Fixes: QTCREATORBUG-31531 Change-Id: I75ee134ea3b31610c8fed3f04fb03332a46d9659 Reviewed-by: Eike Ziller --- doc/qtcreatordev/src/qtcreator-dev.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/qtcreatordev/src/qtcreator-dev.qdoc b/doc/qtcreatordev/src/qtcreator-dev.qdoc index 998f040ebf7..17897710145 100644 --- a/doc/qtcreatordev/src/qtcreator-dev.qdoc +++ b/doc/qtcreatordev/src/qtcreator-dev.qdoc @@ -243,7 +243,7 @@ \endlist \li Reference \list - \li \l{http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html} + \li \l{https://specifications.freedesktop.org/shared-mime-info-spec/latest/} {MIME Type Specification Files} \li \l{External Tool Specification Files} \li \l{http://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/} From cdbfaae20935b34befa41aeed8460c74ccd9937f Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 5 Sep 2024 09:31:59 +0200 Subject: [PATCH 6/6] Revert "SquishTests: Don't expect Creator to detect 32 bit cdbs" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e2d0ec02fea52ac45a959da40fe414cfffbaf474 as the removal of the detection of cdb 32bit has been reverted as well. Change-Id: I01ed6808e4fa396f3e23e0d23db36f59fde111a2 Reviewed-by: Robert Löhning --- tests/system/suite_general/tst_default_settings/test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py index 0d64d887018..c001763c297 100644 --- a/tests/system/suite_general/tst_default_settings/test.py +++ b/tests/system/suite_general/tst_default_settings/test.py @@ -300,11 +300,18 @@ def __getExpectedDebuggers__(): def __getCDB__(): result = [] possibleLocations = ["C:\\Program Files\\Debugging Tools for Windows (x64)", + "C:\\Program Files (x86)\\Debugging Tools for Windows (x86)", + "C:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x86", "C:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x64", + "C:\\Program Files\\Windows Kits\\8.0\\Debuggers\\x86", "C:\\Program Files\\Windows Kits\\8.0\\Debuggers\\x64", + "C:\\Program Files (x86)\\Windows Kits\\8.1\\Debuggers\\x86", "C:\\Program Files (x86)\\Windows Kits\\8.1\\Debuggers\\x64", + "C:\\Program Files\\Windows Kits\\8.1\\Debuggers\\x86", "C:\\Program Files\\Windows Kits\\8.1\\Debuggers\\x64", + "C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86", "C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64", + "C:\\Program Files\\Windows Kits\\10\\Debuggers\\x86", "C:\\Program Files\\Windows Kits\\10\\Debuggers\\x64"] for cdbPath in possibleLocations: cdb = os.path.join(cdbPath, "cdb.exe")