Commit Graph

74059 Commits

Author SHA1 Message Date
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
David Schulz
82b250d901 Docker: add option to disable file path mapping
Can be used to easily reproduce the current windows state that has no
way to map the remote file system to a local path on other systems like
linux.

Change-Id: I32cd1852dd0b4fc0890a503c244f34065c29e18c
Reviewed-by: hjk <hjk@qt.io>
2021-09-24 04:23:06 +00:00
Alessandro Portale
8eea18eefe ProjectExplorer: Fix a silly mixup
icon path vs. icon text.

Amends: 519c2f3109

Change-Id: I1b2528a2df8ebeb02642f64e2d5c5ae80acfd4d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-23 16:29:23 +00:00
Alessandro Portale
fcf9537dc5 Various FilePath::fromString -> fromUserInput changes
Change-Id: Ic9c5e2f5c0375468651557f504b101572b72ac06
Reviewed-by: hjk <hjk@qt.io>
2021-09-23 16:28:54 +00:00
hjk
3dd8831f14 ProjectExplorer: Simplify retrieval of WorkingDirectoryAspect values
Drop the macroExpander argument, at the cost of complicating internal
ProjectConfiguration setup a bit.

Simpler code at the user side.

Change-Id: Ie9ea0b719f6e402b44d9ba7ce6047aa4e15441fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-23 15:22:28 +00:00
Leena Miettinen
0e1ce368b9 Doc: Fix QDoc error by making link to QDS example conditional
Change-Id: Idda2614cddc24e2019c39590b1de8222632738c5
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-09-23 15:01:51 +00:00
Christian Kandeler
d359a7902b ProjectExplorer: Prevent callbacks while ramping down
... in DeviceTestDialog.

Task-number: QTCREATORBUG-26285
Change-Id: I4b2162b7be1819e9ce389d1a3db2a8280db72aee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-23 14:43:13 +00:00
Leena Miettinen
fe62385361 Doc: Fix the Qt Quick Application tutorial
- Keep the Window, but move the page into a separate QML file
  to which you add states
- Explain how to bind the icon to the rectangles in the states
  to make the UI scalable
- Update the transparent icon and instructions for setting the border
  transparent
- Add and update screenshots

Fixes: QTCREATORBUG-26291
Change-Id: I68c6b7b897c7824b43b9e0fa719e37864841ba9b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-23 14:05:00 +00:00
Cristian Adam
4cad094066 CMakePM: Treat header files as project files
CMake doesn't associate header files in a compiler group in the
file-api export. But it does list them as source files if added
to the source files of a target.

By using the CppEditor::ProjectFileCategorizer we can sort the
header files to the right compiler group.

This way one could have the clang-tidy and clazy run on a header
file. Or the TODO plugin find TODOs in header files. Or the Autotest
plugin finding Google Tests in header files.

Fixes: QTCREATORBUG-23783
Fixes: QTCREATORBUG-23843
Fixes: QTCREATORBUG-26201
Fixes: QTCREATORBUG-26238
Change-Id: I8acace48e89fd9b3da8bce1c479dec7891e1bbd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-23 13:52:05 +00:00
Thomas Hartmann
ddccb87a87 QmlProject: Propose to open QDS for any .ui.qml file
This is only enabled if no QmlDesigner plugin is found.

When a .ui.qml file is opened we check for a QDS installation.
If QDS is installed we propose to open QDS instead, if not
we show information on QDS.

Search oder for .qmlproject file. QDS requires a project file.

* Check if current project is .qmlproject
* Check if the current folder contains a .qmlproject
* Check folder for .qmlproject that contains the .ui.qml file
* Check parent folder for .qmlproject ...

If not .qmlproject is found we show an error message.
Enabling external link support for InfoBar.

Task-number: QDS-5065
Task-number: QDS-5066
Change-Id: I2c70c400c4d11b83a4848f9e002e180fa119f6e2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-23 11:13:58 +00:00
Henning Gruendl
64e48988ed QmlDesigner: Fix SpinBox dragging
* Add PPU (pixels per unit) property
* Include device pixel ratio

Task-number: QDS-3081
Task-number: QDS-4798
Change-Id: I23cd26662d719888eca685e54d0706f5da09c4cd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-23 10:34:22 +00:00
Thomas Hartmann
72d932a44e QmlDesigner: Fix Coverity Scan defect
dialog was just created and cannot be null.

CID 1506796:  Null pointer dereferences  (REVERSE_INULL)
Null-checking "dialog" suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.

Change-Id: I53c116620c91b5b41b4028e367cb286e13193cf7
Reviewed-by: Tony Leinonen <tony.leinonen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-09-23 09:44:09 +00:00
Alessandro Portale
b92187334f Core: Fix compilation against Qt 5
include QPainter

Amends: 519c2f3109

Change-Id: I0974e28eac47b7b1f7fe2a88e3b11527d3441be0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-23 09:36:45 +00:00
Kai Köhne
ef9f8be90c Disable QuickDesigner for now
Task-number: QTCREATORBUG-26160
Change-Id: If8621a41b191f295302a8cbdbd74a399cff6e8d0
Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-23 09:30:16 +00:00
Christian Kandeler
e1e962503a ProjectExplorer: Make sure the working dir is properly expanded
... in the path chooser.

Fixes: QTCREATORBUG-26274
Change-Id: I4aa920888b9bef2820ed883e1f34a5c670a545d6
Reviewed-by: hjk <hjk@qt.io>
2021-09-23 09:18:05 +00:00
Cristian Adam
3922b1a917 CMakePM: Add issue icon and tooltip description on project failure
If a project fails to load it will be displayed with a warning icon.

If the CMake configuration fails and the backup configuration is
restored, the project is also marked with a warning icon.

Change-Id: I95ccc5d171f5b789fe317fbb1da9e13dcd81a5dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-23 08:50:24 +00:00
Alessandro Portale
519c2f3109 Core: Consolidate setter of icon and text in IWizardFactory
Make setting the icon and the text atomic, and move the text drawing
code to iwizardfactory.cpp. That simplifies things such as setting the
fallback icon.
Also, it enables the upcoming theming of wizard icons.

Change-Id: Ieb803eba52a659b3278b29db32838d9b41d73cb6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-23 08:42:07 +00:00
Jarek Kobus
71cfd0d2d0 Fix a crash in help index filter
The crash appeared when Creator was built against Qt 6.2,
however, the Creator code for IndexFilterModel was
broken before and was working just by coincidence with Qt 5.15.

1. mapToSource() reimplementation creates now indices on source
   model side, instead of on proxy side.
2. filter() returns invalid model index now in case when
   list is unfiltered and empty and in case when the filter
   was used but we got empty result. Before it was creating
   a new valid index to (0, 0), but in fact we didn't have a
   corresponding valid data for it.
3. Reimplement headerData(), as otherwise the default implementation
   of this function inside proxy was calling erroneously index(0, 0)
   when we had empty data.
4. Reimplement hasChildren(), as otherwise the default implementation
   returned true for hidden root item, what caused a call to
   index(0, 0) in case we had empty data.
5. Assert that the index() is being called only for a valid
   range of rows that match our internal proxy data.
6. Add some checks whether sourceModel() isn't nullptr prior to use.
7. Simplify IndexWindow::filterIndices().

Fixes: QTCREATORBUG-26309
Change-Id: I5d150488893abd117b7d68c0436e4e511537738b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-23 08:41:42 +00:00
Eike Ziller
b53512352e CMake: NinjaPath was never supposed to be written to the settings
It is a value written by the installer, and to be read from the install
settings. Writing it to the local user settings breaks it if the user
uninstalls Qt and installs it at a different location.

Also add a temporary fixup, removing the setting from the local user
settings, if it was already written there.

Amends beda749326

Fixes: QTCREATORBUG-26289
Change-Id: I27652031b13aaf17a5daff3bfba1312bf1158ec7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-23 08:13:03 +00:00
hjk
478ce99942 Docker: Don't try to re-start running container
Change-Id: If8594ce467c44be7a67aa2a7e783028306731af1
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-23 06:10:05 +00:00
hjk
1e18678383 Docker: Extend log messages
Add some indication which container the log messages belong to.

Change-Id: Iafdc7f9c77e58649f2922aefd2a109cf17db78ff
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-23 05:30:17 +00:00
hjk
9c66b493e1 Docker: Add some more information why certain operations fail
Change-Id: I7f561fbf089fff5ba0151f72789aad4c216b15fe
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-23 05:03:05 +00:00
Alessandro Portale
887ebc630d Upgrade qtcreatoricons.svg to Inkscape 1.1
Inkscape 1.1 insists on optimizing several things when saving the
current SVG which was last saved by v1.0. Let's let that happen.

Change-Id: I4a6541f55ba5678255a12115052ab807725389be
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-22 20:32:09 +00:00
Loren Burkholder
6c0f2b1c63 Use a more logical code style
This adds C++11-style initializers and breaks the initializer list into a new line, since most classes will have other members to be put in new lines as well.

Change-Id: I7b6d6bf6f32dbd58a744405aefabb02be9f45316
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-22 16:38:41 +00:00
The Qt Project
4444ac052c Merge "Merge remote-tracking branch 'origin/5.0'" 2021-09-22 13:58:28 +00:00
Christian Stenger
f2c501a5bf Docker: Tweak handling of DISPLAY
Passing the DISPLAY variable differently on Windows allows to
even run a gui application on the docker image if there is an
XServer (e.g. vcxsrv) running on the Windows host that can be used.

Change-Id: I36f849c4efc6e53ef92fcea96b4b256fd92a01c6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-22 12:53:29 +00:00
Christian Stenger
6a5340175b CMakePM: Improve cmake default generator setup
Docker images with UNIX on a Windows host should get a proper
default generator.
This allows to build projects with a default set up kit for docker
out of the box without modifying the kit values or the project
setup.

Change-Id: Ic32e72c28d98a367e71f19d4e1c211ec7a4e613e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-22 12:53:17 +00:00
Christian Kandeler
feb2b4e0df process launcher: Fix qbs build on Windows
Change-Id: I461056e7a0449d5a69694deb1af53a303d7f1b8f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-22 12:27:21 +00:00
Leena Miettinen
a6f29a5f31 Doc: Describe porting Qt 5-based QDS projects into Qt 6
Task-number: QDS-4720
Change-Id: If368bb19c98016761fbebfd9c81780dbf5f75705
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-22 11:46:29 +00:00
Eike Ziller
6a02aa2574 Merge remote-tracking branch 'origin/5.0'
Change-Id: I75aab10a066ce0e2d322663db7723825043fa9c8
2021-09-22 13:31:25 +02:00
Marco Bubke
091f157192 QmlDesigner: Adapt project storage changes in updater
Task-number: QDS-5123
Task-number: QDS-4923
Task-number: QDS-4925
Change-Id: I79acbbdb11bf7a0529c1ef005e6b5e1fd0d12aa7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-22 11:22:11 +00:00
Cristian Adam
11fd8232b7 CMakePM: Display <File System> tree node only on failure
Fixes: QTCREATORBUG-25994
Fixes: QTCREATORBUG-25974
Change-Id: I383fe5c28d1f71c8f7939bc9fe4f1f0bf1d6a01b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 36a0151c6d)
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-22 10:46:46 +00:00