From 280545fdf89fe92b6f2b6b28e2c4d86c862c3d71 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 11 Mar 2021 16:09:18 +0100 Subject: [PATCH 1/5] Editors: Fix soft assert about empty currentView We need to always either have a current view or a current editor. Make sure we set the current view if we end up without a current editor when closing files. Amends ee1e6ca50821ace4323a0838452dda59b1a352a2 Fixes: QTCREATORBUG-24869 Change-Id: I9e1982697700079e037695e100ef71eadaf7849f Reviewed-by: David Schulz --- src/plugins/coreplugin/editormanager/editormanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 36c1ae3634d..f45b49ae1b9 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1743,10 +1743,12 @@ bool EditorManagerPrivate::closeEditors(const QList &editors, CloseFla foreach (IEditor *editor, acceptedEditors) delete editor; - if (focusView) + if (focusView) { activateView(focusView); - else + } else { + setCurrentView(currentView); setCurrentEditor(currentView->currentEditor()); + } if (!EditorManager::currentEditor()) { emit m_instance->currentEditorChanged(nullptr); From 2ec094b4192d7ab2549f83657b8479d2c8a11bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Thu, 4 Mar 2021 22:08:03 +0100 Subject: [PATCH 2/5] Squish: Prepare for clang > 9 Change-Id: I4cf6e8be63568d56388b0cf87ae692735bf4c113 Reviewed-by: Christian Stenger --- tests/system/suite_general/tst_default_settings/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py index 9a15e2b8fae..c8daf5a0c72 100644 --- a/tests/system/suite_general/tst_default_settings/test.py +++ b/tests/system/suite_general/tst_default_settings/test.py @@ -209,7 +209,8 @@ def __getExpectedCompilers__(): expected.extend(__getWinCompilers__()) compilers = ["g++", "gcc"] if platform.system() in ('Linux', 'Darwin'): - for c in ('clang++', 'clang', 'afl-clang', 'clang-[0-9]', 'clang-[0-9].[0-9]', + for c in ('clang++', 'clang', 'afl-clang', + 'clang-[0-9]', 'clang-[0-9].[0-9]', 'clang-1[0-9]', 'clang-1[0-9].[0-9]', '*g++*', '*gcc*'): compilers.extend(findAllFilesInPATH(c)) if platform.system() == 'Darwin': From 1f3cd3c70fb38e570f44e17b2c8e2c6bad54f11c Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Mon, 15 Mar 2021 17:01:57 +0300 Subject: [PATCH 3/5] Update Qbs submodule to the top of 1.18 branch Change-Id: Ifa6522e01b32c48e830c395347e891a89c9ad35a Reviewed-by: Eike Ziller --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 481c2a0a47d..0d42ca4d0f8 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 481c2a0a47d9c97bfa3d09869591e47e37f75c0b +Subproject commit 0d42ca4d0f8b0866b51ac9587f68a6550ca6d3fe From 65d2f87f6c577f51d9324075dd4cb5cfa2e99028 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 16 Mar 2021 13:10:53 +0100 Subject: [PATCH 4/5] Editors: Fix another soft assert about current view Task-number: QTCREATORBUG-24869 Change-Id: I575153a909f398ade4dce4edbb4927ea0d35c20f Reviewed-by: Christian Stenger --- src/plugins/coreplugin/editormanager/editormanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index f45b49ae1b9..ff4902457cb 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1730,6 +1730,11 @@ bool EditorManagerPrivate::closeEditors(const QList &editors, CloseFla if (IDocument *document = documents.last()->document) { activateEditorForDocument(view, document, flags); } + } else { + // no documents left - set current view since view->removeEditor can + // trigger a focus change, context change, and updateActions, which + // requests the current EditorView + setCurrentView(currentView); } } } From 38ce4fb4ec589fdf7585a5b9a1d60a2f38586dac Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 17 Mar 2021 13:52:33 +0100 Subject: [PATCH 5/5] CMake build: Fix issues with Devel package for qmake-based plugins Add the pch files that qmake uses. On Windows, the .lib files must have the major version too, like the DLLs. Change-Id: I437bbeac0323c5b9bc174ddea8c0d9be6497b4e6 Reviewed-by: Cristian Adam --- cmake/QtCreatorAPI.cmake | 4 ++++ src/shared/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index fc9d90d27d9..10716fd9114 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -217,6 +217,8 @@ function(add_qtc_library name) set_target_properties(${name} PROPERTIES SUFFIX "${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}" PREFIX "" + IMPORT_SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORT_PREFIX "" ) endif() @@ -469,6 +471,8 @@ function(add_qtc_plugin target_name) set_target_properties(${target_name} PROPERTIES SUFFIX "${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}" PREFIX "" + IMPORT_SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORT_PREFIX "" ) endif() enable_pch(${target_name}) diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt index ec0069078d8..90965fbd1cd 100644 --- a/src/shared/CMakeLists.txt +++ b/src/shared/CMakeLists.txt @@ -5,6 +5,10 @@ add_subdirectory(qtlockedfile) add_subdirectory(help) add_subdirectory(registryaccess) +# PCHs used by qmake based plugin builds +qtc_add_public_header(qtcreator_pch.h) +qtc_add_public_header(qtcreator_gui_pch.h) + if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qbs/CMakeLists.txt) set(BUILD_QBS_DEFAULT YES) else()