Commit Graph

72385 Commits

Author SHA1 Message Date
hjk
04f6f6bbc0 CppCheck: Use more FilePath
Change-Id: I45da67df4b76032303b57f567d73ae01bf9f2e91
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-05 11:25:40 +00:00
hjk
cc8d65aa25 Debugger: Use FilePath in CdbSymbolPathsListEditor
Change-Id: I8935284cf3712903660f61cd06083d4da6f1c7c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-05 09:45:50 +00:00
Christian Stenger
bdb7aed82e QmlDesigner: Fix compile
Amends e0611c0cfa.

Change-Id: I5bea935b8f6cd9e86c028d066a7b8775b10c06c7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-05 09:43:21 +00:00
Christian Kandeler
2641c2514e CppEditor: Add timing information for semantic highlighting
Change-Id: If53fd8c8895916a613629628b4555983c0d76ce6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-05 09:13:39 +00:00
Christian Kandeler
221eb6def0 ClangCodeModel: Add infrastructure for collecting timing data
... and use it for highlighting with clangd.

Change-Id: Ib082c0b80593a2115f9cc19ee8279b17187e9309
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-05 09:12:54 +00:00
Miikka Heikkinen
2ab6f800b3 QmlDesigner: Fix issues with Components and Repeaters
- Fixed state preview rendering by deparenting nodes under
  component wraps.
- Ensure state preview image is always clipped to root item.
  The state preview bounding box broke when Repeater was direct
  child of root and had delegate with rotation.
- Allow dragging items under Repeater to create implicit component.
- Allow dragging Components under Repeater.
- Do not ask for target property when Component is dragged under
  any node.
- Update nodeSource properly when reparenting implicit component
  or removing last child of a Component item.
- Fixed scene update when last child of a repeater is deleted/moved.

Fixes: QDS-5197
Change-Id: Iaaf1745e25db3522ffc1dba7fd1b051da29f5aec
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-05 09:12:12 +00:00
Miikka Heikkinen
4036c20f63 QmlDesigner: Add Loader and Repeater to component library
Also fixes some issues with Repeater usage.

Fixes: QDS-5149
Change-Id: I259dcb73be634150dd0c5e602165b63112ec958c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-10-05 09:11:59 +00:00
Christian Kandeler
545da2f6a6 ClangCodeModel: Improve collection of highlighting info from AST
... with clangd.
- Turn function with lots of lambdas into a class.
- Traverse the AST without repeatedly modifying a list in a tight loop.

Change-Id: I46668a4df672c00cbd7b1a562ae94a6db4cbd2fc
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-05 09:11:45 +00:00
Miikka Heikkinen
e0611c0cfa QmlDesigner: Add support for Component type
Component type is added to Component Library and can be dragged to
the scene. Items under the component are not shown in the scene.

Fixes: QDS-5093
Change-Id: I0c80647e73124866a8b772022a761ca6cbb545a1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-05 09:10:16 +00:00
Jarek Kobus
9e5744b1f3 Remove unneeded include of QAbstractProxyModel
QSortFilterProxyModel, which we already include and use here,
is derived from QAbstractProxyModel, which we don't use here.

Change-Id: I896f27d25cc75e73a7f97b82657fad648ef0ab99
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-05 09:06:45 +00:00
hjk
93a07e1c6e Mcu: Proliferate FilePath use in McuSupport
Change-Id: I0ae8bf1454d1715f251d88065b52e3bb6a242402
Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-05 08:47:00 +00:00
hjk
8d68e05d05 Valgrind: Use FilePath for some suppression files
Change-Id: I48490a77d569d752ada1883554cf307148f2c0cb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-05 08:46:11 +00:00
hjk
2bb6bb633f Valgrind: Use FilePath in HeobDialog
Change-Id: I1efa5442791f7655c4c887ea639a7a928d769a28
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Hannes Domani <ssbssa@yahoo.de>
2021-10-05 08:44:50 +00:00
Thomas Hartmann
bc7f52c475 QmlDesigner: Remove x,y when setting center anchors
Change-Id: Id6cde717f8a6fe66ac78c65e2e1ac387ec6d3c1d
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-05 08:30:28 +00:00
Mahmoud Badri
175acdf29c QmlDesigner: Add externally dropped assets to form editor
When dropping external assets to the form editor, add image assets
to the form editor after importing the assets.

Change-Id: Ia97f4a2ad2af1c57608516db1e1728642f4c3ea2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-05 07:57:33 +00:00
Eike Ziller
5b1f14f4aa Merge remote-tracking branch 'origin/6.0'
Change-Id: Ic6f91a71dd7d540eb9b6c27ba5ef9931583566b5
2021-10-05 09:52:55 +02:00
Christian Stenger
530a4cc17d ProParser: Fix build
Amends 2f8b541fe5.

Change-Id: I596d846e2d143e71f217e01b5c820ceb7a3ccada
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-05 07:31:56 +00:00
Christian Kandeler
111ca0964e ClangCodeModel: Adapt test to upstream bugfix
See https://reviews.llvm.org/D110825.

Change-Id: I829a20a08cd0afd8d225e5c5e6d0aa2cf3b365d6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-05 07:26:09 +00:00
Eike Ziller
31bcc0ca2c Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: I311d1128c6a299c1db8717a12b40393055a889bb
2021-10-05 09:13:56 +02:00
Joerg Bornemann
068c4e9b7b CMake: Work around Qt6::ATSPI2_nolink issue
This works around QTBUG-97023.

When building the Qt Creator super repo against the installer-provided Qt 6.2.0 on Linux,
Qt6Gui creates an imported library target named Qt6::ATSPI2_nolink.
This one must also be promoted to global scope.
Otherwise, subsequent find_package(Qt6 COMPONENTS Gui) calls fail with

  Some (but not all) targets in this export set were already defined.
  Targets Defined: Qt6::Gui;Qt6::GuiPrivate
  Targets not yet defined: Qt6::ATSPI2_nolink

Add Qt6::ATSPI2_nolink to the components that are promoted and aliased.

Change-Id: I39c46e8f1c831e2fad2aa4e928b785da08a0407c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-05 05:50:13 +00:00
Cristian Adam
60fca0596a ClangTools: Add header files to the list of files to be analyzed
Now that the CMakeProjectManager is reporting the header files as
source files, it makes sense to analyze the headers as source files.

Note that the header type needs to change to source type since the
"cxx-header" argument that will be send if the Kind is CxxHeader is
handled by the compiler as an argument to produce a precompiled
header, which is not what we want.

Fixes: QTCREATORBUG-21452
Fixes: QTCREATORBUG-25644
Fixes: QTCREATORBUG-25782
Change-Id: Icd674962ff8312b8fbfa46491938eb721edd761d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-04 16:43:53 +00:00
Christian Kandeler
2fcd764d56 ClangCodeModel: Add clangd-based document locator filter
Change-Id: I2811be80e740cacf57eccd19e47560af746ad0c1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-04 15:40:49 +00:00
Eike Ziller
ab16f2984b Work around QRegularExpression crashes on macOS with Rosetta
Looks like the regular expression jitting is not reentrant when running
under Rosetta for some reason. It was crashing when loading bigger
subdir .pro files which regular expressions in it, like qtcreator.pro.

Disable JIT if we run under Rosetta.

Task-number: QTBUG-97085
Change-Id: Icbab1ca8f62afa9cc86045983e84087a7694b5ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-10-04 13:39:14 +00:00
David Schulz
a38a703368 LanguageClient: Fix current document filter
The DocumentSymbol is an hierarchical symbol format so we also need to
take childrens into account when using the current document locator
filter.

Change-Id: I57f11e8f1781893613719102f87e5a2b2d0af941
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-04 12:40:07 +00:00
Eike Ziller
b07e29eb79 COIN: Build with Qt 6.2.0 final
Change-Id: I91c7697b1fd7d8fa1a19f24bfc53efa23c415c65
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-04 12:34:27 +00:00
Assam Boudjelthia
2de32e3aa8 Android: make sure emulator device actions are emulator specific
Actions like start, erase, and avd arguments are specific to emulator
type devices, so make sure such actions are only in that case.

Task-number: QTCREATORBUG-23991
Change-Id: I9d5ffbd733c31540ab4e3d2a617cad54e70f8f8e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-04 12:19:22 +00:00
Assam Boudjelthia
480bdbd3af Add search field for Android Sdk Manager
The list of packages from the sdk manager can be too much to look at and
search manually, thus a search field is very convenient to have here.

The search is very simple, include any package that contains the search
word into the result.

Change-Id: Id222841162739d49562ad11bb0f3152041614ebc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-04 12:11:16 +00:00
Jarek Kobus
2f8b541fe5 Replace QHash with std::unordered_map inside ProFileCache
It looks like it happens that while holding a reference
to ProFileCache::parsed_files elements we are modifying
this container by adding / removing items.
In general it's undefined behavior.

In addition some other fixes have been made. Comments
inside the code.

Task-number: QTCREATORBUG-26351
Change-Id: I7f98c813ff6b7bd612757e7a14a5e6835affd21e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-04 11:51:26 +00:00
hjk
3a02e03729 Utils: Add an Environment::searchInDirectories
And use it in the local branch for FilePath::searchInDirectory which
so far erroneously also looked into the system environment's path.

Change-Id: I60316831b74a55dee84fbf4b54c0eecc49dd8dde
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-04 11:24:26 +00:00
Christian Stenger
95259ae79d CMakePM: Be more graceful regarding cmake tools
Otherwise we may easily lose registered tools if the device
is currently not available.
This happens e.g. if the docker daemon is not running.

Change-Id: I10156d749bf33d7d789c3fad78bf3acdf1f6fd74
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-04 10:59:21 +00:00
Cristian Adam
6907d9c6b4 GitHub Actions: Update LLVM/Clang to version 13.0.0
Change-Id: I6f1b008da3ee511ab5494d7e8b0556036b14e64c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-04 10:28:56 +00:00
Knud Dollereder
ed465a81f5 Do not reset the render-image size to (0,0) when reaching the size limit
The size of the image to be rendered for the FormEditor is computed from
the bounding box enclosing the items within the scene.
There is a size limit, when reached the size was reset to (0,0) leading
to an empty FormEditor image. This is now fixed by returning the
bounding box of the root item in case this limit is reached.

Change-Id: I58366610da2e90c34aea6117e225765ff4b3288b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-04 09:26:54 +00:00
Alessandro Portale
2d85e6c62e ProjectExplorer: One more usage of fromUserInfo
The recent projects are handled as QString, and hit FilePath in
ProjectExplorerPluginPrivate::openRecentProject(), the first time.

This quick fix is using fromUserInfo. A proper solution will be to
change the API and data structures around recent projects to use
FileApi.

Change-Id: I668cd11020833659e9b7af9e1f8314fb1f404293
Reviewed-by: hjk <hjk@qt.io>
2021-10-04 08:00:54 +00:00
Eike Ziller
a200402a2f Merge remote-tracking branch 'origin/6.0'
Change-Id: If6c5ca7bc4b404959ca3250777d6fb818297798d
2021-10-04 09:38:28 +02:00
hjk
9def0165ac Replace a few PathChooser::setPath by setFilePath
Change-Id: I4120aa2fe9584334e7c19ca15a647027e496008e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-04 06:03:58 +00:00
hjk
6842745a68 Debugger: Avoid some repeated file accesses on startup
Change-Id: Id0d8458a872519156b859c40762ebc7837ef434b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-04 06:03:35 +00:00
hjk
4d3374d23a Utils: Drop .exists() check in some FilePath functions
... when it is implicit by other checks in the same expression.

Change-Id: I10c6bd92e4890bdf611f3a222dc6c2d271e98f37
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-04 06:03:26 +00:00
hjk
2373c69e47 QmakeProjectManager: Proliferate FilePath use
Change-Id: Ife92980a179a2872e4dd5083b60bbd0561be55bc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-10-04 06:02:32 +00:00
Mahmoud Badri
9e38e710d3 QmlDesigner: Allow dropping external assets
External assets can be dropped to Form Editor, 3D Editor, Text Editor, and Navigator.

Fixes: QDS-5045
Change-Id: I2de06ab118350a8d0809b286c16d06e7edea92e4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-01 15:02:29 +00:00
Thomas Hartmann
a07112258b QmlDesigner: Disable Timeview and CurveEditorView when widget is invisble
Task-number: QDS-5159
Change-Id: Ibae0b9742d4aaac6a1def1c84342a031baf75256
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-01 14:03:45 +00:00
Christian Kandeler
d52e7b9398 LanguageClient: Make sure to run callback in all code paths
... when receiving a reply for textDocument/definition.

Change-Id: I08f3a22f7c39a33b7b84539125a76d0c0d625692
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-01 11:40:38 +00:00
Christian Kandeler
ec7c60cd67 ClangCodeModel: Do not report non-type template parameters as types
... with clangd.

Change-Id: I9edad375eacc6c33a833c88da64dc29f79334157
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-01 11:40:08 +00:00
Piotr Mikolajczyk
4b7536fa14 Update docs on Qml preview on Android
Now just enabled the documentation generation of
the section referring to Android

Change-Id: I56861685b933ba3ad4e9457a78c68075f2de848f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2021-10-01 10:31:50 +00:00
Cristian Adam
0665a9151c CMakePM: Scan files only on CMake configuration failure
The file tree scanner will only be started on CMake configuration
failure to generate the <File System> fall back project node.

Change-Id: I873ef1189fd43dc9bffa03aeafabb00bb3b8b6af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-01 10:26:37 +00:00
Cristian Adam
b8609be931 CMake: Fix clang build type mismatch detection with Clang 13.0
Clang 13.0 has made CommonOptionsParser's constructor protected
and the test fails to build, and clang is considered as being
not found.

Change-Id: I7b28b5104bcb6541f3ee9c4bf56e9bb1898d58af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-01 08:15:42 +00:00
Johanna Vanhatapio
5d843fc4f7 Doc: Update info about the light components
Task-number: QDS-4888
Change-Id: I2a25ab5c6e8c8ce985ad73d3f52a638857d0e127
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit c75df591ed)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-01 07:40:03 +00:00
Johanna Vanhatapio
c75df591ed Doc: Update info about the light components
Task-number: QDS-4888
Change-Id: I2a25ab5c6e8c8ce985ad73d3f52a638857d0e127
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-10-01 06:45:18 +00:00
Thomas Hartmann
c026a100a4 QmlDesigner: Do not mark file as changed for "formeditorColor"
Task-number: QDS-4044
Change-Id: I52a3707edeee8c2204fb67d8101d2a0e99af06ae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
qds/v2.2.0
2021-09-30 15:59:58 +00:00
David Schulz
442bf39939 Utils: swap anchor and position of Utils::Text::selectAt
selecting now from column to column+length

Change-Id: I34fdf2d3db7fb15687b973094b2ca063b5c6587c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-30 14:09:37 +00:00
hjk
fcfdfdf823 ProjectExplorer: Settingspage code cosmetics
FilePath, namespaces, indentation.

Change-Id: I77a3595bad01c1984bf23cd12ba06d90d58a71ea
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-30 13:28:12 +00:00