Sometimes it is handy to return a range so you can break in a for range
loop. So you can now write:
for (auto [key, value] :
statement.range<std::tuple<long long, std::string>>()) {
values.push_back(value);
if (value == Tuple{"foo", 23.3, 2})
break;
}
for (auto [key, value] :
statement.rangeWithTransaction<std::tuple<long long, std::string>>()) {
values.push_back(value);
if (value == Tuple{"foo", 23.3, 2})
break;
}
It will only step over the statement to the break. So you don't fetch
not used values anymore. The second version will add a transaction
around the range.
But be careful. The range is view to the statement. Holding it longer or
reusing it can lead to strange behavior because the state of the
statement is changing.
Change-Id: I90191f7da5a015c7d8077d5bc428655a2b53246c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Make the difference between components and component instances
clearer.
Task-number: QDS-3407
Change-Id: Ibb808696b49ccd465b3cb6706c8d76675fdd0b6e
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Missed to remove the not anymore used ResultTypeCount.
Change-Id: Ia150e945bd650cc1e3d19fcb9426621d93fa16c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... 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>
... in the 3D Node topic.
Task-number: QDS-3407
Change-Id: I7955faa90ce594adcfd0ab530fa4264a96667771
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
sccache does not support the "/Zi /FS" option for debug information
with MSVC. Optionally replace "/Zi" by "/Z7", which leaves debug
information in the object files and only collects it at link time.
See also qtbase 2354274f39934b94383923834479901106489def.
Change-Id: Id94c2116f3c4192556dbdf8fe82b12ce0a204273
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@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>
Returning a const reference is different from our usual coding style,
and can lead to crashes when assigning to a const reference, like
const QString &path = filePath.pathAppended("foo").toString();
Make it behave like our other API.
Change-Id: Iab1cf1a944be405227b135c12029f58869893911
Reviewed-by: hjk <hjk@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>
Also some miscellaneous fixes.
Task-number: QDS-3407
Change-Id: If47cdb0b7bc16f3fc624b96c2e0dabfde2d2f2db
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@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>
... in Concepts and Terms topic. Also added some links to Creating
Components.
Task-number: QDS-3407
Change-Id: Iea2314c40ec5edb906ca0e23b9d7dea48cf6c597
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Update the state of categories hide state property when removing a
module so that "Show All Hidden Categories" context menu option enable
state is updated after removing a module.
Fixes: QDS-4226
Change-Id: I7c963e92e6e94e28856a5e51f75ae618b3b684ec
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>
So we don't have to update the test each time
Creator changes the project templates.
Change-Id: I76f96f719895f2f8cadccaf9c91cc85d1735ce13
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add links to new topics and the tutorial video.
Task-number: QDS-3407
Change-Id: I03b5e3b7dff69de6cd6dbb6492615e9712000460
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
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>
Read and prepend the conan path from Qt SDK which is set in
QtCreator.ini.
Fixes: QTCREATORBUG-25553
Change-Id: I1404064ca253cb968d19bca253f1bb781209d0bd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This was removed in 6baf09bf91.
Even though sdktool doesn't need to write these old IDs anymore, it
still must support them for --language for a while, because older Qt
installer components still use the numerical values (and will not be
updated).
Task-number: QTBUG-92949
Change-Id: I7483e52e331fe676b60d7b401f8a6f6510fd1789
Reviewed-by: Christian Kandeler <christian.kandeler@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>
No need to pass a value which never differed from len(...)
Change-Id: Iea481abed0ebfa9acf05456bc2ff1f01c7bc0d1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>