Commit Graph

80509 Commits

Author SHA1 Message Date
Marco Bubke
8de67a6850 QmlDesigner: Use new validation approach in form editor
Many validation tests can now be skipped.

Task-number: QDS-7454
Change-Id: Ia7b126611d2c7c72ff3b1c77565acd5a160d0d06
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-26 08:51:18 +00:00
Marco Bubke
1d9c7e071e QmlDesigner: Use new validation approach in material browser
Many validation tests can now be skipped.

Task-number: QDS-7454
Change-Id: I01c37ff9747260940400043d2a0e39bb2700ee5b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-26 08:50:36 +00:00
Marco Bubke
6659024dd3 QmlDesigner: Add sourceContextAndSourceId to SourcePathCache
Change-Id: I4f5eb784e80d3afc10aa007f3be1604f6e18e312
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-26 08:49:54 +00:00
Marco Bubke
0b47270be2 QmlDesigner: Use new validation approach in component core
Many validation tests can now be skipped.

Task-number: QDS-7454
Change-Id: I677fd75ed03dca49353b2eba68d2e470509c28ae
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-26 08:49:40 +00:00
hjk
23f26a45f5 Core: Inline filesystemfilter.ui
Change-Id: I6d7fb337a1700c78becb182d30c5967906b6d432
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-26 08:37:18 +00:00
Henning Gruendl
e32f585fda QmlDesigner: Fix drop incorrect place
* Fix drop incorrect place
* Improve overall drag smoothness

Task-number: QDS-7733
Change-Id: I70e23df54c0e52b423c21b883924c5daee955d0a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-26 08:27:31 +00:00
Jarek Kobus
141fe19e59 TextDocument: Make m_document a child of TextDocument
This is needed when moving TextDocument object between threads,
otherwise all objects that are not children of the TextDocument
(in terms of Qt's object hierarchy) will stay in the old thread.

Change-Id: If5cc0151a5e4c1c7b69cf949bbb9cad317a44d17
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-09-26 08:24:14 +00:00
Eike Ziller
4c13b7ca65 Fix duplicate translations
Amends 6bc77c7c37

Change-Id: I2623bfa2ca2640cde4b95e5617e3d2a0991f6b96
Reviewed-by: hjk <hjk@qt.io>
2022-09-26 07:43:59 +00:00
Eike Ziller
4fd4b42f3d Fix FilePath::absoluteFilePath for default constructed file path
FilePath::absoluteFilePath() would consider an empty path to be
relative, and resolved it wrt the current working directory. That is
unexpected in the sense that QFileInfo::absoluteFilePath behaves
differently, and lead to a crash down the line when e.g. a diff editor
was opened when the current working directory is '/' (the default on
macOS when started with "open" or from Finder, Dock or Spotlight).

Make FilePath::absoluteFilePath() return and empty path if the input was
empty.

Change-Id: Ie0d4da50afa24134bd56505b2f4abcf382eee982
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-09-26 07:43:36 +00:00
hjk
e3a6f56e8f Bazaar: Remove extra Row / st again
Slipped in with ded6500922 after it was removed in 6da227925a.

Change-Id: I53cf5216490b60e201ed9a70e3f08c583a5fa1ae
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-26 07:08:27 +00:00
Leena Miettinen
9542e9bd1c Doc: Fix missing \endlist command
Change-Id: I4daee6fad7d016c60b359c881852549c4d751528
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-09-26 07:04:16 +00:00
David Schulz
7419fa1b3d Locator: reduce strictness of actions filtering
Use the updated fuzzy matcher to get more relevant results.

Also highlight all ocurences of the search string in the display name
and the extra info.

Change-Id: I500b3323fd35953eac4f28db9fa03fc3870286dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-26 06:57:05 +00:00
hjk
ded6500922 Bazaar: Convert to Tr::tr
Change-Id: If49e9ccf9426f049bff842b1facbd408d1d54d4e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-26 06:00:44 +00:00
hjk
6da227925a Bazaar: Inline bazaarcommitpanel.ui
Change-Id: I5b72560b283584075b30e4bb313a5c143f5c2548
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-26 06:00:36 +00:00
Thomas Hartmann
85b911d30b QmlDesigner: Fix anchor targets
In some cases the binding for anchor targets is not properly resolved.
Using explicitly the root context we define the ids in does solve
the issue.

Change-Id: I69e5bd237668719ec9417d30d0bac8635c79506a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-23 14:53:48 +00:00
Thomas Hartmann
507b1fff39 QmlDesigner: Create importComponentObject in root context
This might be the implicit default, but let's make this
explicit.

Change-Id: Ic42735b12f22819767ceb642d265f813201c9146
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-23 14:53:41 +00:00
Henning Gruendl
5582a8047a QmlDesigner: Fix model sync on property remove
Removing the name property of a state in the TextEditor was not
triggering a model rest, which caused the StateEditor being in a wrong
state.

Change-Id: I1bd43f5f6bfb962e4a838cbd74c37c7ed4e37d9c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-23 14:50:44 +00:00
Henning Gruendl
d920139302 QmlDesigner: Fix binding editor empty expression
If the user pressed "Accept" on the binding editor if the text was empty
a dialog with a warning popped up. This fix avoids sending empty strings
to backend when condition.

Task-number: QDS-7729
Change-Id: I77e5e9d34f8566dc4ed215c839b01186d839a2df
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-23 14:50:35 +00:00
Miikka Heikkinen
2f55183557 QmlDesigner: Fix crash if build target is not defined
Change-Id: Ieae55ff1a5f5de132f10ee5b51bab610ece8e39a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 14:19:45 +00:00
Miikka Heikkinen
3d672dbf16 QmlDesigner: Fix material 2D view preview for material root components
Change-Id: I7930e5087014b47ccc054109cbb607ef9c373515
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-23 14:12:15 +00:00
Thomas Hartmann
5b0bb02115 QmlDesigner: Fix ColorDialog popup
Change-Id: I7f8daa6e9b26ae8244de1f7ab7c7db1dfa9b7e52
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-09-23 12:42:54 +00:00
Christian Stenger
805e536df6 Utils: Fix result of fileNameWithPathComponents()
Combination of bf8bf1adc0 and d83f9d71cc broke
the resulting string.
Fixes tst_fileutils file name tests.

Change-Id: I69c485e52bbf76093b903b407ab2ff2f58d28a0d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-23 12:39:32 +00:00
hjk
d5412588fd Utils: Remove QDir use from parentDir() implementation
cleanPath() is good enough now.

Change-Id: I3f0e7a96496c11bc90c4eb83c35d706aeab93aa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 12:21:12 +00:00
Jarek Kobus
7b77085652 TextEditorWidget: Prolong the lifetime of old document
The crash happens when calling TextEditorWidget::setTextDocument()
second time for the same editor instance.

Change-Id: I0a2febb50702673e2751a0d41fc0bc80cb6ba4a2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 12:17:09 +00:00
Christian Stenger
4ea8823f45 Squish: Start the wizard directly
Instead of just providing the new project dialog with
a single factory run the wizard directly.
Spares the user one click.

Change-Id: If6fb079721c997f550694466ba39a83bc7cd4182
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-23 12:12:57 +00:00
Christian Stenger
e919229074 Squish: Fix open suites
Do not skip suites if they have no test case yet.

Change-Id: I6f2697379f9eb7475aca2635a587dfc550e6b82c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-23 12:12:46 +00:00
David Schulz
45bd886e3e TextEditor: add find usage to context menu
... of the generic text editor if the editor has the FindUsage optional
action mask set. This is mainly used to show this action when a language
server is configured for this editor that supports find usages.

Change-Id: I55c6983cd553c46817332144f78f1207185ac3f6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 11:39:14 +00:00
David Schulz
54feec93e3 LanguageClient: correctly initialize editors of opened documents
Change-Id: I2dee2093c0bdb97a204e89bf0db526ae405b8e78
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 11:39:10 +00:00
David Schulz
b88ba1b7a6 TextEditor: add optional action mask for find usage
Change-Id: If8187b226d176c292d0d90aed870f78d9d3d2730
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 11:39:07 +00:00
hjk
ffff3080e2 Bazaar: Inline uncommitdialog.ui
Change-Id: I92eb7a1128394f680b473fc7cb8cb9e5e4f63f67
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-23 11:28:27 +00:00
Miikka Heikkinen
c909e791d6 QmlDesigner: Remove unused variable
Change-Id: Ifaddb79f01887d73cc2d715ba45f41f2dcd30a0a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-09-23 11:25:26 +00:00
Samuel Ghinet
e46431f7df QDS New Project Dialog: Remove Warning that UserPresets.json was not read
Task-number: QDS-7679
Change-Id: I639a8323b3860f3dfb5f4287267a014aaa95dc63
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-09-23 11:21:03 +00:00
Marcus Tillmanns
d97b2fd6f4 FSEngine: Add tests for reading/writing
Change-Id: If38d27933727d4af0b24758bdf1a58f5ea78fd1b
Reviewed-by: hjk <hjk@qt.io>
2022-09-23 11:19:35 +00:00
David Schulz
1ee370df50 LanguageClient: check capabilities before find usage
Change-Id: I421c2f93c90e6b0b8198fcff5707e8a47e8022f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 10:51:11 +00:00
Christian Kandeler
049c2cf6f3 QmakeProjectManager: Work around broken mkspecs
E.g. linux-oe-g++/qmake.conf has this craziness:
    QMAKE_CXX = arm-poky-linux-gnueabi-g++ -mthumb -mfpu=neon
                -mfloat-abi=hard -mcpu=cortex-a9
                -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
                -Wformat-security -Werror=format-security
Since there seems to be no hope for a fix, we work around it by looking
for compiler options in the alleged executable names and forwarding them
along with the flags from the actual *FLAGS variables.

Fixes: QTCREATORBUG-28201
Change-Id: Id0651677dd7b444a5f443e63d36e8dec52106af7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 10:04:06 +00:00
hjk
9f71f8b933 Bazaar: Inline revertdialog.ui
Change-Id: I6cff0f874076b498f07d11ede5d4e099ba179be7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-23 09:39:00 +00:00
hjk
dd585c601c Utils: Make path cleaning platform agnostic
Unfortunately, QDir::cleanPath() only cleans according to the rules
of the host system, which can be wrong in remote setups.

As the implementation is not accessible/tweakable from the outside,
copy the relevant code and remove the platform #ifdef's.

Change-Id: Ife9a925412a12d3cef21ed3721a387c61c152ddf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-23 09:25:05 +00:00
Henning Gruendl
a7c15838e2 QmlDesigner: Add tooltips in StateEditor
Task-number: QDS-7736
Change-Id: I6732043da895e04e6ed70f74d8342ba7ff7354fe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-23 09:21:03 +00:00
Henning Gruendl
66ec244cf9 QmlDesigner: Fix TextField context menu
Fix TextField keeping its selection after context menu is opened. Due to
this bug QTBUG-71723 being closed the behavior changed. Also the states
when condition TextField needed to be context menu aware to not set a
new expression when the context menu is opened, otherwise it will
immediately reset the model and the context menu wont show up if the
content was edited.

Task-number: QDS-7730
Change-Id: Ic0e63cd3d244bd7f83bcb0edd3b31c0ca1f0a5df
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-23 09:20:21 +00:00
Henning Gruendl
a8f46ac852 QmlDesigner: Add Timer specifics
Task-number: QDS-7582
Change-Id: I8254012970cd54e450853e026b421c73258c1346
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-09-23 09:20:09 +00:00
Christian Kandeler
712311b20c LanguageClient: Optionally use a different default replacement string
... when renaming symbols.
Otherwise, the server might return an empty list of results, as renaming
a symbol to itself is a no-op.

Change-Id: I9ca808c4032458c9a2eec262feadd28212938c23
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 08:39:57 +00:00
Eike Ziller
6bc77c7c37 T9n: Fix after changing "Switch To" to book style capitalization
Book style is a specialty of english, no need to break existing
translations.

Amends 7be9d0f567

Change-Id: Ic9a7c4110e38aaace4d93092b706330e9a05f565
Reviewed-by: hjk <hjk@qt.io>
2022-09-23 08:13:50 +00:00
Christian Stenger
9adcd3bdd2 Squish: Improve tool tips
Change-Id: Ia0e63aedabfea781b09a3653d5c0e7ba63bbca4d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-23 08:02:19 +00:00
Piotr Mućko
df92e79da4 McuSupport: Sync JSON files with QtMCUs repo and related fixes
This synchronizes JSON files used by unit tests with files
in QtMCUs repo. To do that some changes in code were needed.

QtMCUs package is no longer created for each JSON file. Because of
its nature it's created once and passed to each target.

Unit tests now have verifyPackage function to avoid duplication
of checks.

In test creating target QtMCUs package is checked beside toolchain
ones.

Change-Id: I5dea470daf184b45facfaaa793c359310ac22fc1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-23 07:48:14 +00:00
Thomas Hartmann
c3f5a9bf0d QmlDesigner: Add timer to library
Task-number: QDS-7582
Change-Id: I048b08cae236bbce39d83c6881abad21592fcb8b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-09-23 07:35:53 +00:00
hjk
5dcfbe6c52 Autotest: Use more FilePath
Change-Id: I15de1121305f245274d74b4116786f6f07ffa3c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 07:25:16 +00:00
Alessandro Portale
9e9c0630ee Welcome: Convert to using Tr::tr
Change-Id: Ibcef6dab32894d3032b44965bdcd92fa4f6f780a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-23 06:40:43 +00:00
hjk
686bcb3ef5 TextEditor: Proliferate FilePath use to FontSettings and ColorScheme
Change-Id: I3fd2e57b9b922d7bf6269b608da48f4a2e13dfb2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 06:22:22 +00:00
hjk
dc09779044 TextEditor: FilePathify CodeStylePool
Change-Id: I1ae0706237c7b50d5faf3e069d7bb238e237f331
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 06:22:11 +00:00
David Schulz
d83f9d71cc Utils: use native path in FilePath::displayName
Change-Id: Idf82f963cbdee648c53038af478963044b3aa631
Reviewed-by: hjk <hjk@qt.io>
2022-09-23 06:18:57 +00:00