Commit Graph

70590 Commits

Author SHA1 Message Date
Assam Boudjelthia
e860871d2a Move AVD Manager from Android Settings to Device Settings
Move AVD management and creation to Qt Creator's DeviceManager
facilities. This allows AVDs to be created from the Devices settings
page and their details and control/action buttons for starting/stopping,
etc. are added there as well. This makes the process similar to other
device types that Qt Creator supports, to get a similar experience.

Task-number: QTCREATORBUG-23991
Change-Id: I16c52b3cc73035e0ee12fd54ae9dad4595c8cda5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-27 19:09:05 +00:00
Christian Kandeler
b35630c03d ClangCodeModel: Highlight "override" and "final" with clangd
Change-Id: If30de546ce360ab9bc3cfa2780f61d6a78e4191d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 15:03:50 +00:00
hjk
0aa3cc45b5 Core: Use FilePath for ExternalTool working directory
Change-Id: Ifd295c3bd07b79f146b84fc27c117f42ba9b793f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 14:21:40 +00:00
hjk
3f7f867da5 Android: JavaLanguageServer code cosmetics
Namepaces, unused function.

Change-Id: I4f51e163fdb5034c9856195b1929466f6f8b8ddf
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-27 14:12:07 +00:00
hjk
5c7b4d66c5 Android: Use FilePath in JavaLanguageServer
Change-Id: Ifaaf95c7463db634a08072e5c988bfc75237f8eb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-27 14:11:58 +00:00
hjk
cef21f46e8 AutoTools: Remove unused AutoToolsOpenProjectWizard
Change-Id: I76642cf71f7af4b827e7ad10a75f29e589f33388
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-27 13:07:47 +00:00
Marco Bubke
9e29b602d4 QmlDesigner: Use ModuleId for Type instead of Module
We already know the module id because it's the source id of the module.

Change-Id: Ice241d38c12c7ca79a525464c53b7d552095a0fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:25 +00:00
Marco Bubke
03687c1d02 QmlDesigner: Add minimal updates
Exported type names are synchronized so that old type names are removed.

Task-number: QDS-5130
Task-number: QDS-5126
Change-Id: I6e6482170c8197f37f60a57bdfb7f1b450001b4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:21 +00:00
Marco Bubke
b2a300dd60 QmlDesigner: Refactor ProjectStorageUpdater tests
Change-Id: I0174153a470ce3009945df9cd2a822150f2f19f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:18 +00:00
Orgad Shaneh
6564325081 Git: Add "Show HEAD" link in amend commit editor
Fixes: QTCREATORBUG-25004
Change-Id: Idac181c8821da41a21d86cb1760691d51158daee
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-09-27 12:32:41 +00:00
Cristian Adam
d341ab6371 CMakePM: Remove <Headers> virtual project node
CMake projects need to add the headers as source files in order to get
exported from the CMake file-api json export.

Having header files that are not part of the project displayed in the
<Headers> node is error prone and confusing.

This also means that you won't get bogus files when doing git commit
for example.

Fixes: QTCREATORBUG-18206
Fixes: QTCREATORBUG-24609
Fixes: QTCREATORBUG-25407
Change-Id: I89ac4f8a80f452119f8a991b9e4ef14efb7a86b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 12:25:53 +00:00
hjk
95907b0f7d Utils: Allow full file paths with directory parts
... when creating a new empty file.

This simplifies file creation with file paths cut&paste from external
applications as it removes the need to split it into a directory part
and the file name.

Change-Id: I3f81db89d5ae7db4117c29a4f947cdf92dc4d50c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 11:16:20 +00:00
Eike Ziller
fdb5c7a8a3 Add "Files in All Project Directories" global search
Similar to the corresponding locator filter.

It searches in the project directories, not limited to the files that
are actually mentioned in the project itself. That is helpful if
projects don't mention resources, or README's, or header files, or
"alien" project files in case the project supports multiple build
systems.

In principle, for single projects, this can be achieved with the "Files
in File System" filter, but that is less convenient because one needs to
specify the directory.

Change-Id: I94bc664cadd0881274ae709b00b8576c696cc325
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-27 11:15:29 +00:00
hjk
95f7c5f256 Valgrind: Simplify suppression file interface
The global settings and per-project settings looked the same,
but behaved quite differently: The per-project one were a kind
of diff against the global one.

Besides having "issues" when keeping the temporary and permanent places
where relevant parts of the data were kept (settings, manual-applied
global, auto-applied local settings), the concept was not clear in the
UI at all.

This here takes the simple way out: Either local, or global, no diffs.

Change-Id: I90439cd20067ab60b88372f1cb03eeef8c2e42d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 11:05:30 +00:00
David Schulz
c00330f905 Editor: multi cursor support
Adding a way to create multiple cursors that can insert/remove text at
arbitrary positions in the document. Adding cursors is done by pressing
alt + up/down or by clicking into the editor while holding the alt key.

Fixes: QTCREATORBUG-16013
Change-Id: I495d27d95a3d277220946616ef30efc241da0120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-27 10:56:54 +00:00
Christian Stenger
eefb385918 ProjectExplorer: Fix json wizards
Amends a8d44b04da.

Change-Id: I43c8726fd1fcf770d879dc21169bdde7433dcf53
Reviewed-by: hjk <hjk@qt.io>
2021-09-27 10:39:02 +00:00
Orgad Shaneh
75cff21e42 Doc: Improve description of p4config.txt usage
Fixes: QTCREATORBUG-25041
Change-Id: I05ad3f4dc4e19bec2a4bd6b5049061db55be7d09
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-09-27 10:24:25 +00:00
Orgad Shaneh
74713e5ef1 Merge remote-tracking branch 'origin/5.0'
Change-Id: I7ca9791b95032a1f276c520f8eefde3801510eb9
2021-09-27 13:22:58 +03:00
Jarek Kobus
a4575bdf2b Simplify IndexFilterModel::filter()
Get rid of code repetition. Use some lambdas.

Change-Id: Ib344a2fdb0079faa86091d67e78c0c67c7ed077b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 09:41:02 +00:00
Christian Kandeler
63fbaedc03 CppEditor: Clear out mis-detected parentheses
... from the syntactic highlighter.
For instance, in this piece of code:
    void myfunc()
    {
        const auto rawString = R"(abc
        de)fg"hij)";
    }
The closing parenthesis inside the raw string literal is mis-interpreted
by SimpleLexer as closing the string, causing the next one to be
interpreted as an actual parenthesis, which would then be erroneously
matched against the opening brace of the function.
We fix this by removing parentheses that the semantic highlighter knows
are not actual punctuation tokens.

Change-Id: I057b9e747ed81282cdddd71a805c12db9616da65
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-27 08:52:06 +00:00
hjk
0745dc1634 Utils: Add some backtrace dumping facility to QTC_ASSERT
Unix only for now, opt-in, by setting QTC_BACKTRACE_MAXDEPTH=<number>
in the environment.

Change-Id: Ice110dbf5d25003706a947b27c279fec464df7a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 08:51:48 +00:00
Christian Kandeler
214968a80b GenericProject: Pass resolved include paths to code model
Apparently, we used to rely on relative paths being resolved elsewhere,
but we shouldn't.

Fixes: QTCREATORBUG-26304
Change-Id: Ia52b728909abc87c1225f8e935f4548a32ca9b63
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 08:48:51 +00:00
Christian Kandeler
49569574de Fix some warnings about unused variables and functions
Change-Id: I5f0acd9598bc7f3a79963cc4e1b255e2b6fb2e5d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 08:47:36 +00:00
Leena Miettinen
077a807f01 Doc: Update View 3D, Node, and Group properties
- Update screenshots
- Add missing properties
- Divide the Group topic into Node and Group topics because
  the Node properties are common to all components that inherit
  Node.

Task-number: QDS-4888
Change-Id: Iaf114cd09ead755c9754423fb6b47eff0292cb3f
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-09-27 08:18:21 +00:00
hjk
a8d44b04da ProjectExplorer: FilePath-ify JsonWizardFactory
Change-Id: Ib56daffeb7e6eac3879e00e41812c699338e1fcb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 08:11:18 +00:00
Alessandro Portale
44fb173a6e Core: Hack for HighDPI text drawing on QPixmap with Qt6
A QPainter on a QPixmap behaves differently on Qt 5 and 6 when it comes
to the pixmap's devicePixelRatio. On Qt6/DPR>1, the text in this code
would be rendered outside the pixmap. Forcing the DPR of the pixmap
to 1 while rendering the text fixes the issue.

Since I cannot test on all platforms, nor have a multi monitor setup
with different scalings, I added some cargo cult code which resets the
original DPR after rendering. Just to be on the safe side.

Fixes: QTCREATORBUG-26315
Change-Id: I32ce78a45d52a4c75eb437574b925c85b9295402
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 07:48:24 +00:00
Orgad Shaneh
f2f1fc8601 Use lowercase for Windows header for supporting cross-compilation
Linux mingw uses lowercase headers, so cross-building on Linux for Windows
target must use the correct form. Windows is case-insensitive, so it won't
affect host-native builds.

Change-Id: Ic2140412bb367bbce83b5e2546d70e0936928c5c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-27 07:23:22 +00:00
Johanna Vanhatapio
d5cb1e81a2 Doc: Update info on custom shaders
Task-number: QDS-4888
Change-Id: I64481edd0a8bb6553c657754ea5392a19a15cf27
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-09-27 06:40:00 +00:00
Orgad Shaneh
a4141b8d14 Git: Fix log editor shows as modified
Fixes: QTCREATORBUG-25936
Change-Id: I072c723e59073399531b822ec76bdac08867c72b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-09-26 19:22:50 +00:00
Assam Boudjelthia
86a397fd29 Fix buttons size policy on Android settings widget
Correct size policy for Add and Remove Ndk buttons to take the size
allowed to them.

Change-Id: I71f046eb18986c4d1215867efdf381105a16842f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-26 10:59:56 +00:00
Henning Gruendl
f1962d6201 QmlDesigner: Fix ButtonRow hover
Task-number: QDS-5134
Change-Id: I50fa43721d1eed8d5a81184bae24a8419d50911e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-24 15:32:40 +00:00
Henning Gruendl
0db724eb25 QmlDesigner: Cleanup alignment button related code
Change-Id: Ib6b20c5a3d0e92040bbb268be7a1a4df43e22f0f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-24 15:32:32 +00:00
Henning Gruendl
0a8545c068 QmlDesigner: Collapse specific section by default
Collapse AdvancedSection and LayerSection by default.

Task-number: QDS-5136
Change-Id: Ia60c47095749e7181156a79a652d6a56633ee3a6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-24 15:32:11 +00:00
Christian Stenger
29413a0e44 AutoTest: Soften dependency of wizard
Make the auto test wizard available also without the AutoTest plugin
being loaded.
For the wizard it suffices to depend on the presence of CppEditor
and all of the projects generated are basically C++ based.

Change-Id: I76b8d397e819b2865ad597f487084ad4c618c6a5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-24 13:24:30 +00:00
Christian Kandeler
47cd1def7a TextEditor: Provide a function for inserting a parenthesis
... into a sorted list.

Change-Id: Ibc39a345425945437cc8b8d9237589746143b2d9
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 11:57:12 +00:00
David Schulz
421e06393f TextEditor: update matching parenthesis in the editor
... after updating the parenthesis in the layout

Task-number: QTCREATORBUG-26183
Change-Id: I346046fbc3932b94227c1ac5bee6b0d7c44651e1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-24 11:50:54 +00:00
Christian Kandeler
0524e9236f CppEditor: Fix wrong temporary parentheses mismatch indicator
Do not clear out "semantic parentheses" in the syntactic highlighter.

Fixes: QTCREATORBUG-26183
Change-Id: I88f085b63da2469341dbb29eabc7f033367e6f19
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 11:41:25 +00:00
Christian Kandeler
553f4bec7e ClangCodeModel: Remove inapplicable TODO item
It's not worth the extra effort to restrict the identifier <-> file name
check to data types: There is hardly any possibility for a completely
false positive, as local variables do not pass through this code path.

Change-Id: Ia92549c8c6723e520789a2ad820a2606620d4efe
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 11:41:07 +00:00
Christian Kandeler
eefc8cbc7d ClangCodeModel: Remove inapplicable TODO item
I don't see any explicit sorting of the references in clangd, so let's
continue to not rely on that.

Change-Id: I65269af4995ab851e49f52686a10cc96697fbe64
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 11:40:49 +00:00
Knud Dollereder
b75d91e57b Remove superfluous qDebug printouts
Change-Id: I804873f8066f2785905e1ea25efc035cad275a3e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-24 10:08:56 +00:00
Alessandro Portale
edfdcd1a53 Core: Polish welcome screen grid hover animation
* Fix offset calculation (arrived at top in less than 200ms)
* Use "OutQuad" easing for the speed of the sliding text
* "Fade in" separator line and description during animation
* Animate covering of image by background color
* Draw rectangles with qdrawutil (fixes HighDpi)
* Change refresh timer from 5 to 10 ms

Change-Id: I53899227d875a3faf086ebc6b3d83e5eb9dcaa12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-24 09:37:39 +00:00
Eike Ziller
1b918c95d4 Locator: Fix "Files in All Project Directories" filter
That filter (by default included with 'a') could end up showing files
from projects that were no longer open. In some situations the
directories for this filter could be saved in the settings even though
they are supposed to be automatically managed when opening and closing
projects. It could happend that they never were removed again, for
example after saving the locator settings via apply in the options
dialog, and then killing Qt Creator.

Simply never save or restore which directories the filter handles, and
the file cache, by overriding the save/restoreState methods.

Change-Id: I2912d64443b5e5ec5a21e0df61d14ffda799a0e7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-24 09:12:30 +00:00
Christian Kandeler
b10641caa2 ClangCodeModel: Adapt clangd test to upstream change
See https://reviews.llvm.org/D110324.

Change-Id: I9dbc03dd814392939be28d1943515d581f9f5b58
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 08:42:21 +00:00
Christian Kandeler
f8c2ab9f7a ClangCodeModel: Remove outdated FIXME
Change-Id: I0f69ab0848c5196bf6cedd467bdff74d0d74dfda
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 08:41:46 +00:00
Christian Kandeler
c47312a836 LanguageClient: Pass out a mutable Project object
Callers can have legitimate reasons to use it in a non-const manner.

Change-Id: Id91a4708dd95845661b291ce7cc9ee1581bdade8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 08:41:18 +00:00
Orgad Shaneh
76760d8d80 Debugger: Fix debugging of terminal apps with GDB < 10
Fixes: QTCREATORBUG-26299
Change-Id: I96ed413a4722799090307e6682d2ec70f4de9b56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-24 07:05:16 +00:00
Christian Stenger
dde5a52693 Revert "Debugger: Drop support for backends relying on Python 2"
This reverts commit 43bcf91121.

GDB coming with MinGW shipped by Qt (e.g. 5.15  official) are still Python2 based.

Change-Id: Iad658de7a242345cc7f6081f26f0238071668a06
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-24 07:04:34 +00:00
Eike Ziller
e84bc5f81f Modes: Temporarily re-add a removeMode function
Partially reverts 6a142dfd95

Looks like this was used by 3rdparty plugin(s) for a mode that is only
useful for some time and then should not be shown again.

Re-add removeMode from before 5.0, but do not trigger that automatically
from the mode destructor, so it doesn't interfere at shutdown.

This patch is just a binary compatible partial revert. Since removeMode
is broken in several aspects (e.g. corresponding commands are not
removed) and we don't really support adding and removing modes during
runtime, this should be replaced later on by a different way to handle
the usecase, like a "visible" property for modes, which could be useful
in other ways too.

Fixes: QTCREATORBUG-26270
Change-Id: Ief2a36d94bd09b0511a14f528b33fdbcc4c4222b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-24 06:45:28 +00:00
David Schulz
6b1421af8d cdbext: fix c++17 deprecation warning
Change-Id: I2d06f602b4b229d1dec1dc1924e473f6b7aa4f68
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-24 05:12:33 +00:00
Christian Stenger
7b6f1000c6 AutoTest: Improve handling of pch usage
Using a regular expression to search for possible macro usages
will not omit commented out lines.
So, check matches for being commented out to be able to filter
out false positives.

Change-Id: Ie8f982ef418a4538e87567354adb0eb54ea918de
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-24 04:34:02 +00:00