Commit Graph

68765 Commits

Author SHA1 Message Date
David Schulz
483a340e73 TextEditor: speed up searching in huge documents
Avoid creating QTextCursors for checking whether a search result is
inside the find scope. QTextCursor::setPosition seems to layout the
block the cursor is positioned at, which is not for free and not needed
to verify whether a search result is inside the find scope.

Change-Id: Ia1658fbbaa89a61f862e0b97eaa5b059972e2311
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-13 11:37:29 +00:00
Christian Kandeler
db77f214ca Update qbs submodule to HEAD of 2.2 branch
Change-Id: I3ec6c2388858c80867c538901903a5226caa39e7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-13 11:10:22 +00:00
David Schulz
f77635883b Utils: avoid assert in FileWatcher
Remove a file from the watcher while handling the fileChanged signal can
lead into untracking the directory of the file before it got added to
the watcher, so make sure it is tracked before emitting fileChanged.

Change-Id: I63e80c20856af3d58ee23763180859f44f07b73d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-13 11:06:28 +00:00
Christian Stenger
25a1fb4e9c SquishTests: Fix testing of welcome page
The examples and tutorials part of the welcome page got a
new approach which is either having a sectioned grid view
or a non-sectioned grid view (while searching).
That means we have now a model holding the items of several
other (sub)models and a filter model taking care of what is
shown while searching.
While searching we need to check the filter model, while for
not-search the original list view could be used as we did
before this patch. But as there are no access or verification
of the whole list this done is just replacing the old approach.

Change-Id: I1777340f8c6ea88af3bfc20a600ee1c174a18807
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-10-13 10:07:39 +00:00
Ali Kianian
e18f0b50e6 QmlDesigner: Rename SingleCollection to CollectionDetails
* SingleCollectionModel is replaced by CollectionDetailsModel
* SingleCollectionView is replaced by CollectionDetailsView

Change-Id: Id3e7572b7b7d7e369684cde21b3cc6a34f819369
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-10-13 09:21:30 +00:00
Alessandro Portale
1418dc04e0 ScreenRecorder: Allow only one screen recorder dialog at a time
And show the dialog if it was already open but minimized.

Change-Id: I9aebebba88488c795b253f6dadda7f356ffc9dc4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-13 09:13:31 +00:00
Marcus Tillmanns
7cd63a597e Copilot: Add more search paths for agent.js
Fixes: QTCREATORBUG-29750
Change-Id: I19c5ad41705daf00ae08fec88bd9ed40b8a34d12
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-10-13 08:05:16 +00:00
Cristian Adam
9f0068a4e1 Perfparser: Update submodule
... contains a test fix for MSVC.

Change-Id: I5127075bd32e52ad205324728f05bc288b04a8be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-13 07:52:47 +00:00
Alessandro Portale
b265e0906c CompilerExplorer: Use StyledBar
Change-Id: I9f80a025a6ed3a4732794b4715a25ce3b90f6d43
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-13 07:38:40 +00:00
Burak Hancerli
5f22737177 3rdparty: Add QrCodeGenerator library
This library is required for QmlDesigner plugin to generate
QR codes used in Design Viewer integration.

Task-number: QDS-10485
Change-Id: Ic4b565fe56f682c8af310ad873f48caf74d05aef
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-12 14:58:43 +00:00
hjk
2ebd21e0d4 Beautifier: Fix layout of clang format settings page
Change-Id: I972bf300ca7fb268174bda8a2b1334cab6350b1f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-12 12:43:04 +00:00
Artem Sokolovskii
b1b3a801d7 DAP: Fix lower case m in cmake debugger engine
Change-Id: I35d28c82ed0bde0c25a388d138e2bdc8648eefaf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-12 12:36:29 +00:00
Ali Kianian
4cbd05c30d QmlDesigner: Show and edit the property type
Task-number: QDS-10964
Change-Id: I271a17a1bc64eaac8af914a5aa00a7a34317f68b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-10-12 12:29:48 +00:00
Artem Sokolovskii
c8e5db79ba DAP: Fix grey out cmake debug option
Change-Id: Ic4f593c87b874835f923ca5d171f5c78c3fee191
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-12 12:23:22 +00:00
David Schulz
03e064f1ce Copilot: Do not request completions for read only editors
Fixes: QTCREATORBUG-29738
Change-Id: I7e894a079595265f163c63243a3e8b098696f696
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-12 12:13:34 +00:00
Artem Sokolovskii
be47810673 Debugger: Fix setting wrong engine manager for qml engine
Fixes: QTCREATORBUG-29718
Change-Id: Iffd4c9ad6831b4a326fd9b84b9ae2829992caf80
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-12 11:46:52 +00:00
Jarek Kobus
c43ee0885c SelectableFilesModel: Remove redundant variable
Change-Id: I259ab5e918aa5fd8a12f08bdd683b2f8392f20ac
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 11:26:29 +00:00
Marco Bubke
db59cdaf72 NanoTrace: Reduce macros with template specialization
The nano trace code gets more complicated but the usage get mor
readable.

Change-Id: I2b829455d1328dc330474abbb804c76232df3e92
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-12 11:14:49 +00:00
Marco Bubke
c081c96bf0 QmlDesigner: Add tracing to project storage
The tracing is by default disabled for the project storage category. So
there is no overhead because the tracer instance is a empty class in
that case.

Change-Id: I7d3e91527871a946cadbbad2e11f0b2ab2825c59
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-12 11:14:42 +00:00
Marco Bubke
14476ee606 Sqlite: Use nanotracer
Change-Id: I32ff23b4115eaeda998810082b044f2b320c5124
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-12 11:14:27 +00:00
Marco Bubke
672fc4d218 Nanotrace: Add high resolution low overhead tracer
I want to use the trace in the project storage but I like reduce the
overhead. If the constexpr activateTracer is set there is even not
overhead at all.

Uage would be:

foo.h:
extern thread_local EventQueue fooEventQueue;
extern thread_local Category fooCategory;
void foo()
{
  Nanotrace::Tracer t{"Foo", fooCategory};

  Nanotrace::Tracer t{"Foo", "fooCategory", fooEventQueue};

  Nanotrace::Tracer t{"Foo", "fooCategory", R"xy("First":"Argument")xy",
                      fooEventQueue};

}

or you can use the GlobalTracer:

void fooWithGlobal()
{
  Nanotrace::GlobalTracer t{"Foo", "Category"};
  Nanotrace::GlobalTracer t{"Foo", "Category",
                            R"xy("First":"Argument")xy"};
}

foo.cpp:
namespace {
Nanotrace::TraceFile fooTraceFile{"foo.json"};
thread_local auto fooEventQueueData =
  Nanotrace::makeEventQueueData<10000>("Foo", fooTraceFile);
} // namespace

thread_local EventQueue fooEventQueue = fooEventQueueData;
thread_local EventQueue fooCategory{"foo"_t, fooEventQueue};

If nano trace is deactivated fooEventQueueData would be a null pointer,
fooEventQueue would be disabled and the trace would generate no code.

Change-Id: I1cad8570536806c462a61276eb142b8aa4932529
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-12 11:14:07 +00:00
Marcus Tillmanns
07f2c24308 CompilerExplorer: Remove unnecessary emerge()
Change-Id: Ibacd732c408a3aad31a5e1254fa2e7c551438a56
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:46:13 +00:00
Christian Kandeler
25b747b00c QmakeProjectManager: Compress project tree once from the root node
We must not compress a half-built tree, as the relevant conditions might
change later. For example, after setting up the headers node, we might
have a tree src -> headers -> header.h, and compression will lead to
src/headers -> header.h. Now after adding the sources node, we might
have an additional main.cpp under src, which means src and headers
should not have been merged.

Fixes: QTCREATORBUG-29733
Change-Id: I1419a87a0671f43ad65cbe3d108c36cfeba17781
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:35:02 +00:00
Marcus Tillmanns
413fda678f Utils: Add "layouting" widgets to layoutbuilder
This allows us to handle widgets that have an "addWidget" function.

Change-Id: Id1b63bae7032403fdd3c5e6ba60283cf56cc1cfe
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:32:56 +00:00
Marcus Tillmanns
db8d82e51e Utils: Change Stack to QStackedWidget
We use a QStackedWidget instead of a QStackedLayout here because the
latter will call "setVisible()" when a child is added, which can lead to the
widget being spawned as a top-level widget. This can lead to the focus
shifting away from the main application.

Change-Id: I4746de2ea1a300d7c97735f0bbd9338cd2818b5d
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:32:51 +00:00
Marcus Tillmanns
644e88ae2e Utils: Emerge widgets from LayoutItem
This allows us to call e.g. PushButton{}.emerge(); without having to
add another unnecessary layout.

Change-Id: Ica26f4776dee1843e1f40c238e1f3c1a54d14ea5
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:32:44 +00:00
Ali Kianian
9f6e613103 QmlDesigner: Fix the build error for the property name
Change-Id: Ie9991a3f58d747f2ade2162b215f4236e0b3f639
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-10-12 10:15:50 +00:00
hjk
1a1dcfc5c7 Core: Un-export and hide only locally used ProgressTimer
Change-Id: If67b0d55972620a59a38a811fda6238d9cd4ab56
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-12 09:49:50 +00:00
hjk
c732c137f7 Core: Minor cleanup to session.h
Change-Id: Ic3a9280529946247e5e4526676c5e979ccb17c48
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-12 09:49:30 +00:00
Ali Kianian
0964911529 QmlDesigner: Consider property type for the collection properties
Task-number: QDS-10964
Change-Id: I9759b772811fa44baa4f8a548bf04cadbd0807a4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-10-12 09:30:26 +00:00
Alessandro Portale
f734ba4461 Wizards: Make editable text options with macros/code non-translatable
Options with contain %{Macros} (sometimes with JavaScript code) should
not be translatable, since a translation can easily a prevent a wizard
from successfully working.

This change turns a couple of trText, trDisabledText and trPlaceholder
options into their non-translatable pendants.

Fixes: QTCREATORBUG-29649
Change-Id: Ia46ab7ac35f78d6368868d78e24179197744921d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-12 09:04:01 +00:00
Marcus Tillmanns
2a510011f1 Utils: Send start failed if no ProcessInterface
Change-Id: I38cdce9812bcec3240e3fb4f30a1dd266a5515e9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-12 08:41:19 +00:00
Marcus Tillmanns
b1b83c5c5e Copilot: Fix connection
Change-Id: I8d32e5bdfd90968ac7c578f647ea7ae0325dbc9b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-12 08:41:12 +00:00
David Schulz
eda0dbd8dd TextEditor: modernize highlighting search results
Change-Id: I365a09dfd9d371119044da5567a1adb397f3ac93
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-12 07:58:49 +00:00
Marcus Tillmanns
da03156259 Utils: Allow nullptr widgets in layouts
Change-Id: I33ee85bd809a3388872bee4a470e9439010ed8a8
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 06:31:08 +00:00
Samuli Piippo
e5d0bab0ea sdktool: add line break after clangd option
Amend d79c69918f and add line break.

Change-Id: I5082f0e6339cd161fa9c9030ad257e4246ff051f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-12 06:01:20 +00:00
Christian Stenger
344ac9813d CMakePM: Fix crash in rstparser
Change-Id: I5a9e456214581800c977e69da01aab1053cc554f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-12 04:44:47 +00:00
Marco Bubke
cd4cca907b QmlDesigner: Move item library entries to project storage
The subcomponent manager is synchronizing some meta files with the item
library. The project storage is synchronizing types. Synchronizing both
is quite complicated. Moving the the functionality to the project
storage removes that synchronization task.

Task-number: QDS-10266
Change-Id: Icdf14fbe85d5c4891542acae85ebecf0ba77b45d
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-11 17:46:23 +00:00
Tim Jenssen
daa4419d7c QmlDesigner: fix typeName for root node
Change-Id: I832c5888228150dcc36fd1002b9d495a23fcc305
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-10-11 16:30:32 +00:00
Christian Kandeler
e508615243 Designer: Remove unused code
Amends bbbc90ee1d.

Change-Id: I963859c6f38621f0b2d6a21b45078c23c89d99e6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-11 15:14:32 +00:00
Leena Miettinen
fbe6c0d977 CompilerExplorer: Fix UI text caps and punctuation
Change-Id: I44fff47e3aef1b2910f22efd05201e81f6995024
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-11 14:53:34 +00:00
Marcus Tillmanns
09d066108e CompilerExplorer: Improve error reporting
Displays network errors as disrupting, instead of just sending
them to the log.

Change-Id: If5a3dbb733f1433dcc2bcd0a52ad12d8ee3b85ef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-11 14:43:49 +00:00
hjk
6193cb3294 CppEditor: Stop updating things when shutting down
Fixes: QTCREATORBUG-29735
Change-Id: Ic1ee1798e156b5ddf564a721f5a4e8892ae40f63
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-11 12:23:55 +00:00
hjk
efc168fb61 Core: Re-order system settings dialog a bit
Change-Id: I853ac869769dd55d118bf722d3cbfa4416a54972
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-11 12:13:27 +00:00
Marcus Tillmanns
520cbfa39a DeviceSupport: Make errors translatable
Change-Id: Ieccb48cb5335e8eace4990e52f93ea431c7085de
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-11 11:57:59 +00:00
Marcus Tillmanns
2a84b9f02b Utils: Fix FileAccess if device returns nullptr
A device may return a nullptr if it does not support device access.

Change-Id: I302a2c63406268a2ff876c1bf408c5e26137fd9d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-11 11:57:52 +00:00
hjk
a386b5467a ExtensionSystem: One indirection less for delatedTimer
... at the price of a fatter #include that only ends up in very
few TUs

Change-Id: I983e2082d5b894ee561e7c7ba96731ef6bc58e3a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-11 11:39:00 +00:00
Marcus Tillmanns
c4ea695411 Terminal: Improve color tooltips
Change-Id: Ifc2fdb4369767a65c79a784d1f68caac81497db1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-11 11:24:57 +00:00
Shrief Gabr
5671bd3cd0 QmlDesigner: Export collection as CSV
Task-number: QDS-10618
Change-Id: Iaae95dd920b453e53c22fdf65c2f6d80652d5be3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2023-10-11 10:38:22 +00:00
Alessandro Portale
03cca64eea ProjectExplorer: Add non-translatable text options to text edit fields
LineEdit and TextEdit have a couple of text options which start with
"tr". These strings can be translated via Qt Linguist.

In some cases, these text options contain macros or even JavaScript code
which must not be translated. Translation of these fields can
easily break the wizard.

This change adds the possibility to set non-translatable options for
LineEdits and TextEdits "(tr)Text", "(tr)DisabledText" and
"(tr)Placeholder" in the .json files.

Task-number: QTCREATORBUG-29649
Change-Id: I278a0bec848888cf96bdb49306e319c14a09236c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-11 10:34:28 +00:00