Commit Graph

68765 Commits

Author SHA1 Message Date
Ali Kianian
f31cd97404 QmlDesigner: Implement StudioStyle
- StudioStyle is implemented as an independent style dedicated to
QmlDesigner.
- QmlDesigner style part is removed from ManhattanStyle.
- Buttons are handled in StudioStyle.
- An standard palette is defined for StudioStyle.
- StudioStyle is applied to the application by QmlDesignerBasePlugin.

Task-number: QDS-9274
Change-Id: Id0a9040d82b6228a8fb215a416a916be116542bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-03 13:51:07 +00:00
hjk
e0694c52d9 RemoteLinux: Allow parsing used ports from cat output
We used to run

     {filePath("sed"), {"-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*"}

on the device side but doesn't pass quoting on double-remote setups.
Chicken out by using a simpler for now command.

Change-Id: I7794f803d185bd4b6b717d85c01cc250cc66f1eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 13:50:35 +00:00
Marco Bubke
48ad79ee1e Utils: Introduce UniqueObjectPtr
We very often want to remove a Qobject in a scope but because it has a
parent it can be deleted earlier. So using std::unique_ptr can lead to
double deletion. UniqueObjectPtr can track if a pointer is already
deleted. So no double deletion is possible but we still delete the
object in that scope. UniqueObjectPtr is based on std::unique_ptr but
uses a QPointer as internal pointer representation.

Because QPointer is not convertable you cannot cast from one type to
an other(QTBUG-112464). Because of that UniqueObjectInternalPointer
derives from QPointer and adds a conversion constructor.

Change-Id: I2c7707489f6db836cc5db2463efa8c33932b6455
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-03 12:48:11 +00:00
hjk
5715b8baec Debugger: Execute the non-installed gdb data-dir magic
... only when there's a hope for it to help.

Change-Id: I0b7215af371515a1eec8420fdf59e60037584941
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-03 10:15:31 +00:00
Thomas Hartmann
a45bc00a0f QmlDesigner: Disable possible imports in toText
In this context this is not required.

Change-Id: I04e74661bafe9dd9a0f72fc17cb4e6cf01e564fe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-03 09:54:10 +00:00
Thomas Hartmann
61d89aba67 QmlDesigner: Disable possible imports in createQmlObjectNodeFromSource
In this context this is not required.

Change-Id: I6d801eb11af1f60ed67b84bdd3db4d3db41da04e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-03 09:54:03 +00:00
Thomas Hartmann
6f1657fa06 QmlDesigner: Fallback to root context
If we cannot resolve an expression in the proper context,
we fallback to the root context.
The current context should be always a child of the root context,
but there are issues reported to be fixed by this.

Change-Id: I3f91641ea10fd0fa3bf22a93455e291013f5acc1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-04-03 09:53:32 +00:00
Thomas Hartmann
42d84e012c QmlDesigner: Use simplifiedTypeName to strip "QML" prefix
Task-number: QDS-9608
Change-Id: I4fb59e603a0ab31727ee60a8af5b2c3ab4dfdf9b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-04-03 09:47:40 +00:00
Christian Stenger
ea73bb9146 DeviceSupport: Silence soft assert
Change-Id: Ifa5bcbb799fcfeb25254a87a1e3e62bc8864bf4d
Reviewed-by: hjk <hjk@qt.io>
2023-04-03 08:12:03 +00:00
Marcus Tillmanns
94c4800ad8 Terminal: Fix crash when reusing TerminalWidget
Change-Id: I9d30df1abbecabd3909078e0a609fe5ba96769ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 07:53:23 +00:00
Marcus Tillmanns
0015c666d2 Docker: Fix ensureReachable return value
DockerDevice::ensureReachable returned false in case a path was
already mounted.

Change-Id: I7b378a063dfe5380a1ead648f89911f2225c6338
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 07:34:40 +00:00
Marcus Tillmanns
18045f3fe0 Terminal: Close Pane with last Terminal
Closes the Terminal pane once the last terminal is closed.
Opening the pane again will also open a new Terminal.

Change-Id: I2f822b0058b26506250c784357ba522f29fd4078
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 07:34:26 +00:00
hjk
a8abb5ca50 RemoteLinux/Qnx: Disentangle deploy step factories further
Change-Id: I5d6c9a6de05bf8284be13f877642de39f7c3d22d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-03 07:08:50 +00:00
hjk
3cd0dad3d4 RemoteLinux: Set up GenericCopy step when sftp and rsync fail
Change-Id: Ia99275c9e1cabe06613a138dec87bd9c2f98b258
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-03 07:08:36 +00:00
hjk
e094e738b0 RemoteLinux: Have an extra simple echo test
First test without additional complications through quoting.
Makes debugging easier.

Change-Id: I3ea1a0725474fed09204fda1219cbc535bd2ef7c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 06:15:41 +00:00
Jarek Kobus
9bdddd3df7 Compile fix
Change-Id: If0a12d9e2b7d8782ecc65855285f95e05c816f39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-02 17:33:10 +00:00
Eike Ziller
7fc0dcec0d Fix lots of tr.h files not being mentioned in CMakeLists.txt
Change-Id: I63d364ac50d9587339b10a5571870cb9a81c54ee
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-01 04:25:17 +00:00
Thomas Hartmann
60646fa6ac QmlDesigner: Ensure statusbar spans the complete widget
Task-number: QDS-9512
Change-Id: I6b4cb31ea7de7e8735450f327050290f15351b96
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-31 16:33:34 +00:00
Thomas Hartmann
07adb77dd1 QmlDesigner: Add action for taking screenshots
Task-numner: QDS-9431
Change-Id: I091e8cef646d08ee67935e2b3cea903b68a37a0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-31 16:33:22 +00:00
Eike Ziller
b635e99086 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/libs/utils/multitextcursor.cpp

Change-Id: I54b00ea5e6953078beed7673b5de31114f983bfa
2023-03-31 15:58:09 +02:00
Samuel Ghinet
9c7dcea60b QmlDesigner: Fix new folders (same name) not automatically expanding
When a user created a new folder with the same name as an existing
folder in that same location, the folder was not automatically
expanded.

Task-number: QDS-8866
Change-Id: I82ec4303a30d8f810417deea68b487e1b55833d5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-31 13:44:14 +00:00
hjk
c6565611d6 RemoteLinux: Don't crash on empty test output
Amends 95609cdd57.

Change-Id: Id316ccf1989ac7853bdb71b22351aec7fd12fe7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-31 11:16:39 +00:00
David Schulz
82a4ea721f TextEditor: add a virtual destructor to TextSuggestion
Change-Id: I30378a5a3367a79eb3b39bc921c409ca0af04119
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-31 10:03:41 +00:00
David Schulz
7046890bcc Editor: ensure that the outline is the left most toolbar widget
Fixes: QTCREATORBUG-28765
Change-Id: Ifc43ed64ab4906af2d669ff372d8b66d59203048
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-31 09:32:04 +00:00
Orgad Shaneh
2d7fe61e7c ClangTools: Disable PCH
This plugin depends on yaml-cpp, which enables exception handling on MSVC,
so the PCH is inconsistent.

Change-Id: Id098ea115d71d787192319a6fd0ef7f2addd7ec6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-31 07:46:42 +00:00
Alessandro Portale
556768b293 TextEditor: Use QtColorButton in ColorSchemeEdit
Replaces the style-sheet based drawing. Reduces handling code. Adds
Drag'n'drop capabilities.

Change-Id: I7e7ff06df61ffead00d4c747c8b0f5e81de169ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-31 07:44:07 +00:00
Alessandro Portale
3aa0291cd1 Utils: Handle invalid colors in QtColorButton
Paint a sublte placeholder.

Change-Id: I4fc0a51744a98621fb8289ce7cddfc2ccd43784f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-31 07:43:48 +00:00
Samuel Ghinet
dbf91a8f03 QmlDesigner: Fix Material download not showing any progress
Also, now delayed the finish part by 200ms so that 100% progress would
be visible to the user.

Task-number: QDS-9562
Change-Id: Ie8f87ff70770b206256d4dbf0c08227723067eeb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-31 07:26:45 +00:00
David Schulz
4b606ba9de LanguageClient: optimize cloning documents
Cloning the document that is needed to track the changes for the
language server is 3 times slower than just getting the whole original
document content and create a new QTextDocument with that content.
Presumably some additional information gets cloned that is not needed
for just the content tracking.

Change-Id: I4a7002b2ac97563f01dc3a67351b9363e9cc7b3f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-31 06:38:37 +00:00
Christian Stenger
93fb8cd1ef Fix Qbs build
Change-Id: Ia46cadd346561c2d52596290e3fbabcc2e746229
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-31 06:04:07 +00:00
Tim Jenssen
09ab24ca72 LanguageClient: fix build with mingw
Change-Id: I447a21cc9eef6bb1f8cfdec500e68ae33c4db276
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-30 16:10:17 +00:00
Tim Jenssen
9526971b23 qds: fix build after merge with older Qt versions
Change-Id: Ia6574b38d19df4a274d4e095a76bb1ceb60fa258
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-30 16:09:54 +00:00
Tim Jenssen
adb664f521 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/libs/utils/filepath.cpp
  src/plugins/qmldesigner/qmldesignerexternaldependencies.cpp
  src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp
  tests/unit/unittest/CMakeLists.txt

Change-Id: I017a6075db41a5233487ac855ffe23de2b2bb0ee
2023-03-30 13:30:42 +00:00
Samuel Ghinet
129153e663 QmlDesigner: Allow user to download multiple textures at once
Task-number: QDS-9224
Change-Id: Ia1ec8f8b0951e8dd31d47f64509d39137cdeaa41
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-30 12:26:36 +00:00
Marco Bubke
21b598805e QmlDesigner: Delete tool bar and status bar with plugin
The parent of the tool and status bar are widgets in icore. So they are
not deleted at the same time as the rest of the qmldesigner plugin. So
the connections are still there and you get dangling pointer. Deleting
them with plugin prevents this dangling connections.

Change-Id: I489d18c037c67ce34326651e693e74c4d951c261
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-30 11:29:21 +00:00
Alessandro Portale
6f765181c9 Icons: Remove obsolete svg files and scripts
Change-Id: Ibdb42808b70323eca6f751a6f74cd90a3f844ee7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-30 10:14:53 +00:00
Alessandro Portale
cb3fd6eb0d Utils: Introduce Utils::Icons::PINNED_SMALL
Replaces two duplicated pin.xpm in the pinnable debugger tooltip and the
qmleditorwidgets with the new icon.

Change-Id: I57b7adc5c0b92ffdf01da12dd832482d739cb86e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-30 09:14:31 +00:00
Orgad Shaneh
613e011bfa Utils: Fix MSVC warning in MultitextCursor
warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data

Change-Id: I35b981e544c66f818089b9e2d511a1b36ca86bfd
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-30 08:27:19 +00:00
David Schulz
73c645820f TextEditor: use QScopeGuard instead of ExecuteOnDestruction
Change-Id: I2d7c04d69ad49a121b157af2750eaed26bab9480
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-30 08:00:19 +00:00
Orgad Shaneh
0f3f5fb4d8 Git: Fix crash when menu is closed before fast-forward check result
Fixes: QTCREATORBUG-28958
Change-Id: Ic3bfde2f355fdb3d44b0614e9ba176ff550d97c8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-30 07:38:50 +00:00
Mahmoud Badri
0b79db5c17 QmlDesigner: Close section's context-menu on view focus out
When clicking outside any view that has sections and a section's
context-menu is visible, it is now closed.

Fixes: QDS-9564
Change-Id: I73cd3a9754c5a18360427525a2a943c2c549e83f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-03-30 07:31:24 +00:00
Christian Stenger
6f7934226e McuSupport: Adapt plugin unit test expectations
Amends 22909726eb.

Change-Id: Icd586fe7724ce4ba9b12780f6044a3f35e5a4fa5
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-30 04:48:20 +00:00
Samuel Ghinet
0d73fae212 QmlDesigner: Fix texture metadata no longer showing on hover
After the changes that made the texture icons downloadable, hovering
over the download button of a texture no longer showed metadata. The
reason is that the structure of the json metadata file changed a bit
-- now we have a top item with children "version" and "file_items".

Task-number: QDS-9575
Change-Id: Ib41d7871e3b3c0a0c759de5d0277c3ee7c974d4f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-29 15:26:54 +00:00
Samuel Ghinet
a59cf942e0 QmlDesigner: Fix materials & textures not shown when internet is down
If internet is down, or, for some reason, the URLs are inaccessible,
then we should still show the existing materials and textures.

Task-number: QDS-9582
Change-Id: Ic9516c7bc00a37d1c3cd31643749f51a217bf317
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-29 15:26:15 +00:00
Mahmoud Badri
0184e38708 QmlDesigner: Fix typo in anchors property names
Change-Id: Ibb100babdc1d98bd0c75bda11ac3b184efb0e480
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-29 15:25:38 +00:00
Thomas Hartmann
31347c0506 QmlDesigner: Fix crash
The file node can be null if a new file was just added.
This worked before the 10.0 merge, but could be timing related.

In any case the check is good practice.

Task-number: QDS-9584
Change-Id: Ic01b763c6ba4466832316a454a12ccbdc1a6cc64
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-03-29 14:21:00 +00:00
Robert Löhning
143dedf2f5 LanguageClient: Fix state string
After a shutdown, the client is shut down.

Change-Id: I092af02bfb72fda611229af42a838071890bfce9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-03-29 13:29:54 +00:00
hjk
2eebfb130c RemoteLinux: Also check for generic copy in device test
Currently both ssh and rsysnc don't work on double remote, this
allows passing the test with some deployment.

Change-Id: Iad2f125b09d1b326d6399cdc3dff0faa9430e92d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-29 13:08:45 +00:00
Thomas Hartmann
1c6e7c796b QmlDesigner: Fix crash
The nullptr does crash. We can use a proper QmlJSQuickFixAssistInterface
created from the editor instead.

Task-number: QDS-9573
Change-Id: I5ea2792acb311c37e1005ff039ed7110503dfb4f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-29 12:29:15 +00:00
Christian Stenger
59be9e98bf Debugger: Avoid duplicate commit and close
The delegate triggers a commit and close already when
the focus is switched. So, the additional calls will
end up in a warning deep inside QAbstractItemView
and not processed.
Get rid of the obsolete calls and the warnings.

Change-Id: Ic27f6b1aa0b73f4bb82b0878650d8ae8ae8f87d2
Reviewed-by: hjk <hjk@qt.io>
2023-03-29 12:19:39 +00:00