Commit Graph

335 Commits

Author SHA1 Message Date
Alessandro Portale
a917770053 Replace QtSupport::QtVersionNumber with QVersionNumber
Task-number: QTCREATORBUG-27786
Change-Id: I71a44709c264829f629c9dfce702076eda297a77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:08:39 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Marcus Tillmanns
2770f92f53 QDS: Fix unused variable warnings
Change-Id: I3ea21d5883cb75dd2507ad3d0aa6b3e24ed8354e
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-18 13:21:18 +00:00
Marcus Tillmanns
451d02c88d FilePath: Remove ::toDir() and deprecation hints
Change-Id: Ib561c019e3fd44cd85504ad4286eb3759ce19516
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 08:46:06 +00:00
Eike Ziller
9328aaa835 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp

Change-Id: I1ed3dd86fe5b4b87e3015c41652f5d0fa16d7070
2022-07-25 09:25:00 +02:00
Thomas Hartmann
63200ff771 QmlDesigner: Prefer autodected kits and use replacment kits only as fallback
In QDS we want to priotize the kits we provide as part of the installation.

Change-Id: I282166bce811b6777088cd0dcde31dd8da785e2b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-22 09:32:15 +00:00
Fawzi Mohamed
fd89043de2 qmljs: (QString -> Utils::FilePath)++
convert more QString containing paths to Utils::FilePath

Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 17:13:23 +00:00
Eike Ziller
90a03391d7 Merge remote-tracking branch 'origin/8.0'
Change-Id: I37a1f78caf9ae258c6b052efa3be15b3dbcbe164
2022-07-12 13:56:23 +02:00
Thomas Hartmann
086de6f896 QmlProject: Allow only one project in QDS
This keeps project management simple. Having multiple projects
open often leads to confusion.

Change-Id: If6344732cf2813ea8ccf6a1a790229d1038ec240
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-12 08:42:33 +00:00
Eike Ziller
c7b724c4ca Merge remote-tracking branch 'origin/8.0'
Change-Id: Ia1c97d5949de607177a5a0632c7e8a37cbfd3475
2022-06-27 10:33:44 +02:00
hjk
2496ffe3ce Code cosmetics
Mostly unused #include's, also sort them or reduce scope.

A few namespaces, ...

Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-24 14:44:13 +00:00
Tim Jenssen
c4e94c2c9c Merge remote-tracking branch 'origin/qmlprojectstorage'
Conflicts:
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlproject.h

Change-Id: I0c0d59c8e3b8455b6ac575d34fdf49f39388db7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-21 10:47:34 +00:00
Artem Sokolovskii
92b3a51358 QMLPlugins: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ie3e3ec9fdaea856943e5325cabd21e52bf290e70
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-06-01 13:47:19 +00:00
Eike Ziller
f14b1a484a Merge remote-tracking branch 'origin/7.0'
Change-Id: I7037b2b400617b0be0e1a010dd293e4f96d77328
2022-05-23 12:26:27 +02:00
Thomas Hartmann
757b6554d8 QmlProject: Fix typo
Change-Id: Ie376933f2a83b0d5ceb22ad1b0e335d052c08135
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-18 19:42:34 +00:00
Eike Ziller
6a296ab68a Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectplugin.cpp

Change-Id: I14030f58303839e706af892dd12a67566e3bed68
2022-05-18 13:35:47 +02:00
Thomas Hartmann
de7a7b6ac8 QmlProject: Allow setting main qml file and main ui.qml file
The .qmlproject file already has the "mainFile" setting which indicates
which qml file is run. This patch adds a main ui.qml file that indicates
which ui.qml file is opened in the design mode if the .qmlproject is opened.

The patch also adds two context menu actions that allow setting the main qml
and main.ui.qml files without having to edit the .qmlproject file by hand.

Changing the main ui.qml file also checks if the current ui.qml file is
used as in the main qml file and if it is, then we switch the component there.

For now the actions are only available in QDS.

Task-number: QDS-6882
Change-Id: I1c6e19c039036dc635161fa6e06173356dc509aa
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-17 15:17:12 +00:00
Tapani Mattila
8bb1a862a0 QmlProjectManager: Integrate QDS landing page
Task-number: QDS-6564
Change-Id: Ia1a4188ba1bb561bbfeadf5fb29bcba75d05b5ce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-17 11:19:49 +00:00
Eike Ziller
3b2134711b Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/webassembly/webassemblyrunconfiguration.cpp
	src/tools/processlauncher/launchersockethandler.cpp

Change-Id: Iab052af98013aa59282c16f22ae6e9ecb32f50c4
2022-04-20 16:12:41 +02:00
Jarek Kobus
7fadaff5d4 IDevice: Make it possible to forward declare Ptr and ConstPtr
Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-14 12:27:04 +00:00
Miikka Heikkinen
be284f24c0 QmlDesigner: Add configuration for qsb shader generator tool
Added default ShaderTool configuration block to new project template
and use information specified there to generate qsb shaders.

The args property specifies command line argument for qsb tool.
The files property specifies files for which qsb tool is run for.

E.g.:

ShaderTool {
    args: "-s --glsl \"100 es,120,150\" --hlsl 50 --msl 12"
    files: [ "content/shaders/*" ]
}

Fixes: QDS-6590
Change-Id: I3bab0db21d20f486f9f25c1437a27ddb7fb47396
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-04-08 07:58:20 +00:00
Christian Kandeler
cac1c3d501 Fix more warnings
Found by compiling with clang

Change-Id: Iec0ed8aa8b6a742a5a3996a6c19c410e209fb048
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-23 16:57:25 +00:00
Thomas Hartmann
dfd9d4804e QmlDesigner: Track if QDS was opened from QtC
Task-number: QDS-6315
Change-Id: I4109e9c98ff5c27b4096b1af32ae945aec10c123
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-22 16:59:38 +00:00
Thomas Hartmann
454682ea3f Do not enter edit mode when opening a .qmlproject as QDS
If the user opens a .qmlproject in QDS mode we do not want to
enter the edit mode by default.
We check the startup project after opening and calling
openEditMode() will determine if we keep the default of opening
the edit mode or not.

Change-Id: Ic8a7fbefa007d487ec680099544c07fe007c0b29
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-07 15:17:54 +00:00
Thomas Hartmann
b8c8a6a2bb QmlProject: Add single isQtDesignStudio method
Change-Id: Idf9d07e6318af8d6934adcbc0afa3695e262836f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:14 +00:00
Thomas Hartmann
96ec295fc6 QmlProject: Search in content for .ui.qml files first
Change-Id: I1cf8a0bc83c24a0207e68a12a9a441cc7432a013
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-04 15:39:26 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Eike Ziller
51d23ad64f Merge remote-tracking branch 'origin/6.0'
Change-Id: I55d228482ceda144f903fb85eef048d53602ad18
2022-01-24 10:34:10 +01:00
Tuomo Pelkonen
bdba99c61b Multilanguage: Add multilanguageSupport option to qmlproject
Change-Id: I1fc1861e17dc62cec91f5fa27f7e01360a42de78
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-20 09:41:36 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
Marco Bubke
3fd3cc307e QmlDesigner: Don't export members which are not used outside
Change-Id: I2eb756484a13ce81fd55e7b991d3a509045974e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-04 13:49:17 +00:00
Miikka Heikkinen
c17f633a7e QmlProjectManager: Add widgetApp qml project property
Widget was the default apptype in Qt5, but in Qt6 the default was
changed to gui, so projects with qml modules that depend on widgets can
no longer be launched. Notable example of this is QtCharts.

Added "widgetApp" qml project property to allow users to specify if
they want widget or gui based application.

Task-number: QDS-5686
Change-Id: If0787421c79d4ba24a0f8513c8538126bcf29b4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-08 13:12:12 +00:00
Thomas Hartmann
a9fc431bd9 QmlProject: Do not allow supression of info bar for qmlproject
Task-number: QTCREATORBUG-26604
Change-Id: I0bde278322150906780dccda734214182fe5100d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-24 09:10:19 +00:00
Tuomo Pelkonen
48c30ed76c QmlProject: set project languages from application side
Even though this does not save the project languages
to the .qmlproject file, this is needed for the languages
to be synced during runtime. Saving the changes to the
.qmlproject file is done in multilanguage-plugin itself.

Change-Id: I771a2e68c3e776422e52d40f4b8526c9ae4e84c4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-11-04 17:30:19 +00:00
Tuomo Pelkonen
b996bae04d QmlProject: Add support for primaryLanguage
Task-number: QDS-5187
Change-Id: I05aafa726fd6c2b586d57b64239cf08c1f2342ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 04:57:22 +00:00
Thomas Hartmann
e3d9ba8f59 QmlProject: Add support for supportedLanguages
Task-number: QDS-5187
Change-Id: Ieb1cb90225db4093178fafe4ebe948d5967a529d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-11 14:40:22 +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
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
hjk
cb4f75426d ProjectExplorer: Remove one constructor overload of DeployableFile
Change-Id: I87e444349129e9370b5fec505444723d36e21448
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-14 03:28:48 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02:00
Thomas Hartmann
e543cb0d05 QmlProject: Open connect to ParsingFinished() only once
Task-number: QDS-5018
Change-Id: I2782641c8494c44c71c680e145be7744c98afabc
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-07 13:47:12 +00:00
Thomas Hartmann
97a65f9ea2 QmlProject: Do not open .qml.ui file if a file from that project is open
The wizards and example browser already open a .ui.qml file.
In this case we do not want to open the first one.

Change-Id: I8278ca28cd02dfde2b4ab0ffd1b551073d85859f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2021-09-07 12:46:43 +00:00
Eike Ziller
8e51295959 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/processreaper.cpp
	src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
	src/plugins/cmakeprojectmanager/cmakeprocess.cpp

Change-Id: Ie248bcb02a80f3e02ab19d73033ce2ba31e7fd83
2021-09-07 11:05:40 +02:00
Thomas Hartmann
1393aa8505 QmlProject: Open the first .ui.qml file in QDS
Open the first .ui.qml file of a .qmlproject to not
confuse users.

Task-number: QDS-4986
Change-Id: I56c77c2101fd549cb7b96ea7d273bb4f5234693a
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-06 11:57:53 +00:00
Artem Sokolovskii
bf2954ffbf Qml: Use QtcProcess
Change-Id: I12ff58739db14952bdf38355f0fe3b332f57f330
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-31 09:56:59 +00:00
hjk
30f171a491 Utils: Rename FilePath::normalizePathName to normalizedPathName
Change-Id: Ib7bcc9968749649f762a396d3861f7b67711e926
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-26 07:03:13 +00:00
hjk
db014de91c Utils: Introduce FilePath::normalizePathName()
... as wrapper around FileUtils::normalizePathName, and use it
in some places.

Change-Id: I42792e1f175b8119c8db930eae80a9f822ac70fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-23 10:37:26 +00:00
Thomas Hartmann
9b17a2b283 QmlProject: Prefer Qt 6 kits if the project is flagged as Qt 6 project
A .qmlproject can contain 'qt6Project: true'. If this is the case
we prefer a Qt 6 kit, otherwise we prefer a Qt 5 kit.

We only change this behavior if Qt Creator is in QDS mode.

We should prefer desktop kits in any case.

Task-number: QDS-4734
Change-Id: I90f6628cd071db01f2add068fd776774f7be133e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-03 20:24:21 +00:00
Thomas Hartmann
58602ec21c QmlDesigner: Add setting for Qt 6 projects
Adding
'qt6Project: true'
to the qmlproject file marks the project as Qt 6 'only'.

Task-number: QDS-4734
Change-Id: Ib9d969fd11d409e280734f9bedf759b40470fc61
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-07-27 15:32:29 +00:00
hjk
1bde4ddbec ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 13:45:06 +00:00