Commit Graph

47434 Commits

Author SHA1 Message Date
Oswald Buddenhagen
2839d9fa92 add/improve tooltips of mime type settings page
Change-Id: Ie03bc73763f4acbb72ed14e249b8e9598570c3e6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-11 14:55:47 +00:00
Oswald Buddenhagen
20a3eae86f fix memory leak in AndroidSdkDownloader::extractSdk()
put the process on the stack, so we don't need (and fail) to free it.
while at it, remove the pointless close() call.

amends f46099d2.

Change-Id: I4025691bebf2899efe006ee83012aefbb8797a64
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-12-11 14:54:47 +00:00
Jarek Kobus
d42f38cc96 Use Q_ENUM instead of obsoleted Q_ENUMS
It fixes the following warning:
Use Q_ENUM instead of Q_ENUMS [clazy-qenums]

In addition, it amends 8588cf268f
where WidgetStyle got removed.

Change-Id: I4d72dd762a2f18ba8886360b3581b4ef19bf4c5e
Reviewed-by: hjk <hjk@qt.io>
2020-12-11 14:16:42 +00:00
Eike Ziller
0a20b8e7de cmake build: Fix PLUGIN_RECOMMENDS
Use the right variable name, and syntax for iterating the list.
Fix plugin configuration order, so targets are found.
Fix misspelled plugin name.

Also remove unused and wrong "EXPERIMENTAL" option.

Change-Id: I77cc5d12ebdaa8bcd0315dd830a9435c648b2ba3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-11 11:07:14 +00:00
Knud Dollereder
58ce987314 Do not use the rootItemRect for zoom all
since this is set to null - indirectly from the showEvent of FormEditorWidget.
Use the instanceBoundingRect of the rootNode instead.

Fixes: QDS-3316
Change-Id: Ia156e5b675bc1c517c4b3f5c640b22d9c47bc117
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-11 11:02:26 +00:00
Christian Stenger
ae696a5b6f AutoTest: Fix compile
Amends ca769055e0. Infrastructure behind had changed meanwhile.

Change-Id: Ia7f4e92843c4d4a3b7be061712fe79e72d140fb2
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-12-11 10:11:11 +00:00
Eike Ziller
919ffcb0fb cmake build: Add option to build against system SyntaxHighlighting lib
Enable/disable our own KSyntaxHighlighting by default
depending on the availability of KF5SyntaxHighlighting.
If that is available, it still is possible to turn the building
and using of our own KSyntaxHighlighting copy on by enabling
BUILD_LIBRARY_KSYNTAXHIGHLIGHTING.

Fixes: QTCREATORBUG-25076
Change-Id: I3545fc12d87572d7eb6f5977994b081ff7ea3880
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-11 09:37:23 +00:00
Alessandro Portale
3e9385bf1b Core: Make member functions const/static
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.

readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.

Change-Id: I004d6f7fab4375f9902f940f29b4a4f561fc7604
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-11 08:28:25 +00:00
Eike Ziller
a40e5b5382 Core: Save less settings
Try to not save settings that weren't changed from their default, and
make it possible for defaults to change in the future.

Task-number: QTCREATORBUG-24762
Change-Id: If469b72573791bc92ed535edf00271ef09b55386
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-11 08:02:57 +00:00
Eike Ziller
e2eab0e016 Core: Remove legacy settings reading from 2014
Change-Id: I2833be6d3dae1787fdf29cc5a9daccd68fa0f82e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-11 07:44:11 +00:00
Christian Stenger
ca769055e0 AutoTest: Handle sanitizer output
This is an attempt to handle output coming from
sanitizers appropriate.

Task-number: QTCREATORBUG-24328
Change-Id: Ifb22d465c9f99d767cc7702b9c459076ab39d567
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-12-11 07:20:08 +00:00
Miikka Heikkinen
20f11c961e QmlDesigner: Fix crash when 'Debug QML emulation layer' is enabled
Timer was accessed before creation in this case.

Change-Id: I8817043f1a875cb4c7c6cf8a1f4b398f78058509
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-10 18:27:36 +00:00
Alessandro Portale
8df758c45e AutoTest: Use separate icon variations for toolbar and menu
For the "Run" and "Run failed" actions.

Change-Id: I7fc537cbe0727038740f2c26478c30dc96babb66
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-10 16:27:38 +00:00
Alessandro Portale
19e13ddd6b Utils: Add "Run File/Selected" icons and use them in ClangTools/AutoTest
In AutoTest, use the toolbar and menu variants accordingly.

Change-Id: I1405de1ace1efe6c3e51b17356a9e4dfb3b11dcd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-10 16:27:28 +00:00
The Qt Project
d28533abd4 Merge "Merge remote-tracking branch 'origin/4.14'" 2020-12-10 13:34:38 +00:00
Miikka Heikkinen
66e491be14 QmlDesigner: Reset puppet if shader property changes
Puppet reset is needed as changing shader makes no difference
if done after material initialization.

Change-Id: I67b0b4cca28b4636cc9acb1cd7446dfabc10e2ee
Fixes: QDS-3300
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-10 13:09:03 +00:00
Thomas Hartmann
d205778ec1 QmlDesigner: Fix import tracing
Change-Id: I8783627428a7cf78787f19d439fdadca157e9081
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-10 13:07:26 +00:00
Jarek Kobus
82b2735da4 Don't leak memory when canceling Type Hierarchy
Add QFutureSynchronizer for collecting all running
futures (including those already canceled, but not finished yet).
It could happen, that we cancel the future, while
the associated task still needs some time in order
to catch the cancel request. When a d'tor of synchronizer
is run it cancels and waits for all pending futures
to be finished.

Add extra check for isCanceled() after a call to
updateDependencyTable(). In case the cancel was detected
inside updateDependencyTable(), we should return immediately.

Don't leak CppClass object inside handleLookupItemMatch()
when the task was canceled.

Amends: c400923308

Change-Id: I709e14a0c8b563d522a8e8c32b087e5f83310b24
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-10 12:44:49 +00:00
Christian Stenger
b4742c03db QmlDesigner: Fix compile of tests
Change-Id: I3bab23e47702904f1602963e0c843f8f45c8b8c4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-10 12:03:26 +00:00
Eike Ziller
1283b15117 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	doc/qtdesignstudio/examples/loginui1/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui2/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui3/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui4/qtquickcontrols2.conf
	share/qtcreator/debugger/dumper.py
	share/qtcreator/debugger/qttypes.py

Change-Id: Id44a67cdeeb0889ff96eddcdf409d20ca7cbdd0b
2020-12-10 13:02:02 +01:00
Thomas Hartmann
ad2699773d QmlDesigner: Set focus policy for 3D canvas
Otherwise the widget does not get focus.

Change-Id: I8209f85c375ff419d34397d9a9e1826d07b4e432
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-12-10 10:14:55 +00:00
Thomas Hartmann
c282551569 QmlDesigner: Track usage of flow tags
Change-Id: Id9e27c601dcb67e6758de51e8a1fcfd02b3ac6e5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-12-10 10:14:48 +00:00
Thomas Hartmann
ca33079e91 QmlDesigner: Add QTC_ASSERT
In corner cases m_nodeInstanceServer can be null.
This should be considered as an error, but there is
no reason to crash in this case.

Change-Id: If2b5e11b7d2462634ab8f9bce653bdbc5b3c8b45
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-10 09:58:29 +00:00
David Schulz
f440dfe43a LanguageClient: Restructure request response handling
Instead of working on a Client member IContent now returns an optional
response handler that consists of an id, a name and a callback.

Change-Id: I5ca7dd4eaa7ae37f333f99c9fe60339db03ebf2c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-10 09:31:31 +00:00
Miikka Heikkinen
757d3200aa QmlDesigner: Reset puppet if shader code changes
If a shader file inside the project is modified, reset the puppets to
update custom materials and effects that use the modified shader.

Change-Id: Ie81accf5f3029c31b49b65b5e1b53e1259a9b4eb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-10 08:54:01 +00:00
Jarek Kobus
558532b45f Remove unneeded include
Change-Id: Ia61dd59af9bcb1157f9d601892695680974e31f2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-10 08:37:02 +00:00
Christian Kandeler
d12e3cb72d Wizards: Use a FancyLineEdit::ValidationFunction
... rather than a QValidator.
QLineEdit's behavior of preventing invalid input is not suitable here,
as its concept of intermediate states is too limited.

Change-Id: If34793966e8b06762db86b90bb1dbb1526b74ea7
Fixes: QTCREATORBUG-22080
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-10 08:26:41 +00:00
Cristian Adam
5b1cff753a CMakeProjectManager: Match only on Cxx and C languages on import
This way Qt Creator won't be creating imported kits on every import.

On Windows the language "RC" is not part of the kit languages and
would always discard valid matching kits.

Fixes: QTCREATORBUG-25069
Change-Id: Ib4ec323ebf514c82e5036f7d0123100a75f3ea10
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-10 08:20:53 +00:00
Thomas Hartmann
fdf6cd7899 QmlDesigner: Reload file if type information is incomplete
Unfortuatly we require this. The code model might be still parsing imports
which will lead to an error. Reacting to ModelManagerInterface::libraryInfoUpdated
and then reloading the document does fix this.
This issue has high visibility.
In case the puppet debug mode is enabled we ignore this.

Task-number: QDS-3113
Task-number: QDS-1592
Change-Id: I6cbf9d01d1702f61c6bbbb86dca546174fecc825
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-09 14:58:47 +00:00
Thomas Hartmann
37ec7f904a StudioWelcome: Set correct help topic
Change-Id: I7cc2ae25d8adf0034a7d4eb10956607dd5e5e1c0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-09 13:51:42 +00:00
Eike Ziller
344802b8b2 Don't call erase without namespace qualification
C++20 adds free a function `erase` as API for containers, and Qt 6.1
adds it for Qt containers.
Since it is a free function, ADL kicks in and creates issues if
we don't fully qualify calls to our `erase` function.

Change-Id: Ie5971d9206ae9e87e0f28f1390c09ded6f431b90
Reviewed-by: hjk <hjk@qt.io>
2020-12-09 13:15:22 +00:00
Assam Boudjelthia
ee199c3fed Android: setSticky behavior to follow other platform's kits
Don't set the whole kit's values to sticky, instead set only
device, toolchain, qt version properties to sticky to follow
the behavior of other platform's kits.

This also allow users to set specific CMake version for the kits
in case the selected one is not correct, since Android plugin doensn't
handle that anyway.

Fixes: QTCREATORBUG-25042
Change-Id: Ia6f6474b5ad9132e841e6e7024113439649b61f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-09 07:38:30 +00:00
Eike Ziller
b9a7864679 Android: Use new message manager API
Bring pane to front if error occurs when trying to install custom APK.
This is only triggered when the user explicitly presses a button, so
that is fine.

Task-number: QTCREATORBUG-24430
Change-Id: I4358e9a430ac220400ed70ebfe617f556d6e91a3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-12-08 16:05:04 +00:00
Thomas Hartmann
036e6d9555 QmlDesigner: Normalize expression when comparing them
Change-Id: I0697e7cea74b942ee3c3f667741744f17281162e
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-08 15:50:08 +00:00
Christian Kandeler
9cbcbfff33 Fix various clang warnings
Unused variables & functions, unneeded copies in range-for loops,
missing overrides.

Change-Id: I27b60e7c92a6ca425a84c89b537d5c3815449a94
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-08 15:39:20 +00:00
Alessandro Portale
df482e27b7 McuSupport: Identify kits also by toolchain
Fixes: QTCREATORBUG-25052
Fixes: QTCREATORBUG-25053
Change-Id: I87e51fbdb8d01cb564574f996bdfb51420f28584
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-08 15:06:02 +00:00
Jarek Kobus
3796b66423 Remove unneeded include
Change-Id: Ifb857526ee559a4e1c8d48602fd89b3030238691
Reviewed-by: hjk <hjk@qt.io>
2020-12-08 14:44:34 +00:00
Jarek Kobus
e9ef83f4c6 Don't call non-const method on temporary container
...as it may detach. Fix the following clazy warning:
Don't call QList::first() on temporary [clazy-detaching-temporary].

Change-Id: I667c122c42ccfc1344508154466d9c1dc6ae6166
Reviewed-by: hjk <hjk@qt.io>
2020-12-08 14:44:18 +00:00
Eike Ziller
5738418d41 Core: Use new MessageManager API
Bring messages pane to front when triggering an external tool or
command, write output silently and flash when tool finishes or fails.

Also bring pane to front if file renaming or removing fails (this should
happen only as a direct consequence of the user choosing this action).

Task-number: QTCREATORBUG-24430
Change-Id: Ib47431bd57a9c05bfdbfb03ad4c7cd38bdf3ddd1
Reviewed-by: hjk <hjk@qt.io>
2020-12-08 07:07:15 +00:00
Björn Schäpers
c422962709 QbsProject: Fix set LangaugeVersion for newer standards
I have some products which export c++20, some c++17 (not yet ported) and
some which do not specify the language itself. And sometimes I end up
with too much errors from the code model, because it sets the language
to C++11 or C++17.

Also adapted the C language.

Change-Id: I0056c8d873191d49164c3e7f3e4fdb24ccc1fb9b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 20:05:38 +00:00
Jarek Kobus
a0079b171f Make canceling of Type Hierarchy evaluation more responsive
On the beginning of the process of evaluating type hierarchy
the evaluating thread may freeze on a first call to
Snapshot::updateDependencyTable() for quite a long time
(e.g. when showing the type hierarchy for IPlugin class
inside Creator project - it may freeze up to about 3 seconds).
So, when we want to cancel the evaluation (e.g. when
we switch from "Type Hierarchy" into another view or when
closing Creator) we may freeze for this period. In order to
fix it we pass a future interface as an additional argument
for Snapshot::updateDependencyTable() and cancel the update
when cancellation of task was requested.

Change-Id: I2147f10a68989587476c30369ec2ac552a57d5ae
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 16:24:57 +00:00
Henning Gruendl
2d9de4f706 QmlDesigner: Fix evaluation dialog automatic close
Fix Qt Enterprise Evaluation dialog being child of the QtDS splashscreen
resulting in the dialog getting closed together with the splashscreen
after its 15 seconds timer runs out.

Task-number: QDS-3258
Change-Id: Ied7a883efc925491dae65ac90227573cc93e1167
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-12-07 15:34:53 +00:00
Eike Ziller
43249f655b CPaster: Use new message manager API
Only show the panel if an error occurs, or if the user opted to have the
paste link shown to him.

Task-number: QTCREATORBUG-24430
Change-Id: Ie474acbe2b4d3b6d3332111bdd7ae18b16bd8618
Reviewed-by: hjk <hjk@qt.io>
2020-12-07 15:06:30 +00:00
Jarek Kobus
c400923308 Modernize Type Hierarchy
Don't freeze UI on request for show Type Hierarchy.
Move the lookup code into a separate thread.
Don't clear tree hierarchy when waiting for new one.
Show progress indicator on top of old hierarchy instead.
Add a task to ProgressManager when working on a new hierarchy.
Handle canceling the process of showing Type Hierarchy.
Implement simple progress reporting for this process.
Optimize a bit DerivedHierarchyVisitor.

Change-Id: I3894ac6ed3f4834831831f083f718f8385ca346f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 14:04:50 +00:00
Alessandro Portale
f2dd45d8ce QmlDesigner: Fix dockwidgets.css for default theme
Use the dark background color explicitly. Also remove redundant CSS
declarations.

Task-number: QTCREATORBUG-24402
Change-Id: I052969e96f564e27c150ba86bfcb4dd156024240
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-07 13:23:09 +00:00
Alessandro Portale
e46955f627 QmlDesigner: Fix the color of some toolbar icons
Give them the standard Theme::IconsBaseColor that works well with all
themes.

Task-number: QTCREATORBUG-24402
Change-Id: I458d1b4a7b3cceb2d318ff4257b4aa173170a533
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-07 13:23:06 +00:00
Eike Ziller
41b0f60bc9 ProjectExplorer: Use new message manager API
Bring general messages pane to front when showing requested wizard
debugging information, otherwise flash.

Task-number: QTCREATORBUG-24430
Change-Id: Icb59542ca37bfe8b8e644e08464fe17abb1c5d93
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 13:05:59 +00:00
Eike Ziller
db2b085010 Meson: Use new message manager API
Avoid bringing general messages pane to front.
Flash when starting a process, write output silently afterwards.
Put an error into issues pane if parsing fails
Also don't log debug messages by default.

Task-number: QTCREATORBUG-24430
Change-Id: If4cbc1f48b0749b44410e2ac14d6796d63e4610e
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 13:05:36 +00:00
Alessandro Portale
eccc16e996 ProjectExplorer: Use FancyLineEdit in AddRunConfigDialog
With place holder text, fancy delete button, more UI space and less
code.

Change-Id: I16a80c215ac18fdc088c13087d58481311b9b838
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 12:27:17 +00:00
Assam Boudjelthia
ec68b4e96c Android: fix SDK path on macOS
Change-Id: I369cf218eb2fd42ede04a6cb6b638d6fa6282994
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-07 11:51:40 +00:00