Commit Graph

8097 Commits

Author SHA1 Message Date
Jarek Kobus
936086745a FileSearch: Get rid of FileSearchResult
Use SearchResultItem instead.
This change should reduce the remaining freeze described in
a9eb732ce6 even more.

Change-Id: I102b82ed5677360ccd9e425dd0bdd941d87116f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-09 11:03:48 +00:00
Robert Löhning
8764bab627 SquishTests: Improve version detection for imports
Change-Id: If38aa92c22c3390859f738ad5bfa5bacf47302ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-09 08:29:14 +00:00
Robert Löhning
13e0011dba SquishTests: Fix formatting of exception message
Amends 8d03220017

Change-Id: I05266fe6152a8ac2601890e8dcf32fc68d0989d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:28:51 +00:00
Robert Löhning
a32e720692 SquishTests: Some more Python3 adaption
Change-Id: Iee0fd4107c3423d72a1dc51b0087837e4de46537
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-09 08:28:29 +00:00
Tim Jenssen
5a88c3ffc1 QmlDesigner: improve ModuleScanner
handle empty path and paths better

Task-number: QDS-9847
Change-Id: I9dc6f7972835a366a046d06641fbb64494c734fc
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-05-08 15:29:27 +00:00
Tim Jenssen
1d183e4de7 QmlDesigner: use GTEST_INTERNAL_HAS_STRING_VIEW for str compare
constData() was a workaround for the tests

Task-number: QDS-9847
Change-Id: I23fcca794ab50101ae70034079af46303c98c648
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-05-08 15:29:16 +00:00
hjk
41b6ecf502 Fix environment auto test
Amends 1e1befd9eb.

Change-Id: Iecd06ee06081057208a2b3387d618142dc74d0bd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-08 12:03:52 +00:00
Marco Bubke
4be3f6b5e9 QmlDesigner: Improve version handling
Consolidate version handling in imports. It has drawbacks if we copy
code to different places in our code base. Having tests for the version
conversion has advantages too.

The invalid version has not anymore using -1 but the maximum integer as
indicator because an empty version is higher than any other version.

Change-Id: I8608b9509660f4253e8e5ba7397d964defe35e51
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-05-08 11:35:59 +00:00
Marco Bubke
5b9950c5d0 QmlDesigner: Make meta info system mockable
Using the projectstorage mechanism we introduce a flag for the test, so
we can use ProjectStorageInterface instead of ProjectStorage. It has the
overhead of a virtual function interface but for the test that is
neglectable. In the test we can now use a project storage mock to
emulate the meta info system. Later we could use a pregenerated database
file to create a fake project storage.

Task-number: QDS-9766
Change-Id: I16efa28bc4b12181941adecc132084157156daec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-05-08 11:18:15 +00:00
Marco Bubke
32f84fc05a QmlDesigner: Move Version to different namespace
We want to use it not only for synchronization.

Task-number: QDS-9766
Change-Id: I26a2ade8203d9c5131e8dec101885434713f8252
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-05-08 10:52:20 +00:00
Semih Yavuz
cd73f8c6b8 qmljsreformatter: don't default foreach type to "in"
Fixes: QTCREATORBUG-29123
Change-Id: I4d3a611c359946c4483388cbf18a0b6f16d0a8d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-08 07:39:26 +00:00
Robert Löhning
82b5cc89cb SquishTests: Log used Python version
Change-Id: I60cb928382840f34800af6a8ee1ed7f084acfb93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-08 07:33:12 +00:00
The Qt Project
a65637be5c Merge "Merge remote-tracking branch 'origin/10.0' into temp" 2023-05-08 07:30:02 +00:00
Eike Ziller
5917171911 Merge remote-tracking branch 'origin/10.0' into temp
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I877666cf9c209c5b0a1365aeb81d9cb13144a993
2023-05-08 09:17:56 +02:00
hjk
cc45afdfb0 Layouting: Avoid a lambda in the demo
Change-Id: Ic11936fd2a6da2153a52e39249d49d174ffb8466
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-05-08 06:58:17 +00:00
Jarek Kobus
8b3aa900da Utils: Move SearchResultItem/Color into Utils
It's going to be reused inside FileSearch.

Change-Id: I8993d7158ff31c311c2283d32bc43465a8946a52
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-08 06:41:27 +00:00
Alessandro Portale
1e1befd9eb Proliferate pathListSeparator()
Change-Id: I546107af6a88ad5901659a0a64485e4ebca3a164
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 15:17:10 +00:00
hjk
62f3d29be4 Layouting: Introduce Ids for Items
Intenally just wrapping a 'bindTo' result, but less trigger potential
for pointer related peladophobia

Change-Id: I25171a2675fb0474ce97c04552ac1cf5ffd6ee56
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 15:08:23 +00:00
hjk
d5329d56b6 Layouting: Add demo
Currently almost the same as the comparison example, but planeed to
grow.

Change-Id: Id129266a1b5b12438e2fb643ee114e6d816581f6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-05 13:09:02 +00:00
Jarek Kobus
af32b0ce44 Tests: Rename tst_AsyncTask -> tst_Async
Follows 187a7640de

Change-Id: I58e6afbc0cbdea37c405b11e133d794a91f09fc6
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 12:35:56 +00:00
Jarek Kobus
abce79939a Tests: Rename tst_QtcProcess -> tst_Process
Follows 470c95c94b

Change-Id: Ie26b5677d28e645ab27aeebf5976b5507385716a
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 12:35:50 +00:00
Robert Löhning
200d3b455b SquishTests: Don't test.verify state of checkbox in getBuildIssues
- It generates a ridiculously large number of test results in
  comparison to what's actually tested
- In tst_memberoperator, it is used in waitFor(). Thus, it depends
  on timing and the number of test results varies from one
  execution to another

Change-Id: I7d4ad8f87590b4fc2dda51e9eda703961c7acd9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-05 09:35:38 +00:00
Robert Löhning
8d03220017 SquishTests: Improve log messages of exceptions
...and make them more similar to Squish's own "Error" messages.

Change-Id: If5df701d4fa01fc1c1aea94cc9778a6a5dccc44e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-05 09:33:01 +00:00
Eike Ziller
7724f8653f Merge remote-tracking branch 'origin/10.0'
Change-Id: I7a3925ad8e4f97461b64a70217102ed900430253
2023-05-05 10:39:47 +02:00
Tim Jenssen
1f2f223dd7 Merge remote-tracking branch 'origin/10.0' into qds/dev
Change-Id: Ifb5f580cfea7c0d166756938b013a338279d45d9
2023-05-04 13:45:45 +00:00
Jarek Kobus
867b10a06b Remove unused includes of QFutureInterface
Change-Id: I70f5e842801b628c7f9ad4d433334ce04d4e648e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 06:50:36 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
Marco Bubke
c88417cf48 Utils: Silence warning for GCC too
GCC is recognized by clangso we silence both.

Change-Id: I377caa344a60636e3c73404d9d02a4dfc2eda794
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-05-03 16:08:20 +00:00
hjk
50084f6b0e Layouting: Handle attach types via setter
Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:19 +00:00
hjk
70b02d23e1 LayoutBuilder: Rework
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.

Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).

No direct access to the widget in creation, funnel out is
via the new bindTo() facility.

Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:02 +00:00
Jarek Kobus
a3a5b8f806 Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}
Follows AsyncTask -> Async rename.

Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:24:20 +00:00
Jarek Kobus
82bc4870b3 Tasking::WaitForBarrier: Rename it into WaitForBarrierTask
Rename BarrierAdapter into BarrierTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I003b09fd71af1bde870f761d365a8cea1858862a
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:07:51 +00:00
Jarek Kobus
187a7640de Tasking::Async: Rename Async into AsyncTask
Rename Utils::AsyncTask into Utils::Async.
Rename AsyncTaskBase into AsyncTask.

Task-number: QTCREATORBUG-29102
Change-Id: I3aa24d84138c19922d4f61b1c9cf15bc8989f60e
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:28 +00:00
Aleksei German
26acabe625 QmlDesigner: Fix tests compilation
availableInVersion() was removed

Change-Id: Ic98f585ae9b4a8dcdf83281eb6e272b01f3ae4b7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-05-03 10:02:16 +00:00
Jarek Kobus
4b129df44f TaskTree: Enable the fluent interface for Tasks
Make it possible to use the default Task c'tor
and add selected handlers with onSetup/Done/Error()
methods.

Change-Id: I94f5806f347931faa07cff0ade620a3d30777cfe
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 07:05:28 +00:00
Christian Kandeler
8aecf0d749 Fix qbs build for QML test
Change-Id: I8df3988f574cc94c8bb441a54a1b861913029dfa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 11:17:36 +00:00
Robert Löhning
d86b091297 SquishTests: Further Python3 adaption
Fixing tests in suite_editors

Change-Id: I4e5e1adc2c4e6606232d76a794aff7a7144d5c9e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 09:14:12 +00:00
Eike Ziller
66c0c36bc1 Fix compiler warnings
Change-Id: I9b0b4a60d1152142f62bf3f76885cf8019714623
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 09:05:16 +00:00
hjk
3e953f4896 Layouting: Add some example code as show case
Change-Id: I92842c7859514397748e744949688090154772df
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 08:58:20 +00:00
Christian Stenger
3aefbb37b9 Tests: Fix qbs build
Amends 0b3a0dce88.

Change-Id: I89a301a8780f17c3197ffe99a6cfc9a61d5961b3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-02 07:00:07 +00:00
Jarek Kobus
ce1a9b5990 TaskTree: Add tests for new functionality enabled by Barrier
Test, that it's possible to distribute the barrier advance
in multiple tasks.

The barrier passes after the both advances are triggered.

Change-Id: Ica58f9657ecdf1ba45e1059ea47be0453948e7b9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:54:28 +00:00
Jarek Kobus
c4acd5ce4c TaskTree: Refactor barrier tests
A preparation step before adding new barrier tests.

Change-Id: I83aa8a7788859f98c98885384b52dc3377e01916
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:54:20 +00:00
Jarek Kobus
36dad70ab0 TaskTree: Replace the usages of old WaitFor with new Barrier
Adapt the TaskTree tests and the usage in FileStreamer.
The FileStreamer may be tested by running the
FileSystemAccessTest.

Change-Id: I1d8086dd359c458b7bdd3d4d47cf249184b04c65
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:53:59 +00:00
Marcus Tillmanns
015d12ccf3 FakeVim: Accept suggestion with Tab Key
* Changed signals to callbacks as only one receiver was ever added
* Added "tabPressedInInsertMode" callback to allow accepting
  a suggestion with the Tab Key

Fixes: QTCREATORBUG-28830
Change-Id: Ie70ba595b8802b6100fff495164d8e0471b1354c
Reviewed-by: hjk <hjk@qt.io>
2023-05-02 06:53:54 +00:00
Jarek Kobus
0b3a0dce88 TaskTree: Rewrite tests to use AsyncTask
Instead of using QtcProcess. In this way the tests may be
executed much faster, since there is no need to start
qtcreator_processlauncher.

This should limit the CI failures caused by timeout when
executing these tests.

Remove testapp, unneeded now.

Change-Id: I80775276c2aaec7c2d463b1ac25010efa942b258
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 04:51:42 +00:00
Tim Jenßen
9c2a73b1c8 Merge remote-tracking branch 'origin/10.0' into qds/dev
Change-Id: I51801c3bec7e29f7c7384d86d79b4fcabb4f99c1
2023-04-27 20:30:00 +02:00
Jarek Kobus
df5e3c587a TaskTree: Enhance Sync's function
Make it possible to pass a void returning function to the
Sync constructor. In this case it's assumed that function
returns true by default and finishes successfully.

Add some helpful error messages when requirements for the
passed function are not met.

Change-Id: I8be75acd277d06e87db3c87a6eb96173aa9cd890
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-04-27 08:11:24 +00:00
Jarek Kobus
36eab77c61 tst_taskTree: Add more tests for WaitFor/Condition/Activator
Change-Id: I662d56c3b943a4df8b4c12da95eb57fbca9e3048
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-27 06:08:22 +00:00
Marco Bubke
de2154f1c9 QmlDesigner: Add versioning for core modules
Task-number: QDS-9786
Change-Id: I56c6e9ca06ffcfcaf35cbbee061cb99e7297fca5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2023-04-26 13:16:40 +00:00