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>
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>
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>
And show the dialog if it was already open but minimized.
Change-Id: I9aebebba88488c795b253f6dadda7f356ffc9dc4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Displays network errors as disrupting, instead of just sending
them to the log.
Change-Id: If5a3dbb733f1433dcc2bcd0a52ad12d8ee3b85ef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
A device may return a nullptr if it does not support device access.
Change-Id: I302a2c63406268a2ff876c1bf408c5e26137fd9d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... 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>
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>