Commit Graph

8097 Commits

Author SHA1 Message Date
Burak Hancerli
ccf17b02c8 QmlDesigner: Fix project file getter/setter issues
Task-number: QDS-9781
Change-Id: I2df8cca1c4e5cd10563621b849fb54b29c0d155d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-26 12:55:59 +00:00
Robert Loehning
1fe7b77393 SquishTests: Remove workarounds for closed issues
Change-Id: If5f62b0f9013223643f016ce4e04932cca53397c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 11:49:13 +00:00
Robert Löhning
183cf3adc5 SquishTests: Make workaround permanent for Creator 10
The bug is fixed in master branch only.

Task-number: QTCREATORBUG-28985
Change-Id: I5b1648e89a2ae61ce651ce6d2061fea58559d145
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 11:44:36 +00:00
Robert Löhning
fff4ab8b3d SquishTests: Update tst_CSUP06
Change-Id: Icbe7cae9b282dd125de46f8ba8bd265b9aa1054d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-26 11:34:04 +00:00
Marco Bubke
b929cbfd64 QmlDesigner: Fix QmlTypesParser
Change-Id: I826e1a37747a51602f3f7a8ea675320787080272
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-26 09:55:47 +00:00
Jarek Kobus
070bfe9387 FutureSynchronizer: Change the default value of cancelOnWait to true
The "false" default wasn't really useful.

This changes the default value to the following usages:

1. AndroidDeployQtStep
   Introduced in 91f136ef3a
   The synchronizer was used to cancel the running tasks inside
   the doCancel(), so the similar behavior should be expected
   when destructing the AndroidDeployQtStep.

2. GitClient
   Introduced in f3106ebafe
   Is used only inside the last line of
   GitSubmitEditor::updateFileModel(). The running function
   (CommitDataFetchResult::fetch) doesn't take QPromise<>,
   so it can't detect if the future was canceled or not.
   In this case this change is no-op.

3. ExtraCompiler
   Introduced in c99ce1f455
   The intention was to make it cancellable and finish
   early on cancel.

4. PluginManager global future synchronizer
   Introduced in 72bddf9f51
   The intention was to make it cancellable and finish
   early on cancel.

The relevant places in code are marked explicitly for
points: 1, 2 and 3.

Change-Id: I1a52deb8d1f81d355950c8772bbaa6d0a202fd7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-26 08:17:27 +00:00
hjk
3edc491b2a Utils: Simplify SettingsAccessor constructors
Use setters instead.

Change-Id: I912234fa832eeb80519740ca011921f1e71d70b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 06:32:52 +00:00
hjk
aeac83af78 Utils: Collapse the two SettingsAccessor constructor hierarchies
Change-Id: I7b659c9e3c66700cfc92f9cfbd9df0535a1ca655
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 06:24:19 +00:00
hjk
b4a6af026e Utils: Remove displayName from SettingsAccessors
It was not used.

Change-Id: I7c0927698bf31548ec076c39881561d72e8495e6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-26 06:23:21 +00:00
hjk
8cf500c5bc Utils: Make Layouting a top level namespace
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.

Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-25 13:31:25 +00:00
hjk
72d72251d8 Utils: Start decoupling LayoutBuilder from Aspects
Makes it easier reusable elsewhere.

Change-Id: I86ff9f40229a33690f854f5fda692bc06d6976ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-25 10:55:29 +00:00
Marco Bubke
45cf905b29 QmlDesigner: Fix version scanning
Switch was missing.

Change-Id: I5d87e624f698b9f59fe57cf49cafef4e6d08eca2
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-04-25 10:31:32 +00:00
Marco Bubke
eafe43399d QmlDesigner: Remove duplicates
Change-Id: I5b2d8433c0aca286ec530f237750ba660c409a48
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-04-25 10:31:20 +00:00
Cristian Adam
54af6bd5b3 CMakePM: Allow files to be renamed in project view
This includes both with source files explicitly specified or
resulted from a file(GLOB|GLOB_RECOURSE) call.

Fixes: QTCREATORBUG-27538
Change-Id: I5ee113af168bdb8cd0a96e8ab2ae603c0607fb0b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-25 09:22:08 +00:00
Eike Ziller
c9696fbabb Merge remote-tracking branch 'origin/10.0'
Change-Id: I8b36c1812b61dbe08fe3e7930f950e6b8e8a7079
2023-04-24 08:52:35 +02:00
Robert Löhning
94c9e6cbac SquishTests: Add possible location of cdb
Change-Id: I72c3f1b5bdcceeca2764d4a77229c45655187376
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-21 11:44:20 +00:00
Semih Yavuz
21ca06fc7c Codeformatter: Support indenting of type annotated function
Fixes: QTCREATORBUG-29046
Change-Id: Ie4a4d85b7aa00ddf4dd3ea4bade6ffa57af7b4e0
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-20 12:55:40 +00:00
Cristian Adam
d8be2491a5 CMakePM: Add new / existing source files to project
This will add the new added source files (.cpp, .h, .qrc, .ui) to the
corresponding CMake source file as last arguments for known CMake
functions like add_executable, add_library as well for the Qt
counterprarts qt_add_executable or qt_add_library.

For custom functions the code will insert a target_sources() call.
Subsequent calls will add the files to the last target_sources.

The previous copy to clipboard mechanism and settings have been removed.

Fixes: QTCREATORBUG-26006
Fixes: QTCREATORBUG-27213
Fixes: QTCREATORBUG-28493
Fixes: QTCREATORBUG-29006
Change-Id: Ia6e075e4e5718e4106c1236673d469139611a677
Reviewed-by: hjk <hjk@qt.io>
2023-04-20 12:43:33 +00:00
Marco Bubke
2694d6a1f5 Add feature to disable QmlDesigner and related files
QTC_WITH_QMLDESIGNER or WITH_QMLDESIGNER has to be set to OFF to disable
QmlDesigner related code.

Change-Id: I7e25200fe856fcc7de3493cfa394cdd4f923e0bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 17:19:33 +00:00
Marco Bubke
34c69766dd QmlDesigner: Add version scanning for Qt5
Add some hardwired code for lagacy Qt5 support.

Task-number: QDS-9542
Change-Id: I505685042f53b7e653e76c8d883c8d7bb30605d7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 15:58:21 +00:00
Marco Bubke
6035ff939d QmlDesigner: Add module scanner
For performance reason we want to get the qml modules directly from the
file system. When the project storage is finished we can get the modules
from there.

Task-number: QDS-9542
Change-Id: I26d4b028fbf5ebc541fcd8e34d285ded1fb14935
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 13:58:22 +00:00
Eike Ziller
4e6877753a Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp

Change-Id: I1628528dbc0ffe874b49bbe022da5933b1348057
2023-04-18 12:53:45 +02:00
Tim Jenssen
a73358b3aa Merge remote-tracking branch 'origin/10.0' into qds/dev
Change-Id: I9520e55c8b7248afb297168395d7099829ed42c7
2023-04-17 20:59:36 +02:00
Jarek Kobus
837967a77a tst_RunExtensions: Move onResultReady test into tst_AsyncTask
Change-Id: I73e2cc62be207adbfb2a4e4ce1367140986cc8b3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:18:47 +00:00
Jarek Kobus
7ab0fd56ae RunExtensions: Move onResultReady and onFinished into asynctask.h
Change-Id: I96dbf5b0253251224ae678172cd5fca12b34326a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:10:33 +00:00
Robert Löhning
26bcec1641 SquishTests: Don't require Qt Quick Controls
It's not available for any version we use anymore.

Change-Id: I11556c42b4ed7924d3ede04749b0b26251d8f0da
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-17 09:09:44 +00:00
Semih Yavuz
15a06b77c0 Fix tst_qml_reformatter auto test
Add source location to pragma library writer so that the comments before
.pragma line are also written.

Fix tst_qml_reformatter by skipping the blankline comparisons. Line by
line comparison with the non-formatted code is not a good idea to test
 reformatting. Ideally test should have compared the formatted file with
the original one character wise, yet it is not worth changing into that
at this point.

Amends 0ce57fcf5e90f8bf8cfbe681f2954a0c1ef0e945

Change-Id: I39bcee2c881e1a0928c17ebb45aa1c85e6cf3b99
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-14 14:23:14 +00:00
Christian Stenger
9beec99452 SquishTests: Expect another build fail on Win
Change-Id: Id4051f4f82c1219209fd59e72f1add76ec338a87
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-14 05:06:37 +00:00
Christian Stenger
cf8f23e8e0 SquishTests: Fix wrong usage
Amends 476f67cce5.

Change-Id: I584a059b52515bf625a973fff43485f5b52e6061
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-14 05:06:28 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
Robert Löhning
2ffe169a8d SquishTests: Try stabilizing tst_generic_highlighter
Change-Id: I12e29f2886d22ce03a1a2eb62d5c776cd894d359
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 10:48:21 +00:00
Eike Ziller
b542d47907 Examples: Read meta data, which includes categories
Task-number: QTCREATORBUG-28546
Change-Id: I11505d4f8b8eaef3f525185cd45757b6f41012ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit e060f82fa5)
2023-04-13 07:14:18 +00:00
Eike Ziller
9144ab75f4 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit 87b5176fd2)
2023-04-13 07:14:05 +00:00
Semih Yavuz
78cf563142 reformatter: fix formatting of js directives
Fix the miscalculation of the start / end of the js directives lines.
Also small optimizations on usage of increment operators. Add a unit
test.

Fixes: QTCREATORBUG-29001
Change-Id: I38923f137dca5c0b89d474cd747a64ec11e62fd9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-12 11:50:43 +00:00
Jarek Kobus
8175d5abda onResultReady: Provide a context object for all usages
Remove overloads for onResultReady() and onFinished()
that don't take context object.

Change-Id: Iaec538bcccd29e22791ec65cc95b4b87640708c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-12 11:05:16 +00:00
Christian Stenger
41e78b9e57 SquishTests: Fix compiler substitution on Windows
Change-Id: I970622c888d6c8b7c63e8b1674419ba900ea6d24
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-06 13:56:47 +00:00
Robert Löhning
f7ad1f02a1 SquishTests: Fix waitForProjectTreeItem() for python3
Amends 892ccd2097

Change-Id: I18e2c9a5407e4c70dfdae5e9c17959897ea33d50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 13:05:40 +00:00
Robert Löhning
42c653b53c SquishTests: Don't filter out code model issues when we need them
Amends c46dff0199

Change-Id: I5f2613edf15f86161a576ab21f16f079bd12a59f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 09:38:54 +00:00
Burak Hancerli
66d72433a6 QmlProject: Refactor QmlProjectManager
- feature: JSON based project manager plugin
- feature: functionality to write QmlProject file
- tests: tests for QmlProjectItem

Task-number: QDS-8810
Change-Id: I8989e54577e9cd883bd76346e22774cc7f7ed93f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 15:13:43 +00:00
Marco Bubke
318bb02801 QmlDesigner: React on watcher notification
The watcher notifies the updater if files or directories are changed.
The updater then does minimal updates to the project storage. Common
cases like that the qml documents or qmltypes are changed are handled by
an extra path. Otherwise we trigger a directory update. If the directory
is in 'strange' state like the qmltypes file is removed but the qmldir
is not updated the changed file ids are saved and used additionally in
the next notification.

Task-number: QDS-9479
Change-Id: Ie82fd914b2e229f0315bf60df398c85477ce5a26
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-04 10:44:09 +00:00
Robert Löhning
41c1b76af0 SquishTests: Stabilize tst_rename_macros
Change-Id: I9d77bf9daa66b46e2b16c8618e1848538cb797aa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 09:51:26 +00:00
Robert Löhning
892ccd2097 SquishTests: Add function for finding elements of project tree
Change-Id: I08c3c22a404d2b58bdb1205f22e5cf937c6027b0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 09:51:01 +00:00
hjk
305ccfe259 Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).

Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.

Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:56:55 +00:00
Robert Löhning
6ad3531b15 SquishTests: Handle expected failure of qml refactoring
Change-Id: I05b19c33de6e1245bfb6610f7a3fd39ba428aa28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-03 09:27:50 +00:00
Robert Löhning
5c5e12981e SquishTests: Add an explanation about automatically created kits
Change-Id: I1bb351c56600fa4a6e420299bdbaff1c436d19c9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-03 09:23:39 +00:00
Eike Ziller
b635e99086 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/libs/utils/multitextcursor.cpp

Change-Id: I54b00ea5e6953078beed7673b5de31114f983bfa
2023-03-31 15:58:09 +02:00
Christian Stenger
0c6b3b3747 Squish: Fix expected compilers on Windows
Compilers will be nowadays displayed with full version.
VS 2019 and 2022 are out for a long time and have been added.
Ensure installed official LLVM is detected correctly.

Change-Id: Ica29dca74cb8e08bafda1a88fcd2c2a6150bb236
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-03-31 06:12:49 +00:00
Tim Jenssen
adb664f521 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/libs/utils/filepath.cpp
  src/plugins/qmldesigner/qmldesignerexternaldependencies.cpp
  src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp
  tests/unit/unittest/CMakeLists.txt

Change-Id: I017a6075db41a5233487ac855ffe23de2b2bb0ee
2023-03-30 13:30:42 +00:00
Christian Stenger
3ad00fc871 SquishTests: More Python3 adaption
Change-Id: I95488e2b5661c8790cb73246947af58de2a1899b
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-03-29 15:17:24 +00:00
Christian Stenger
230b030755 SquishTests: More expected build issues
Expect build issues if the kit does not support the
minimum cpp standard needed by the project.
Additionally exclude the kit explicitly if the compiler
is too old to understand the needed minimum cpp standard.

Change-Id: I0cf0ad17b2cd68ba990d3360a8628ddd7fe507bd
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-03-29 15:17:09 +00:00