Commit Graph

47434 Commits

Author SHA1 Message Date
Christian Kandeler
5066ddd908 ClangTools: Add documentation for current diagnostic to tooltip
Fixes: QTCREATORBUG-25163
Change-Id: I284c50c0b9b73c74ba328624c5238368de05839d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-20 10:01:29 +00:00
hjk
79ade10c4a Debugger: Add an option to show simple values as text annotations
Change-Id: I726d8559d7e28abd776ce483d5f670be5af09412
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-20 09:45:03 +00:00
Jarek Kobus
700da528b8 Remove unused viewerFont() method
Change-Id: I3da752d7f96162b7cd10e74667a6a3665cb12e14
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-19 16:24:16 +00:00
Jarek Kobus
0fe8089214 Force repaint of litehtml help viewer when font changes
Trigger refresh_styles() and parse_styles() on font change.

Change-Id: I3ea667b2d9fb382681ffad2279823500e9e20491
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-19 16:24:11 +00:00
Jarek Kobus
291f46386f Add "Zoom" setting to the Help font settings
If the scrollWheelZooming is enabled, this
setting will get updated when using scroll wheel.
It will also be used when zooming in/out
by using keyboard shortcuts.

Fixes: QTCREATORBUG-25109
Fixes: QTCREATORBUG-25230
Fixes: QTCREATORBUG-23731
Change-Id: I9d22632b4c034ce236fa39dba074df4a2746ff84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-19 16:24:04 +00:00
David Schulz
aa974e6816 Theme: Use dark theme by default on dark windows
Change-Id: Ieb024e01adfdce1c37948097bae85fa2488ee341
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-19 15:14:24 +00:00
Leander Schulten
8192f7f4f4 CppEditor: Make it possible to specify default values in generate constructor quickfix
Change-Id: If73b4bdad1e3878091378d800bec2f1682a55c9f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-19 13:48:46 +00:00
Christian Kandeler
3e2cb9d3d2 QbsProjectManager: Remove unneeded export macro
Change-Id: I4876ddce7dc350359aa554289f6806bbe4467145
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-19 13:29:18 +00:00
Leander Schulten
8082df491a CppEditor: Only generate valid identifiers in QuickFixes
Change-Id: Idcb3495f04627610eaf530dcb5d3b58429eda616
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-19 12:51:33 +00:00
Christian Stenger
da07d8f5c3 AutoTest: Fix some clazy warnings
Avoids potential nullptr accesses and unneeded allocations.

Change-Id: I8c13ca1dab885fc3e9a05dc7329ff592a7f0fe1a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-19 12:27:08 +00:00
Vikas Pachdha
55cbe717a9 AssetExport: Export reference assets of components
Task-number: QDS-2868
Change-Id: Ib5d3875e009bde972a30b0a90216bad6ef6e38ea
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-19 12:23:31 +00:00
Kama Wójcik
41ff60a693 QmlDesigner: Paint single event id label
* Paint red label on the arrow with event id if only one event is
  connected
* Cleanup label painting for multiple events
* General code cleanup

Task-number: QDS-3481
Change-Id: I9652c1767ccaeb07b03c35e0fd4fec41d496c210
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-19 11:18:01 +00:00
Eike Ziller
0fa391c7d3 Make it possible to assign global shortcut to "Show in Explorer/Finder"
So it works consistently for the project tree and when in editors.
The action ID changes from ProjectExplorer.ShowInGraphicalShell to
QtCreator.ShowInGraphicalShell.

Fixes: QTCREATORBUG-24958
Change-Id: I4c89e61997183401080dd64e66c4fec681b53241
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-19 07:48:27 +00:00
Christian Stenger
def68ecd2f Core: Remove wrong include
Amends cc7be5724a.

Change-Id: I1b4dfd3f4f3de92f6f97591ca7ac6ca2e17a6f6d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-19 05:42:15 +00:00
Christian Stenger
dd76bd8203 QbsPM: Fix wrong dll linkage on Win
Amends 9b8be3b3d5.

Change-Id: Icce629f06cb4130981ebb2801d3ef2032c80dbb5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-19 05:40:02 +00:00
David Schulz
80a1870292 Debugger: log the debugger exitcode also in hex
Change-Id: Ia9742bfa9c36c7ff4fdd965f2a32ea36a4239422
Reviewed-by: hjk <hjk@qt.io>
2021-01-19 05:38:04 +00:00
Mahmoud Badri
cc7be5724a Add Crashpad to Qt Creator and Qt Design Studio
Fixes: QDS-2748
Change-Id: I87e25682f066d167eebfd7b78c46c166e5062e11
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-18 22:08:14 +00:00
Christian Kandeler
89ad72c789 CppEditor: Start renaming the new function parameter
... in the ExtractLiteralAsParameter quickfix. It's unlikely that the
user wants to keep the generic default name.

Fixes: QTCREATORBUG-25104
Change-Id: Ic354f20c27da43664bcb3c2839e981c176aaf821
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-18 16:13:33 +00:00
Raphaël Cotty
9b8be3b3d5 QbsProjectManager: Add selection of abis for the android target
If the target is android and the qt version has more than one abi
then display a widget to select them in the build configuration.

Change-Id: I9d3ab60a0a1f4aba2e1250c495fa25917b254287
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-18 13:43:35 +00:00
The Qt Project
212e3b349a Merge "Merge remote-tracking branch 'origin/4.14'" 2021-01-18 12:21:01 +00:00
Mitch Curtis
4adfc76ec9 Add "r" as mnemonic for Build > Build for Run Configuration
Similar to f1881777b7, this change makes
it possible to build a specific sub-project using only the keyboard.
For CMake projects, this is a workaround for QTCREATORBUG-25231.

If that bug is ever fixed, this mnemonic still remains useful,
especially as it has a different meaning than Build Subproject: it
builds for the current run target as opposed to the sub-project
associated with the current file.

Task-number: QTCREATORBUG-25231
Change-Id: Iceb25a1c5c3242db3331c28ff0e4ca908dc04890
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-18 11:53:54 +00:00
Leander Schulten
1342500fb0 CppEditor: Make it possible to change the order of parameters in the Generate Constructor Quickfix
Change-Id: Iacdf1d660f50a85c18bc48db842bf45ebccf686e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-18 11:46:32 +00:00
Eike Ziller
16d25a3cc8 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/qmldesigner/assetexporterplugin/componentexporter.cpp

Change-Id: If742bcd843cf75cf55e07b489ecb7211f0cd9058
2021-01-18 11:50:32 +01:00
Christian Kandeler
cb203dc49c CppTools: Do not wait for QFuture in ~BuiltinEditorDocumentProcessor()
This seems safe, as the arguments to the async function that the future
results from are values and shared pointers, so there does not appear to
be a need for this object to stay around while it finishes.

(cherry-picked from commit fd22787a69)
Fixes: QTCREATORBUG-25121
Change-Id: Ib498551856942bf7c3d05c3013e12ad6d90fd762
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-18 10:47:35 +00:00
Miikka Heikkinen
4c9a829527 QmlDesigner: Fix storing current timeline and state nodes in model
Commit bed1c073db simplified notifiers
and as a collateral damage removed updating current timeline and state
nodes in model.

Task-number: QDS-3391
Change-Id: Ic91868d35b7b7bd595014f60f4aaa61ae657f7a6
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-18 09:03:58 +00:00
Christian Stenger
86557203b3 AutoTest: Handle summary of Qt tests if possible
When using plain text output of Qt and Quick tests we are able
to correct possible mis-parsings of the output.
These merely can happen if the test application produces output
on stdout on its own which may interfere with the normal test
output and confuses the parser.
If XML output is used this handling is impossible as we do not
get any summary, but interfering the output with user stuff
would end up in a parse error and a fatal anyhow.

Task-number: QTCREATORBUG-25112
Change-Id: I84f5e542aa3faeb6470963c784e92ed1b2584b61
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-18 06:07:43 +00:00
Eike Ziller
9b2cc489dc Fix formatting of proparser messages
In case of no line number, but file name.

Change-Id: I2c51e5834e113c8f98b018df361b0504c4bd79f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-01-15 16:35:02 +00:00
Miikka Heikkinen
3f7fd1383e QmlDesigner: Fix crash when adding timeline and rootnode is not visual
Fixes: QDS-3355
Change-Id: I2d3c13b29895cc723ac5dd43bafec38ba5a99305
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-15 15:41:06 +00:00
Ulf Hermann
1455eae9ac QmlProfiler: Be more patient in FlameGraphViewTest
Apparently 5s are not enough to show a window on the screen ...

Change-Id: I8da65d0d8b8b9bbb7ba80396045551d46590ff61
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-15 13:53:39 +00:00
Christian Kandeler
887cb05b98 CppEditor: Fix renaming location for "optimize for loop" quickfix
Use the start of the variable name, not the end. It's more natural, and
it prevents problems with the clang code model, as isCursorOnIdentifier()
returns false if the cursor is after the last character of the name.

Change-Id: I368ccf5cef9c3fb04c0902e49f8a189c102c481f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-15 13:12:00 +00:00
Vikas Pachdha
0061c9479f AssetExport: Enable generating multiple metadata files
Task-number: QDS-3357
Change-Id: Icc591d61d149ff92b6c415434e2a7574103802ae
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit f1268a9f86)
2021-01-15 11:03:19 +00:00
Miikka Heikkinen
261e4bc045 QmlDesigner: Fix test build
Can't have theme dependency in designercore.

Change-Id: I28b5a4623ed0122fccb886121795eb07467555e9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-15 10:42:29 +00:00
David Schulz
8526c7de77 TextEditor: Fix search result highlight for overlapping results
Fixes: QTCREATORBUG-25237
Change-Id: Ib95e49b4db57909b79295f2ff7729560ab45c8a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-15 10:14:10 +00:00
Miikka Heikkinen
40c6a6c1b9 QmlDesigner: Show image preview tooltip only if image fetch succeeds
Change-Id: Iedf7407c949eb5b648e9ce36971fba6097f9e6f0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-15 09:03:19 +00:00
Christian Kandeler
12c0aadc82 CppEditor: Fix race condition for highlighting of local usages
Starting a renaming action involves looking up local usages. In this
case, a different code path than normal updates the editor's extra
selections, in order to make sure that the occurrence to be edited is
rendered in a special way. We must therefore prevent the normal handler
from taking action, as it would overwrite abovementioned special
selection.

Change-Id: Ia811b49b3023a0a366a43a69cc01e6b2b370acb5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-15 08:15:22 +00:00
Christian Stenger
ab963bd4f1 AutoTest: Simplify expression
Change-Id: I3f724e3d9f749f533cd6d18e2258cf7e99c29239
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-15 06:20:18 +00:00
Christian Stenger
3de4ac3736 AutoTest: Handle test tools inside project settings
This effectively enables to handle ctest project wise instead
of just globally. So far only code based test frameworks could
be enabled or disabled by project.

Change-Id: I491f91119c3500131ca51af4d55b0e68d47debf0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-15 06:20:09 +00:00
Jarek Kobus
2b2cacfc09 Fix vanishing transitions when zooming to state
The main design issue in this plugin is that
there is no clear separation between model (which
pretent to be ScxmlDocument and his childern of
ScxmlTag type) and its views (GraphicsScene
and its children of BaseItem subclasses).
When the "Zoom to State" action is invoked,
the new view is being created, showing just
a part of the ScxmlDocument model. However,
some validation is done only on the view part,
checking that BaseItems belong to the common
GraphicsScene. In case the transition was defined
from internal state node to somewhere outside,
we don't have for it an BaseItem on the gui side,
as we just show the part of the scene. That's why
the validation vanishes the transition when
viewing a zoom.

In general, all the validations should be moved
from gui to the ScxmlDocument / ScxmlTag part.
This in general would require really big refactoring,
or even rewrite.

This patch moves some checks into a model side and
disables direct modifications of the model when
it's not desired.

Fixes: QTCREATORBUG-21676
Change-Id: Ica0771f637a9802dcc0fb87ad04b0ee77a21cda2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-14 20:48:55 +00:00
Eike Ziller
484d40258a IDocument: Simplify permission changes
Take care of handling file permission changes centrally.

TextDocument had its own, caching implementation of tracking the backing
file's read-only state. Move that into IDocument directly.

IDocument::reload with a permission-only change is not a very
interesting case, but every subclass needed to add handling of it.
Instead, remove TypePermission from the file-change types, and handle it
separately via the now unified checkPermissions() implementation.
IDocument::reloadBehavior already was never called with TypePermission.

Change-Id: I321d47ba6193bc878efa9bb50ba7a739fa492745
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-14 14:55:34 +00:00
Miikka Heikkinen
71b5a9e19a Fix compile error
Change-Id: Icf20d3f83a0792e59e9bd3a305d883d32ab66c77
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-14 14:30:14 +00:00
hjk
cd6b0cb795 Debugger: Also ignore SIGSTOPs inside clone() when using a terminal
Chances are high these are triggered by the process stub. There is
a small chance for false positives here, but true SIGSTOPs by
other external sources in these locations are very unlikely.

Task-number: QTCREATORBUG-25073
Task-number: QTCREATORBUG-25082
Change-Id: I25478caf6803877f2f8cbb2edef68ae1183223a6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-14 12:47:08 +00:00
hjk
ad4d2e1912 Debugger: Make the "There be dragons" hint more visible
The message existed already for a while, but only as tooltip.

Change-Id: If1cf248b470e83bc7b0c2d20d1b348a0257cfe91
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-14 12:08:15 +00:00
Thomas Hartmann
9ebe7bd8e9 QmlDesigner: print SignalHandlerProperties in debug view
Change-Id: I438a32abd1091028d25758d322d2d81214ac17f4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-14 11:09:12 +00:00
Miikka Heikkinen
4e5676e8c2 QmlDesigner: Add font asset preview tooltip
Refactored item library component preview tooltip to be also suitable
for asset previews.

Also now using the same image cache for font asset icons.

Fixes: QDS-3254
Fixes: QDS-3470
Change-Id: I34c1278be2e5697e01eaedabe2798104507a6ad8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-14 10:50:38 +00:00
Christian Stenger
c9a956c989 OutputFormatter: Do not ignore DebugFormat
On Windows applications may print to the Windows internal
debug console. This output is retrieved and passed around as
DebugFormat as it is impossible to guess whether stdout or
stderr had been used when printing.
But output in DebugFormat had been ignored so far - fix this
and handle this as inside the Qt test parser.

Fixes: QTCREATORBUG-24560
Change-Id: Ic5e3723c3e3e47556264e4c5cf719706ee7eaf1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-14 10:25:39 +00:00
Christian Kandeler
fd22787a69 CppTools: Do not wait for QFuture in ~BuiltinEditorDocumentProcessor()
This seems safe, as the arguments to the async function that the future
results from are values and shared pointers, so there does not appear to
be a need for this object to stay around while it finishes.

Fixes: QTCREATORBUG-25121
Change-Id: Ib498551856942bf7c3d05c3013e12ad6d90fd762
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-14 09:54:22 +00:00
hjk
206e9f95fb Core: Signal duplicated editors
FakeVim needs some notification even in cases where the
duplication is triggered outside the EditorManager as in
QmlDesigner's qml-editor.

Fixes: QTCREATORBUG-22344
Change-Id: Ia4950ff4b02d3f89779f03ff4c106a07ccff2106
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-14 08:31:44 +00:00
Cristian Adam
98b92ed03e CMakeProjectManager: Fix issues with precompiled headers
Clang code model can break if CMake project uses precompiled headers.

QtCreator will make a copy of the precompiled header, this way it
will not conflict with the build system one.

Ammends 888ea6bbbb

Fixes: QTCREATORBUG-24945
Fixes: QTCREATORBUG-25213
Change-Id: I149fc416cd047683d095758a024de47c7baf681c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-14 08:08:40 +00:00
Jarek Kobus
a64defa10b Remove unneeded include
Change-Id: If5a21c5dd95cbee594b0aa5cfaee895eda84bc10
Reviewed-by: hjk <hjk@qt.io>
2021-01-13 16:06:34 +00:00
David Schulz
955e2b2296 TextEditor: only track actions which are updated
Change-Id: I323e8a9c0a8088d9c6ab338b32a225a228bd7061
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-13 14:02:08 +00:00