... and make use of it in the clangd client.
We want the progress bar for background indexing to have a better title
than the plain (and non-translated) "indexing" that the clangd server
sends.
Change-Id: Ib75eac370e7c22f0c5bd477f4a4c423283b27e1f
Reviewed-by: David Schulz <david.schulz@qt.io>
According to MSDN: "You can mix binaries built by different versions of
the v140, v141, and v142 toolsets. However, you must link by using a
toolset at least as recent as the most recent binary in your app. Here's
an example: you can link an app compiled using any 2017 toolset (v141,
versions 15.0 through 15.9) to a static library compiled using, say,
Visual Studio 2019 version 16.2 (v142), if they're linked using a
version 16.2 or later toolset. You can link a version 16.2 library to a
version 16.4 app as long as you use a 16.4 or later toolset."
https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?
view=msvc-160
So don't try to assign an older msvc toolchain to a kit that contains a
Qt build with a newer version of msvc.
Fixes: QTCREATORBUG-25618
Change-Id: If58676da5f61add1eed7e786862ee475e180b7dc
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Jom is currently installed into the Qt Creator bin/ directory directly,
but it can be considered unsafe if we add that to the PATH. Look in a
subdirectory for it as well, as preparation for moving it there instead.
Task-number: QTCREATORBUG-25585
Change-Id: I85b379fa093c57639875872868c16b5cc964f4aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If the check state of a tree item changes due to closing
the project and there is no other project open we access
a nullptr.
Change-Id: Ib08031e19eaae0837d1dc0485a05756cd8d0c0dc
Reviewed-by: David Schulz <david.schulz@qt.io>
Not directly used in leaf plugins (iOS?) anymore.
Change-Id: I5fcf7e0d976e99b5d9eb8b0e6404651b35d5db43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Set category collapsed state only after checking the status of category
and not during it.
Fixes: QDS-4227
Change-Id: I4771a8641174ac2f0413b3ff2380dd8dbb77742f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
error: non-constant-expression cannot be narrowed from type 'qsizetype'
(aka 'long long') to 'int' in initializer list
Change-Id: I743f942fb0bef9f907b4facbb346264dfeaad778
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Just a hotfix. This parser is still much too eager, and a lot of unit
tests only pass because it wrongly matches things that should be caught
elsewhere.
Fixes: QTCREATORBUG-25617
Change-Id: I91161a103b41239c3aac9e119c21e152b0437a32
Reviewed-by: hjk <hjk@qt.io>
If the user actually links with a Qt installation, the note is not shown
again. But if the user installs a different Qt Creator that is not
linked, it should be shown again.
After the user presses "Do not show again", it really will never be
shown again.
Fixes: QTCREATORBUG-25502
Change-Id: Ic3b6f46c318e4b8aa6b189e712b01f2c3d4a2b1d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Makes sense for modularization purposes, and it will soon get additional
functionality.
Change-Id: Ie8163d352fc408b4167ee2ce6147aa1fb19528eb
Reviewed-by: David Schulz <david.schulz@qt.io>
State the ID and where it comes from
Change-Id: I8bdf9e38b2a1d3a00409cfa680f1079e5a048eba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If the user has enabled clangd (default is off), we start up one instance
per project when it is opened/changed (including build config switches),
and trigger background indexing.
So far, the index is used to provide results for locators and "Find
Usages".
Per-document functionality such as semantic highlighting and completion
is still provided by libclang.
Change-Id: I12532fca1b9c6278baab560e7238cba6189cde9f
Reviewed-by: David Schulz <david.schulz@qt.io>
Split out the snippet functionality into a new derived
overlay implementation.
Change-Id: I2d7fffabe16ce6348ed067eb52ff221420a23285
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Let's have a build step which allows running a command on a registered
Docker image, which is defined by the Kit's build device.
If the build device is the Local PC, run the command locally.
This specialized build step will most likely be removed after the
existing steps have been taught to run on the Kit's build device.
For now it is part of a POC that allows to experiment with non-local
build commands.
Task-number: QTCREATORBUG-22362
Change-Id: Ifda503ee346b67857a5b82c05cb38cf7f63698d0
Reviewed-by: hjk <hjk@qt.io>
Update subcomponentmanager only for the needed imports when:
- Adding the QtQuick3D import via the link in the 3D editor.
- Adding 3D asset using the assets importer.
Also few renamings to make things clearer.
Change-Id: I4eb55f64307498f3dbb400e947667dfe9e42ff8e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The shorter form is not declaring any class implicitly. The class have
to be declared before. So you avoid the mistake of declaring a new class
instead of make one friend.
Change-Id: Ia035e2f5967c24cdb053ac8b91aa61bbbd5ea20d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Only assign documents to a client if the client was started by a
setting. Programatically started clients should handle assigned
documents manually.
Change-Id: I192c4c011a48e0406f267d3cab3c860f740ddad7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... on new build/app start.
Fixes: QTCREATORBUG-25605
Change-Id: I3f478db4c63cf0100c42342deedab9db5ba12042
Reviewed-by: André Hartmann <aha_1980@gmx.de>
- "ISO C++20 considers use of overloaded operator!= to be ambiguous
despite there being a unique best viable function with non-reversed
arguments"
- std::erase(std::vector, ...) takes preference over Utils::erase if not
fully qualified
Fixes: QTCREATORBUG-25598
Change-Id: Ib9d0574ff46d2ab415437c0c044c51e8c9f37caa
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Do not use MS extensions on a cross platform build.
Amends 5203c478a5.
Change-Id: Ia4dc014ccb21ffed60dc6a6a54dc63340242349c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Now there is iter_swap, rotate and reverse in the node list property. With
that methods we can implement slide too.
Task-number: QDS-4159
Change-Id: Ie7f80f64fd26e517ca696158a878262928dc82c4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
For swap we cannot provide all the arguments and they are only used in the
rewriter. So we use now a simplified notifier for all views except the
rewriter view. After the introduction of the new rewriter we can remove
the old notifier.
Task-number: QDS-4159
Change-Id: Idc91a618ea40da0bda9856888d115a84016597d5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Enables re-using existing functionality.
The "Make mutable" functionality is still oddly placed. I doubt people
find and use it actively.
Change-Id: Ic6aae17e3a7df093f0f5f234f1e6e1afc196a087
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The possible issue with the current implementation is that
in theory many possible GC() are being executed in parallel.
In this case just one of them is really working and others
are waiting on the locked mutex (first line of the GC()
method). In such a scenario when a call
to StringTablePrivate::insert() is being executed from one
more thread, it may happen that the working GC() thread
is stopped (since m_stopGCRequested.fetchAndStoreAcquire(true)
was executed from insert()) and later the mutex lock may be
granted to the other awaiting GC() thread instead to the
thread which executes insert() method. In this unlikely
scenario the GC() thread won't be canceled and the lock
inside the insert() method may be locked for considerable
amount of time, what is not desired.
The goal of this patch is to resolve the possible issue above
and to simplify the code by eliminating the m_stopGCRequested
variable and make use of QFuture.cancel() / QFuture.isCanceled()
API instead. In addition, since we control now only one
possible thread that executes the GC(), there is no need for
future synchonizer anymore.
GC() function can't be run in parallel in different threads,
as the whole body of GC() is protected with mutex. This means
that whenever a new scheduled call to GC() is being executed,
this new call waits on the mentioned mutex at the beginning of GC().
So, instead of protecting the whole body of GC() with a mutex,
we ensure that the old call to GC() is already finished (if not,
we also cancel the old call) while preparing an asynchronous
call to start a new GC() from inside startGC() method.
Whenever we are calling the insert() method, we still protect the access
to m_strings with a mutex (as insert() is designed to be called
from different threads in parallel). Just after locking the mutex
we are canceling any possible ongoing call to GC(). After canceling
the GC() call, we are sure that no new call to GC() will be executed
until we unlock the mutex, so it's safe now to modify the m_string
data.
Change-Id: If72d0a6f98fb414c6c63117bc9baa667d17e1ffe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>