Commit Graph

62421 Commits

Author SHA1 Message Date
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
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
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
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
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
Alessandro Portale
71af551dea ProjectExplorer: Fix project paths from welcome screen
Don't puto wrong delimiters into FilrPath. They create multitudes of
problems down the road.

Change-Id: I7a95494c0f59416b7468636b3786d7efdbbdf14e
Reviewed-by: hjk <hjk@qt.io>
2021-09-21 10:58:09 +00:00
Eike Ziller
04bb1ee5da Fix QtProjectImporter test for Qt 6.2 versions in PATH
In Qt 5, qmake is statically linked to the bootstrap library,
so just copying qmake somewhere results in a runnable executable.

In Qt 6 this changed, and qmake depends on the dynamic QtCore
library, and on Linux also on ICU. Copy these in addition to
the qmake executable. Keep the directory structure as in Qt, so
the dynamic linker finds them.

Change-Id: Ie4f6b617bc91d847b1e4fe38dc8a1c603eae4087
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-21 09:26:07 +00:00
Assam Boudjelthia
7bf268114d Fix issue with deploy step not getting valid abi with CMake
With CMake, it seems that the abi was being empty string because
looking for ANDROID_ABIS is not defined and instead there's ANDROID_ABI.

Also make sure to handle the case of ANDROID_ABIS, which might be
declared in future versions like Qt 6.3 which can support multi-abi
builds.

Change-Id: I805c5c25409a4e20a237b8747082d256bd72e275
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 06:07:41 +00:00
Christian Stenger
c141b0d8f9 AutoTest: Support some ctest settings
Add some useful settings for ctest based testing. Adapt output
parser accordingly to get at least relevant output and display
significant information inside the visual display.
Current implementation loses or mixes some information when
running jobs in parallel.
Complete output is still available inside the text display.

Fixes: QTCREATORBUG-26029
Change-Id: Id040f83900a6cfd89f5c2aff987278a297aa14c4
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-21 04:31:34 +00:00
Marco Bubke
e7de332f2b QmlDesigner: Fix uninitialized variables
It shows very well why only one variable per statement should be
initialized.

Change-Id: I4bef73066583998be545c8930b3f9cbea5bc4e4b
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-20 14:51:36 +00:00
Kai Köhne
96ba15dc3a MSVC: Fix C4996 in sqlite3.c
Fixes warnings
  sqlite3.c:43154: warning: C4996: 'GetVersionExA': was declared deprecated
  sqlite3.c:43164: warning: C4996: 'GetVersionExW': was declared deprecated

We know that we're running on Windows NT based versions (the default), so
we can as well skip this check.

Change-Id: Idd7db098645060bf8b9e449e59904f2f63fb0e0a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-20 14:13:46 +00:00
Alessandro Portale
58a9b1e396 Android: Use fromUserInput on paths with potential native separators
Otherwise functions like FilePath::fileName() don't work.

amends: 2d019ed659

Change-Id: Id606cabe77a46dab07d3f8c3f38e852517782176
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-20 14:01:30 +00:00
Eike Ziller
29df497d25 Add text search functionality to output window centrally
All output windows should be searchable with Edit > Find/Replace
(Ctrl+F), no reason for every single instance setting that up
individually.

Add a find placeholder for the build system output in Projects mode, so
the search functionality is available there as well.

Change-Id: Idad6824bfb21e6ae9ab923191a7e83b43256e68b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-20 13:58:45 +00:00
The Qt Project
9815d2ee7e Merge "Merge remote-tracking branch 'origin/5.0'" 2021-09-20 11:51:42 +00:00
Eike Ziller
6a99368979 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/utils/processreaper.cpp
	src/plugins/android/androidbuildapkstep.cpp
	src/plugins/cmakeprojectmanager/cmakeprocess.cpp

Change-Id: I353a445b5862f63362ea954749b5565360951283
2021-09-20 13:43:20 +02:00
Christian Kandeler
7e378513c1 Make some headers self-contained
This fixes the build in certain configurations, e.g. MSVC + qbs + Qt 6.

Change-Id: Ia72dfd6dcfe1d1ecc08c40a3af6e60a935dc355f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-20 10:14:14 +00:00
Christian Kandeler
002d0a97aa ClangCodeModel: Add XFAIL-ing test for clangd completion
Change-Id: Ic8672d5ce14b9a8d86dc511c5aa3289037258d64
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-20 08:26:57 +00:00
Marco Bubke
728be60986 QmlDesigner: Change import export architecture
The new architecture should be a better abstractions for qml.
ImportedTypeNames are introduced. ModuleDependencies are now taken
over by document imports. Modules lost their version and
ExportedTypeNames gained it.

Task-number: QDS-4938
Task-number: QDS-4933
Task-number: QDS-5009
Task-number: QDS-5032
Change-Id: Ia86921c5be9107fe7d5bfd28f12bf8453769dc10
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-20 07:29:22 +00:00
Marco Bubke
13aaea197b QmlDesigner: Rename Import into Module
Task-number: QDS-4933
Change-Id: Ibc28ae731ffb27734f61eb438230fa58fe800bdc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-20 07:29:15 +00:00
Marco Bubke
a570d53db2 QmlDesigner: Add ProjectStorageUpdater
Adding a skeleton for the ProjectStorageUpdater.

Task-number: QDS-4819
Task-number: QDS-4793
Change-Id: I230d68f71480d360d71019883510ef22dd276802
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-20 07:28:59 +00:00