Commit Graph

67787 Commits

Author SHA1 Message Date
Michael Winkelmann
98ab3af2a8 Annotation: isEmpty const
Change-Id: I95f1c275c7190f27e0ac2c1a57eb791c9353d4c8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-09 11:24:10 +00:00
Jarek Kobus
675a72e296 Fix a deadlock when closing Creator while loading a project
Replace the call to SynchronousProcess::run() by asynchronous
call that invokes a process.

This change may be tested by applying the additional patch
mentioned in QTCREATORBUG-25385 description.

Don't call the SynchronousProcess::run() from the main thread when
the Quit event was already scheduled for qApp, since the Quit event
will get removed from the awaiting queue by a call to
QEventLoop::exec().

Fixes: QTCREATORBUG-25385
Change-Id: I8af39552443bfa9b3af6e31ddce85a01b91bbbd8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-09 11:13:01 +00:00
Miikka Heikkinen
2de66272e8 QmlDesigner: Fix item library header
Title text of tab buttons no longer overlaps the plus sign.

Fixes: QDS-3842
Change-Id: Iec51ebf00e6f719eac8b7204634ae8dc7696939a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-09 10:53:12 +00:00
Mahmoud Badri
af41cca569 QmlDesigner: Move new item lib qmls to the share folder
...so that theming and hot reloading can be applied. Theming isn't part
of this commit. Also used icon font instead of pngs.

Change-Id: I7df149fe9c07fb4c2e3deca6bcf3b0346025e3d6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Miina Puuronen <miina.puuronen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-09 08:58:14 +00:00
Marco Bubke
a6f944e472 Sqlite: Use emplace_back instead of push_back
It does not only removes code it should be even more optimal.

Change-Id: I819a7300ca798c3109b20c1e3bafcd19078faebd
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-09 08:58:05 +00:00
Marco Bubke
5c459be526 QmlDesigner: Add Model::bindingPropertiesAboutToBeChanged
It is sometime quite useful to know the old value. For example to remove
it. We could add add the old values to the bindingPropertiesChanged but
this would be a much larger change.

Change-Id: I9b4a78602a35766c99092892b61173fc5c439978
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-09 08:58:00 +00:00
Marco Bubke
00cec8a688 QmlProjectManager: Bump up version of the multilanguage database
Change-Id: I123171475f6d37241fdbe37c94725df718f5fe9f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-09 08:57:53 +00:00
Marco Bubke
20690236d7 Utils: Add iterator constructors to small string
Change-Id: I34e15177268f0733200d25c90fd935485c3176ae
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-09 08:57:30 +00:00
Tuomo Pelkonen
dab168fa81 QmlDesigner: Fix flow editors decision items selection area
Decision item must only be selectable from the item, not the label text. Text can
overlap with other items and selection becomes unnatural if it is included
in selection bounding rectangle.

Task-number: QDS-3747
Change-Id: Ic5697f124cd0210f6af00b3c004ea19d0af2cd91
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-09 08:46:53 +00:00
Tuomo Pelkonen
29307b7b15 QmlDesigner: Improve in-place Text element text modification
When double-clicking Text -element, check if the text is rich text or not.
In case of rich text, show a rich-text editor modal dialog
In case of plain text, show a in-place LineEdit with correct font

Task-number: QDS-2306
Change-Id: I5206c7d6c869e26ad39979106510d72626dbe800
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-09 08:46:46 +00:00
Tuomo Pelkonen
8e7a3ae4a6 QmlDesigner: draw FormEditorItem bounding rectangle
Draw red rectangle around FormEditorItems
Optimize drawing using square root based sizes

Task-number: QDS-2241
Change-Id: Iedd11b7e50f23e2d8c5a26ad5f7da62756ad426e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-09 08:46:43 +00:00
Christian Stenger
33cafa0dcf LLDB: Drop secondary lookup of native types
Although already tried to lookup a native type with an
lldb internal mechanism we still tried to do it "manually"
again.
This secondary approach was needed at some point when lldb
had no integrated way to lookup a type inside all modules.
Lookups done manually will not provide a better result than
the lldb internal one.
The error output generated with this blocks debugging which
makes QC unusable at this state.
So, remove the secondary lookup completely.

Fixes: QTCREATORBUG-25185
Fixes: QTCREATORBUG-25217
Change-Id: Ibd8a125a89633c611bf750e0f1759c639717e1d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-03-09 08:06:47 +00:00
hjk
89646aadce Utils: Don't raise SIGSTOP in the process stub
Previously, the starting inferior was sent a SIGSTOP to avoid
progress before the debugger could attach.

However, these signals are then also visible in the debugger and
need to be ignored as part of the startup handling in Creator.

The waiting effect can be achieved less intrusively by waiting
on a pipe read between fork() and exec().

Task-number: QTCREATORBUG-25073
Task-number: QTCREATORBUG-25082
Task-number: QTCREATORBUG-25227
Change-Id: Ie70b9eb5ea865f85411c26b0dbf377a019fec8d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-09 08:06:21 +00:00
Miikka Heikkinen
d37f6648f3 QmlDesigner: Preserve item library expand state
Section and category visibility updates always expanded section
or category. Now this forced expansion is only done when searching
for items.

Fixes: QDS-3811
Change-Id: I006124a92086c4851d54407c4ffba0e9c94a854d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-08 15:47:45 +00:00
Miikka Heikkinen
6fdb34994c QmlDesigner: Ensure item library content is visible
Make sure the ScrollView content area is visible after content size
changes.

Fixes: QDS-3795
Change-Id: I1f7408db9ad318a5c54b5186569dd04235a3d952
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-08 13:10:30 +00:00
Eike Ziller
fee671dfbe Merge remote-tracking branch 'origin/4.14' into 4.15
Change-Id: Ifbfb495fff50b5bb27a12b204653cf1697820913
2021-03-05 17:18:43 +01:00
Eike Ziller
88d1708018 Perfparser: Update to HEAD of 4.15 branches
Fixes build with Qt 6

Change-Id: I0f0965939a85d5a5d6757c98c968caa20a4c1b82
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-03-05 15:48:42 +00:00
Eike Ziller
5e1f40a3af CMake: Don't add standard Linux paths to LD_LIBRARY_PATH
If a project specifically links to a library in a standard path (like
/usr/lib/...), we do not need to add that path to LD_LIBRARY_PATH.
Actually adding it can be harmful if the build needs to link against
some other library in a different version than is available in the system
path.

Common case is linking the application against a Qt version from the
online installer. If /usr/lib/... ends up in the LD_LIBRARY_PATH before
the path to the Qt from the online installer, the system Qt is picked up
at runtime instead of the Qt from the online installer.

Fixes: QTCREATORBUG-25292
Change-Id: Ib080e41f5893fb68e9d65cc9c9f11d1a9a60f485
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-05 14:53:41 +00:00
Miikka Heikkinen
fab090907d QmlDesigner: Remove duplicate sections from item library
If there are multiple imports of the same library, only use the
highest version to populate item library.

Fixes: QDS-3786
Change-Id: I2dd0976c9353692342b390bec15a99554e74aa05
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-05 13:28:32 +00:00
Miikka Heikkinen
dfeff5b30d QmlDesigner: Search also possible imports in item library
Possible imports are now also parsed for items in item library.
They are only shown in case the search string is not empty.
Starting a drag of unimported item will automatically add the import.
Added a small manhattanlength check to the start of the drag to
avoid unwanted import additions on clicks.

Also fixed the item sorting to alphabetical order within categories.

Task-number: QDS-3825
Change-Id: I93366182af3fd7eda38bf94d53807393ecf92a08
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-05 13:28:22 +00:00
David Schulz
064da4e0cc LanguageClient: make typed settings backwards compatible
Instead of saving the typed settings in the same list as the generic
stdio settings use a separate key. This way the new typed settings won't
get misinterpreted and overwritten by running older Qt Creator versions.

Change-Id: Ic14dfd978b5577b6ae08735bf811c21fba5ab725
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-05 13:27:52 +00:00
Eike Ziller
30da5aafd7 CMake build/Qt6: Automatically disable build of profilers
Tracing library does not build with Qt 6. Disable that automatically
and also the plugins that depend on it. Add some feature info for
the Tracing library, though we usually do not add feature information
for libraries in general.

Change-Id: I51b6993e30ec69d63a031c7bf404ea3887e14d84
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-05 12:29:57 +00:00
Cristian Adam
69afdcd290 CMakePM: Use case insensitive search for file-api configuration
Fixes the case of CMAKE_BUILD_TYPE=RELEASE on Linux, when the project
loading would fail due to "Release" build type name used by Qt Creator.

Change-Id: I2b1a643df190fd02acc422d154a717ed5cd9ce31
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-05 12:16:22 +00:00
Cristian Adam
8c9faaf3e5 CMakePM: Do not issue error message when CMakeCache.txt is missing
Only do the backup of the CMakeCache.txt and the file-api json
reply directory when they exist.

Change-Id: I0fe1098968c5b6b3a8285745452d5a24d7ded638
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-05 11:36:54 +00:00
Alessandro Portale
011bc5ce33 Core: Hide the horizontal scrollbar in WelcomePage
The horizontal scrollbar appears with some certain window sizes. That is
most likely due to the column count calculation not taking the vertical
scroll bar width into consideration.

This change simply prevents the unneeded horizontal scrolbar from
sporadically popping up.

Change-Id: I2fb4aac0921f4a6627058d3e73af22c1fe6db3b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-05 08:34:34 +00:00
Eike Ziller
28f53a9040 macOS: Fix vanishing controls in Welcome mode with macOS dark mode
The example set selector and the search input field were missing some
palette tweaks that were done by other classes deriving from
WelcomePageFrame.

Fixes: QTCREATORBUG-25405
Change-Id: I43a022aa5464a1167f94d26e945de225a436b768
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-05 07:34:32 +00:00
Knud Dollereder
1ba7c149af Enable step functions in the curve-editor
... and shut-up an annoying qDebug log in the transition-editor.

Change-Id: Iea8b48e48bb7e52cd4c845f28c49f8a513785fab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-04 14:48:19 +00:00
Christian Stenger
60aac50a44 QmlDesigner: Fix build
Amends 2f86e6d7b5.

Change-Id: I55bdb470137f945267f792a6513ae96afad7aa48
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-04 11:46:18 +00:00
Cristian Adam
6fa671b329 CMakePM: Use UNINITIALIZED for -D<var>=<val> in Batch Edit
CMake is setting the UNINITIALIZED type if you forget to set the
type of a variable when you do it from command line.

Qt Creator was setting INTERNAL, which had the effect of not
being displayed in the UI at all, giving the impression that the
value has been dropped.

Change-Id: I9a6b487bf5062d288365938fd7ef99b49de42884
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-04 10:09:11 +00:00
Christian Kandeler
ffb19f9acf RemoteLinux: Proper support for rsync on Windows
The Windows implementations of rsync have some peculiarities.

Fixes: QTCREATORBUG-25333
Change-Id: Ic69c7ffb868d25e391501a3e3c1b8d007abca8ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-04 05:29:15 +00:00
Tim Jenssen
2f86e6d7b5 fix "qmldesigner: do not use hardcoded path in plugin"
-> 6571bd5197.

Change-Id: I62524ec88fed1d041227cf7d9ac97ff65b24af8a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-03 19:11:12 +00:00
hjk
60f103b681 Utils: Keep editing position in StringAspects with TextDisplay
Fixes: QTCREATORBUG-25410
Change-Id: I414c90fe679d9f63bfc29361ab753979ff20bfe6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-03 11:40:43 +00:00
Eike Ziller
e5a4fdaa1b Keep -test option even if Qt Creator is built without tests
If we remove the -test option, external plugins cannot run their tests
with the binary package + development package, even if _they_ are built
with WITH_TESTS (or add the plugin tests some other way).

Fixes: QTCREATORBUG-24526
Change-Id: I53f4125b52ba625ba37a91237e4826d62c008c2e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-03 11:03:19 +00:00
Marco Bubke
f9b64d99ae QmlDesigner: Fix qmake .pri file
Change-Id: I85b8e4e5569879131b0697aa3f4f6e8d1e477fe4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-03 10:49:20 +00:00
Alessandro Portale
d38a49a9d6 CMakeProjectManager: Conform Modules icon
The Modules node in the tree of a loaded CMake project looks quite
different than the rest of the icons. Also, it is neither available as
High-DPI variant nor do we have the original vector graphics for it.

Thich change fixes the above issues.

Task-number: QTCREATORBUG-25412
Change-Id: I4ad5853330424f9fec2520b8b539a325b6c80176
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-03 10:45:56 +00:00
hjk
b4de69795f Debugger: Mark elision of long QUrls in Locals and Expressions
Fixes: QTCREATORBUG-25404
Change-Id: Ieee42f9239c9ffe88da03765678e1d2c4b6bb11d
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 6df27ccbe7)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-03 08:25:25 +00:00
David Schulz
9d72c807f1 Theme: fix saving default theme on dark systems
Change-Id: I08fbe6441b87c05c93ae30f816eb0d6f79bfb4da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-02 18:24:52 +00:00
Ivan Komissarov
c43956ea45 Update Qbs submodule to the top of 1.18 branch
Change-Id: Ia684a71c5b460cdbb6617e30ea218e349a8901d1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-02 15:46:53 +00:00
Eike Ziller
7c112ed01d QmlDesigner: Fix build with Qt 6
No QList<T>::toSet anymore

Change-Id: I6e42bd3a1e917c128142b4628277ed48844d1d4d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-03-02 15:40:39 +00:00
Cristian Adam
8f2db9fcbe CMakePM: Ask for configuration save if the user has changed variables
If the use has forgotten to click "Apply Configuration Changes"
button in project settings but it tries to build or run the
project, then the "Apply Configuration Changes" dialog box pops
as a reminder.

Change-Id: I26728ee3c79af72125be3bede759620c2cf3d7a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-02 14:18:53 +00:00
Leena Miettinen
daea0d4c07 Doc: Add summary of Form Editor toolbar buttons and fields
Replace all occurrences of "item" with "component"

Task-number: QDS-3771
Change-Id: Idbfdf30a4f651126d2f9875770cab036b65d9779
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-02 12:27:16 +00:00
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
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
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