From 35f8f069addf21a4e122c8a7cf8a0e9f5caa905f Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 13 Nov 2023 10:53:43 +0100 Subject: [PATCH 1/9] Doc: Fix "the the" Change-Id: Ib39bc4dddc75a10dedff6006283d1258415d679b Reviewed-by: Eike Ziller --- .../src/projects/creator-only/creator-projects-libraries.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc index 9d03ea4e892..89376e6a513 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-libraries.qdoc @@ -111,7 +111,7 @@ You can add a library into a \e subdirs project. Use wizards to create the project and the library and to link the library against the project. - \note This tutorial only applies when you select qmake as the the build + \note This tutorial only applies when you select qmake as the build system for the subdirs project. \section1 Creating a shared library From 218f346fcc76f56bb383b3717aef2e6b741e4e91 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 10 Nov 2023 15:28:32 +0100 Subject: [PATCH 2/9] Utils: Prevent temporary duplicated display of InfoBar items The delayed deletion of InfoBar items can cause short lived but visible duplication of InfoBar entries. This change hides the obsoloete items immediately to prevent that effect. Fixes: QTCREATORBUG-29877 Change-Id: I6ed428185849f22f8d87f68cf1a5fac610e9dddf Reviewed-by: Eike Ziller --- src/libs/utils/infobar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/utils/infobar.cpp b/src/libs/utils/infobar.cpp index 37daa486def..bd6429a7622 100644 --- a/src/libs/utils/infobar.cpp +++ b/src/libs/utils/infobar.cpp @@ -268,6 +268,7 @@ void InfoBarDisplay::update() { for (QWidget *widget : std::as_const(m_infoWidgets)) { widget->disconnect(this); // We want no destroyed() signal now + widget->hide(); // Late deletion can cause duplicate infos. Hide immediately to prevent it. widget->deleteLater(); } m_infoWidgets.clear(); From 223deb596839e3b96236d0047c9e5290aedcb691 Mon Sep 17 00:00:00 2001 From: Xavier BESSON Date: Mon, 13 Nov 2023 09:40:37 +0100 Subject: [PATCH 3/9] Shortcut to enable/disable shortcuts routing to terminal Fixes: QTCREATORBUG-29876 Change-Id: I8b04c09ce1de7dab968499773179f663c1c6fe7d Reviewed-by: Marcus Tillmanns --- src/plugins/terminal/terminalconstants.h | 1 + src/plugins/terminal/terminalpane.cpp | 8 ++++++++ src/plugins/terminal/terminalpane.h | 1 + src/plugins/terminal/terminalwidget.cpp | 6 ++++++ 4 files changed, 16 insertions(+) diff --git a/src/plugins/terminal/terminalconstants.h b/src/plugins/terminal/terminalconstants.h index 99700475e60..67b618c62de 100644 --- a/src/plugins/terminal/terminalconstants.h +++ b/src/plugins/terminal/terminalconstants.h @@ -15,5 +15,6 @@ constexpr char CLEARSELECTION[] = "Terminal.ClearSelection"; constexpr char MOVECURSORWORDLEFT[] = "Terminal.MoveCursorWordLeft"; constexpr char MOVECURSORWORDRIGHT[] = "Terminal.MoveCursorWordRight"; constexpr char CLEAR_TERMINAL[] = "Terminal.ClearTerminal"; +constexpr char TOGGLE_KEYBOARD_LOCK[] = "Terminal.ToggleKeyboardLock"; } // namespace Terminal::Constants diff --git a/src/plugins/terminal/terminalpane.cpp b/src/plugins/terminal/terminalpane.cpp index a11284ef1bd..cdbbb850173 100644 --- a/src/plugins/terminal/terminalpane.cpp +++ b/src/plugins/terminal/terminalpane.cpp @@ -125,6 +125,8 @@ TerminalPane::TerminalPane(QObject *parent) updateLockButton(); + connect(&toggleKeyboardLock, &QAction::triggered, m_lockKeyboardButton, &QToolButton::toggle); + connect(m_lockKeyboardButton, &QToolButton::toggled, this, [this, updateLockButton] { settings().lockKeyboard.setValue(m_lockKeyboardButton->isChecked()); updateLockButton(); @@ -292,6 +294,8 @@ void TerminalPane::initActions() closeTerminal.setIcon(CLOSE_TERMINAL_ICON.icon()); closeTerminal.setToolTip(Tr::tr("Close the current Terminal.")); + toggleKeyboardLock.setText(Tr::tr("Toggle Keyboard Lock")); + using namespace Constants; Command *cmd = ActionManager::registerAction(&newTerminal, NEWTERMINAL, m_selfContext); @@ -310,6 +314,10 @@ void TerminalPane::initActions() QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+]") : QLatin1String("Ctrl+PgDown"))}); + ActionManager::registerAction(&toggleKeyboardLock, + TOGGLE_KEYBOARD_LOCK, + m_selfContext); + connect(&newTerminal, &QAction::triggered, this, [this] { openTerminal({}); }); connect(&closeTerminal, &QAction::triggered, this, [this] { removeTab(m_tabWidget.currentIndex()); diff --git a/src/plugins/terminal/terminalpane.h b/src/plugins/terminal/terminalpane.h index c21d1525120..dc3b4d30f15 100644 --- a/src/plugins/terminal/terminalpane.h +++ b/src/plugins/terminal/terminalpane.h @@ -66,6 +66,7 @@ private: QAction nextTerminal; QAction prevTerminal; QAction closeTerminal; + QAction toggleKeyboardLock; QMenu m_shellMenu; diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp index c9b52f6bf35..584a15a90cd 100644 --- a/src/plugins/terminal/terminalwidget.cpp +++ b/src/plugins/terminal/terminalwidget.cpp @@ -571,6 +571,12 @@ bool TerminalWidget::event(QEvent *event) return true; } + if (settings().lockKeyboard() + && QKeySequence(keyEvent->keyCombination()) + == ActionManager::command(Constants::TOGGLE_KEYBOARD_LOCK)->keySequence()) { + return false; + } + if (settings().lockKeyboard()) { event->accept(); return true; From 45858f739a20bf2dcc859cd5aac80766e991a875 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 14 Nov 2023 08:49:25 +0100 Subject: [PATCH 4/9] McuSupport: Fix building tests Change-Id: I9473805663ea2d33ddf600ae06c455b139bac89b Reviewed-by: hjk --- src/plugins/mcusupport/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/mcusupport/test/CMakeLists.txt b/src/plugins/mcusupport/test/CMakeLists.txt index 7d2a94c286e..dc1e00a0942 100644 --- a/src/plugins/mcusupport/test/CMakeLists.txt +++ b/src/plugins/mcusupport/test/CMakeLists.txt @@ -1,6 +1,7 @@ extend_qtc_plugin(McuSupport CONDITION WITH_TESTS AND TARGET Googletest DEPENDS Googletest + DEFINES GOOGLE_TEST_IS_FOUND SOURCES unittest.h unittest.cpp packagemock.h From 8290a7636ecfb802488f8e336ab7e8b741a959a9 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 13 Nov 2023 09:14:51 +0100 Subject: [PATCH 5/9] ProjectExplorer: Really don't create replacment kits for Design Studio Amends b5dec80d6b6. Change-Id: I34b263626c66dfec2676ff311d1f5e460333b924 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/project.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index 20c65655627..c0e245baf1c 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -821,7 +821,11 @@ void Project::createTargetFromMap(const Store &map, int index) } Kit *k = KitManager::kit(id); - if (!k && !ICore::isQtDesignStudio()) { + if (!k) { + // QDS does not want replacement kits. + if (ICore::isQtDesignStudio()) + return; + Id deviceTypeId = Id::fromSetting(targetMap.value(Target::deviceTypeKey())); if (!deviceTypeId.isValid()) deviceTypeId = Constants::DESKTOP_DEVICE_TYPE; From 74a089f3eaf0df437f0603a96f4eb386e1730552 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 13 Nov 2023 13:33:50 +0100 Subject: [PATCH 6/9] CppEditor: Fix the lookUpDefinition() function ... that tells us whether we need to offer the "add #include" quickfix. If we encounter a forward declaration, we cannot return yet, as a proper declaration might still show up. Fixes: QTCREATORBUG-29883 Change-Id: Ie1b831b9414043c3fc0d5d1e914b6096957757e6 Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/cppeditor/cppquickfixes.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index 012785df349..7c460a0ad73 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -1953,25 +1953,30 @@ LookupResult lookUpDefinition(const CppQuickFixInterface &interface, const NameA // Try to find the class/template definition const Name *name = nameAst->name; const QList results = interface.context().lookup(name, scope); + LookupResult best = LookupResult::NotDeclared; for (const LookupItem &item : results) { if (Symbol *declaration = item.declaration()) { if (declaration->asClass()) return LookupResult::Declared; - if (declaration->asForwardClassDeclaration()) - return LookupResult::ForwardDeclared; + if (declaration->asForwardClassDeclaration()) { + best = LookupResult::ForwardDeclared; + continue; + } if (Template *templ = declaration->asTemplate()) { if (Symbol *declaration = templ->declaration()) { if (declaration->asClass()) return LookupResult::Declared; - if (declaration->asForwardClassDeclaration()) - return LookupResult::ForwardDeclared; + if (declaration->asForwardClassDeclaration()) { + best = LookupResult::ForwardDeclared; + continue; + } } } return LookupResult::Declared; } } - return LookupResult::NotDeclared; + return best; } QString templateNameAsString(const TemplateNameId *templateName) From 3ef343bbf8273f2447b7cc50a10ae07f090e2acf Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Nov 2023 12:41:00 +0100 Subject: [PATCH 7/9] Core: Improve readability of searchresult error messages Task-number: QTCREATORBUG-29824 Change-Id: Ic26a6671b886d74ab2aac1d8e1baa66bd9fe7f8d Reviewed-by: Eike Ziller --- src/plugins/coreplugin/find/searchresultwidget.cpp | 8 ++++---- src/plugins/coreplugin/find/searchresultwidget.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/coreplugin/find/searchresultwidget.cpp b/src/plugins/coreplugin/find/searchresultwidget.cpp index 06c59d95ecc..400f8e06370 100644 --- a/src/plugins/coreplugin/find/searchresultwidget.cpp +++ b/src/plugins/coreplugin/find/searchresultwidget.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -93,8 +94,6 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) : topLayout->addWidget(m_topReplaceWidget); m_messageWidget = new QFrame; - pal.setColor(QPalette::WindowText, creatorTheme()->color(Theme::TextColorError)); - m_messageWidget->setPalette(pal); if (creatorTheme()->flag(Theme::DrawSearchResultWidgetFrame)) { m_messageWidget->setFrameStyle(QFrame::Panel | QFrame::Raised); m_messageWidget->setLineWidth(1); @@ -103,8 +102,9 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) : auto messageLayout = new QHBoxLayout(m_messageWidget); messageLayout->setContentsMargins(2, 2, 2, 2); m_messageWidget->setLayout(messageLayout); - m_messageLabel = new QLabel; - m_messageLabel->setPalette(pal); + m_messageLabel = new InfoLabel; + m_messageLabel->setType(InfoLabel::Error); + m_messageLabel->setFilled(true); messageLayout->addWidget(m_messageLabel); layout->addWidget(m_messageWidget); m_messageWidget->setVisible(false); diff --git a/src/plugins/coreplugin/find/searchresultwidget.h b/src/plugins/coreplugin/find/searchresultwidget.h index a9f87c467f1..4a40346343a 100644 --- a/src/plugins/coreplugin/find/searchresultwidget.h +++ b/src/plugins/coreplugin/find/searchresultwidget.h @@ -18,6 +18,7 @@ class QToolButton; class QCheckBox; QT_END_NAMESPACE +namespace Utils { class InfoLabel; } namespace Core { namespace Internal { @@ -123,7 +124,7 @@ private: QWidget *m_descriptionContainer = nullptr; QLabel *m_label = nullptr; QLabel *m_searchTerm = nullptr; - QLabel *m_messageLabel = nullptr; + Utils::InfoLabel *m_messageLabel = nullptr; QToolButton *m_cancelButton = nullptr; QLabel *m_matchesFoundLabel = nullptr; bool m_preserveCaseSupported = true; From 206000a3d606135d3afa6509fb276d62be6e2b70 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 14 Nov 2023 11:29:44 +0100 Subject: [PATCH 8/9] Fix state of LineColumButton after clicking When using the `pressed` signal, the button stays in the "pressed" state forever afterwards. Using the `clicked` signal behaves correctly, so use that instead. Change-Id: I646c93f1db3b1176630f1cfa718aba01d0aaf252 Reviewed-by: David Schulz --- src/plugins/texteditor/texteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 66efbcfda02..db85a570178 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -157,7 +157,7 @@ public: , m_editor(parent) { connect(m_editor, &QPlainTextEdit::cursorPositionChanged, this, &LineColumnButton::update); - connect(this, &QToolButton::pressed, ActionManager::instance(), [this] { + connect(this, &QToolButton::clicked, ActionManager::instance(), [this] { emit m_editor->activateEditor(EditorManager::IgnoreNavigationHistory); QMetaObject::invokeMethod(ActionManager::instance(), [] { if (Command *cmd = ActionManager::command(Core::Constants::GOTO)) { From 90e6fb54b6606bfa61d1679002887b4cb757fe37 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 14 Nov 2023 15:13:15 +0100 Subject: [PATCH 9/9] COIN: Update to Qt 6.6 provisioning That Qt version is used for building as well Change-Id: Idae06324532b0dc2f453b802ca3d817fe3d41593 Reviewed-by: Cristian Adam Reviewed-by: Qt CI Bot --- coin/product_dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coin/product_dependencies.yaml b/coin/product_dependencies.yaml index 4212b9b2e24..a658f8103be 100644 --- a/coin/product_dependencies.yaml +++ b/coin/product_dependencies.yaml @@ -1,4 +1,4 @@ dependencies: ../../qt/qt5.git: - ref: "6.5" + ref: "6.6"