Commit Graph

68568 Commits

Author SHA1 Message Date
Thomas Hartmann
c100616ea6 QmlDesigner.RichTextEditor: Use proper parent and make dialog modal
Change-Id: Ifeb7f228acfcfc7daecdcd431be639809ec47f0e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-02 12:13:18 +00:00
Eike Ziller
261967a5f4 Fix search result font for symbol searches
SearchResultItem defaults to the standard application font,
we need to tell it to use the text editor font explicitly,
like the specialized addResult method did that was removed.

Amends d3deefc3a4

Fixes: QTCREATORBUG-25396
Change-Id: Id8d41d93c96fbfd6d993568a37d42509da452665
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-02 11:13:52 +00:00
Vikas Pachdha
385aecc692 QmlDesigner: Handle dynamic properties while merging model
Add variant properties explicitly to handle dynamic properties
Required for important customer

Change-Id: I22366e29e390a2dda7d882e4c2fde2540397c955
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
(cherry picked from commit 0c1d44604a)
2021-03-02 10:44:10 +00:00
Vikas Pachdha
550359b954 QmlDesigner: Use predicate to walk nodes for merging
Required for important customer

Task-number: QDS-3776
Change-Id: I59f647042d5975f953c4c9e2f24e60a0003b85c8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
(cherry picked from commit c17458cfa9)
2021-03-02 10:43:48 +00:00
Thomas Hartmann
70764080fd StudioWelcome: Allow to download examples
Change-Id: If46eb9bc2f24a6c1057fd3db34596c4619ddcb7b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-02 10:19:47 +00:00
Cristian Adam
fe540e8828 CMakeProjectManager: Remove isCmakeChanged state
Since CMake's file-api cache is the only source of truth for
CMake configuration, there is no need to keep track of such
a state.

Qt Creator will issue -D<var>=<value> -U<var> command line
parameters for CMake, which will update the file api json files.

Change-Id: I08e7041a95422549502eb7961f96570225e942fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-02 09:54:27 +00:00
hjk
6df27ccbe7 Debugger: Mark elision of long QUrls in Locals and Expressions
Fixes: QTCREATORBUG-25404
Change-Id: Ieee42f9239c9ffe88da03765678e1d2c4b6bb11d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-02 09:13:34 +00:00
Fawzi Mohamed
9e4e44d180 qmljs: preserve default arguments when reformatting QML
Fixes: QTCREATORBUG-23009
Change-Id: I9949fe26a91a063c4804fddcca4e26d14bc5cd61
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-02 08:29:42 +00:00
Fawzi Mohamed
0ff75a721f qmljs: reformat inline components
Fixes: QTCREATORBUG-25381
Change-Id: I472105cd6436d4d0ae7369880c332b8f4a2321ad
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-02 08:29:29 +00:00
Fawzi Mohamed
c57f6a703b qmljs: correctly handle required and readonly properties
* correct indentation after required property QTCREATORBUG-24144
* handle required <name> statement
* allow default readoly required reordering
* more permissive than the actual parser (which then will show errors
for invalid sequences)
* backport form QmlDom

Fixes: QTCREATORBUG-24144
Change-Id: I19166ca65d108d533a1ed3748c09e35bcfdbc56d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-02 08:29:13 +00:00
Cristian Adam
3c3e9a97fd CMakeProjectManager: Write cmake configuration into qtcsettings.cmake
The parameters sent to CMake are also saved as qtcsettings.cmake,
this allows Android Multi-ABI CMake projects apply the settings
for all ABIs.

This was part of 196b0da08a

Task-number: QTCREATORBUG-25183
Change-Id: I6d4f210247d5377cab855a1a051cf7aa815192c7
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2021-03-02 08:15:37 +00:00
Eike Ziller
720dbf557f PluginManager: Remove plugin crash check at shutdown
The check was mostly introduced for the case where Qt Creator crashes at
startup. For example if the user enabled or installed a plugin that
makes Qt Creator crash at startup, they get the chance to temporarily
disable that plugin because otherwise they cannot even access the plugin
dialog.

For shutdown that makes less sense, and is irritating for development.

Change-Id: I7267d74f4bb2d302c946a7488cc645ca4c7f864b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-02 07:46:16 +00:00
hjk
5f2edec6cb Utils: Fix setting up spinbox for IntegerAspect
setValue() has to be called after setRange(), otherwise the value will
by cut at the initial default 99 maximum.

Change-Id: Id4a7cf1db0e3044f32022d6de8f66810f9cd6b4e
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-02 07:31:42 +00:00
Miikka Heikkinen
ee07604f79 QmlDesigner: Sort previously flow-tagged imports to top of the list
Allow prioritizing certain modules in the possible imports list.
The obsolete "showTagsForImports" metainfo property was repurposed for
this to keep compatibility with old metainfos. A new metainfo property
"priorityImports" does the same thing.

Fixes: QDS-3801
Change-Id: I96aafcb8e6d10117e29203f55f60e73843b3aae5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-01 16:17:10 +00:00
Leena Miettinen
a1561d97e9 Doc: Describe buttons and fields in Transition Editor
Task-number: QDS-3771
Change-Id: I48b5a87f88552efdb2c1fef89d94d5f98047010a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-01 16:09:39 +00:00
Christian Stenger
bf0154e50f LLDB: Do not print warnings to Locals
Change-Id: I552f75ebbb57c4af30582aa764fec75aa08df340
Reviewed-by: hjk <hjk@qt.io>
2021-03-01 15:13:00 +00:00
Christian Stenger
88ef74d0f9 LLDB: Fixup filtering out function signatures
Amends 2f67d75ca4.

Task-number: QTCREATORBUG-25185
Task-number: QTCREATORBUG-25217
Change-Id: Ic22d67d742273f9a8944c64df4c8a0647c4157f4
Reviewed-by: hjk <hjk@qt.io>
2021-03-01 15:12:54 +00:00
Christophe Giboudeaux
4caca8fbfb Fix a link error when building the qmldesigner plugin
Fixes: QTCREATORBUG-25152
Change-Id: I36e51f3f552b3639d77342ee56e7efe5b44497e5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-01 14:01:00 +00:00
hjk
deeb845b93 Utils: Introduce an IntegersAspect
Change-Id: I71ed382633ec4527fcb99d3de49e81a01e9c1641
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 13:52:41 +00:00
hjk
b7acf45c13 Utils: Make BoolAspects also notify their changed values
... when triggered via base class setValue().

The pattern would probably be useful for other aspects, too, but e.g.
for actions in a menu (like switching on/off FakeVim) this already
covers most cases.

Change-Id: I7886f4b845883edb6d337df0fa53f989ae893f65
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 13:50:23 +00:00
Eike Ziller
131dc3df4b CMake build: Do not install valgrind-fake and cplusplus-keywordgen
These are Qt Creator developer tools

Change-Id: I9bad103d9139dde2b7bed7fd2117b5e1455daa92
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-01 12:54:21 +00:00
hjk
383e756dc3 Utils: Introduce a DoubleAspect
To be used with doubles (and QDoubleSpinbox as representation)

Change-Id: I0ad8ce1e495c48a305a42328c48e226ab3d4278c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 12:47:27 +00:00
hjk
e6fe923392 Utils: Add StringAspect::{append,remove}Value{,s} convenience functions
Change-Id: I3893d9512b7600328e127693da9dc07c771b305a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 12:47:10 +00:00
Ivan Komissarov
1b9349d328 cmake build: Fix setting WITH_PROJECT_FILE_UPDATES
This amends 13f466c.

Change-Id: Ib555d8ac9598c25e9f526a21ff0324f334eb6594
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-01 11:49:33 +00:00
hjk
60a9529485 Utils: Allow icons to be used for aspect actions
Useful for toggles in tool buttons, as used e.g. in valgrind.

Change-Id: I61f5d4ba86d1f39d0071e4c0e37d2447f408a91e
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 11:33:17 +00:00
hjk
a5d5887908 Utils: Use the user-set default value when (not) saving values
Change-Id: Iae05d767e28afcfbb581089f6253b633f1aab468
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 10:47:38 +00:00
hjk
632993a9b2 Utils: Constify ContainerAspect::forEachAspect
It doesn't modify the container itself.

Change-Id: Ia98da2488398fd7605b2b113b3aa6dfb882ab892
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 10:44:26 +00:00
Christian Kandeler
c1f05d58b8 CppTools: Clear outdated "semantic parentheses"
For instance, if the user types "template<", then the next operator> in
the source code will be temporarily classified as the closing angle
bracket for that template. Therefore, we have to clear out any previous
information of that kind.

Change-Id: Ib6d64415b2f6294661e2b8ec48cbaea5893d8fd0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-01 10:07:54 +00:00
Miikka Heikkinen
f071a3301b QmlDesigner: Hold import progress while application inactive
Creator's global filesystem watcher doesn't trigger while the
application is inactive, so changes to file system are not detected it
that is the case. Hold the import process while we are waiting for
filesystem update if the application is inactive.

Fixes: QDS-3809
Change-Id: If55a5ce45ddf06095d7ea51c5dec4f882e83d81f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-01 09:04:45 +00:00
Eike Ziller
0f5b6c82ee Merge remote-tracking branch 'origin/4.15'
Change-Id: Ifae18bacb0c4bdb1e0516c9f92c0fd16150e35e6
2021-03-01 09:56:20 +01:00
Eike Ziller
eaa4592b63 Merge remote-tracking branch 'origin/4.14' into 4.15
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I892ea0c3b42f61b9cd24fa5508ec181d8d245d29
2021-03-01 09:49:45 +01:00
Alessandro Portale
9fbd1c26b0 CMakeProjectManager: Use the "gear" as project root item icon overlay
Replace and remove the pixel accumulation called "projectexplorer.png".

Fixes: QTCREATORBUG-25397
Change-Id: Idbf5e634bbe98d6eb9cc2cbaafd7f631cac18a83
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-01 08:23:51 +00:00
Eike Ziller
a0f12f5b98 CMake build: Add version number to external plugin dlls
Fixes: QTCREATORBUG-24590
Change-Id: I01996e25af0b8ab7056c5d2012cd7951c3757ae5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-26 18:27:26 +00:00
Thomas Hartmann
44ce8db8d6 QmlDesigner: Add more annoations titles
Change-Id: Iec5198426979f2540beda08ccaa064f042897f3b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-26 17:29:50 +00:00
hjk
61a0b2b2b3 Add some basic contact information in a new Help->Contact dialog
Change-Id: I5a01c3d3c9fd467ed7b48869b66617adf2b11fed
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-26 16:36:07 +00:00
hjk
6f479665f7 Utils: Add manual apply for aspects
The current aspect implementation directly couples ui element
changes with aspect value changes. This is appropriate in situations
like the Build or Run Settings, where configuration changes are
automatically applied.

This change here makes these connections configurable to potentially
re-use aspects in Ok/Apply/Cancel scenarios, as a first step only
for {Bool,Integer,String}Aspect.

The change is source-compatible, but changes the behavior of
BaseAspect::setDefaultValue(): This now _always_ sets also the
value, silently.

Change-Id: I2acd66b42c2251134658d35bb31b5d938149de4f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-26 16:35:58 +00:00
Christian Kandeler
4ebe717a7d Output panes: Fix auto-scrolling issue
The idea is that the user turns auto-scrolling off by manually moving the
scrollbar up and turns it back on again by moving it all the way down.
However, at least on my machine I am no longer able to do the
latter -- the scrollbar position is always at least one below the
maximum. I don't know when, why or how that changed, nor do I know
whether it's about Qt, the window system or something else. Either way,
we have to account for it.

Change-Id: I83aab758d72735d4db45d228eca8bbc7a8eebd93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-26 15:34:55 +00:00
Christian Kandeler
1616e72fcc Core: Fix accidental re-ordering of search results
Amends d3deefc3a4.

Fixes: QTCREATORBUG-25396
Change-Id: I6ca9c9cf20dcdfc7fbb4dbd5e8bf473880267736
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-26 15:12:04 +00:00
hjk
434c624b6f LayoutBuilder: Add support for VBoxLayout and HBoxLayout
Change-Id: Ieeef8244a05ffb1b642843c6471f92e2b154cf8a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-26 13:29:31 +00:00
Alessandro Portale
1ed3d242de ProjectExplorer: Refresh fileoverlay_product.png
Provide it with the semi-transparent white outline that other overlays
have. Good for dark themes.

Also, let's keep the original version controlled in our icons SVG.

Task-number: QTCREATORBUG-25395
Change-Id: I439ce4c25ed6d6e758dc4ac078e65977b16aafe5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-26 13:13:26 +00:00
Cristian Adam
faa21ef378 CMakeProjectManager: Allow copying of CMake variables
In the context menu of the CMake variables there is now a "Copy"
entry that will copy to clipboard the -D<var>:<typ>=<val> or -U<var>
values.

Task-number: QTCREATORBUG-22482
Fixes: QTCREATORBUG-24781
Change-Id: Iaa70e64fd0593398732ccb8d9036571b308b5f12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-26 12:18:58 +00:00
Christian Kandeler
93ec7862f2 Wizards: Remove duplicate entries from translation combo box
We only care about language and country, but there are locales where
these are the same. Since they map to the same output for our purposes,
we randomly choose one of them.

Change-Id: I0591607d1dfa6ea27cd9405cf895d0f8865df804
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-26 11:55:33 +00:00
Miikka Heikkinen
d41bc944cc Help: Fix crash with previous/next document in help mode
"Previous/next Open Document in History" crashed in help mode when only
a single page is open.
Disable the actions in this case, and add a guard that prevents setting
the current page to an invalid index.

Fixes: QDS-3743
Change-Id: I569292d8c348269dd12d2ebb089c03173cbd4bc2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-26 09:50:15 +00:00
Heiko Becker
0de044d479 Use GNUInstallDirs to install desktop and appstream files
c81baf1a9c introduced the usage of
GNUInstallDirs for Linux. Use it to install desktop files and
appstream metadata, too.

Change-Id: I13a363e5383e1150fd9b8d7e33d55ac53bee63ff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-26 09:44:11 +00:00
Eike Ziller
dce690ab73 Fix build with Qt 6
Change-Id: I67ffc389d7579ac98755ec99614ce9b3e4e07df5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-26 09:26:15 +00:00
Henning Gruendl
91241d86de QmlDesigner: Fix property editor value setter
Fix property editor value setValueWithEmit and setExpressionWithEmit by
resetting the other.

Task-number: QDS-3800
Change-Id: I7729c0b9fbac7eacce665d00d79a69e8ee7a5f90
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-26 08:31:29 +00:00
Christian Kandeler
a995a4633f CPlusPlus: Do not mis-classify bitfield declarations as initializations
Fixes: QTCREATORBUG-25390
Change-Id: I1976b7db2996f5a09db73adbd127aac9ab92d57d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-25 15:55:54 +00:00
Christian Kandeler
1027b94fcb Fix some compiler warnings about unused variables
Change-Id: I9a9450eab68f53b08722adb9a5d33c4f318b2129
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-25 15:55:39 +00:00
Vikas Pachdha
0c1d44604a QmlDesigner: Handle dynamic properties while merging model
Add variant properties explicitly to handle dynamic properties

Change-Id: I22366e29e390a2dda7d882e4c2fde2540397c955
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-25 14:55:13 +00:00
Vikas Pachdha
c17458cfa9 QmlDesigner: Use predicate to walk nodes for merging
Task-number: QDS-3776
Change-Id: I59f647042d5975f953c4c9e2f24e60a0003b85c8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-25 14:55:07 +00:00