From c7803fe6ae8234f9e23ec1bc00481e7d76e8ac38 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 17 May 2024 09:42:24 +0200 Subject: [PATCH 1/5] Doc: Mention QML Language Server in "Adding Language Servers" - Add a link to "Turn on QML Language Server". - Add the \QMLLS macro and use it everywhere. Fixes: QTCREATORBUG-30823 Change-Id: I75ff67967ad6bf592dceeae46486713012aafd50 Reviewed-by: David Schulz Reviewed-by: Sami Shalayel Reviewed-by: Fabian Kosmale --- doc/config/macros.qdocconf | 1 + .../creator-only/creator-language-server.qdoc | 35 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/doc/config/macros.qdocconf b/doc/config/macros.qdocconf index f881062d136..5117f9f3e4b 100644 --- a/doc/config/macros.qdocconf +++ b/doc/config/macros.qdocconf @@ -32,6 +32,7 @@ macro.QDV = "Qt Design Viewer" macro.QL = "Qt Linguist" macro.QMCU = "Qt for MCUs" macro.QMLD = "Qt Quick Designer" +macro.QMLLS = "QML Language Server" macro.QQV = "Qt QML Viewer" macro.QSDK = "Qt" macro.QUL = "Qt Quick Ultralite" diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 8c01b9cfefe..aff9f9f357f 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -62,7 +62,8 @@ \section1 Adding Language Servers - \QC adds a Python language server by default. + \QC adds a \l{Configure Python language servers}{Python language server} by + default. Also, it offers to install language servers for JSON and YAML files when you open them in the editor if it can find the @@ -71,18 +72,22 @@ \image qtcreator-language-server-json.webp {Prompt to install JSON language server} - Add a Java language server for \l{Connecting Android Devices} - {Android development}. For other languages, add generic stdIO language - servers. + \l{Add a Java language server} for \l{Connecting Android Devices} + {Android development}. For other languages, + \l{Add generic language servers}{add generic stdIO language servers}. To add language servers, go to \preferences > \uicontrol {Language Client} and select \uicontrol Add. \image qtcreator-language-client-options-java.png {Java language server preferences} - To enable a language server, select the check box next to the language + To enable a language server, select the checkbox next to the language server name and set server preferences. + To turn on \l{Turn on \QMLLS}{\QMLLS}, go to + \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and + select \uicontrol {Enable \QMLLS}. + To remove language servers from the list, select \uicontrol Delete. \section1 Supported Locator Filters @@ -218,23 +223,23 @@ \ingroup creator-how-to-lsp - \title Turn on QML Language Server + \title Turn on \QMLLS - Since Qt 6.4, the QML language server offers code completion and + Since Qt 6.4, \QMLLS offers code completion and issues warnings for QML. To use it, go to \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and select - \uicontrol {Enable QML Language Server}. + \uicontrol {Enable \QMLLS}. - By default, enabling the QML language server will only enable warning messages + By default, enabling \QMLLS will only enable warning messages and code completion, while advanced features such as renaming and finding usages will be handled by the embedded code model. - To disable the embedded code model and use the QML language server for everything, - select \uicontrol {Use QML Language Server advanced features}. + To disable the embedded code model and use \QMLLS for everything, + select \uicontrol {Use \QMLLS advanced features}. - Also, \QC tries to use the QML language server shipped with - the Qt version in your current kit. To override that behavior and always use the - QML language server of the highest registered Qt version, select - \uicontrol {Use QML Language Server from latest Qt version}. + Also, \QC tries to use \QMLLS shipped with + the Qt version in your current kit. To override that behavior and always use + \QMLLS of the highest registered Qt version, select + \uicontrol {Use \QMLLS from latest Qt version}. \image qtcreator-qml-js-editing.webp {QML/JS Editing preferences} From ced23f3f89318d1e798aaa2f2e32d40c5f83c8c8 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 17 May 2024 10:23:49 +0200 Subject: [PATCH 2/5] Doc: Use "p4 set P4CONFIG" on all platforms Fixes: QTCREATORBUG-30816 Change-Id: Id95062f24bcd2b225581f3158c779caac6780a14 Reviewed-by: Friedemann Kleint Reviewed-by: Orgad Shaneh --- .../external-resources.qdoc | 4 ++++ .../creator-only/creator-vcs-perforce.qdoc | 23 ++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/qtcreator/src/external-resources/external-resources.qdoc b/doc/qtcreator/src/external-resources/external-resources.qdoc index 6c385180192..0fa7ca60dff 100644 --- a/doc/qtcreator/src/external-resources/external-resources.qdoc +++ b/doc/qtcreator/src/external-resources/external-resources.qdoc @@ -1,6 +1,10 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +/*! + \externalpage https://www.perforce.com/manuals/cmdref/Content/CmdRef/P4CONFIG.html + \title Perforce: P4CONFIG +*/ /*! \externalpage https://doc.qt.io/Boot2Qt/index.html \title Boot2Qt: Documentation diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc index 3af3c6769b4..6c9c93ff51d 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc @@ -37,8 +37,8 @@ \section1 Using Configuration Files - To specify the details individually for several projects, use configuration - files: + To specify workspace details individually for several projects, use + configuration files: \list 1 \li Create a \c {p4config.txt} configuration file for each project in the @@ -46,19 +46,16 @@ \li Go to \preferences > \uicontrol {Version Control} > \uicontrol Perforce. \li Clear \uicontrol {Environment Variables}. - \li Run the following command from the command line once: - \list - \li On Windows: - \badcode - p4 set P4CONFIG=p4config.txt - \endcode - \li On Linux - \badcode - export P4CONFIG= - \endcode - \endlist + \li To set \c P4CONFIG to use the file that you created, run the + following command from the command line once: + \badcode + p4 set P4CONFIG=p4config.txt + \endcode \endlist + For more information about using the \c P4CONFIG variable, see + \l{Perforce: P4CONFIG}. + \section1 Editing Files In addition to the standard version control system functions described in From 946bbb477ebc2cd29a1a624ff2ac29603837dbaa Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 17 May 2024 14:14:53 +0200 Subject: [PATCH 3/5] Doc: Fix QDoc warnings in BaseAspects docs Change-Id: Iee6e29040dfffaa4fa7da99cb0b854ef22b45042 Reviewed-by: Marcus Tillmanns --- src/libs/utils/aspects.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index c35085ce4d1..5cc028bcdb8 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -115,6 +115,17 @@ public: their data, or use an ID, neither of these is mandatory. */ +/*! + \enum Utils::BaseAspect::Announcement + + Whether to emit a signal when a value changes. + + \value DoEmit + Emit a signal. + \value BeQuiet + Don't emit a signal. +*/ + /*! Constructs a base aspect. @@ -159,7 +170,9 @@ QVariant BaseAspect::variantValue() const /*! Sets \a value. - Prefer the typed setValue() of derived classes. + If \a howToAnnounce is set to \c DoEmit, emits the \c valueChanged signal. + + Prefer the typed \c setValue() of the derived classes. */ void BaseAspect::setVariantValue(const QVariant &value, Announcement howToAnnounce) { @@ -939,9 +952,6 @@ public: Based on QTextEdit, used for user-editable strings that often do not fit on a line. - \value PathChooserDisplay - Based on Utils::PathChooser. - \value PasswordLineEditDisplay Based on QLineEdit, used for password strings @@ -1428,7 +1438,9 @@ QString FilePathAspect::value() const } /*! - Sets the value of this file path aspect to \a value. + Sets the value of this file path aspect to \a filePath. + + If \a howToAnnounce is set to \c DoEmit, emits the \c valueChanged signal. \note This does not use any check that the value is actually a file path. @@ -2784,8 +2796,8 @@ void IntegersAspect::addToLayout(Layouting::LayoutItem &parent) */ /*! - Constructs a text display showing the \a message with an icon representing - type \a type. + Constructs a text display with the parent \a container. The display shows + \a message and an icon representing the type \a type. */ TextDisplay::TextDisplay(AspectContainer *container, const QString &message, InfoLabel::InfoType type) : BaseAspect(container), d(new Internal::TextDisplayPrivate) From e48a40bd8dd029cbea797a4dc4a1ccae379218d7 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 17 May 2024 13:44:30 +0200 Subject: [PATCH 4/5] Update qbs submodule to HEAD of 2.3 branch Change-Id: I9afd32c952cb4d57ed0daf8ff9860a35f3d78be0 Reviewed-by: Christian Stenger --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index fc4dec2f6a8..1ee1e51fa98 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit fc4dec2f6a82c11ff7fe1aac2408d83dbbd1a9c5 +Subproject commit 1ee1e51fa98f89ae4ee977f6074d070f5788c633 From 85617f1369e2638d47c1b583650200bd4805ddb3 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 16 May 2024 15:31:37 +0200 Subject: [PATCH 5/5] Git: Avoid crash when reloading files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly reset the document when the document gets closed. Task-number: QTCREATORBUG-30824 Change-Id: I4fb3d6fd6041990e5b8b4f6b7c4fd9ebc62f5a4a Reviewed-by: Orgad Shaneh Reviewed-by: André Hartmann --- src/plugins/git/instantblame.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/git/instantblame.cpp b/src/plugins/git/instantblame.cpp index 5921518c347..f932c78698e 100644 --- a/src/plugins/git/instantblame.cpp +++ b/src/plugins/git/instantblame.cpp @@ -166,6 +166,13 @@ void InstantBlame::setup() connect(EditorManager::instance(), &EditorManager::currentEditorChanged, this, setupBlameForEditor); + connect(EditorManager::instance(), &EditorManager::documentClosed, + this, [this](IDocument *doc) { + if (m_document != doc) + return; + disconnect(m_documentChangedConn); + m_document = nullptr; + }); } // Porcelain format of git blame output