Commit Graph

68568 Commits

Author SHA1 Message Date
Christian Stenger
eafba223a5 QmlJS: Add test for recursive declared items
Tweak the test to allow multiple messages per line.

Task-number: QTCREATORBUG-24615
Change-Id: I662ab4801794dc3e49f68667f634337a847bc503
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-06 09:31:20 +00:00
Christian Stenger
fd64253a62 QmlJS: Suppress wrong warning
When a type is created inside a file with the same name
do not warn if the created type is namespaced.

Fixes: QTCREATORBUG-24615
Change-Id: Icb2b1a9fd1a02ee222084b676ee818eed65a7c93
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-06 09:31:12 +00:00
Thomas Hartmann
11dcdb74ef QmlDesigner: Rename activateTimeline() to setCurrentTimeline()
Change-Id: Ie6932e79eb99b318629557b9f419ae2da1500833
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:15:45 +00:00
Thomas Hartmann
0f2af19780 QmlDesigner: Activate created timeline
Change-Id: I2b8ba374ed463c9062035a9b5b0d2e8209819c4d
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:15:33 +00:00
Thomas Hartmann
e72cd12962 QmlDesigner: Use AbstractView::currentTimeline in TimelineWidget
AbstractView: :currentTimeline is the method that should be used.

Change-Id: I256b03691c114d44f807ce6a29f1f32f612545c9
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:14:00 +00:00
Thomas Hartmann
e6d2e81c07 QmlDesigner: Make explicit how we collect the current timeline
The method graphicsScene()->currentTimeline() should not be used anymore.

Change-Id: Ib05df55c66a962dd7b129759ea330dd83efbc04e
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:13:43 +00:00
Thomas Hartmann
4022e330fb QmlDesigner: Use AbstractView::currentTimeline
There should be only 'one' current timeline. Let's keep the QTC_ASSERT
until we know this does not introduce issues.

Change-Id: I1518bef39b290732bda5dc6e5fc571c33f7407f2
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:13:29 +00:00
Thomas Hartmann
638db3c35b QmlDesigner: Remove the custom notification "INSERT_KEYFRAME"
Adding a keyframe can be done directly in the PropertyEditor.

Change-Id: I38fa87a8bcf4f551890c4ada748301cdeea9f165
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:13:15 +00:00
Thomas Hartmann
8ae81f5a40 QmlDesigner: Use QmlTimeline::insertKeyframe in TimelineView
Change-Id: I22df18aba407b9c49a3aceb46169fd90efe73942
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:13:02 +00:00
Thomas Hartmann
1077ceefd8 QmlDesigner: Add insertKeyframe to QmlTimeline
Change-Id: I405cab4ece5420098ee9d5b3ce823d2b4c1d9339
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:12:50 +00:00
Thomas Hartmann
2da6b66210 QmlDesigner: Use local timeline
We should not use m_graphicsScene->currentTimeline() from the widget.

Change-Id: If31e57884622722818bc1b3254bda98434e65c1e
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 09:11:53 +00:00
Tim Jenssen
fb26650d86 QmlPuppet: fix crash when multilanguage database is used
amends 81a36ac0ef

Change-Id: Ib4143432704569c84a57540a07f75fa2044aaf0e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-06 09:01:43 +00:00
Tim Jenssen
97a9327746 QmlPuppet: reorder includes
Change-Id: If73f76aee81feef160feeb87c78644e26e36072d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-05-06 09:00:49 +00:00
Thomas Hartmann
0059f6af74 QmlDesigner: Define RegExpValidator in HelperWidgets
In Qt 6 there is no RegExpValidator anymore.
To support both Qt 5 and Qt 6 we register our own RegExpValidator
in HelperWidgets if we compile with Qt 6.

Change-Id: I7e66cbf3e29dd034a1c96a22e233058cb7a892e3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 08:33:33 +00:00
Thomas Hartmann
8bfdb39d71 QmlDesigner: Fix InternalConstants for Qt 6
Change-Id: I1f516b4d350c88154dfe193d0833b28b1b46c7e2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 08:33:23 +00:00
Thomas Hartmann
80f6f22061 QmlDesigner: Do not define extra stream operators for QList
This is not required and creates issues with Qt 6.

Change-Id: I74e875fe785d5baa4d0688d0ef86a9151750e56c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 08:32:53 +00:00
Jarek Kobus
dc88306983 ClangModelManagerSupport: Add future synchronizer for started tasks
Task-number: QTCREATORBUG-25678
Change-Id: I0031f64b3d80cfcff6b9625bd2d57ea228382c80
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-06 08:22:22 +00:00
Thiago Macieira
f8d04c0732 Add missing #include
A local, unpushed change highlighted it.

qmldebugtranslationclient.cpp:47:42: error: use of deleted function ‘QYouForgotToDeclareStreamingOperators& operator<<(QDataStream&, T) [with T = QUrl]’

I really don't understand how this could compile even without my change.

Change-Id: I9f583ca106d24f048885fffd167c35c9e614c786
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-06 07:42:55 +00:00
Christian Stenger
80f61a5db9 AutoTest: Extract data gathering and parse result creation
Function processDocument() became to huge. Beside this it
might be needed to re-use functionality partially.

Change-Id: I4c31caa4458c165938c3d6f1170d8ac4806d2af1
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-06 07:19:42 +00:00
Eike Ziller
6689f0e5f4 Fix dropping files onto image viewer
Interactive QGraphicsViews eat all drag&drop events. Since we don't want
the view to be "interactive" anyhow, just set it to non-interactive.
Dragging the image around if it is larger than the view is not
implemented via drag&drop events, so it still works.

Fixes: QTCREATORBUG-25462
Change-Id: Iee403bab7ba83f897b4d2cca662c4e82ae4aa529
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-06 07:15:43 +00:00
Marco Bubke
1618937637 Sqlite: Use config.h instead of setting everything in the build files
Change-Id: Ia70a5e78475a8b8078276df03330060c8785bf90
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:49 +00:00
Marco Bubke
f8647ec428 Sqlite: Enable SQLITE_DEBUG for debug
Change-Id: I086dc07ae7672d1077f8469eccac5ce34d56c04d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:44 +00:00
Marco Bubke
81a36ac0ef Sqlite: Optimize the initialization
https: //www.sqlite.org/compile.html#omit_autoinit

Change-Id: Iaa91203be21f01a19235a9401cb4fa412eca8276
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:37 +00:00
Marco Bubke
8edbdd78ad Sqlite: Default column type to None
None has no type affinity. So it will not try to convert types to other
types like Numeric will do.

Change-Id: I5362a6d071459594619485b8b8a37b3f5ed12db6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:14:18 +00:00
Marco Bubke
385158ddcc Sqlite: Remove unused function
Change-Id: I3ce625c1c097c9f6e66c378c3b708397c09c6980
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-05 15:13:59 +00:00
Marco Bubke
47672714a3 Sqlite: Simplify the binding with fold expressions
Makes the life of the compiler easier too.

Change-Id: I079ed042e0fd4c359415d123b89ad39341a35468
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
2021-05-05 15:13:08 +00:00
Eike Ziller
f4c3c49920 Bump version to 4.15.1
Change-Id: Ibc2b495f00d33ec9c0c1400c9378cd80d95e11f3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-05 14:48:35 +00:00
hjk
7f61347757 Utils: Add some description of FilePath::onDevice
Change-Id: I92f2a9b387b026e128b5a733211aec0d9c443d4f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-05 13:42:28 +00:00
hjk
43636e3cb3 Docker: Suppress a warning if logging is not enabled
Change-Id: Ifad1dd0b720d910cf0fc0c200517563f3ba0897c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 12:54:22 +00:00
Andre Hartmann
60055b6e4c FileProperties: Add line endings and indentation info
Open the file and try to guess the line endings and
indentation style.

Change-Id: I4e64b5ea7fc8429fe576d956fdff6b015f275003
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-05 12:49:11 +00:00
hjk
bedf8e65f4 Git: Use QtcProcess instead of SychronouceProcess helper functions
Change-Id: I76b21d046676b454f49970e8602f33b759f3c6c5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-05 12:29:29 +00:00
hjk
a570ab0e3c Perforce: Use QtcProcess instead of SynchronousProcess helpers
Change-Id: I1d6ef963a72a9ef3175c696bff9038faf5889311
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-05 12:28:45 +00:00
hjk
8b4cd1e0aa VcsBase: Use QtcProcess in VcsBaseSubmitEditor
Replaces uses of SynchronousProcess helper functions.

Change-Id: I015306a7265248253bc37b297600adf746be9f5d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-05 12:27:23 +00:00
hjk
c69eb63767 Utils: Remove SynchronousProcess::{setP,p}rocessEnvironment
Change-Id: I761c04a08bc7e52b2d57d90cb8aa93ec9f3db724
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-05 12:25:57 +00:00
hjk
793d673f39 Vcs/Utils: Use Utils::Environment for ShellCommand
Change-Id: Ica289ab2f83d52270923c4ff4983860cfbe0b494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 12:21:29 +00:00
hjk
f5aa7bd9a1 QtSupport: Replace a use of SynchronousProcess
Change-Id: I986b2972aa4dbd3e4fe2ac0ba0893b358e2ac865
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 12:15:08 +00:00
hjk
5813c7e8c2 Utils: Make SynchronousProcess use Utils::Environment for environments
Makes the interface more similar to QtcProcess.

Change-Id: I58e57d9fdb7c37eb0d2a5c5eef8643d6be97c3cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-05 12:14:31 +00:00
Christian Stenger
5b5a998a5c QmlDesigner: Fix invalid id detection
Do not expect an id having 2 or more characters.

Fixes: QTCREATORBUG-25474
Change-Id: I0b3878614ad41681036a98befd03661530a0625c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-05 11:43:43 +00:00
Jarek Kobus
0ca487b265 Fix a possible crash in ClangEditorDocumentProcessor
Use QFutureSynchronizer in order to ensure that all
threads have finished on shutdown.

Fixes: QTCREATORBUG-25673
Change-Id: I3a6a808ada389bc51a1f0149dfc112768929a20d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-05 11:13:49 +00:00
Tapani Mattila
d5cadcfa59 ProjectExplorer: Enable to easily check if a project has dirty files
Task-number: QDS-4241
Change-Id: I2fec5f411cdff9fabfa31bbd73971c0308df0783
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-05 11:07:40 +00:00
Christian Stenger
2447d1d69c QmlJS: Restrict warnings of blocks
Warn only if the block contains a var statement
as this is discouraged.

Fixes: QTCREATORBUG-24214
Change-Id: Ib96c6723e82b6ddce0b7b63f23d3408f45ae7d58
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-05 10:32:59 +00:00
Christian Stenger
845afb25fc QmlJS: Fix checking for case and default blocks
case and default blocks inside a switch statement are just
special statement lists which need proper handling to avoid
wrong warnings regarding using standalone blocks.

Task-number: QTCREATORBUG-24214
Change-Id: Ia682b13ed4df21c5831308193d5abaf5163bde59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-05 10:32:49 +00:00
David Schulz
a86da031c7 TextEditor: Fix is visible check of function hint
Since the FunctionHintProposalWidget is just a proxy witget that uses a
FakeToolTip it is not shown directly so we cannot check the visibility
with isVisible.

Fixes: QTCREATORBUG-25664
Change-Id: I6888e373afcfc79565ce8e3dad1bb05501d58200
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-05 10:11:21 +00:00
Eike Ziller
b3a893e9b8 Merge remote-tracking branch 'origin/4.15'
Change-Id: I75ffc79eeb8d73296a2271a636fae48e35427947
2021-05-05 11:46:19 +02:00
Youri Westerman
103aa8be7c Add more information to appdata xml
- Add oars content rating to appdata xml
- Add screenshots to appdata xml
- Add release info

Change-Id: I61bf023814149983f7a64e03f49eb8d998dac85b
Reviewed-by: Youri Westerman <tetracon@gmail.com>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-05 07:57:01 +00:00
Aleksei German
b92acd3e8e QmlDesigner: Report Bug link for QDS
Task: QDS-1272

Change-Id: I1d369d2a53d6829651a8c70be77ef4e5855d775c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-05 07:38:10 +00:00
hjk
077c149667 Debugger: Don't pass comments as custom commands to backends
GDB creates disturbing replies for them.

Fixes: QTCREATORBUG-25666
Change-Id: If6223d1065cb96301e3e25aec15e653702e78d08
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 06:37:26 +00:00
Christian Kandeler
97744a071a ProjectExplorer: Fix project mode layout issue
Window state save/restore was undermined by code that added and removed
the central widget, leading to inconsistent data.
Fix this by making sure that we (de-)serialize if and only if a central
widget is present.
Also remove the hacky workaround that was supposed to fix this, but
didn't.

Fixes: QTCREATORBUG-25551
Change-Id: I6e7f2aff7455db476f870ead64b09a9716f3558b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-04 14:46:06 +00:00
Miikka Heikkinen
0a84406e0d QmlPuppet: Re-enable navigator preview image generation
The issue blocking this was fixed in QtQuick3D.

Change-Id: I31ceb3091f7deb4450c966a8c41a203782569f14
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-04 14:02:50 +00:00
Michael Weghorn
fd9ca07a11 Debugger: Import GDB pretty printers for new objfiles
Previously, if enabled in the configuration, system
GDB pretty printers were loaded only once for all
objfiles present at the point in time when the loading
happened, which meant that GDB pretty printers for
objfiles loaded later were not taken into account
and thus unavailable if they were defined in the
corresponding autoload scripts for the objfiles.

In order to make use of those as well, remember whether
loading of system GDB pretty printer is enabled, and if so,
evaluate the pretty printers set at the new objfiles
in the handler for GDB's new_objfile event.

Extract the functionality for handling one objfile's
pretty_printers to a separate function
'importPlainDumpersForObj' to avoid code duplication.

Note: For this to actually work, it is required that the
objfile passed to the registered GDB new_objfile handler
actually has the pretty printers set at this stage.
This was only recently implemented on GDB side, in
GDB commit 2c473def12b08100e6b56261f01112db7f6aeab5
("gdb: do autoload before notifying Python side in
new_objfile event", 2021-04-27, [1]).
Therefore, this currently only works with the current
development version of GDB built from its git master
branch, not with any already released GDB versions.
(When older GDB versions are used, this will just behave
as it used to, and the corresponding GDB pretty-printers
will not be used.)

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=2c473def12b08100e6b56261f01112db7f6aeab5

Fixes: QTCREATORBUG-25339
Change-Id: Ibc0ab16fbb75184fa199c0709bfc73954f04c193
Reviewed-by: hjk <hjk@qt.io>
2021-05-04 13:30:51 +00:00