From 69e18d7917ea5524191055d526bfa627581520e2 Mon Sep 17 00:00:00 2001 From: Tuomo Pelkonen Date: Tue, 22 Jun 2021 11:53:32 +0300 Subject: [PATCH 1/6] Qmldesigner : Fix crash when component is added while editing inline delegate This is only fixing the crash but does not adding the import Task-number: QDS-4602 Change-Id: Iacb449d5342fcfdd5daf21abcec668569380ddba Reviewed-by: Miikka Heikkinen --- .../qmldesigner/components/itemlibrary/itemlibrarywidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 290611e2e0b..ddf067c1270 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -291,8 +291,9 @@ void ItemLibraryWidget::handleAddImport(int index) + import.toImportString()); } - m_model->changeImports({import}, {}); - QmlDesignerPlugin::instance()->currentDesignDocument()->updateSubcomponentManagerImport(import); + auto document = QmlDesignerPlugin::instance()->currentDesignDocument(); + document->documentModel()->changeImports({import}, {}); + document->updateSubcomponentManagerImport(import); m_stackedWidget->setCurrentIndex(0); // switch to the Components view after import is added updateSearch(); From 4290c264147eafafa315703b9bcd3594ef0bc358 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 17 Jun 2021 11:44:01 +0200 Subject: [PATCH 2/6] CMake build: Force optimization of CPlusPlus lib Even in the debug build, as done for the qmake build system. This is for performance optimization of this critical part for C++ parsing even in debug / developer builds. Change-Id: I9552ba9fc44e213f2df1d2d2a64a126af3603fd1 Reviewed-by: Eike Ziller Reviewed-by: Christian Stenger Reviewed-by: Cristian Adam --- cmake/QtCreatorAPI.cmake | 25 +++++++++++++++------- cmake/QtCreatorAPIInternal.cmake | 11 ++++++++++ src/libs/3rdparty/cplusplus/CMakeLists.txt | 9 ++++++++ src/libs/cplusplus/CMakeLists.txt | 9 ++++++++ 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index c0db1ab3854..6504175d9e8 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -106,7 +106,7 @@ function(qtc_source_dir varName) endfunction() function(add_qtc_library name) - cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;UNVERSIONED;FEATURE_INFO" + cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;UNVERSIONED;FEATURE_INFO;SKIP_PCH" "DESTINATION;COMPONENT;SOURCES_PREFIX;BUILD_DEFAULT" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN} ) @@ -252,7 +252,10 @@ function(add_qtc_library name) ARCHIVE_OUTPUT_DIRECTORY "${_output_binary_dir}/${IDE_LIBRARY_PATH}" ${_arg_PROPERTIES} ) - enable_pch(${name}) + + if (NOT _arg_SKIP_PCH) + enable_pch(${name}) + endif() if (WIN32 AND library_type STREQUAL "SHARED" AND NOT _arg_UNVERSIONED) # Match qmake naming scheme e.g. Library4.dll @@ -309,7 +312,7 @@ endfunction(add_qtc_library) function(add_qtc_plugin target_name) cmake_parse_arguments(_arg - "SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT" + "SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT;SKIP_PCH" "VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PLUGIN_TEST_DEPENDS;PROPERTIES" ${ARGN} @@ -518,7 +521,9 @@ function(add_qtc_plugin target_name) IMPORT_PREFIX "" ) endif() - enable_pch(${target_name}) + if (NOT _arg_SKIP_PCH) + enable_pch(${target_name}) + endif() if (NOT _arg_SKIP_INSTALL) if (_arg_EXPORT) @@ -591,7 +596,7 @@ function(extend_qtc_test target_name) endfunction() function(add_qtc_executable name) - cmake_parse_arguments(_arg "SKIP_INSTALL;SKIP_TRANSLATION;ALLOW_ASCII_CASTS" + cmake_parse_arguments(_arg "SKIP_INSTALL;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;SKIP_PCH" "DESTINATION;COMPONENT;BUILD_DEFAULT" "CONDITION;DEPENDS;DEFINES;INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN}) @@ -692,7 +697,9 @@ function(add_qtc_executable name) VISIBILITY_INLINES_HIDDEN ON ${_arg_PROPERTIES} ) - enable_pch(${name}) + if (NOT _arg_SKIP_PCH) + enable_pch(${name}) + endif() if (NOT _arg_SKIP_INSTALL) unset(COMPONENT_OPTION) @@ -779,7 +786,7 @@ function(extend_qtc_executable name) endfunction() function(add_qtc_test name) - cmake_parse_arguments(_arg "GTEST" "TIMEOUT" "DEFINES;DEPENDS;INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC" ${ARGN}) + cmake_parse_arguments(_arg "GTEST" "TIMEOUT" "DEFINES;DEPENDS;INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;SKIP_PCH" ${ARGN}) foreach(dependency ${_arg_DEPENDS}) if (NOT TARGET ${dependency} AND NOT _arg_GTEST) @@ -820,7 +827,9 @@ function(add_qtc_test name) BUILD_RPATH "${_RPATH_BASE}/${_RPATH}" INSTALL_RPATH "${_RPATH_BASE}/${_RPATH}" ) - enable_pch(${name}) + if (NOT _arg_SKIP_PCH) + enable_pch(${name}) + endif() if (NOT _arg_GTEST) add_test(NAME ${name} COMMAND ${name}) diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index 45aa8246dbe..75da71d69ab 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -122,6 +122,17 @@ function(qtc_handle_sccache_support) endif() endfunction() +function(qtc_enable_release_for_debug_configuration) + if (MSVC) + string(REPLACE "/Od" "/O2" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/Ob0" "/Ob1" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + else() + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") + endif() + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE) +endfunction() + function(append_extra_translations target_name) if(NOT ARGN) return() diff --git a/src/libs/3rdparty/cplusplus/CMakeLists.txt b/src/libs/3rdparty/cplusplus/CMakeLists.txt index b8a8607a8c3..f2515c9c3a0 100644 --- a/src/libs/3rdparty/cplusplus/CMakeLists.txt +++ b/src/libs/3rdparty/cplusplus/CMakeLists.txt @@ -41,5 +41,14 @@ add_qtc_library(3rd_cplusplus OBJECT Type.cpp Type.h TypeVisitor.cpp TypeVisitor.h cppassert.h + SKIP_PCH PROPERTIES POSITION_INDEPENDENT_CODE ON ) + +if(TARGET 3rd_cplusplus) + qtc_enable_release_for_debug_configuration() + if (BUILD_WITH_PCH) + target_precompile_headers(3rd_cplusplus PRIVATE + "${QtCreator_SOURCE_DIR}/src/shared/qtcreator_gui_pch.h") + endif() +endif() diff --git a/src/libs/cplusplus/CMakeLists.txt b/src/libs/cplusplus/CMakeLists.txt index 9ca49291d4c..aa650c11b34 100644 --- a/src/libs/cplusplus/CMakeLists.txt +++ b/src/libs/cplusplus/CMakeLists.txt @@ -40,4 +40,13 @@ add_qtc_library(CPlusPlus pp-engine.h pp-scanner.cpp pp-scanner.h pp.h + SKIP_PCH ) + +if(TARGET CPlusPlus) + qtc_enable_release_for_debug_configuration() + if (BUILD_WITH_PCH) + target_precompile_headers(CPlusPlus PRIVATE + "${QtCreator_SOURCE_DIR}/src/shared/qtcreator_gui_pch.h") + endif() +endif() From 10420d4e5e6887c1007cc8326b9fb69f02116595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 23 Jun 2021 13:33:50 +0200 Subject: [PATCH 3/6] Replace Freenode with Libera.Chat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia4a54b72f522a02c734273630c8217af75e4ea92 Reviewed-by: hjk Reviewed-by: Eike Ziller Reviewed-by: Leena Miettinen Reviewed-by: Robert Löhning --- .../src/debugger/creator-only/creator-debugger.qdoc | 2 +- src/plugins/coreplugin/mainwindow.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index 2cc62044585..6fc4a634167 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -1510,7 +1510,7 @@ contents of the pane to debugger-related questions to the \QC mailing list (qt-creator@qt-project.org) or paste them to a \l{Pasting and Fetching Code Snippets}{code pasting service} before - asking questions in the IRC (on the #qt-creator channel at FreeNode). + asking questions in the IRC (on the #qt-creator channel at Libera.Chat). \endlist diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 9f7b9274e70..7ad86b3c519 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -1250,7 +1250,7 @@ void MainWindow::contact() QMessageBox dlg(QMessageBox::Information, tr("Contact"), tr("

Qt Creator developers can be reached at the Qt Creator mailing list:

" "%1" - "

or the #qt-creator channel on FreeNode IRC:

" + "

or the #qt-creator channel on Libera.Chat IRC:

" "%2" "

Our bug tracker is located at %3.

" "

Please use %4 for bigger chunks of text.

") @@ -1259,8 +1259,8 @@ void MainWindow::contact() "mailto:qt-creator@qt-project.org" "

") .arg("

    " - "" - "irc://freenode.org/qt-creator" + "" + "https://web.libera.chat/#qt-creator" "

") .arg("" "https://bugreports.qt.io" From 913dc9549e3cbda3deff5632e5e91684bbb6dade Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 23 Jun 2021 15:33:31 +0200 Subject: [PATCH 4/6] CMakePM: Do not expand qrc files for The qrc file expansion could take time and it's not a great idea to do it for all files in the filesystem. Amends 53115259baa522d0d2d8f05aaa058693b1de62a8 Task-number: QTCREATORBUG-25783 Change-Id: I10b1f6c224e78b0efe4654bcf36d7cb9ba0e7e5f Reviewed-by: hjk Reviewed-by: Qt CI Bot Reviewed-by: Cristian Adam --- src/plugins/cmakeprojectmanager/projecttreehelper.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp index df63f64bdd2..7fda249d304 100644 --- a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp +++ b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp @@ -226,8 +226,17 @@ void addFileSystemNodes(ProjectNode *root, const QList &allFil if (!fn->filePath().isChildOf(root->filePath())) continue; - std::unique_ptr node(fn->clone()); + FileType fileType = fn->fileType(); + if (fileType == FileType::Resource) + fileType = FileType::Source; + + std::unique_ptr node(new FileNode(fn->filePath(), fileType)); + node->setLine(fn->line()); + node->setIsGenerated(fn->isGenerated()); node->setEnabled(false); + node->setPriority(fn->priority()); + node->setListInProject(fn->listInProject()); + fileSystemNode->addNestedNode(std::move(node)); } From 2e4d57db35d3c6096ef3b503c45936ed6d8f5288 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 23 Jun 2021 16:47:25 +0200 Subject: [PATCH 5/6] Fix that disabled QRC files were enabled by QRC expansion The automatic expansion of QRC files to the tree of their contents didn't preserve the "enabled" property of the original QRC node. For CMake projects that resulted in the file system tree still being shown, with only the QRC nodes, when "Hide Disabled Files" was on, instead of hiding the file system tree completely. Change-Id: If1eb88478955dc8635def844cfc501befcbfc329 Reviewed-by: Cristian Adam Reviewed-by: Qt CI Bot --- src/plugins/resourceeditor/resourceeditorplugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index 50708c98c14..25c29e2cdcd 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -258,6 +258,7 @@ void ResourceEditorPlugin::extensionsInitialized() QTC_ASSERT(pn, continue); const Utils::FilePath path = file->filePath(); auto topLevel = std::make_unique(path, pn->filePath()); + topLevel->setEnabled(file->isEnabled()); topLevel->setIsGenerated(file->isGenerated()); pn->replaceSubtree(file, std::move(topLevel)); } From afa421887165fc33b100a00ae6908952dc102945 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Tue, 22 Jun 2021 16:01:12 +0200 Subject: [PATCH 6/6] Update Qbs submodule to the top of 1.19 branch Change-Id: I79385eb5d49c46a4e856682f3be43c954ca26717 Reviewed-by: Christian Kandeler --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index f002b866e7e..bd2d37ae336 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit f002b866e7e190ddcadfb61ca935c6f0b6ef7e1a +Subproject commit bd2d37ae336e3c88e2fd484cc64eb05b46d07888