Commit Graph

62421 Commits

Author SHA1 Message Date
Marco Bubke
c1ca2a7103 Sqlite: Fix insertUpdateDelete
Like you can read in https://www.sqlite.org/isolation.html after an
update they same value can be show up for an iterator advancement. This
would be lead to an delete. So the last value for update is saved and
then compared in the delete method. If they are equal the delete is
skipped.

Change-Id: Ic0aa6619f6a4a520eac77be4e5a83cbe533d102d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 15:01:39 +00:00
Marco Bubke
815383bf0a Sqlite: Disable auto moc and uic because there are no QObjects
Change-Id: Ia96f99a38ceaffd233f5248db2e2b0911b1a4342
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-12-08 15:01:31 +00:00
Marco Bubke
4e99b13804 QmlDesigner: Make the member of BasicId private
This prevents that it is changed by accident. It should be anyway not
accessed outside of tests and the storage.

The reinterpret cast is defined behavior.

It would be nice to make the constructor private too but it is used widely
in the tests.

Change-Id: Ib0e8393cc950a651138c1e87c1b6a7b3e5a836f2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 15:01:23 +00:00
Marco Bubke
6009f65b9b QmlDesigner: Fix broken algorithm for table without rowid
It seem not to work for tables without rowids. We have to research if
it a Sqlite bug or more propable a misuse of our side.

Change-Id: Ie1e2fdba5f71595f24cad79125c37db0ec9715c3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 15:01:17 +00:00
Marco Bubke
3e52e8b643 QmlDesigner: Cleanup the id casting
The ids were sometimes casted, sometimes copied to integer values. Now
the cast is moved to an extra function.

Change-Id: I3dcdbde05461f2fca700cc9020758738266d5fd2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 15:01:12 +00:00
Marco Bubke
0827556621 QmlDesigner: Synchronize ProjectData to the Storage
Task-number: QDS-5644
Change-Id: Icede506974e88dd64fc866b65f4fa9d64a05aea0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 15:01:05 +00:00
Marco Bubke
56af8b905e QmlDesigner: Improve project storage update
Task-number: QDS-4920
Change-Id: If5a839a6862bab50fe3a3e049cb1214f04eeca1a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 15:00:44 +00:00
Jarek Kobus
c3a5dc380d IDevice: Make fromMap() / toMap() protected
Change-Id: I9a8f1caddffaf4e0f446ccc4f08f1110b6c003d4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 14:44:38 +00:00
Henning Gruendl
1996c4c8c8 QmlDesigner: Fix connection editor functions
Fix the connection editor not picking up all the slots of a model node
due to setting a wrong expression in the QmlJS::Document.

Change-Id: I2d28e1e779c5293991397ebc2a061c35234d9cae
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 14:18:53 +00:00
Eike Ziller
42729a8fd9 Remove IEditorFactory::defaultEditorFactories() from public API
Only used internally now, other usages were changed to
defaultEditorTypes().

Change-Id: I39f272dd0610c14070a16b7f9df1c7ef0adb17fd
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-08 14:00:07 +00:00
Eike Ziller
8a61a945f5 Support external editors as default for Open With and properties dialog
Change-Id: I64fdfcb31d75e78810fa4dee5661bfb8fc6ccb52
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-08 14:00:01 +00:00
Eike Ziller
27e6b8f7a5 Editors: Make external editors available in MIME type settings
Makes it possible to set an external editor as the default handler in
the MIME type settings.
So far that is ignored though - in that case all functionality falls
back to the default IEditorFactory instead.

Change-Id: I9bd2a1366f64f16fa648451600b4045323f87bd0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-08 13:59:50 +00:00
Eike Ziller
862c969441 Create common base for IEditorFactory and IExternalEditor
As preparation for both being selectable as default editor type for a
mime type.

Change-Id: Ie34ad25caa7fe0cc0b740c96743db9bab378bf24
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-08 13:59:12 +00:00
David Schulz
5d75f1900b LanguageClient: fix crash on completion assist cancel
The Client might be already deleted when the text editor codeassist
calls cancel on the processor.

Change-Id: I6b0b484a086456ed9d0543f530aea0fae32c523a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-08 13:54:15 +00:00
David Schulz
61e764bb18 Find: fix crash on search in current file without file
The old document is already deleted after closing the last editor.
Checking the document before updating the ui prevents it in that case.

Change-Id: I7e65fd1203b6e843ae6dc93d2c304974d5b48a69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-08 13:29:26 +00:00
Thomas Hartmann
2427ffad71 QmlDesigner: Do not offer imports that end with '.impl'
Task-number: QDS-5681
Change-Id: I8a836c47b4468684c4fe65c1f1691517a35e98e2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-08 13:26:18 +00:00
Knud Dollereder
b8a7122097 Register image formats supported by QImageReader and hdr
The list of supported image file formats of the asset loader
was missing an entry for the jpeg extension.
This is now fixed by generating this list out from the result
of QImageReader::supportedFormats with the addition of the
.hdr format.

Fixes: QDS-5713
Change-Id: I65ccbe4c02e1b4eb725b6bb14d154bbfddf8fa9c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 13:13:37 +00:00
Miikka Heikkinen
175ddb79e8 QmlDesigner: If widgetApp is specified for project, force it in puppet
Force QApplication use in puppet if widgetApp is set to true in
the project.

Task-number: QDS-5686
Change-Id: Id1be1f1e6b7239015c4c33f2e3866f78b0f878a7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 13:12:33 +00:00
Miikka Heikkinen
c17f633a7e QmlProjectManager: Add widgetApp qml project property
Widget was the default apptype in Qt5, but in Qt6 the default was
changed to gui, so projects with qml modules that depend on widgets can
no longer be launched. Notable example of this is QtCharts.

Added "widgetApp" qml project property to allow users to specify if
they want widget or gui based application.

Task-number: QDS-5686
Change-Id: If0787421c79d4ba24a0f8513c8538126bcf29b4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-08 13:12:12 +00:00
Samuel Ghinet
8c139603a1 QDS: shrink the right margin of the project view for small sized dialog
This also allows a bit smaller minimum width for the dialog.

Also, did a bit of cleanup.

Task-number: QDS-5500
Change-Id: I3660190ac0a73dd1da1c7d6f8ee76660b1fba6be
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-08 13:05:55 +00:00
Sergey Levin
44ff85cb1b Change QLabel from StringAspect to ElidingLabel
ElidingLabel with elided mode set other than Qt::ElideNone will not show
in case QFormLayout has QFormLayout::ExpandingFieldsGrow field growth
policy

Change-Id: I26db57fbeb2c921e054cf7dc18229ebddcb04530
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-08 12:53:19 +00:00
Alessandro Portale
5e77303b57 Android: Turn SDK manager from QTabWidget into QGroupBox
Since the AVD manager moved into the "Devices" option page, the SDK
manager tab was left alone in the QTabWidget. One single tab looks
strange and uses more space than needed.

This change turns the SDK manager area into a QGroupBox, which is
consistent with the rest of the Android Options page. This patch also
adjusts the margins and spacings of the SDK manager widget to fit to the
rest of the options page.

Change-Id: Id1ed38862e8f9e984f53cdfb59492e30902162a7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-08 11:45:45 +00:00
Christian Kandeler
67cf7c08d0 LanguageClient: More verbose logging when clearing token data
Change-Id: I3f9883858fa2f23dff00cda9f556f0f4bbff127a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-08 09:46:25 +00:00
Petar Perisin
0b736c3f7a GTest: do not change arguments order of testRunner
transforming list of args to set can change order
of arguments as well as count, which can make
application unable to run

Change-Id: Ib8164e0b7661511f738bdc3b21e74fbaaa6a5252
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-08 09:06:00 +00:00
Assam Boudjelthia
e3fb97b5ce Android: give a visual indication when sdkmanager is reloading packages
Add an info message when sdkmanager is reloading the packages, and also
don't expand the summary widget when the widgets are not active,
which can be when the packages are being reloaded or when the licenses
are being reviewed, this will give more space for reviewing the licenses
instead of having the summary take most of the settings page space.

Change-Id: I6acf3f6edc3b3d3fa78f0ba00308a21f8bb4fa72
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-07 18:07:57 +00:00
Christian Kandeler
92e3eb722a ClangCodeModel: Another clangd cursor adjustment
This time for the case where we are after the last character of a
function call argument.

Fixes: QTCREATORBUG-26638
Change-Id: I634fa91e87103a7ae82e3a43246dfbc7069dbbdc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-07 16:08:28 +00:00
Assam Boudjelthia
ca9742e2a1 Android: Merge Java settings into Android settings
... to save some space.

Change-Id: I68d7cae1b007eff0624f2c0993e191c64fb415fc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-07 15:44:57 +00:00
Assam Boudjelthia
53d5bc5a08 Android: Add channel and include_obsolete UI filters to SDK Manager
Allow to filter channels and obsolete packages from the UI.

Change-Id: Ifcaa2a1c3421a15e60f92b7a9b86cc9ab3554885
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-07 15:44:39 +00:00
Christian Kandeler
7ffaa89f02 ClangCodeModel: Work around clangd cursor issue, part 2
Amends 825c9ea64f to work also for member access via pointer.

Change-Id: I8ee68d0f6d93c65c2f82a63bce5baef2aa2159de
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-07 14:00:18 +00:00
David Schulz
2405ccb271 clangd: Assert on generating tooltip for deleted client
Text marks for diagnostics should be deleted when the client dies. If
they somehow survive assert when creating a tooltip for those text
marks.

Task-number: QTCREATORBUG-26585
Change-Id: Iaebf0d2aba66d2a6c250f8dad7856ef03b1dcacd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-07 13:54:34 +00:00
Christiaan Janssen
fd98dbaeab McuSupport: fix cmake var mapping for cypress flash tool
Task-number: UL-5094
Change-Id: Ib87eb39d54c1677ed4c130054d0a9f01ca6a8ec4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-07 11:05:39 +00:00
Maximilian Goldstein
3d47a0ef09 qmljsmodelmanager: Add additional directories to find qmltypes
This works around the issue that we only looked for qmltypes in the
directory the binary ends up being stored in. This did not work
for macOS and Windows as those are stored in subdirectories due
the platform specific ways binaries are stored there.

Now we also look in the directory where the qmltypes should be located
on these platforms.

Task-number: QTCREATORBUG-24987
Change-Id: I23d46e68f8fad0b4e2e8a01fc7c41360f1e6961e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-07 10:15:11 +00:00
Christian Kandeler
49c421e5c4 ClangCodeModel: Prevent duplicate "/Tx" options
Those trigger code model warnings.

Fixes: QTCREATORBUG-26664
Change-Id: I0ed6b9edeeb94c8597b30c0be514d2b34dbedc49
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-07 10:08:09 +00:00
David Schulz
655e64b2da clangd: fix saving clangd settings
amends 6cf6f1c230

Change-Id: Ib9007805783cfac258a73b81b7e1a401f9fbc2df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-12-07 10:06:58 +00:00
Jarek Kobus
b6a996a8d5 DiffEditor: Assert that we are operating on non-null documents
Task-number: QTCREATORBUG-26594
Change-Id: I4331c457a6360682229dbbbfd8ac3d50b44b8ead
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-07 08:36:56 +00:00
Christian Stenger
e158bfe618 FakeVim: Improve handling of content changes
..when indenter or auto completer may interfere.

Task-number: QTCREATORBUG-26195
Change-Id: Iaf0eefd74344423409fa0c22f8e3ea618b4c9930
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2021-12-07 07:10:46 +00:00
hjk
104ea4accc Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits.

Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-06 17:10:49 +00:00
hjk
8cb5c3cfdd Ssh: Use base QtcProcess' useTerminal for SshRemoteProcess
Still trying to ramp down non-QtcProcess interfaces.

Change-Id: I6b4ae6788f5021959ff3eb35bbade2157a6d67fa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-06 15:30:00 +00:00
Christian Kandeler
02f93f68d6 QbsProjectManager: Consider "c++23" for cpp.cxxLanguageVersion
Fixes: QTCREATORBUG-26663
Change-Id: Ie22ce49cb724c434121c3d4b62b4580139a4706b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-06 14:44:35 +00:00
Christian Stenger
db1c6f5b08 TextEditor: Fix compile with Qt 5
Amends 8d08196a21.

Change-Id: I8f67ee0549c621d168bacb57cd4ce0ad226cf852
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-12-06 13:44:28 +00:00
hjk
e64ce914f9 Utils/Ssh: Move SshRemoteProces::isRunning() to QtcProcess base
... and use it on a few places.

Change-Id: Id2cea709e355a46821a720e593740ac032888ced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-06 13:44:23 +00:00
Thomas Hartmann
1ee33048a8 QmlDesigner: Fix crash
Task-number: QDS-5535
Change-Id: I7e568efb39637faf8cd17255440e06d98b768f1e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-12-06 13:20:38 +00:00
hjk
9c0bc16e94 TextEditor: Simplify BehaviorSettingsPage implementation a bit
ICore::settings() lives longer than anything in TextEditor.

Change-Id: I67df38f291f43763bdd236ea611db614ac515c97
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-06 12:31:43 +00:00
Christian Stenger
41b8e302ef CppEditor: Fix compile with Qt5.14
Amends ef30831213.

Change-Id: I3c8a962c558114bd64e8e07d7212e4f14ecffa90
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-12-06 11:47:46 +00:00
Orgad Shaneh
6cf6f1c230 CppEditor: Save Clangd settings in human-readable form
in the global settings.

Change-Id: I2f90388c138c92f03f78044e225574ded640d4b9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-06 11:42:18 +00:00
Christian Kandeler
180200be66 ProjectExplorer: Handle "requested here" in GccParser
See also 4dd0537d4b.

Change-Id: If6fae31716ca8ec5e23e0159d6dd7ddfdb042bb3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-12-06 10:34:00 +00:00
Christian Kandeler
366c6fde89 CppEditor: Run the built-in "local uses" code even with clangd enabled
The built-in code model treats the "local uses" result state as an
indicator of whether to provide quickfix operations. It's unclear what
kind of side effects would result from removing this condition, so we
always run the built-in variant of the "local uses" code, and only
refrain from actually updating the selections in the clangd case.
Amends 0c53c2daef.

Fixes: QTCREATORBUG-26649
Change-Id: I9e1a3e3ad08bf13bcb35efe996a61aa34302b166
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-06 10:31:52 +00:00
Eike Ziller
8d08196a21 Fix crash when removing built-in snippets
Snippets collection managed the snippets with persistent iterators to
the "end" of the active snippets. Qt 5's QList was nicely updating
iterators even on non-const operations, but that has changed in Qt 6.

Don't use iterators, simply work with the count of active items.

Fixes: QTCREATORBUG-26648
Task-number: QTCREATORBUG-24098
Change-Id: Icc13274daf0e87d0562d80d7bc763c863d5da075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-12-06 10:30:47 +00:00
Orgad Shaneh
ef30831213 Utils: Simplify from/toSettings API
Change-Id: I591b6f833342ba9bd1a282332de5bb620d7f8c76
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-12-06 10:02:20 +00:00
hjk
64ac719ff8 Utils: Slim down private ProcessReaper interface
Change-Id: Idd5669b9ed525148426b85bbbc9a2818877f2707
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-06 09:26:19 +00:00