Provide a context menu to reset the enabled and disabled
messages of the static analyzer to the internal default.
Change-Id: I98bde71899ad4de50d0e170bf0d2892b87989ceb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Provide settings to define a customized set of enabled
static analyzer messages.
Fixes: QTCREATORBUG-29095
Change-Id: Id629e383dd9e3beeef98026759ac66716dc43d23
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.
Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).
No direct access to the widget in creation, funnel out is
via the new bindTo() facility.
Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It is required for updating currently visible proposals. Also guard
against potential null assist interfaces.
Amends 0bd6d7a69f
Fixes: QTCREATORBUG-29096
Change-Id: Ic34d70561b471e7e529f2fb7c239b49712aca502
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The "false" default wasn't really useful.
This changes the default value to the following usages:
1. AndroidDeployQtStep
Introduced in 91f136ef3a
The synchronizer was used to cancel the running tasks inside
the doCancel(), so the similar behavior should be expected
when destructing the AndroidDeployQtStep.
2. GitClient
Introduced in f3106ebafe
Is used only inside the last line of
GitSubmitEditor::updateFileModel(). The running function
(CommitDataFetchResult::fetch) doesn't take QPromise<>,
so it can't detect if the future was canceled or not.
In this case this change is no-op.
3. ExtraCompiler
Introduced in c99ce1f455
The intention was to make it cancellable and finish
early on cancel.
4. PluginManager global future synchronizer
Introduced in 72bddf9f51
The intention was to make it cancellable and finish
early on cancel.
The relevant places in code are marked explicitly for
points: 1, 2 and 3.
Change-Id: I1a52deb8d1f81d355950c8772bbaa6d0a202fd7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.
Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The automatic handling of the document inside the language client
manager is normally done after a document was opened successfully. Since
the QML document registers the document manually on construction before
the file was tried to be opened the automatic cleanup inside the manager
does not work. Postpone the document registration like in the
PythonDocument after the document was opened successfully.
Fixes: QTCREATORBUG-29021
Change-Id: I2dd9e2da9c9ed6d38414ad991df3c03b62e9d611
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The nullptr does crash. We can use a proper QmlJSQuickFixAssistInterface
created from the editor instead.
Task-number: QDS-9573
Change-Id: I5ea2792acb311c37e1005ff039ed7110503dfb4f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
We can use custom formatter not only with auto-formatting on file save,
but also tools/qmljs/reformat file action. Hence, command and arguments
lineedits of custom formatter should only be enabled/disabled by
useCustomFormatter checkbox. useCustomFormatter also should not depend
on auto-format-on-file-save checkbox's state.
Change-Id: If1a634612f38395fd846166f4cc72593f5150f91
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Xavier BESSON <developer@xavi-b.fr>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This changes several tr() calls which were either missed during Tr::tr-
ization or were added later.
Found with regular expression: (?<!(Tr::)|([\w]))tr\(
Change-Id: I1c0c03589e941614a7a8449ecfebc7d2cad396c3
Reviewed-by: hjk <hjk@qt.io>
And handle the consequences in qmakebuildconfiguration.cpp.
Change-Id: Ic24d99927254e8d16decea49b880a2446bf322e6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The AssistInterface changed to unique_ptr, but the internals of how the
QmlJSEditor looked for quick fixes still wrapped it into a
QSharedPointer, which then deleted the assist interface in addition to
the unique_ptr.
Amends 0e4b0a26d3
Fixes: QTCREATORBUG-28742
Change-Id: If685dbb2c49b09d529d0dcb3677dc90b03a039f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The input is more unparsed-string-ish in nature, so FilePath is not
appropriate.
Change-Id: I85efb5813b8f5fbbc4127be1c936d5487637b75c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The hiding is not persistent, so on the next Qt Creator start all
annotations are visible again. This is meant to quickly get rid of
annotations if there are to many irrelevant of a specific kind.
Change-Id: I4862e56e0f5624f30aadda26efc9dea672ab1f57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... when destructing a qmljseditor. Just let the updater continue and
delete it once it finishes.
Fixes: QTCREATORBUG-28206
Change-Id: Icabe10f17b7bf326bb15e5ee622504c477d83acf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This way the base class can manage the lifetime of the interface object
and it doesn't need to be done in each implementation of perform.
Change-Id: Ie1ce742e31b688a337533ee6c57d376146e25ace
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Define the run type of the processor by its implementation instead of a
enum value of the provider. The execution of a processor inside the
assist now follows a unified procedure.
Change-Id: Ibe9fab324c6072e77702c2663946d7a9f562a085
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use the intelligent partial text replacement logic that is also used for
e.g. the Beautifier formatters.
Fixes: QTCREATORBUG-28349
Fixes: QTCREATORBUG-25218
Change-Id: I9ae4052df27c8aa2012106a8ef8f624ba5f3c30b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
this avoid use of the (still unintialized q->d) in settingsChanged in
the constructor
Change-Id: Idd756fc88df166124c34a6177a9d598604634057
Reviewed-by: David Schulz <david.schulz@qt.io>
Looks for qmlls (the qml language server of Qt) and if available
and set in the preferences uses it instead of the embedded code
model for the supported features.
Its usage is driven by two flags that can be set in the QtQuick > QML/JS
Editing preferences: "use qmlls" activates the use of qmlls if available;
"use latest qmlls" always uses the qmlls of the latest Qt, instead of
the one of the target (with the one used to compile QtCreator as
fallback).
To support disabling/enabling of qmlls as soon as one changes the
preferences the singleton QmllsSettingsManager can emit a signal
on changes.
It also keeps track of the latest qmlls binary known.
QmlJS::ModelmanagerInterface::ProjectInfo is also extended to keep track
of the qmlls binary.
QmlJSEditorDocument uses the ProjectInfo and QmllsSettingsManager to
decide if a LanguageClient::Client should be started for that
document.
The client uses the QmllsClient subclass to keep track of the path of
the qmlls clients and use the same qmlls process or all files that
use the same binary.
Currently qmlls <6.4.0 are not considered because they might have too
many issues.
The enabling/disabling of warnings and highlight is a bit cumbersome
because they are handled together in the semantic highlighter, but
must be handled separately depending on the qmlls capabilities.
The disabling is done at the latest moment stopping the visualization
of the embedded model warnings/highlights/suggestions.
The computation of the semantic info is not suppressed to support the
other features (find usages, semantic highlighting if active,...).
When qmlls supports more features a complete removal of the semantic
info construction could be evaluated.
Change-Id: I3487e1680841025cabba6b339fbfe820ef83f858
Reviewed-by: David Schulz <david.schulz@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
To avoid additional dependencies, let the QtSupport plugin register a
function for filtering help URLs, and add information about the
originating file path to the help items created by the context help
handlers. The filter hook then finds out the corresponding project,
active target, and corresponding Qt version, and filters the help URLs
accordingly.
With the default setting in "Kits > Qt Versions > Register
documentation", only the highest versioned documentation set within a
major Qt version is registered, so context help now shows the highest
versioned help from Qt 5 or Qt 6 depending on active target. If that is
changed to "All", context help now shows documentation from exactly the
version that is currently used by the project.
Fixes: QTCREATORBUG-10331
Change-Id: I7d87793737cc5ab7d228ee4bfe568d7e8343ee7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>