Commit Graph

47434 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Orgad Shaneh
35245a7fcf Debugger: Show Threads dock by default
Change-Id: I11480919b4bccab2f5472d4683a3ee81068cac71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-02-25 10:38:43 +00:00
Miikka Heikkinen
69087a2c4b QmlDesigner: Update selected imported node
Add context menu item for updating selected 3D node. If selected node
is a component created by import, that import is updated. Otherwise
if the open document itself is an imported component, update that
import. In the latter case, preselect the source file relevant for
the selected node.

Fixes: QDS-3738
Change-Id: Id678288893f1700648d084ba92df40844d2af0b5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-25 09:39:13 +00:00
Eike Ziller
cc21658170 Merge remote-tracking branch 'origin/master' into 4.15
Change-Id: Ia313b9a8bf82940e496b7456801faf552fe4b022
2021-02-24 19:42:30 +01:00
Cristian Adam
145be455ee CMakeProjectManager: Add Batch Edit support for CMake configuration
For the initial CMake parameters one can have an edit dialog. Now it's
possible to batch edit variables also after the project has been
configured.

Change-Id: I406b8e7db16147032a75c82fddf9b7acec85c4bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-24 15:33:25 +00:00
Vikas Pachdha
fbf509dd0b QmlDesigner: Fix designer's unit tests
Change-Id: I8da4b6d62beef6e4101fbc331d9877ac7bb0398c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-24 14:04:38 +00:00
Eike Ziller
6608bf1ad5 Merge remote-tracking branch 'origin/4.15'
Change-Id: I65e889663dac29a2efd85eba35bdb39a6611c801
2021-02-24 13:57:54 +01:00
Alessandro Portale
b2b6c64e6a Don't detach temporary containers
Change-Id: I736cfc61c81995a81b056b3e3e5703ded5912525
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-24 08:27:10 +00:00
Mahmoud Badri
4bdc4cf9c7 QmlDesigner: Fix flow tags cleanup regression
Caused by: 58b3afa728

Change-Id: I2cb52801f7d7ad9d7d4382f81ad9e52cae16fd03
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 15:07:46 +00:00
David Schulz
925c4a3198 Android: Add path to Qt java bindings to project files
Change-Id: Ia3ee35732bece5870659cac338f26f815e3ce566
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 14:46:02 +00:00
David Schulz
3c80f1bd9d Android: Add 3rdparty jars to classpaths
Change-Id: Ibc645e2377d4cb6d5eddd86d77cbb7f8ca294f1f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 14:41:01 +00:00
Mahmoud Badri
58b3afa728 QmlDesigner: Clean up flow tags remainings
Remove the remaining unused code related to flow tags. Flow tags feature
was removed as part of the new item library ui commit:
151184a609

Change-Id: Ic2f518cb7d345d4f5a183194bebb29c76b227c15
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 14:01:47 +00:00
Mahmoud Badri
83c61a7c53 QmlDesigner: 2 item library import section improvements
- Move imports with no categories to the bottom of the list.
- Remove the project import from the list.

Change-Id: I41d229bb776bfe845dadbfc5c1be5b7d50aeee3e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 12:49:57 +00:00
David Schulz
d46d53de1f LanguageClient: reset project pointer when project is closed
Change-Id: I9a2787404bd47bf338125df1066d88e9061b5768
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 12:46:22 +00:00
Fawzi Mohamed
6929935111 designercore/imagecache: avoid missing override warning
Change-Id: Ic9bfdb9041dd82f78e56886793fd43d91955d2b7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-23 12:39:19 +00:00
Mahmoud Badri
7d3ba0587f QmlDesigner: Fix item library expand issue
If a click happens on an item library item, mouse interaction
(expanding, collapsing sections, and showing context menu) is blocked
until some action happens (right-click for example). This is due
to a bug in QDrag. With this commit it is very hard to reproduce the
issue unless one's deliberately insisting to reproduce it.

Fixes: QDS-3792
Fixes: QDS-1652
Change-Id: I201b07aabf144adbb4d51e32c1fcc4990f89f5f9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 12:25:22 +00:00
Miikka Heikkinen
8b8fc8458a QmlDesigner: Allow partially overwriting 3D imports
When importing a 3D scene, if an existing import with the same name is
found, allow partially overwriting an existing import by selecting
the files to overwrite.

Task-number: QDS-3738
Change-Id: I8969da9bd03ef47ede4768cc2c7eb033bee3cb66
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-23 11:15:15 +00:00
Alessandro Portale
670616c6f9 Android: Use qAsConst with non-const Qt containers in range-loops
Change-Id: I1242a5c62a27b7b8f30bb7b43ff406eceb4135f7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-02-23 10:51:37 +00:00
Mahmoud Badri
80dfaf3be3 QmlDesigner: Expand collapsed component categories when searching
- Expand collapsed categories in the following 2 cases:
  - When searching.
  - When choosing "Expand all" from the context menu.
- Update only changed data when expand state changes rather than
resetting the whole model.
- Update search after adding a new QML import and switching to
the components view.

Task-number: QDS-3781
Task-number: QDS-3784
Task-number: QDS-3789
Change-Id: I09e6f1f97171cd9172cadf4202dd8d02cbb78513
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-23 09:17:06 +00:00
David Schulz
01caf29221 LanguageClient: assign document to correct client
If a server is setup to start per project we want to open files of a
project in the matching server by default.

Change-Id: Ie266fd858420acd75b7a1fd45be7bee2b06460aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 08:52:56 +00:00
David Schulz
9cc234fbdf LanguageClient: Add the project display name to the client name
If the client was opened for a specific project.

Change-Id: Iafc9f5d46d06e2e656702260f297d6b2b998a431
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 08:52:46 +00:00
David Schulz
65d977ed93 Android: generate .project and .classpath
These files are needed by the java language server to operate properly.

Change-Id: Ie96a1fe32fefeea7333c7fa752557f79796a1478
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 08:52:04 +00:00
David Schulz
605df0c4b6 Java: use a temporary directory for the workspace
Change-Id: Ie8fc01f680393f141f099f57b98eb16a10b37d7e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 08:48:49 +00:00
David Schulz
3f773cb1e5 LanguageClient: avoid sending message to server shutting down
Send the workspace change method before the server gets shut down.
Prevents an assert in Client::sendContent.

Change-Id: Iaedc9829379d987aa6f91a87e26d35b64a9f0f55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-23 08:45:52 +00:00
Cristian Adam
bc3b5bf1f3 Core: Better description of codec for locale label
"Text codec for locale" has been replaced with
"Text codec for tools".

Ammends 1d27f894bb

Change-Id: I022d67aabccd9485b6c629af352b66289a29be55
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-22 13:57:53 +00:00
hjk
c4b7da9ab2 ProjectExplorer/Debugger: Add a 'Run as root' option for Unix hosts
For local run and GDB debug, with or without terminal.

Task-number: QTCREATORBUG-2831
Task-number: QTCREATORBUG-25330
Change-Id: I9b5d2156bcffea4f358474ecdbcad580a4419917
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-22 13:38:25 +00:00
Henning Gruendl
9bc9a4d376 QmlDesigner: Fix regression in template generation
Fix property editor template generation for alias properties.

Task-number: QDS-3740
Change-Id: I082e213a5f05a5ba35bb94d41924dcac81404c61
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-22 13:37:36 +00:00