Merge remote-tracking branch 'origin/13.0'

Conflicts:
	doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc

Change-Id: If93df2592a66679eeff9c8a337372e3aad65f1f1
This commit is contained in:
Eike Ziller
2024-05-21 09:40:46 +02:00
7 changed files with 62 additions and 36 deletions

View File

@@ -33,6 +33,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"

View File

@@ -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,9 +72,9 @@
\image qtcreator-language-server-json.webp {Prompt to install JSON language server}
Add a Java language server for \l{Developing for Android}
{Android development}. For other languages, add generic stdIO language
servers.
\l{Add a Java language server} for \l{Developing for Android}
{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.
@@ -83,6 +84,10 @@
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}

View File

@@ -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 \B2Q: Documentation

View File

@@ -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:
\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
\li On Linux
\badcode
export P4CONFIG=<path-to-p4config.txt>
\endcode
\endlist
\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

View File

@@ -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.
@@ -2793,8 +2805,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)

View File

@@ -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