From 9ae3ed33c54ee5b601508be145fe85962e6196e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Wed, 8 Jan 2025 17:49:15 +0100 Subject: [PATCH 1/9] SquishTests: Revert expected error message in tst_QMLS02 This partially reverts commit 3744160c3bc0925ee820ebbd70386efc7b51a488 due to f60b64106632c6d94f995f5d058886ec7f92783d which reverted Creator's behavior. Change-Id: Ia241205d12e3742adcb246b94a5fefb174699fd0 Reviewed-by: Christian Stenger --- tests/system/suite_QMLS/tst_QMLS02/test.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/system/suite_QMLS/tst_QMLS02/test.py b/tests/system/suite_QMLS/tst_QMLS02/test.py index a9251afc57b..193de69734b 100644 --- a/tests/system/suite_QMLS/tst_QMLS02/test.py +++ b/tests/system/suite_QMLS/tst_QMLS02/test.py @@ -30,12 +30,8 @@ def main(): # invoke QML parsing invokeMenuItem("Tools", "QML/JS", "Run Checks") # verify that error properly reported - # internal check returns e.g.'Invalid property name "Color". (M16)' - # but if project is CMake based the messages are generated by qmllint - test.verify(checkSyntaxError(issuesView, - ['Binding assigned to "Color", but no property "Color" exists in ' - 'the current element.'], False, True), - "Verifying if error or warning is properly reported") + test.verify(checkSyntaxError(issuesView, ['Invalid property name "Color". (M16)'], True), + "Verifying if error is properly reported") # repair error - go to written line placeCursorToLine(editorArea, testingCodeLine) for _ in range(14): From 4fbdb3ad395f0e9ef5299b2e80e160a1269c2119 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Jan 2025 10:50:11 +0100 Subject: [PATCH 2/9] TextEditor: fix loading outline cursor synchronization setting The button was set to the correct enabled state, but not the member that holds the information whether the outline should be synchronized with the cursor. Change-Id: I57f96e02dc0a9a954874fefa4926741b389c3783 Reviewed-by: Christian Stenger --- src/plugins/texteditor/outlinefactory.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/outlinefactory.cpp b/src/plugins/texteditor/outlinefactory.cpp index e34d50c8b85..ee58f2c050f 100644 --- a/src/plugins/texteditor/outlinefactory.cpp +++ b/src/plugins/texteditor/outlinefactory.cpp @@ -177,7 +177,6 @@ void OutlineWidgetStack::restoreSettings(Utils::QtcSettings *settings, int posit const Key baseKey = numberedKey("Outline.", position) + '.'; const QString baseKeyString = stringFromKey(baseKey); - bool syncWithEditor = true; m_widgetSettings.clear(); const QStringList longKeys = settings->allKeys(); for (const QString &longKey : longKeys) { @@ -187,13 +186,13 @@ void OutlineWidgetStack::restoreSettings(Utils::QtcSettings *settings, int posit const QString key = longKey.mid(baseKeyString.length()); if (key == QLatin1String("SyncWithEditor")) { - syncWithEditor = settings->value(keyFromString(longKey)).toBool(); + m_syncWithEditor = settings->value(keyFromString(longKey)).toBool(); continue; } m_widgetSettings.insert(key, settings->value(keyFromString(longKey))); } - m_toggleSync->setChecked(syncWithEditor); + m_toggleSync->setChecked(m_syncWithEditor); if (auto outlineWidget = qobject_cast(currentWidget())) outlineWidget->restoreSettings(m_widgetSettings); } From 025efa09648d6dc9fbc8565cacdc2f1909143375 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Jan 2025 10:53:34 +0100 Subject: [PATCH 3/9] LanguageClient: ensure the outline is expanded after an update Task-number: QTCREATORBUG-32218 Change-Id: I8d2e7d45f00025a11307ae40a2870bfcf6102dc7 Reviewed-by: Christian Stenger --- src/plugins/languageclient/languageclientoutline.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/languageclient/languageclientoutline.cpp b/src/plugins/languageclient/languageclientoutline.cpp index 30dea876882..72bebe5b774 100644 --- a/src/plugins/languageclient/languageclientoutline.cpp +++ b/src/plugins/languageclient/languageclientoutline.cpp @@ -234,6 +234,7 @@ void LanguageClientOutlineWidget::handleResponse(const DocumentUri &uri, m_model.setInfo(*s); else m_model.clear(); + m_view.expandAll(); // The list has changed, update the current items updateSelectionInTree(m_editor->textCursor()); From 3cb772cad88adf1c4d0a548631d3f7dcad95cd69 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Jan 2025 12:19:04 +0100 Subject: [PATCH 4/9] LanguageClient: avoid updating current outline item .. after we received new content for the outline if the user has explicitly disabled the cursor synchronization. Change-Id: Idc98457d26c094a6d420d282c71d50a2b19e1df7 Reviewed-by: Christian Stenger --- .../languageclient/languageclientoutline.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/plugins/languageclient/languageclientoutline.cpp b/src/plugins/languageclient/languageclientoutline.cpp index 72bebe5b774..e27a99bd098 100644 --- a/src/plugins/languageclient/languageclientoutline.cpp +++ b/src/plugins/languageclient/languageclientoutline.cpp @@ -120,7 +120,7 @@ public: private: void handleResponse(const DocumentUri &uri, const DocumentSymbolsResult &response); void updateTextCursor(const QModelIndex &proxyIndex); - void updateSelectionInTree(const QTextCursor ¤tCursor); + void updateSelectionInTree(); void onItemActivated(const QModelIndex &index); QPointer m_client; @@ -168,10 +168,7 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client, connect(&m_view, &QAbstractItemView::activated, this, &LanguageClientOutlineWidget::onItemActivated); connect(m_editor->editorWidget(), &TextEditor::TextEditorWidget::cursorPositionChanged, - this, [this](){ - if (m_sync) - updateSelectionInTree(m_editor->textCursor()); - }); + this, &LanguageClientOutlineWidget::updateSelectionInTree); setFocusProxy(&m_view); } @@ -183,8 +180,7 @@ QList LanguageClientOutlineWidget::filterMenuActions() const void LanguageClientOutlineWidget::setCursorSynchronization(bool syncWithCursor) { m_sync = syncWithCursor; - if (m_sync && m_editor) - updateSelectionInTree(m_editor->textCursor()); + updateSelectionInTree(); } void LanguageClientOutlineWidget::setSorted(bool sorted) @@ -237,7 +233,7 @@ void LanguageClientOutlineWidget::handleResponse(const DocumentUri &uri, m_view.expandAll(); // The list has changed, update the current items - updateSelectionInTree(m_editor->textCursor()); + updateSelectionInTree(); } void LanguageClientOutlineWidget::updateTextCursor(const QModelIndex &proxyIndex) @@ -263,8 +259,11 @@ static LanguageClientOutlineItem *itemForCursor(const LanguageClientOutlineModel return result; } -void LanguageClientOutlineWidget::updateSelectionInTree(const QTextCursor ¤tCursor) +void LanguageClientOutlineWidget::updateSelectionInTree() { + if (!m_sync || !m_editor) + return; + const QTextCursor currentCursor = m_editor->editorWidget()->textCursor(); if (LanguageClientOutlineItem *item = itemForCursor(m_model, currentCursor)) { const QModelIndex index = m_proxyModel.mapFromSource(m_model.indexForItem(item)); m_view.setCurrentIndex(index); From 8e20bc4c74aed1ff6f18f5556149cad6c4f7e011 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Jan 2025 14:06:45 +0100 Subject: [PATCH 5/9] Python: initialize output parser exception state Fixes: QTCREATORBUG-32214 Change-Id: Ied5aafad78b767b7cb5e2c9414de1cfa72d53358 Reviewed-by: Christian Stenger --- src/plugins/python/pythonrunconfiguration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/python/pythonrunconfiguration.cpp b/src/plugins/python/pythonrunconfiguration.cpp index e8f6719a0ab..cfd7ceb01f9 100644 --- a/src/plugins/python/pythonrunconfiguration.cpp +++ b/src/plugins/python/pythonrunconfiguration.cpp @@ -96,7 +96,7 @@ private: const QRegularExpression filePattern; QList m_tasks; - bool m_inTraceBack; + bool m_inTraceBack = false; }; // RunConfiguration From ef5cc7ebf4994ec6617884acf6ea74fdb02bec35 Mon Sep 17 00:00:00 2001 From: Krzysztof Chrusciel Date: Thu, 9 Jan 2025 14:24:20 +0100 Subject: [PATCH 6/9] TextEditor: Fix width of carrier widget in accordance to scrollbar Change-Id: I28184ce1a4103ba978945b6e9c4bc52dc4c2ce3e Reviewed-by: Marcus Tillmanns --- src/plugins/texteditor/texteditor.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index f5e4b7c12bd..8455815504d 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -3942,9 +3942,9 @@ public: , m_embed(embed) , m_textEditorWidget(textEditorWidget) { - QVBoxLayout *layout = new QVBoxLayout(this); - layout->setContentsMargins(0, 0, 0, 0); - layout->addWidget(m_embed); + m_layout = new QVBoxLayout(this); + updateContentMargins(); + m_layout->addWidget(m_embed); setFixedWidth(m_textEditorWidget->width() - m_textEditorWidget->extraAreaWidth()); setFixedHeight(m_embed->minimumSizeHint().height()); @@ -3952,13 +3952,31 @@ public: connect(m_textEditorWidget, &TextEditorWidget::resized, this, [this] { setFixedWidth(m_textEditorWidget->width() - m_textEditorWidget->extraAreaWidth()); }); + + m_textEditorWidget->viewport()->installEventFilter(this); } int embedHeight() { return m_embed->sizeHint().height(); } + bool eventFilter(QObject *obj, QEvent *event) override + { + if (event->type() == QEvent::Resize) + updateContentMargins(); + return QObject::eventFilter(obj, event); + } + private: + void updateContentMargins() { + bool verticalScrollBarVisible = m_textEditorWidget->verticalScrollBar()->isVisible(); + int verticalScrollBarWidth = m_textEditorWidget->verticalScrollBar()->width(); + + // Value 4 here is the liitle space between extraArea (space with line numbers) and code. + m_layout->setContentsMargins(0, 0, 4 + (verticalScrollBarVisible ? verticalScrollBarWidth : 0), 0); + } + QWidget *m_embed; TextEditorWidget *m_textEditorWidget; + QVBoxLayout *m_layout; }; EmbeddedWidgetInterface::~EmbeddedWidgetInterface() From 80135380c1f1f6707e44d74ca6f7b5852cb9bd57 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 8 Jan 2025 15:32:49 +0100 Subject: [PATCH 7/9] ValgrindProcess: Fix showing callgrind results after red square button Amends b1304de6cf1bca02bc6a6447700aa425b1fb7627 Change-Id: I3e744e617d7224ccc243b666adc2b448ca9b6bda Reviewed-by: hjk --- src/plugins/valgrind/valgrindengine.cpp | 2 -- src/plugins/valgrind/valgrindprocess.cpp | 10 +++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index 57f62a0c4b3..0c6156f72a5 100644 --- a/src/plugins/valgrind/valgrindengine.cpp +++ b/src/plugins/valgrind/valgrindengine.cpp @@ -90,8 +90,6 @@ void ValgrindToolRunner::stop() m_isStopping = true; m_runner.stop(); appendMessage(Tr::tr("Process terminated."), ErrorMessageFormat); - m_progress.reportFinished(); - reportStopped(); } QStringList ValgrindToolRunner::genericToolArguments() const diff --git a/src/plugins/valgrind/valgrindprocess.cpp b/src/plugins/valgrind/valgrindprocess.cpp index 23c84f4b487..f0d6d28948c 100644 --- a/src/plugins/valgrind/valgrindprocess.cpp +++ b/src/plugins/valgrind/valgrindprocess.cpp @@ -61,6 +61,8 @@ static CommandLine valgrindCommand(const CommandLine &command, class ValgrindProcessPrivate : public QObject { + Q_OBJECT + public: ValgrindProcessPrivate(ValgrindProcess *owner) : q(owner) @@ -83,6 +85,9 @@ public: bool m_useTerminal = false; TaskTreeRunner m_taskTreeRunner; + +signals: + void stopRequested(); }; Group ValgrindProcessPrivate::runRecipe() const @@ -175,6 +180,7 @@ Group ValgrindProcessPrivate::runRecipe() const connect(processPtr, &Process::readyReadStandardError, this, [this, processPtr] { emit q->appendMessage(processPtr->readAllStandardError(), StdErrFormat); }); + connect(this, &ValgrindProcessPrivate::stopRequested, processPtr, &Process::stop); }; const auto onProcessDone = [this, storage](const Process &process) { emit q->processErrorReceived(process.errorString(), process.error()); @@ -254,7 +260,7 @@ bool ValgrindProcess::start() void ValgrindProcess::stop() { - d->m_taskTreeRunner.reset(); + emit d->stopRequested(); } bool ValgrindProcess::runBlocking() @@ -275,3 +281,5 @@ bool ValgrindProcess::runBlocking() } } // namespace Valgrind + +#include "valgrindprocess.moc" From 22ecc28ceb451d4780354684a0de53a0d57a3727 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Dec 2024 16:33:57 +0100 Subject: [PATCH 8/9] Debugger: Set working directory for gdbserver Fixes: QTCREATORBUG-32122 Change-Id: I63fc8dcd481b33bc5209c034af6c6547c56a9458 Reviewed-by: Volker Vogelhuber Reviewed-by: Jarek Kobus Reviewed-by: hjk --- src/plugins/debugger/debuggerruncontrol.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index c864626a848..f39fabe487b 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -1146,6 +1146,7 @@ void DebuggerRunTool::startDebugServerIfNeededAndContinueStartup() } d->debuggerServerProc.setCommand(cmd); + d->debuggerServerProc.setWorkingDirectory(m_runParameters.inferior.workingDirectory); connect(&d->debuggerServerProc, &Process::readyReadStandardOutput, this, [this] { From 3d79f74ea628fb3997f2e5753cc6282e026eba0b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 10 Jan 2025 12:12:43 +0100 Subject: [PATCH 9/9] Add change log for 15.0.1 Change-Id: Ia0ac1305d3c77e19fe3cb0817c25ca3df0e8abc1 Reviewed-by: Leena Miettinen --- dist/changelog/changes-15.0.1.md | 155 +++++++++++++++++++++++++++++++ dist/changelog/template.md | 2 + 2 files changed, 157 insertions(+) create mode 100644 dist/changelog/changes-15.0.1.md diff --git a/dist/changelog/changes-15.0.1.md b/dist/changelog/changes-15.0.1.md new file mode 100644 index 00000000000..3ad17ae919e --- /dev/null +++ b/dist/changelog/changes-15.0.1.md @@ -0,0 +1,155 @@ +Qt Creator 15.0.1 +================= + +Qt Creator version 15.0.1 contains bug fixes and new features. + +The most important changes are listed in this document. For a complete list of +changes, see the Git log for the Qt Creator sources that you can check out from +the public Git repository or view online at + + + +General +------- + +* Fixed the loading of plugins from the user-specific plugin directory +* Fixed a crash when selecting a dynamic library directly in the plugin + installation wizard + +Help +---- + +* Fixed opening links to Academy + ([QTCREATORBUG-32134](https://bugreports.qt.io/browse/QTCREATORBUG-32134)) + +Editing +------- + +* Fixed a crash when editors are closed while the document switching window + (`Ctrl+Tab`) is open +* Fixed a missing re-highlighting after the color scheme is changed + ([QTCREATORBUG-32116](https://bugreports.qt.io/browse/QTCREATORBUG-32116)) + +### C++ + +* Fixed the `Move Definition` refactoring action for template methods + ([QTCREATORBUG-31678](https://bugreports.qt.io/browse/QTCREATORBUG-31678)) +* Clangd + * Updated prebuilt binaries to LLVM 19.1.6 + * Fixed a potential crash when canceling indexing +* Built-in + * Fixed a wrong warning for range-based `for` loops + ([QTCREATORBUG-32043](https://bugreports.qt.io/browse/QTCREATORBUG-32043)) + +### QML + +* qmlls + * Turned off by default because of issues with QML modules + * Fixed that triggering refactoring actions was not available with + shortcut and Locator + ([QTCREATORBUG-31977](https://bugreports.qt.io/browse/QTCREATORBUG-31977)) + * Fixed that auto-completion sometimes did not appear + ([QTCREATORBUG-32013](https://bugreports.qt.io/browse/QTCREATORBUG-32013)) + * Fixed that a client handler could be created for empty executable paths + +Projects +-------- + +* Fixed the GitHub action created by the Qt Creator plugin wizard + ([QTCREATORBUG-32090](https://bugreports.qt.io/browse/QTCREATORBUG-32090)) + +### CMake + +* Fixed that user-defined `UTILITY` targets were missing from Locator + ([QTCREATORBUG-32080](https://bugreports.qt.io/browse/QTCREATORBUG-32080)) +* Fixed a potential crash with CMake Presets +* Fixed an issue after updating MSVC + ([QTCREATORBUG-32165](https://bugreports.qt.io/browse/QTCREATORBUG-32165)) +* Fixed that `CMakeLists.txt` could not be found when adding files when + the `FOLDER` property was used + ([QTCREATORBUG-32194](https://bugreports.qt.io/browse/QTCREATORBUG-32194)) +* Fixed that a rebuild of an imported project could be forced + ([QTCREATORBUG-32196](https://bugreports.qt.io/browse/QTCREATORBUG-32196)) +* Fixed an issue with watching for external CMake changes + ([QTCREATORBUG-31536](https://bugreports.qt.io/browse/QTCREATORBUG-31536)) +* Conan + * Fixed the loading of projects that specify a `CMakeDeps` generator + ([QTCREATORBUG-32076](https://bugreports.qt.io/browse/QTCREATORBUG-32076)) + +Debugging +--------- + +* Fixed a crash when enabling or disabling all breakpoints with the context menu + +Analyzer +-------- + +### Clang + +* Clang-Tidy + * Fixed that the required compilation database was not created + ([QTCREATORBUG-32098](https://bugreports.qt.io/browse/QTCREATORBUG-32098)) + * Fixed an issue with deselecting checks + ([QTCREATORBUG-32147](https://bugreports.qt.io/browse/QTCREATORBUG-32147)) + +### Axivion + +* Fixed that settings changes were automatically applied + ([QTCREATORBUG-32078](https://bugreports.qt.io/browse/QTCREATORBUG-32078)) +* Fixed the handling of projects with special characters in their name + ([QTCREATORBUG-32091](https://bugreports.qt.io/browse/QTCREATORBUG-32091)) + +Terminal +-------- + +* Fixed the reuse of terminal tabs on macOS + ([QTCREATORBUG-32197](https://bugreports.qt.io/browse/QTCREATORBUG-32197)) +* Fixed a freeze when closing a terminal on Windows + ([QTCREATORBUG-32192](https://bugreports.qt.io/browse/QTCREATORBUG-32192)) +* Fixed that terminals automatically scrolled to the end also when not at the + bottom + ([QTCREATORBUG-32167](https://bugreports.qt.io/browse/QTCREATORBUG-32167)) + +Version Control Systems +----------------------- + +### Git + +* Worked around a potential crash in the Branches view + +Test Integration +---------------- + +### Boost + +* Fixed a potential crash when accessing the C++ snapshot + +Platforms +--------- + +### Android + +* Fixed a potential crash after reloading packages + +Credits for these changes go to: +-------------------------------- +Alessandro Portale +André Pönitz +Andrii Semkiv +Christian Kandeler +Christian Stenger +Cristian Adam +David Schulz +Eike Ziller +Jaroslaw Kobus +Krzysztof Chrusciel +Leena Miettinen +Liu Zhangjian +Lukasz Papierkowski +Marcus Tillmanns +Orgad Shaneh +Patryk Stachniak +Robert Löhning +Sami Shalayel +Tim Blechmann +Ville Lavonius diff --git a/dist/changelog/template.md b/dist/changelog/template.md index 6eb329ca8d9..27075d602c8 100644 --- a/dist/changelog/template.md +++ b/dist/changelog/template.md @@ -103,6 +103,8 @@ Test Integration ### Qt Test +### Boost + ### Catch2 ### CTest