Commit Graph

72385 Commits

Author SHA1 Message Date
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
hjk
054e05951b Partially revert "Core: FilePath-ify DocumentManager"
This reverts a hunk from commit 1167f0fac7
that was meant to be part of another commit.

Change-Id: Ieee7b8e659e139497f5efc8b611469f82ae0fef5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-22 09:51:52 +00:00
Cristian Adam
36a0151c6d 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>
2021-09-22 09:25:47 +00:00
hjk
1167f0fac7 Core: FilePath-ify DocumentManager
And adjust users.

Change-Id: I10ca9aeb442a07f7c8d42af362b294aa3398f5c1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-22 09:10:29 +00:00
Christian Kandeler
08f3c10bf5 CppEditor: Fix clearing of "semantic parentheses"
Amends a0bf5448a1.

Change-Id: I0a89834ade9b5df7aa976278fdc5761eb1c0ac24
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-22 08:34:11 +00:00
Assam Boudjelthia
75854d57ef Add Android device details under Devices settings
Add an AndroidDeviceWidget to handle showing details of detected
Android devices, things like name, serial number, api level,
and more specific info for AVDs.

Task-number: QTCREATORBUG-23991
Change-Id: I97637aa0ced78ebd34c37f2b874802914ce44578
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-22 08:18:10 +00:00
hjk
a16144b89d Docker: Override entrypoints when starting our shell
Some images have convenience entrypoints set, these get into the way
when we want to run a shell deterministically.

Change-Id: Ifedb9924456b80a9a3cdca64b5431c457b052f1a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-22 08:13:30 +00:00
Eike Ziller
8437903295 Core: Show keyboard sequence for navigation widgets
Fixes: QTCREATORBUG-26293
Change-Id: Ifc1df96b063365ee5b27684cb4efb33be2608582
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-22 06:12:10 +00:00
Christian Stenger
de3e3e7af1 Tests: Fix execution of dumper tests on Win
Amends 6786d585e0.

Change-Id: Ib0c9b3d07741db00a01033be2118487ecc9644ea
Reviewed-by: hjk <hjk@qt.io>
2021-09-22 04:41:33 +00:00
Li Xi
7e39f818c2 Delete unnecessary class instances
OutlineWidgetStack inherits from QStackedWidget, so you don't need a
member object like QStackedWidget.

The m_Factory object is not used in the OutlineWidgetStack class, is
of private type, and is not available in its OutlineWidgetStack
derived class.

Change-Id: I0b94a654dde023144f01e0bd7808ad5cc1dc92b8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-22 00:46:23 +00:00
Assam Boudjelthia
2695bcb167 Android: switch qmlpreview to use new Android Device mechanism
Amends 261a39cbbd, after switching
Android plugin to use new device selection mechanism in
96255208a5.

Change-Id: I7b2dd1950055f3e6f1a449778f44d57c0c0a8758
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 21:08:00 +00:00
Piotr Mikolajczyk
261a39cbbd Implements previewing qml preview for a qmlproject
To run it requires either designpreview.apk installed
on the device or apks placed in
<QTCREATATORDIR>/share/qtcreator/android/qtdesignviewer/
Apk filename should follow designpreview_$ARCH.apk

Task-number: QAA-512
Change-Id: Ida955b0fac519112d4623166677a7ba8e9afb1f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 17:38:54 +00:00
Alessandro Portale
c2aeec7e86 Wizards: Reduce QtQuick wizards to essentials
The new/upcoming way of co-authoring and sharing a project in Qt
Creator and in Qt Design Studio, as-well as the disabling of the
QmlDesigner plugin in Qt Creator are a substantial step in the
offering.

The QtQuick application wizards must not stay behind, but rather also
reflect that change:

Keep one essential Qt Quick wizard in Qt Creator (which will eventually
support the project sharing approach). Leave the competence to create
Qml UI code to Qt Design Studio.

The removal of wizards for mobile-oriented ui code (for further hand
coding) also re-enforces the motto that application wizards should
create essentials, rather than example code.

Task-number: QTCREATORBUG-26160
Change-Id: I9775d70b45f97290ab65936ff6e373b6fc177c85
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 17:32:10 +00:00
Henning Gruendl
2e1bdabd1f QmlDesigner: Fix ColorEditor opening position
Fix ColorEditor being cut off at the top, when there isn't enough space
to fit.

Task-number: QDS-5076
Change-Id: If9dc832b89d64c60e11a3458e1d90e5d7e2f0450
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-21 17:06:51 +00:00
Henning Gruendl
4e1eb3727f QmlDesigner: Cleanup color logic code
Change-Id: I33019c06bc9c1f077ac88367f3b8ea279e2801c5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-21 17:06:42 +00:00
Christian Kandeler
ee17e755a9 ProjectExplorer: Use expanded run config display names
... in the "Add new run configuration" dialog. Otherwise users will see
placeholders in e.g. the RemoteLinux case.

Change-Id: Id8b22f4e51b83a2b061fd74bbe9649bee44fc0af
Reviewed-by: hjk <hjk@qt.io>
2021-09-21 16:14:31 +00:00
Assam Boudjelthia
96255208a5 Change device selection mechanism on Android
Currently, on deploy/debug steps on Android, an AndroidDeviceDialog
is popped up each time a deployement is done to select a device. This
can be avoidable by using Qt Creator DeviceKitAspect to have the list
of devices easily selectable from the project mini-menu.

This is better than the current way because it:
* reduces the time from deployment to running the app
* reduces the number of clicks
* avoids having to select the same device each time or
* if a default device is selected, this avoids having to go to project
settings to reset the default device to be able to deploy to a new
device.
* it looks cleaner and more compatible with Creator.

Task-number: QTCREATORBUG-23991
Change-Id: Ida4ab7245c1a3b0ca26c5ccdc9a21a072edf0725
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-21 15:33:40 +00:00
Christian Kandeler
15b6eaa47b ClangCodeModel: Switch off clang-tidy in clangd
We have our own dedicated clang-tidy support, so let's not confuse
users.

Change-Id: I69a32de3ac96ad2c51d70c82a9eb62f811e65460
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-21 13:24:32 +00:00
Samuel Ghinet
b985530144 Make changes in the QtCreator side required for QDS new project dialog
* We need the showing of the Wizard dialog to be optional
* Each wizard has a "detailsPage.qml" file that stores wizard-specific
  UI configuration. We need a way to access that path (QUrl) from QDS.
* ComboboxField is used directly by QDS, and the field object is
  fetched by a call to JsonFieldPage::jsonField() - hence, the
  ComboboxField needs to be dllexported. We need to access fields
  directly from QDS because the QML controls use those fields as backend.
* From QDS we need to select / activate in a combobox field, and to see
  which item is current (activated). We also need to make use of the
  model that the ComboBoxField uses in order to show those same items in
  the qml controls of QDS.
* From QDS we need to set the text in a LineEditField

Task-number: QDS-4490
Change-Id: Ia42d539a5bcbf3dff4593fb027ac18c52da4d046
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 13:21:44 +00:00
Ivan Komissarov
f8f1732a1e Update Qbs submodule to the top of 1.20 branch
Change-Id: Ic9f108b1f0c96ee82bacb78da3c14998e95e53d3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-21 13:05:29 +00:00
Cristian Adam
87c1f597e3 CMakePM: Display CMake project loading errors/warnings in issue pane
Currently the errors / warnings were visible only in Project mode.
Now they will appear in the build system issues pane, so that the
user knows that something is wrong with the project.

Change-Id: I4e0e6aebed86fdb9ea757692255cdbde37cf58a3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-21 12:49:07 +00:00
Marco Bubke
6587feb3d8 Utils: Improve string conversion for Qt6
Skip the creation auf a QByteArray. Use QStringEncoder instead.

Change-Id: I3d2297b1fef27acb2136a64587c5af9099d92aa6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-21 12:45:51 +00:00
Christian Kandeler
e79b9050eb CppEditor: Remove an unused enum value
Change-Id: Ifd0361a9a78eae7be917e1fff68161aa0cd8e79f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-21 11:28:19 +00:00
Jarek Kobus
128c7dfbef Implement heuristics for parsing version number
Similar solution exists in QtHelp module:
QString QHelpDBReader::qtVersionHeuristic() const

Fixes: QTCREATORBUG-26292
Change-Id: I9037785920e25428db0fa7f03f737c5ef66c4ac3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-21 11:17:33 +00:00
Jarek Kobus
2bd6498278 Fix canceling compilation
Don't expect that the process being reaped will emit any signal.
Before deleting the process inside AbstractProcessStep::doCancel()
we do the expected cleanup immediately. We can't expect that the
process being reaped will return fine, so we set exitCode to -1
and exitStatus to CrashExit.

Fixes: QTCREATORBUG-26271
Change-Id: I0afd7ba8846d0fa57a0531201bbed9bd7a490942
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-21 10:59:00 +00:00