Commit Graph

67787 Commits

Author SHA1 Message Date
Leander Schulten
2ce783f96d ClangSupport: Remove unused circular includes
Change-Id: I89e54fad34084ef683bb24fa2db7ef858a8b4759
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-18 12:53:13 +00:00
Christian Kandeler
c247024273 ProjectExplorer: Remove QTC_CHECK in BuildStep::buildConfiguration()
This keeps hitting us on all kinds of valid deployment-related code
paths, resulting in silly workarounds that do not solve an actual
problem.

Change-Id: I5c728f91f1138fa833c6fc9ab19595060a88e19d
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:38:26 +00:00
Christian Kandeler
ab99cd8882 Boot2Qt: Make sure the run config stays up to date with deployment info
As in fc53bae328.

Change-Id: Idb5c7f19b8507751ac5e80862879b716a58f5034
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:38:06 +00:00
Jarek Kobus
d2e1feceac Don't clash signal names with other methods
In case when signal name clashes with other method name -
rename accordingly.
Remove some repeated signal declarations - they are already
declared in superclass.

Change-Id: Ie1430b85d6436d26996494fa44c7554fb354b6ce
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:20:43 +00:00
Jarek Kobus
c3a8429dc8 Fix a clazy warning about qgetenv
Fix the following warning:
qgetenv().toInt() is slow. Use qEnvironmentVariableIntValue()
instead [clazy-qgetenv].

Change-Id: Ifb5d3869e758f8c42bb9f34004d9c04d5dbb4d89
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:10:37 +00:00
Marco Bubke
382aed1f72 QmlDesigner: Improve return values
You can return by const reference if you the ownership of the return
value is non local. If it is local you should return by value. In that
case it should be non const because otherwise the compile cannot move
the return value.

Change-Id: I2a4b08dd0e67a2c2741a46bdd7def842c1db3fbf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-18 12:08:59 +00:00
Eike Ziller
2422a90f1e cmake build/macOS: Fix installing when built with Qt6
In a framework the actual library can be accessed via two different
paths:

- Foo.framework/Foo
- Foo.framework/Versions/A/Foo

It happens that Qt5 exports the first variant for the framework LOCATION
and Qt6 exports the second variant.
We want to cut the whole "Foo.framework" part for the framework's location,
so actually do that.

Amends 98db9774f2

Change-Id: Idad12e92f2bfbdc480256a832320c4dec76a0e5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-18 11:11:22 +00:00
Eike Ziller
f88deb5b70 Plugin install wizard: Search in subdirectories of archive too
Default install structure of a plugin is in a subdirectory like in a Qt
Creator installation.

Change-Id: Ia4e5a08eb9fbe4b1586ff5d406cae1883e7dbd59
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-18 11:03:02 +00:00
Alessandro Portale
03a047db2c CppTools: "CLANG-UPGRADE-CHECK: Checks/update URLs."
Change-Id: Ic2b52794ef55c442b554479f44e6727067d218a8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-18 10:33:08 +00:00
Alessandro Portale
626728609b TextEditor: Define default foreground colors for C_SEARCH_RESULT_ALT1|2
Since the background colors were defined, also the foreground colors
need to be defined to make sure that both light and dark schemes which
do not define C_SEARCH_RESULT_ALT1|2 have a legible contrast.

Change-Id: Ic954852bdc66d3534f664658b914af1a30795a7d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-18 07:41:25 +00:00
Christian Stenger
2d5a6818f2 clangbackend: Enhance support for attributes
Instead of assuming an attribute is always just a single
identifier enhance this to support attributes with arguments,
with namespaces and attribute lists as well.

Change-Id: I4cbae33e6b70e29705404dfba952eaab56f507e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-18 05:50:54 +00:00
Fabio Falsini
21b03918b7 New method for show Android splashscreen
New method use theme for show splashscreen
in the first phase (from when an app is
launched to when Qt takes control of the
surface) and in the second phase draw through
Qt the same drawable object used for the theme.

Change-Id: I4d76322a5640cb95f99f5605c5775051e6de7daf
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-11-17 17:16:46 +00:00
Leena Miettinen
931347d5e1 Doc: Describe Qt Quick types for user interaction methods
Fixes: QDS-3071
Change-Id: I9b56d1e261cb3c97755af4ce88bf6bc1e79d1afe
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 17:13:31 +00:00
Jarek Kobus
ad375435fb Remove unused signals
Change-Id: I2b7969a91d5dbb0b455e906eab49b195133cc279
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 16:00:35 +00:00
Miikka Heikkinen
12f7df6a85 QmlPuppet: Remove effect preview support
The issue in QtQuick3D blocking effect previews (QTBUG-86616) is not
going to be fixed in Qt 5 anymore, and Effect was moved to QtQuick3D
from QtQuick3D.Effects in Qt 6, so this can't be written in Qt 5 and
Qt 6 compatible manner anyway. Removed the support for now as it needs
to be implemented differently if we want to enable effect previews in
the future.

Change-Id: Ic786608572c3350e22dab75366cb93586c29459a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 15:49:13 +00:00
Jarek Kobus
7dad568d9f Remove unused signal
Change-Id: I9bc392527346c5fe2a2e9ddb05695adcf74d78a4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 15:44:13 +00:00
Jarek Kobus
2c919c43be Use QHash instead of QMap when key is a pointer type
Ordering in container by pointer to memory doesn't make much sense.
QHash is faster for lookups in this case.

Change-Id: I0d4bdac7f5bb9afffdeaef70b99326547c080f55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-17 14:38:17 +00:00
Jarek Kobus
5efbdd5f10 Construct QColor instances from int instead of QString
Change-Id: I75c72d71fef024a2229f8f78a96d3f02a1fbf72b
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 14:06:20 +00:00
Jarek Kobus
900007e781 Reuse the requestExpansion() signal from the base class
In addition correct the signatures of signals in BaseTreeModel.

Change-Id: I8c49105c9fcc1a6115c5e5c0dc8d9e87ff98d707
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 13:52:41 +00:00
Leander Schulten
8795ecbf5e CppEditor: Improve performance of QuickFix 'Remove using directive in global scope'
Change-Id: Id929255b5bf39a25b66ea18855b0c3c1f01720f0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-17 13:24:27 +00:00
Alessandro Portale
bf852d8fed TextEditor: Better default background colors for C_SEARCH_RESULT_ALT1|2
C_SEARCH_RESULT_ALT1: Give it a bluish tint.

C_SEARCH_RESULT_ALT2: Black on red is quite sneaky on many people's
eyes. This changes the red background to a brighter and less saturated
red.

Change-Id: Id1000119583bf05d47206d877a791ccc42323753
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-17 12:54:26 +00:00
Jarek Kobus
96ed848bf4 Drop autoconnections
Use typed connections instead.

Change-Id: I5ef7d0fc4abbe687eeb49571ce13e73c7c6d50e0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 12:45:48 +00:00
Christian Kandeler
ab91e547da ClangTools: Allow to disable a specific type of diagnostic
... from the results list.
This is much more convenient for the user than having to locate the
diagnostic in the settings first.
This patch deals with the global settings. We plan to offer the same for
project-level settings in a follow-up patch.

Task-number: QTCREATORBUG-24852
Change-Id: I7a97189c393048b98b9c2cdb6f21861a34670e8f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-17 12:40:58 +00:00
Knud Dollereder
83187ba54f Enable pan and zoom gestures for the formeditor
Use continuous zoom for mouse-wheel zoom
Directly apply zoom and not by detouring through custom notification
Moved logic related to zooming from the zoom-action into the view

Change-Id: Ib56779f3ea686736cc419aec94d7b5566091fb96
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 11:53:11 +00:00
Jarek Kobus
ad2d635a09 Get rid of deprecation warning when compiling against Qt 5.15
In Qt 5.15 the comparison operator for QVariant got deprecated.
Fix the warning by substituting comparison operator by custom
method.

Change-Id: I1a5c4ab6742a6d8d85f6cff5a73d5f49c2d5aa73
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 11:39:56 +00:00
David Schulz
5da4c61f6c Debugger: Fix tooltip expression collector
Only use the selected text from the text cursor if the requested
position is inside the selection.

Task-number: QTCREATORBUG-24180
Change-Id: I1d9b07fec2f89c125fa6568aa76130f252e146a4
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 11:32:42 +00:00
Eike Ziller
eb4d230e38 cmake build: Create DebugInfo component with separate debug info
When building with RelWithDebInfo. The CMake code is adapted from
corresponding (internal) functions from Qt 6.
Also let the scripts create an additional *-debug.7z with the debug
info.

Task-number: QTCREATORBUG-24916
Change-Id: Ibc3c8c0013718b9c5e868136e5ce01e1e99f84c4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-17 11:32:32 +00:00
Jarek Kobus
8f4532daae Fix warning about deprecated QProcess::startDetached()
In Qt 5.15 QProcess::startDetached(const QString &command) overload
got deprecated, and in Qt 6 it has disappeared.
We substiture it by setting explicitly the program and
arguments on browserProc. In order to properly separate
the command into program name and arguments we use
Utils::QtcProcess::splitArgs(). We also handle the case
when a path to file browser was not specified, and the case
when starting a file browser failed and the error was empty.

Task-number: QTCREATORBUG-24098
Change-Id: Ie9c9581b303407ddc5c64264576ad39ec0894bdb
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 11:31:53 +00:00
Jarek Kobus
3998e30684 Fix a warning about const signal
Fix a [clazy-const-signal-or-slot] warning. Instead of defining
a signal for internal usage, use directly QMetaObject::invokeMethod().
Don't declare scanDirectoryForQuickTestQmlFiles() a const method
anymore.

Change-Id: I036afc6124dfb877ced7d9e798920c8a8fde1892
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 11:30:23 +00:00
Jarek Kobus
a05a0a61d0 Fix clazy warning about comparing string to implicit char
Fix the warning: QString being compared to implicit QChar
[clazy-qstring-comparison-to-implicit-char].
Fix it by defining explicitly the value of char16_t type.

Change-Id: I87909cf75fa2dddfe5474f33fa36222ebacf06b9
Reviewed-by: hjk <hjk@qt.io>
2020-11-17 11:29:57 +00:00
Eike Ziller
8f655c60b7 Add some known "path" variables to environment widget
Task-number: QTCREATORBUG-24925
Change-Id: I754a1dd1df88232570b33bb6eb05719dbb8d04fd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-17 10:41:05 +00:00
Jarek Kobus
0a230928c0 Drop autoconnections
Use typed connections instead.

Change-Id: I04205c877541722cc059398a146a216727daa103
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-17 10:13:52 +00:00
Jarek Kobus
3b571a2c70 Fix a clazy warning [clazy-auto-unexpected-qstringbuilder]
Fix the following clazy warning:
lambda return type deduced to be QStringBuilder instead of QString.
Possible crash. [clazy-auto-unexpected-qstringbuilder]
We fix it by defining explicitly the return type of lambda.

Change-Id: I50e4a52c7039d736c8db9274e21a0c4eb63df5bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-17 09:51:03 +00:00
Jarek Kobus
df9d1414b8 Don't cast QHoverEvent into QMouseEvent
Such a cast rely on the fact that some internal data
of both classes must match. Qt doesn't guarantee it.

Change-Id: I5c29af98e320b72b599c059a2827eb2e7d3843da
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-17 08:42:57 +00:00
Tim Jenssen
01d509a100 qmljs: improve code a bit
Change-Id: Iea7bdb5c1a0340b60a3e9efd1e9369403af4fabd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-17 08:31:48 +00:00
Jarek Kobus
32e455c12e Fix a crash when changing filter for clazy analyzer
Fixes: QTCREATORBUG-24935
Change-Id: I94ff4f1a5bdd07c8055608048773b4a81a81fcb3
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-17 07:40:51 +00:00
Jarek Kobus
eede69e313 Don't create a temporary list of values for qDeleteAll
It's enough to pass QHash as an input for qDeleteAll,
it will delete all values and won't touch keys.

Change-Id: I5a924f4d59787ac3fd1ffaf07709ab91ba96c7c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-17 06:29:14 +00:00
Jarek Kobus
b6a51f046f Use static version of QFileInfo::exists()
Docs say it's faster than creating QFileInfo object and calling
exists().

Change-Id: I0c10216bf72ab11ebf97b66a113d85ac0768d918
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:49:40 +00:00
Jarek Kobus
eaba657d90 Fix warnings about possible detach of temporary objects
Calling first() or last() on temporary container may
unnecessarily detach the container. Fix it by calling
constFirst() and constLast().

Change-Id: I2460efd5dbee1534eec8a514d9bff2a947bfddf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:46 +00:00
Jarek Kobus
27c962f503 Remove QStringRef leftovers
Change-Id: I3cf4a4f58b9c7a8572745c73451c483f3d52e606
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:38 +00:00
Jarek Kobus
e97a267533 Don't create a temporary list of values for qDeleteAll
It's enough to pass QHash as an input for qDeleteAll,
it will delete all values and won't touch keys.

Change-Id: I9b00963888ac780f74eabdf59ad02890a042a0d2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:33 +00:00
Thomas Hartmann
0de8aab7ae QmlDesigner: Add missing stream read
Change-Id: I5a93a6ef37b9f0608e82b2b9d4453f792b813da1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-16 16:03:41 +00:00
Jarek Kobus
3d463f5af3 Remove unused variables
Change-Id: Ia02256902fc20f33e5906b12be2c642d8e714e5e
Reviewed-by: hjk <hjk@qt.io>
2020-11-16 15:51:06 +00:00
Henning Gruendl
a37ae0b35d QmlDesigner: Fix mouse wheel manipulation SpinBox
Task-number: QDS-3127
Change-Id: I478e25e977e31756c5fe981aa70fb64193a1852a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-16 15:34:28 +00:00
Miikka Heikkinen
d4775673f7 QmlDesigner: Fix navigator preview tooltip issues
Preview tooltip is now shown as separate frameless tool window instead
of just a child widget to ensure it is always on top.

Fixed the layout issues with preview tooltip when the navigator
is moved to another screen with different pixel ratio.

Node internal id is used to identify the hovered node instead of
row index, as row index is only relative to immediate parent node.

Change-Id: Ida06565c7addfb6247e13ded11a1fed51097f0e9
Fixes: QDS-3119
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-16 15:31:12 +00:00
Mahmoud Badri
c73f93a7cf QmlDesigner: replace qAsConst with as_const in the model class
Also revert few linebreaks from previous commit to satisfy the 100
character rule.

Change-Id: I92e85ae79338b3f1d9f9cb89d9c71f0d1f436198
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-11-16 15:19:52 +00:00
Leena Miettinen
337e7ab1fa Doc: Describe refactoring actions for creating functions
As these actions open dialogs, describe them in separate
sections to keep the summary more concise.

Task-number: QTCREATORBUG-24529
Change-Id: If0f1f899e69049c15417c4a37ae8bf2ca094bb73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-16 14:13:16 +00:00
David Schulz
1984ebcf51 Git: fix assert when comparing GerritApproval
When compiling a debug msvc build std::stable_sort verifies that the
compare function returns the inverted result when switching the left
hand side with the right hand side argument.

Change-Id: I34549d69144966c1b74f368e9af35ec565dc791e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-11-16 14:00:05 +00:00
Leander Schulten
92667c779c CppEditor: Remove using directive at global scope always in all files
Previously only using directives in the global scope that followed the
quickfixed using directive were removed

Change-Id: I330acfe3236a6845fd1667f9fa699ab6c8fb560d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-16 13:55:27 +00:00
Henning Gruendl
d3ab7a89f9 QmlDesigner: Add "NOT" option to binding editor
* Add "NOT" CheckBox in binding editor if boolean target
* Fix wrong node assignment in binding editor context menu call
* Fix connection editor state iteration source
* Cleanup redundant code

Task-number: QDS-2872
Change-Id: I8780bb1507f991b52aacfb011b889896d74ccb4f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-16 13:51:24 +00:00