Commit Graph

47434 Commits

Author SHA1 Message Date
David Schulz
2842b613ed TextEditor: request assist after trigger char inserted
... while proposal is shown

amends 23d63dcc8b

Fixes: QTCREATORBUG-24225
Change-Id: Ie935c7c1d4786a4fd3cf338d7f1df52ae28de63b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-05 09:05:25 +00:00
hjk
fcaa6801cf Utils: Start replacing SavedActions by QAction or Utils::Aspect
First mechanical step here is to derive SavedActions from BaseAspect
instead of QAction.

Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-05 08:46:27 +00:00
Thomas Hartmann
e4b9ad289f QmlDesigner: Add QtQml.Component as component type
Change-Id: Ief07ffc863de978b6082adfec3477b00a7309654
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-05 08:25:48 +00:00
hjk
b97b7dc6f2 ProjectExplorer: Move BuildStepWidget::summary etc to BuildStep
The step is the source of information anyway, and available at the
only place of use. No need to copy that over to the widget, neither
for keeping it up-to-date there when the mechanism is already
available in the step itself.

This creates quite some potential for the simplification of
the various createConfigWidget implementations in follow-up patches.

Change-Id: I4474665f194a1ff7c5792ad086ed53c8d3ce13e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-05 08:16:51 +00:00
Eike Ziller
ad7dbc4619 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I565a0bd783dc80b53d4715fdc153dba1f1d3f7c7
2020-10-05 09:05:23 +02:00
Orgad Shaneh
48c56416f5 Git: Do not prompt to add files in a submodule
Fixes: QTCREATORBUG-23845
Change-Id: Ibf20eed26469b5a8599927e5ac2d458bbff9a156
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-04 17:06:23 +00:00
Fawzi Mohamed
2f584585e3 qmldesigner: Avoid crash of TextToModelMerger::getQMLSingletons()
When m_scopeChain is invalid (due to an invalid ui file)
getQMLSingletons would trigger a crash. Catch this case
and return early (an error message would then be displayed).

Fixes: QTCREATORBUG-24587
Change-Id: I80c70d8e7f1c88b14c53d3daebf957dc1e6089ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-03 19:33:46 +00:00
Ville Voutilainen
2e39132deb Android: Set the manifest dirty when app icons are set or removed
Task-number: QTCREATORBUG-24700
Change-Id: I862b5a17f47c7c6bbf7900b8923a246b8e902190
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-02 16:05:06 +00:00
hjk
c0b001737c ProjectExplorer: Remove BuildStepConfigWidget::m_step
It's not needed centrally anymore.

Keep it in the only remaining user, QbsBuildStepConfigWidget. Also
there it will not be needed after aspectification anymore.

Change-Id: Ia29e1e1f5226832ecb62ca79675ce717c9e5ef9a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 15:53:30 +00:00
Christian Stenger
d49365e29e QmlPreview: Fix test
Change-Id: Ida6c406fb17e79ffa8d46d61984584681025db7a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-02 14:59:11 +00:00
hjk
591e93316d Consolidate build/deploystep default display name handling
Use the display name from the factory as default, override if needed.

Change-Id: I03519c998432fea4120b0de8b2fc2686644635f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 13:18:45 +00:00
Martin Kampas
10c0cdc10f CompilationDatabase: Clean paths
File paths in compile_database.json may contain redundant components
("./" or "../").  These confuse the code model, which then fails to
associate the document with the project node.

Change-Id: I7c74a24789a67b761b0737a41d1dd70d2dfd5f3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 12:33:25 +00:00
Christian Kandeler
7125406305 CppTools: Consider .cu files
... when switching via F4 from a .h file and vice versa.

Fixes: QTCREATORBUG-24418
Change-Id: I121967dbec90125b3feed0a9d2aceb9826f925f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 11:53:08 +00:00
Thomas Hartmann
ff99c2213b QmlDesigner: Fix crash
We have to call  updateEnabledViews() in the correct places.
AbstractView::modelAboutToBeDetached() was to late, since the view
is already removed at this point.

Change-Id: I6d71d5ea773fb7ec8ec258344498a229a30dd9b3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 10:52:50 +00:00
Christian Stenger
133da9797e Designer: Allow namespaces for form editor class
Fixes: QTCREATORBUG-24723
Change-Id: I355a9ea0f5f7156bf744ab87ca19870883af936e
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-02 10:23:01 +00:00
David Schulz
a36bdfc858 Revert "CodeAssist: Avoid pointless completion request after accepting item"
is replaced by 23d63dcc8b

This reverts commit 44b71f7a16.

Change-Id: Ib5adaab4a962a54495b48e6b88ab164046526c37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 09:32:02 +00:00
David Schulz
142c47bdc2 Designer: Fix failing test
Change-Id: I6bc9ec2007c9949b45c0f9068f12247ec50a44d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 09:31:30 +00:00
Eike Ziller
8b031c8c05 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I3f2a6c553819e992da7e9f538dc44b95b482359e
2020-10-02 10:47:07 +02:00
Thomas Hartmann
528b634e5a QmlDesigner: Disable TimelineEditorView when not visible
Change-Id: If67a027c9ad52b2b2fa62df8cf94afdd1c2c49d7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 08:29:52 +00:00
Thomas Hartmann
b292de228c QmlDesigner: Disable TransitionEditorView when not visible
Change-Id: I76a1829dae18d651168f92558d65beb8b94f1f88
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 08:29:42 +00:00
Thomas Hartmann
51a132eb92 QmlDesigner Disable FormEditorView when not visible
Change-Id: I4bf6f3747cfd11fa31bdd386efc11fc27dbfe45c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 08:29:29 +00:00
hjk
72a6038f7a Help: Fix compilation on Linux
QPalette was only declared.

Change-Id: I24fa8eca4fd9fdae4be3d35ee2f392fa606fc9ab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-02 08:09:35 +00:00
Miikka Heikkinen
cc0ca7e1ab QmlDesigner: Respect canBeContainer on drag from library to navigator
If the parent node can't be a container for the newly created node,
the newly created node is deleted within the same transaction.

Change-Id: I4f4771add3aae5b4509b3bb0a8fbabfed2e7c99e
Fixes: QDS-2660
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-02 07:49:11 +00:00
Christian Kandeler
b55825a420 ProjectExplorer: Clean up variables
Global variables with names such as "CurrentProject*", "CurrentKit*" etc
are harmful, because the term "current project" as used in Qt Creator
does not refer to the "active project", but simply stands for the
project that contains the node that is currently selected in the project
tree, which in turn may or may not correspond to the current editor
document, depending on the "sync with editor" setting. In other words,
the "current project" is almost a random value with little meaning
outside the project tree itself.
Therefore, we remove "CurrentProject*" and friends, except the ones that
are currently intentionally in use. The latter get renamed to
"CurrentDocument:Project*", so their purpose becomes clear. Their old
names are kept around for backward compatibility, but are not suggested
by the variable chooser anymore, so new usages are unlikely and we can
remove them at some point.
We also add some ActiveProject* variants that have been requested in the
past.
Also remove the "CurrentSession" prefix that was deprecated six years
ago.

Fixes: QTCREATORBUG-12724
Fixes: QTCREATORBUG-24606
Change-Id: Ibba5d0e0ce3d2beb444a5eec01fbb9b745d90a1d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-02 07:49:08 +00:00
Eike Ziller
da8db0f24d QLitehtml: Make container_qpainter usable without litehtml internals
We use it elsewhere to "paint" html to a printer (for generating a PDF).
It is much easier if we don't need to pull litehtml internals into that.

Change-Id: I447fa5442f02a6b5e84524f82089513f0c569939
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-02 07:32:03 +00:00
Assam Boudjelthia
df52de2828 Android: get correct value for ANDROID_DEPLOYMENT_SETTINGS_FILE for Qt 6
CMake with Qt 6 which uses android-${target}-deployment-settings.json
file name, we use substitute ${target} with the root node target name
to get the correct file name.

Task-number: QTCREATORBUG-24678
Change-Id: Ib0c82b947b3217b6b763191b22d91ab9674fedce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-02 07:13:08 +00:00
Assam Boudjelthia
a4f2779452 Android: use correct variable for Android SDK with CMake for Qt 6
Qt 6 for Android with CMake uses ANDROID_SDK_ROOT (similar to qmake),
instead of ANDROID_SDK.

Task-number: QTCREATORBUG-24678
Change-Id: Ic858b8d76b41b57ef35864a1981ebd142d0cccfd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-10-02 07:09:15 +00:00
Thomas Hartmann
6307b094fe QmlDesigner: Add hint to set a property of the parent
This allows to do this in hints:

Hints {
   setParentProperty: "layer.enabled: true"
}

This will always set layer.enabled to true on the parent
if an item of this type is added. This is required for
adding effects from the item library.

Change-Id: Ic9600e0bbcde11df8d060d4a7ad05b4a590c8bea
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-01 16:16:19 +00:00
Xiaofeng Wang
b6b6482c72 Add an action to format code using clang-format by lines
When the file contians non-ascii characters, the position calculated by
QTextBlock may not the same as clang-format. Format at Cursor will not
work in this case, formatting by lines as a workaround.

Fixes: QTCREATORBUG-21812
Change-Id: I4906130111ef2a2f15ffa698a14bec9430cbb3d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-01 15:04:54 +00:00
Henning Gruendl
3a0182d28e QmlDesigner: Fix exception output
Fix exception output by disabling escaping of non-printable characters.

Change-Id: I5997f6f9b70a71a1a6b1cfdad17ac88daee35f7a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-01 14:53:16 +00:00
Thomas Hartmann
8f948397ee QmlDesigner: Add API to disable views
Since we get more and more views we require a way to disable
the notifiers.
A view that is not visible should disable itself, so
that the notifiers are not dispatched anymore.

Change-Id: I7b6f6b850264a21e287374c4fd4ab0d353d4f261
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-01 14:34:22 +00:00
Eike Ziller
5e73215a0a Help: Prefer litehtml viewer backend over QTextbrowser
Fixes: QTCREATORBUG-24661
Change-Id: I027da9bffbebcbef600150ca9d842c234fe9de8d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-10-01 13:31:03 +00:00
David Schulz
dc64f3207b Editor: Make line spacing adjustable
Fixes: QTCREATORBUG-13727
Change-Id: I3dbc3277795b339bced81dc6c5a048c828183cb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-01 12:11:09 +00:00
Christian Kandeler
efce9b04fc ClangTools: Allow multi-selection in diagnostics view
This enables users to suppress or copy several issues at once.

Fixes: QTCREATORBUG-24396
Change-Id: Ib9019fd6a495b967627bf1ce53dead4d168e99da
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-01 10:08:40 +00:00
Thomas Hartmann
751c0dbc98 QmlDesigner: Add hint for layer effect support
Change-Id: I758bddbe0e8f80966f1e7741144f3552e7a736ef
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-01 10:03:55 +00:00
Christian Stenger
2fa08db858 AutoTest: Consolidate common functionality
While at it remove unused code path.

Change-Id: I15dff61131c5f3c9301cd733e1c8b92bd848f084
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-01 09:37:09 +00:00
Christian Stenger
d10d25b3f3 AutoTest: Improve Boost test results handling
This improves constructing the results tree and additionally fixes
matching free functions to their respective test tree items.

Change-Id: I79490507ba7a1934a7be010a00cb341374bf93ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-01 08:08:06 +00:00
Christian Stenger
ff06a409c2 AutoTest: Immediately update checkstate cache
...as soon a modification of the check states happens
instead of waiting for the next parsing to update.
Otherwise we might lose all changes that have been
made without a parse.

Change-Id: I33a92786742eb2b58c1cfcdb438412a2c5bbaed8
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-01 08:07:50 +00:00
Christian Stenger
a7e1411ebf AutoTest: Cache failed states
Avoid losing failed states of test while editing files
that trigger a re-parse and may drop the original item.

Change-Id: Ia66c7f61819d610cced42ff9f86449855b80da2a
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-01 08:07:40 +00:00
Eike Ziller
6269d09763 Add missing documentation for EditorManager
And tweak related documentation a bit.

Change-Id: Id71d6ed0ddf1bd81f605a6b17b51ed3d9fee9485
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-10-01 07:24:45 +00:00
Fabio Falsini
30997838e7 Add support for Android xhdpi, xxhdpi and xxxhdpi splashscreen format
Current Android Qt Creator plugin allow to convert a single
image to the basic format ldpi, mdpi and hdpi for use as
splashscreen. However Android guidelines require to add
xhdpi, xxhdpi and xxxhdpi format size also. This patch
add conversion of the master image to these additional
formats.

Change-Id: Ibb3e9e0bd0d2aeaf6119b04c64275ffc00e820ad
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-30 15:37:39 +00:00
Eike Ziller
f811b87c66 EditorManager: Small API clean-up
- Move private enum to private header
- Add missing parameter to openEditorAtSearchResult
- Remove convenience singular close* methods, we have {} nowadays

Change-Id: Ic5b6d831a9f506ffee09b89b3358874433d62998
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-30 14:57:20 +00:00
Orgad Shaneh
52d1b31a67 Git: Enable push also for detached HEAD
Task-number: QTCREATORBUG-24508
Change-Id: I326b701c79b21f2d4495d752c7928fadd80901d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-09-30 08:40:57 +00:00
Fawzi Mohamed
103b35bcd5 qml: fix refactoring to separate component
* avoid extra spaces
* warn about existing files

Fixes: QTCREATORBUG-21091
Change-Id: Ic9ed4444bd028455e1b2d1755e6c43f352dfd5e3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-30 08:32:38 +00:00
Fawzi Mohamed
f26b7a3700 projectexplorer: avoid crash if recovery of kit fails
Change-Id: I8bf3a24b1485da2bfd1eb13e61c2712b66b30a70
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-29 21:41:22 +00:00
Knud Dollereder
26ef972310 Disallow the creation of invalid curve
but allow invalid initialized curves to be moved into a legal state.
Visualize invalid curve-segments by painting them in the errorColor

Fixes: QDS-2130
Change-Id: Ida44c3b4f5e3d113df7d1e8e7a2b965d26f43815
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-29 15:44:04 +00:00
Miikka Heikkinen
a3e92da8b8 QmlPuppet: Force QApplication use in puppet if charts is imported
Qt Charts requires QApplication, so force that on when QtCharts import
is detected.

Change-Id: Ie725cb0714f2816a34374e46de71b82f00ce6239
Fixes: QDS-2842
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-29 14:00:56 +00:00
Miikka Heikkinen
b099c2967b QmlDesigner: Refactor preview image data caching
Made image cache always be local to the NodeInstanceView and changed
the key to always be the node id to avoid wrong data to be shown
on tooltip in some cases, such as id change or same image used by
multiple nodes.

Also clean up old cached item on id change.

Change-Id: I6fedea2a158d62e03f9d04be4cd26ae34550d09c
Fixes: QDS-2843
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-29 14:00:37 +00:00
Miikka Heikkinen
1f43e06847 QmlDesigner: Respect cancel on crumblebar save confirmation dialog
Change-Id: I682494100ff90c45e3a4bb1137701d603c548478
Fixes: QDS-2704
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-09-29 14:00:25 +00:00
Christian Kandeler
8adb284783 ProjectTree: Remove effectively unused variable
lastFocusedProjectTreeWidget is always null when read, and so is the
variable it's being assigned to. Therefore, it has no effect and should
be removed.

Change-Id: I05ec123dc0acb542fffc8fce92296f3b533d0fa5
Reviewed-by: hjk <hjk@qt.io>
2020-09-29 12:34:31 +00:00