Merge remote-tracking branch 'origin/4.14' into 4.15

Change-Id: Ie467c5d63420041a9acffeb4a726130988ec0f41
This commit is contained in:
Eike Ziller
2021-03-18 09:29:51 +01:00
5 changed files with 20 additions and 4 deletions

View File

@@ -247,6 +247,8 @@ function(add_qtc_library name)
set_target_properties(${name} PROPERTIES set_target_properties(${name} PROPERTIES
SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}" SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}"
PREFIX "" PREFIX ""
IMPORT_SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORT_PREFIX ""
) )
endif() endif()
@@ -500,6 +502,8 @@ function(add_qtc_plugin target_name)
set_target_properties(${target_name} PROPERTIES set_target_properties(${target_name} PROPERTIES
SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}" SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}"
PREFIX "" PREFIX ""
IMPORT_SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORT_PREFIX ""
) )
endif() endif()
enable_pch(${target_name}) enable_pch(${target_name})

View File

@@ -1753,6 +1753,11 @@ bool EditorManagerPrivate::closeEditors(const QList<IEditor*> &editors, CloseFla
flags = EditorManager::DoNotSwitchToDesignMode; flags = EditorManager::DoNotSwitchToDesignMode;
activateEditorForDocument(view, document, flags); 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);
} }
} }
} }
@@ -1766,10 +1771,12 @@ bool EditorManagerPrivate::closeEditors(const QList<IEditor*> &editors, CloseFla
foreach (IEditor *editor, acceptedEditors) foreach (IEditor *editor, acceptedEditors)
delete editor; delete editor;
if (focusView) if (focusView) {
activateView(focusView); activateView(focusView);
else } else {
setCurrentView(currentView);
setCurrentEditor(currentView->currentEditor()); setCurrentEditor(currentView->currentEditor());
}
if (!EditorManager::currentEditor()) { if (!EditorManager::currentEditor()) {
emit m_instance->currentEditorChanged(nullptr); emit m_instance->currentEditorChanged(nullptr);

View File

@@ -5,6 +5,10 @@ add_subdirectory(qtlockedfile)
add_subdirectory(help) add_subdirectory(help)
add_subdirectory(registryaccess) 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) if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qbs/CMakeLists.txt)
set(BUILD_QBS_DEFAULT YES) set(BUILD_QBS_DEFAULT YES)
else() else()

View File

@@ -209,7 +209,8 @@ def __getExpectedCompilers__():
expected.extend(__getWinCompilers__()) expected.extend(__getWinCompilers__())
compilers = ["g++", "gcc"] compilers = ["g++", "gcc"]
if platform.system() in ('Linux', 'Darwin'): 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*'): '*g++*', '*gcc*'):
compilers.extend(findAllFilesInPATH(c)) compilers.extend(findAllFilesInPATH(c))
if platform.system() == 'Darwin': if platform.system() == 'Darwin':