Commit Graph

67105 Commits

Author SHA1 Message Date
Vikas Pachdha
8e78b9a379 Docs: Update qml export docs
Document generating per component export

Task-number: QDS-3357
Change-Id: Ibdb34622318cf94823b5a3813f16a35f3dcca29c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-07 21:42:45 +00:00
Tim Jenssen
e852173484 qmljs: Reduce allocations in ComponentVersion
Change-Id: I37debafc09a2ad03dfb869686df5935fb22a94be
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-01-07 16:14:40 +00:00
Marco Bubke
4580a3b222 QmlDesigner: Reduce allocations
We use std::to_chars instead of QByteArray::number. In the normal case
we only allocate once but if the numbers are unusual long we
would allocate two or three times. But this is very very unlikely.

Change-Id: Ieb734d63962d4cc5a1c1da73f4ccb4acd7db2577
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-07 15:30:32 +00:00
The Qt Project
13fae30e88 Merge "Merge remote-tracking branch 'origin/4.14'" 2021-01-07 15:30:19 +00:00
Jarek Kobus
9462102245 Add cache to hierarchy visitor, fix following typedefs and usings
In case we already visited the same base class symbol in the same
scope we already know the fully qualified name for base class,
so no need to search it again. We store all visited symbols
with their scopes in cache. This speeds up building type hierarchy,
especially for large trees, like for creator project and showing
type hierarchy for QObject: build time before this change was
about 300 sec, now it's about 130 sec.

Sometimes the old code didn't follow properly base classes
that were typedefs to other classes (like in creator project:
Debugger::Internal::RegisterHandler is derived from RegisterModel,
and RegisterModel is a typedef to Utils::TreeModel). This caused
that some subclasses were omitted form resulting type hierarchy.
E.g. type hierarchy in creator project for QObject lacked
about 8 subclasses.

Change-Id: I03c5aef65b7d7cb0ed279d3558aebc8a55e856b4
Reviewed-by: hjk <hjk@qt.io>
2021-01-07 14:58:19 +00:00
Jarek Kobus
167651b537 Properly annotate templates with full scope in type hierarchy
Fix activation of template classes.

Change-Id: I811f505c1c01fa95d74847cb91dd1cf37476534b
Reviewed-by: hjk <hjk@qt.io>
2021-01-07 14:58:14 +00:00
Jarek Kobus
936b63b4fc Highlight old item after activating new class in type hierarchy
Highlight the old visible class after double click on a new
class in type hierarchy editor. Don't do that when
opening type hierarchy from cpp editor.

Change-Id: Ie9a1131cba9b5a35ab826909b994555188aaceb7
Reviewed-by: hjk <hjk@qt.io>
2021-01-07 14:58:06 +00:00
Bernhard Beschow
f82692cc7f AutoTest: Make code more symmetric
... by assuming that active.keys() is a subset of
TestFrameworkManager::registeredFrameworks() which is used in the case
above. Also, TestFrameworkManager::registeredFrameworks() is already
sorted, as can be seen from the above case, too.

Change-Id: If82c8c998716fa56d6257d3ee0ec09c12d458bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-07 14:54:34 +00:00
Christian Kandeler
6d2edf0613 ClangCodeModel: Fix header file completion weirdness
... when completing right after a dot.
It's unclear why the code uses half-baked heuristics all over the place
instead of simply employing the lexer (which is also used at some point)
for everything. For now, use it to determine the correct starting
location of string literals.

Fixes: QTCREATORBUG-25154
Change-Id: I14c4d71c4a9bc3e2407688ed9c908d1c99155c76
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 14:36:28 +00:00
Tim Jenssen
b801a9339d Merge remote-tracking branch 'origin/4.14'
Change-Id: I70504e096be620434f38cd990c593950da8b24ba
2021-01-07 14:23:46 +00:00
Leena Miettinen
19970878b8 Doc: Update info about Clang diagnostics
Task-number: QTCREATORBUG-25195
Change-Id: Idb8dee94fae29cb0f347decf50e686a3485d9139
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-07 14:16:56 +00:00
Vikas Pachdha
f1268a9f86 AssetExport: Enable generating multiple metadata files
Task-number: QDS-3357
Change-Id: Icc591d61d149ff92b6c415434e2a7574103802ae
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-07 13:31:10 +00:00
Vikas Pachdha
4618018c4b AssetExport: Improve json generating class names
Change-Id: Id9abcf1122ee4c2c53f886438958e38cc84a835d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-07 13:14:39 +00:00
Eike Ziller
c81baf1a9c cmake build: Use GNUInstallDirs for installation paths on Linux
Allows e.g. distributions to adapt to system layout.

Fixes: QTCREATORBUG-25142
Change-Id: Ia6d759514fef5a154334bc3d7221ea4b970122f2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-07 12:17:20 +00:00
hjk
da147880e8 Debugger: Rename 'AttachExternal' to 'AttachToLocalProcess'
And AttachCrashedExternal to AttachToCrashedProcess
And AttachCore to AttachToCore.

Clearer.

Change-Id: I47c2eca5cbdbbc0eb38b9f62b2504c96558ff112
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 12:11:42 +00:00
hjk
111cc934fd Debugger: Mark currently hit breakpoint in breakpoint view
Fixes: QTCREATORBUG-6999
Change-Id: I2b080de0096d1e2bc5b348666adcf4797589fe15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-07 12:09:40 +00:00
Knud Dollereder
dd8b73cfd2 Rename ActionInterfaces Target to TargetView
Change-Id: I55692f9d773a1466fec5285fdc53149a3a1359f1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-07 11:36:31 +00:00
Christian Stenger
e7a65dd3c9 QmlJSEditor: Ensure extra selections are ordered
The code model may provide selections that are not ordered
as they appear inside the document due to the declarative
nature of QML.
Ordering before using them avoids couple of warnings stating
"overlay selections not in order".

Change-Id: Ie912e94aa01ffde52b01dca7a9bde24ae02e8b33
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-01-07 11:07:45 +00:00
Christian Stenger
41982acec3 ClangFormat: Fix missing return value warning
Amends f7d8f8b704.

Change-Id: I3e509769a8ef206f295b3b5d8db4448375e62cbb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-07 10:08:50 +00:00
Eike Ziller
b82d51ad69 cmake build: Make it easier to build against system litehtml
By first checking for it in the system, then if the internal copy
is checked out.

Fixes: QTCREATORBUG-25144
Change-Id: I839591cc8e311948a21685384de574e7330a6ee5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-07 09:45:18 +00:00
Orgad Shaneh
bb070d861b Debugger: Minor cleanup
Change-Id: Idfef663ec6701f7ed8904bd5c3dbfa87e0baaf8b
Reviewed-by: hjk <hjk@qt.io>
2021-01-07 09:14:54 +00:00
Christian Stenger
a59e04b848 AutoTest: Provide basic ctest integration
This allows to have ctest based tests listed inside the test
integration and to run them.

Task-number: QTCREATORBUG-23332
Change-Id: I1cb855697d7bb4afcd7c887506abdea16c252cb0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 08:25:03 +00:00
Christian Stenger
f70e7e6c99 CppTools: Fix compile with Qt5.14 on Linux / macOS
Amends 1a09f816a3.

Change-Id: I76d7eb184504082ad5916bf3b54549e5b2872aef
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 06:19:23 +00:00
David Schulz
be3677c02e ClangTools: Avoid assert when no tool executable is configured
The assert is in ClangToolRunner::run.

Change-Id: I195db04631548e6b7ae9d5360827933889433b9d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-07 05:31:55 +00:00
Bernhard Beschow
43706c0b65 AutoTest: Turn global variable into attribute
Change-Id: Id45bafa61f03e8225d5f4224611e2f6db84a16b1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 22:44:19 +00:00
Cristian Adam
d3595110f1 CMakeProjectManager: Fix importing Qt6 projects
The code that detected the qmake path for the project stopped
working with Qt 6.0.

The new code will run a small CMake project that will output
the path of qmake from the CMake world, and not something that
Qt Creator does from outside.

Fixes: QTCREATORBUG-25100
Change-Id: I9071648c2e60eb89d0dc8f08aed793167b42a365
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 17:10:13 +00:00
Tim Jenssen
e809f665e4 qmljs: add ImportsBenchmarker
To see the results use
QT_LOGGING_RULES=qtc.qmljs.imports.benchmark.*=true

Change-Id: I07fe7b71d893423f3dfe5f9c0f1410bd29312943
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 17:04:29 +00:00
Ivan Komissarov
0f4f67bc4e Update Qbs submodule to the top of 1.18 branch
Change-Id: I80eef69af09c222a92b55bd1524c3f82003829a8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-06 16:24:43 +00:00
Henning Gruendl
bebd70573e QmlDesigner: Add signal list dialog
* Add signal list dialog, delegate and view
* Add context menu entry on items which have a trigger signal
* Add specific model node operations
* Add qml Connections util class
* Add utility functions to signal handler property
* Fix property processing in node meta info
* Fix source code in connection editor and navigator

Task-number: QDS-3138
Change-Id: I362ceef230efdb14f2050995b1693937e5e73c41
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 16:09:34 +00:00
Tim Jenssen
306cadc643 qmljs: fix matchImport method
This is a guess fix without understanding what the
algorithm should do.

Change-Id: I06e258045ab966fd016295c1d8830bc6bdc83dca
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-01-06 15:36:09 +00:00
Tim Jenssen
8f79503ed2 qmljs: avoid quadratic explosion
Change-Id: Icb184fd5c54a5398ed91b926841f7945dc8a81ec
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 15:13:06 +00:00
Knud Dollereder
7c1e210d2c Allow designeractions to target specific views
This is needed for the "connect signal to event dialog" which resides in
a different plugin but needs to be opened from the connection editor.

Change-Id: I9e200791831fa46d65e5f833e14a0d893fc29432
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 14:55:49 +00:00
Marco Bubke
b11d8aa92a Sqlite: Update Sqlite from 3.31.1 to 3.34 and adapt carray
You can now pass everything you can convert to a span directly and bind it
with a carray instead of using the pointer interface. This is working for
int, long long, double and null terminated C strings.

Change-Id: I274c218e2dec0f11e68576545bb78601f85462bd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 14:41:01 +00:00
Eike Ziller
9b4e2aa71d cmake build: Avoid other LLVM libraries interfering with ClangFormat plugin
Make the static LLVM in ClangFormat really internal to the ClangFormat
plugin on Linux by not exporting symbols from it.

This was missed during the conversion of the qmake project to CMake.

Fixes: QTCREATORBUG-24998
Change-Id: If483f3c45d5cf7f63e7b8dde58efab6371414bdd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-06 14:15:48 +00:00
Leena Miettinen
dd75e97cb8 Doc: Add docs for Studio Logic Helper types
Task-number: QDS-3248
Change-Id: I348d82be4a9a5574046cd590b07e711eb862d2ec
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 14:02:55 +00:00
hjk
5d5a4ffbf8 ProjectExplorer: Provide a ToolChain::isValid() base implementation
It checks for an executable compilerCommand(). This was used in Gcc,
Clang and Nim before. MSVC still overrides with a different test.

The formerly unconditional 'return true' for Keil/IAR/Sdcc uses that
check now, too.

Change-Id: I433a5ac6784277dc77129b2671c28af6913327a7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-06 13:45:41 +00:00
Cristian Adam
09e2d6306e CMake: Use copy_if_different for python dependency files
Using "copy" would always copy the files on build, which is
suboptimal.

Change-Id: I8c80732124a6642acae03220f3d43074cece4526
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-06 13:37:20 +00:00
Christian Kandeler
1a09f816a3 ClangTools: Support clang-tidy check options
Fixes: QTCREATORBUG-24977
Change-Id: I33ea247ba98788245ae1264262f60d084b73778c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-01-06 12:39:41 +00:00
hjk
13c9b42a21 Debugger: Move initial GDB breakpoint settings after target setup
While GDB can handle breakpoints set before specifying an executable
fine, it stresses the machinery unnecessarily and fails in corner cases
("wrong" dynamic loader etc). We can avoid most of that by moving the
breakpoint setting to a later point in the process.

Change-Id: I0450a0e43a81c80bfdfefb7b67f6799042e0ec26
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 12:37:25 +00:00
David Schulz
bb892e6427 CdbExt: correctly escape python messages
Messages from python that contain a path like deprecation warnings
contain backslashes. These unescaped backslashes result in parse errors
on the creator side:
"MI Parse Error, unrecognized backslash escape"

Change-Id: Ic6eb6e1d95b18a653767a5b64030d755f6e8970a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 11:52:00 +00:00
Eike Ziller
03cc67abd1 cmake build: Fix building external plugins with Qt6
When finding a Qt component, make sure to explicitly mention the
implicit dependencies too.

This is a workaround for a defect in FindQt5.cmake, which only creates
alias targets and sets the IMPORTED_GLOBAL property on components that
are explicitly listed in the find_package/find_dependency call.

Change-Id: I98c4090ece1fa5704c3a7abeb0e8e27475a30757
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-06 11:19:40 +00:00
hjk
8753889c63 Debugger: Use handleInferiorPrepared also for AttachToRemoteProcess
Same pattern as the other scenarios.

Change-Id: I065783b9ced3ad31a1918b48b44116071bb98d75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 11:09:48 +00:00
Christian Kandeler
f7d8f8b704 ClangFormat: Do not refuse to build against unpatched clang
The plugin builds just fine and should be mostly (fully?) functional with
upstream clang, so it seems excessive to force-disable it entirely for
everybody not using our custom patch.

Change-Id: Id6a179c20325290a8205218c9514a16c1adc9076
Reviewed-by: hjk <hjk@qt.io>
2021-01-06 11:00:02 +00:00
Eike Ziller
6263a58ef3 Devices: Do not pop up general messages pane
That should only happen on direct user interaction.
Also use new message manager API.

Task-number: QTCREATORBUG-24430
Change-Id: I87297b2ec7191b88210d3a2037afe27b8a3f40e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-06 10:52:08 +00:00
Kama Wójcik
a04f5ce3ea Refactor label drawing
Change-Id: Id95721b13454f0062a144263b1c518402a556e5f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 10:23:12 +00:00
hjk
c7e57ced3a Debugger: Simplify gdb startup
The reason for the special callback setup is lost in history.
A possibility is that the extra roundtrip was needed for synchronization
with earlier gdb versions and/or start up sequences. It seems to
works fine without nowadays.

Change-Id: I28c95aec2f065e9c6f0730f1ffbc3db1a3d819da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-06 10:22:28 +00:00
Kai Köhne
8ba1aa4025 Embed target language in hu translation file
Fixes lupdate warning

  qtcreator_hu.ts won't be updated: it contains translation but the target language is not recognized

Change-Id: I4b14b1986ca7fcb009e6c929583aaeed37613a11
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-06 09:31:12 +00:00
hjk
824c30438b Project: Change File System view activation shortcut
From Alt+Y to Alt+Y,Alt+F. "Toplevel shortcut namespace" is a rare
resource.

Fixes: QTCREATORBUG-25124
Change-Id: I6268760f45e34f973b3b38b19d2577c0c655b000
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 09:22:37 +00:00
hjk
a2d1ff94b4 Amend "ProjectExplorer: Introduce and use a new MultiSelectionAspect"
This partially reverts commit 34798b3efd,
which breaks binary compatibility.

Change-Id: I17d55760fac599bfba1f5a9726d81898e6979926
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 09:22:13 +00:00
hjk
9f7af33404 Debugger: Clarify the the state of dumper use outside Creator
Task-number: QTCREATORBUG-25199
Change-Id: Ib993180a21b385c340f990298d0e9c521e18b767
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-06 08:02:09 +00:00