Commit Graph

64121 Commits

Author SHA1 Message Date
Edward Welbourne
b80be2a684 Make Converter::saveFile() consistently error on unexpected options
Have the text dumper do the same as all the others, instead of
ignoring unknown options.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I3c1dcbeda19e679be562110e44c5f566dfcc79ce
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-10-30 12:43:14 +02:00
Edward Welbourne
4389b0c429 Report as available every QTimeZone(qint32).id() result
The QTimeZone(id) constructor accepts these IDs, but
isTimeZoneIdAvailable() did not admit to this. Although we cannot
sensibly list all 183,047 of them in availableTimeZoneIds(), we should
not claim they are unavailable. The custom QTZ constructor needs to
know when the ID it's been given is an IANA one (to refuse to use it),
so it has to be able ask the backends for "is this IANA", so the UTC
backend still has to report these IDs as invalid, leaving the QDT
frontend to include the check for these offset zones.

Extend isTimeZoneIdAvailable() test to include every offset-zone's ID
within QTZ's recognized range of offsets. Although the actual range
accepted by offsetFromUtcString() is wider, bounded by ±24:59:59, the
constructor from offset seconds (rather than offset string) is bounded
by ±16 hours.

Pick-to: 6.6 6.5
Fixes: QTBUG-118586
Change-Id: Id9b378aee122ec841635584367022fcb47041fdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-30 12:43:14 +02:00
Edward Welbourne
4e3518bf63 Align doc of custom QTimeZone constructor with declaration
The ID of the custom zone *must not* be an IANA ID, so naming the
variable ianaId was misleading. The declaration in qtimezone.h uses
zoneId, which is more appropriate, so change the docs and definition
to use that name instead. Also add emphasis where the doc says it must
not be an IANA ID.

Pick-to: 6.6 6.5
Change-Id: I55fbb748173b540741453db3f1e2492272635f9a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-30 12:43:14 +02:00
Assam Boudjelthia
4f33c4a368 Android: properly parse colon separated local libs in QtLoader
The 'load_local_libs' array  might contain lib names separated by
a colon that the new loader code didn't account for, that led to
attempting to load an invalid library path and thus crashing if
anthing depends on that library (in this case the Android plugin).

Amends 3a505a859a.

Task-number: QTBUG-115016
Change-Id: I864c7af7da7016721530c18a412befc5c6a5caa3
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-10-30 12:43:14 +02:00
Viktor Arvidsson
efb06499a7 Add missing timestamp to tablet events
When copying the event for notify, timestamp was not set as it is for
other input events.

Pick-to: 6.5 6.6
Change-Id: I81bb89993027c902db2d1113605d6e6a0faf98f1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-10-30 10:43:14 +00:00
Laszlo Agocs
c6138bf9de Skip QVulkan autotests on Android
This is for the emulator, but have no means to differentiate more
precisely now.

The individual skips are unified in a single place.

Fixes: QTBUG-118234
Change-Id: I5676d11a565b88401d03bf51a10e03d53223df04
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-30 12:43:14 +02:00
Laszlo Agocs
7a3261c196 Do automatic r-b swap in QVulkanWindow's grab for BGRA8
While it would also be acceptable to leave this conversion to the user,
the returned image's format (that it's QImage::Format_RGBA8888) is not
documented. That needs to be corrected in any case. Then, we may just as
well add and document that for the most commonly used swapchain color
buffer format the r-b swap is performed automatically.

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-118244
Change-Id: I7ec8324ec3a0f5c1f2a7a592501d5ff59e3e8cc5
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-10-30 12:43:14 +02:00
Volker Hilsheimer
69b3109435 Include what you need: QIODevice
The qstdweb_p.h header declares subclasses of QIODevice and uses enum
types declared in QIODeviceBase, so make sure we include the QIODevice
header.

Change-Id: Id23da64105f998d52b114b529ce8493c74ed2364
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
2023-10-30 09:17:38 +01:00
Christian Ehrlicher
910f884593 QCommonStyle: add missing standard icons
Even though there are png files for SP_DirOpen/Closed/LinkIcon,
SP_DriveFD/HD/NetIcon, SP_CommandLink and SP_Desktop/ComputerIcon they
were not used within QCommonStyle::standardIcon() so the fallback from
standardPixmap() with 16x16 pixels were used.
As a drive-by use addIconFiles() for the creation of other standard
icons.

Task-number: QTBUG-118122
Change-Id: Ib651cefd31d1de84721fe11712e51980220ee9e2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2023-10-29 15:07:49 +01:00
Christian Ehrlicher
37b6f941ee QCommonStyle: add 128px icons for standardbutton-closetab
Add 128px version of standardbutton-closetab/-down/-hover and the source
svg file.

Task-number: QTBUG-118122
Change-Id: I8146f022cf440fc43d8c72aa08bd778ffdc64a78
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-29 12:07:15 +02:00
Christian Ehrlicher
4acbfd47be QCommonStyle: add 128px icons for toolbar-ext
Add 128px version of toolbar-ext-h/toolbar-ext-h-rtl and toolbar-ext-v -
created from the available svg.

Task-number: QTBUG-118122
Change-Id: I238333242995d6a93ce2cf08ef1b01af02ae2093
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-29 12:07:07 +02:00
Christian Ehrlicher
6d374897ba QCommonStyle: add 128px icon for cleartext
There was no 128px icon for cleartext - therefore add it including the
svg source file.

Task-number: QTBUG-118122
Change-Id: I405de9474406efcc43ffe319952f0b596bcfc623
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-29 12:06:59 +02:00
Christian Ehrlicher
4ee702e2ad QCommonStyle: add 128px versions of media icons
Add 128px versions of (nearly) all media icons and including the svg
source.

Task-number: QTBUG-118122
Change-Id: Iac03f2bb8c0f5fe5d873a996b16eac5808475a19
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-29 12:06:47 +02:00
Christian Ehrlicher
06c9f4b55e QCommonStyle: add missing png icons derived from svg ones
There are svg icons for information/warning/critical/question/
filedialog_start and filedialog_end but no corresponding png icons.
Therefore create those from the svg files and add them.

Task-number: QTBUG-118122
Change-Id: I2b0eb6450319ba64c41593a1f7705d995187f6b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-29 12:06:42 +02:00
Christian Ehrlicher
8eaf01ef81 QCommonStyle: cleanup standardIcon()/standardPixmap() [2/2]
Factor out the four code paths for standardIcon() (windows, mac,
application and resource theme) and use those functions also for
standardPixmap() so the returned pixmap is correctly scaled with the
current devicePixelRatio.
Part 2: move functionality into own functions

Task-number: QTBUG-118122
Change-Id: I0763c4db9e7aecf4c52bf0f5770bd3dd87c4a8a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2023-10-29 12:06:24 +02:00
Edward Welbourne
2636258b29 Add note on -00:00 as offset suffix and UTC-00:00 as zone
The former is overtly forbidden by ISO 8601 but should be recognized
due to RFC 3339's use of it. The "Serialising Extended Data About
Times and Events Working Group" (sedate WG) has established how to
resolve this, so document that conclusion and note the consequent
inadvisability of using UTC-00:00 as a zone ID (although it should
still be accepted).

Change-Id: Ib9fbbe6765117bfa9a84e726d0e75f7397a4c813
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 20:06:06 +02:00
Wladimir Leuschner
d0f79c073d Introduce TabWidget to Windows11 style
Introduce a TabWidget with rounded corners.

Change-Id: Ie6eb7a3e05b2240a0ecce2604ca87cc3db549dd1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-27 16:32:56 +00:00
Wladimir Leuschner
a0cbecf70c Introduce Spinbox into QWindows11Style
Introduce WinUI3 inline NumberBox styled QSpinBox.

Task-number: QTBUG-113617
Change-Id: Id10776f4004e502d7855e0671e58d0f39639ff81
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:56 +00:00
Wladimir Leuschner
51499e7a17 Introduce rounded plain frames, group boxes in QWindows11Style
Plain frames and group boxes are now drawn with rounded edges. In
QWindows11Style.

Change-Id: I576873d31c2252b7a22d84e8e86c64e09e2e5023
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 18:32:56 +02:00
Wladimir Leuschner
6723515e5b Introduce progressbar in QWindows11Style
Introduces Windows 11 styled progressbar to QWindows11Style drawn by QPainter.
The progress is indicated by a thicker line in accent color on a grey track.
Animation for indetermined progress is changed to follow the animation of Windows 11
progress bars.

Change-Id: Icac79fdbe40b82b10e1fd0e59b389890a7de6683
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:56 +00:00
Wladimir Leuschner
c0b5c1567b Introduce Windows 11 style sliders in QWindows11Style
Introduces Windows 11 styled sliders to QWindows11Style drawn by
QPainter. The appearance of the slider control element consist now of a
circular handle, a rounded slider track and divides the slider track
into an accented part left of the handle and a gray part right of the
handle. The inner circle of the slider handle is drawn in accented
color. The inner circle grows when hovered over and shrinks when
pressed.

Task-number: QTBUG-113511
Change-Id: I6ca1d27b8b0f69c2cfa07359a7153d38a2f3795e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:56 +00:00
Wladimir Leuschner
045726818c Introduce accent colored Buttons, Radio-/Checkbuttons in QWindows11Style
Introduce Windows 11 styled Buttons, Radiobuttons and Checkbuttons into
QWindows11Style. The default button, selected radio option and accepted
checkbox are drawn with accent color. The checkmark when accepting a
checkbox is now animated to replicate a hand written checking. Flat buttons are subtle
highlighted when hovered and pressed.

Change-Id: I37c0c21a25ffad427cff361f1b28d3138ff52b09
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:56 +00:00
Wladimir Leuschner
c27baa6aac Update menu behavior to mimick Windows 11 style on QWindows11Style
Updated the highlight of hovered menus and menu items to mimick the
behavior of native Windows 11 applications.

[ChangeLog][Windows] Updated default System colors to use according to
guidelines for Windows 10 upwards.
[ChangeLog][Windows] On Windows 11, hovered menu and menuitems are now
highlighted with darker rounded rect.

Task-number: QTBUG-95217
Change-Id: Ibc786aab115650401b054f028da58d69bcbc3462
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:56 +00:00
Wladimir Leuschner
9da8d67b3b Introduce Windows 11 styled ComboBox in QWindows11Style
QComboBox is adapted to use the WinUI3 style.

Task-number: QTBUG-113513
Change-Id: I300157a7ce9162be73ccd4acfc50b12f7166dc2d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:55 +00:00
Wladimir Leuschner
64db4042d4 Introduce ListView hover and select behavior to QWindows11Style
Introduce a vertical left line in accent color for the current selected
element in a listview and show hovered line slightly darker.
Introduce rounded ItemView Headers.

Change-Id: I203e14db4ef3a3daf8635d79f227780024177b70
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:55 +00:00
Wladimir Leuschner
e4b7ccee53 Introduce TextEdit to QWindows11Stlye
Introduce a TextEdit that is accent colored highlighted when selected.

Change-Id: I84813a85a570d37a178c605ec88dab1ad2f04d4e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:55 +00:00
Wladimir Leuschner
07d524aad7 Introduce Rounded ScrollAreas in QWindows11Style
Introduce a rounded frame around the viewport of a QAbstractScrollArea.
This change affects the appearance of QTextEdit, QTreeView, QListView,
QTableView and QColumnView.

Change-Id: I5fc94ea17415903d74c469f9777a932ca62742d0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:55 +00:00
Wladimir Leuschner
5ececa66d5 Introduce AccentColored LineEdit to QWindows11Style
Introduce a rounded LineEdit, which is highlighted in AccentColor when
active.

Change-Id: Ia836ce8646ec0f8519ac8816d8231440a630b610
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:55 +00:00
Wladimir Leuschner
2ec4da62b2 Introduce scrollbars to QWindows11Style
Introduces Windows 11 styled scrollbars to QWindows11Style.

Change-Id: I720f7d68f94c867a9fdd7142ea60fe46a8b7485c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 16:32:55 +00:00
Wladimir Leuschner
65d58e6c41 Introduce new empty Windows 11 style
A new empty Windows 11 style plugin is introduced and QWindowsVistaStyle
module is renamed to QModernWindowsStylePlugin containing styles for
Windows Vista and Windows 11. The color palette is adjusted according to
the Windows 11 guidelines.

[ChangeLog][Windows] Introduction of Windows 11 specific style.
[ChangeLog][Windows] Renaming of QWindowsVistaStylePlugin to
QModernWindowsStylePlugin

Change-Id: I5f67d7e8c9a3033ffe57ecbaebbf0e3fb10c60ab
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-10-27 18:32:54 +02:00
Volker Hilsheimer
8ac49acca6 Android: Modernize the QAndroidSystemLocale implementation
Declare the Java classes we use, and use the modern template API to
call methods and access fields. Make use of the implicit conversion to
QString.

As a drive-by, limit the write-locking of the mutex that protects the
data to the write access to that data. The rest of the function operates
on objects on the stack.

Change-Id: I3991c3804339f005aaf8e81a697363ab39306a2f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-27 17:44:35 +02:00
Volker Hilsheimer
180c7698e2 JNI: remove implicit conversion of declared QtJniTypes to jobject
It's dangerous, as it results in implicit conversion to void * or bool,
while hiding the object life time implications.
Such objects are QJniObject subclasses, so make sure we don't end up
in the catch-all assignment operator when assigning. Constrain that
operator to types that are convertible to jobject.

Change-Id: If31761c00a678490eeb0b2b038e89e78d8a51747
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-10-27 17:44:35 +02:00
Volker Hilsheimer
8c9f5fba03 Android: don't rely on implicit cast of declared QtJniTypes to jobject
The operator jobject() should be removed from declared QtJniTypes in
qtbase, as it's dangerous. Prepare for that by calling object(), which
returns the wrapped jobject as well, or isValid() where previously the
implicit conversion to jobject also enabled implicit conversion to bool.

Change-Id: I00cf6f1463dd5ab5cbaf03d9e77bfff3bced9b15
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-10-27 17:44:35 +02:00
Volker Hilsheimer
703614f03b Android: replace QtAndroid::activity/service with QtAndroidPrivate
There's no need for both, and QtAndroidPrivate is a documented namespace.
Replace all calls to QtAndroid::activity/service with QtAndroidPrivate
equivalents, and drop the QtAndroid version. Since we no longer store a
global copy of the activity and service, we can drop the reference right
away.

This comes with a bit of overhead - QtAndroid::activity returned a copy
of a global static QJniObject (62cb5589b3,
after which declared QtJniTypes became QJniObjects), while
QtAndroidPrivate::activity returns a newly created QtJniTypes::Activity
on each call.

This however makes it also safer, as the QJniObject is then associated
with the calling thread's JNI environment, and we can optimize critical
code paths where it's safe to do so later. Also, QtAndroid's activity
object was never updated, while QtAndroidPrivate's activity is updated
in the updateNativeActivity native method.

Change-Id: I36c5b504eac52d9e28b4c6b265daab8fedc877e2
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-10-27 17:44:35 +02:00
Mårten Nordheim
d44aae1358 QLocal8Bit::convertToUnicode[win]: Drop QVLA in favor of array
We now, instead, resize and copy the data directly into a QString if
we run out of space in the pre-allocated array.

Pick-to: 6.6 6.5
Task-number: QTBUG-118318
Task-number: QTBUG-105105
Change-Id: I1eed5e75f0bd067b4e7d6bff97c4186f3f6ee0ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 17:44:35 +02:00
Mårten Nordheim
3a5339b418 QLocal8Bit::convertToUnicode[win]: Fix indentation
To make future changes easier to read

Pick-to: 6.6 6.5
Task-number: QTBUG-118318
Task-number: QTBUG-105105
Change-Id: I431c83b956c179b1d04c2bf51b744227f8b136be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-10-27 17:44:34 +02:00
Ahmad Samir
6c234ec1dd QMetaEnum: de-duplicate some code
By using parse_code static helper.

Use views instead of const char*.

Change-Id: I9ccd54d72b831fd963ff3a0092f4829708904659
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 18:44:34 +03:00
Ahmad Samir
336f6340fd QMetaObject: change typeNameFromTypeInfo() to return a QBAV
typeNameFromTypeInfo() returned a QByteArray, the first if branch used
stringData() which uses QByteArray::fromRawData() so not too bad, but
the second if branch allocated a new QByteArray. Making it return a QBAV
is less confusing and avoids a potential QByteArray allocation.

Also remove rawTypeNameFromTypeInfo(), and use typeNameFromTypeInfo()
instead.

Change-Id: I0c51a093aa47d2691a8f1ac45421ede7bce0a871
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 18:44:34 +03:00
Ahmad Samir
4ecbe42ff4 QMetaObject: add indexOfEnumerator(QBAV) overload
And remove the indexOfEnumerator(const char *) overload.

Taking by view so that it works with string data that isn't necessarily
null-terminated (e.g. a sliced() or chopped() view).

QMetaObjectPrivate::indexOfEnumerator needs to be a member function
because it usess a private QMetaEnum constructor (QMetaObjectPrivate is
a friend of QMetaEnum).

[ChangeLog][QtCore][QMetaObject] Added indexOfEnumerator(QByteArrayView)
overload. And deprecated indexOfEnumerator(const char *) overload.

Change-Id: Ie2f4f1a9af69373c19a5d7bd92499544e95e9289
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 18:44:34 +03:00
Ahmad Samir
56b8048ab9 QMetaObject: change static objectClassName() to return a QBAV
QBAV has an operator==(), among other things.

Internally QMetaObject only supports Latin-1, however that is an
implementation detail that shouldn't be exposed in public API. Since
some public methods will be changed to take a view, a QBAV, use QBAV
internally too to keep the code consistent.

Also change QMetaObject_findMetaObject() to take a view, this is more
robust as it can work with other string data that isn't necessarlify
null-terminated (e.g. a sliced() view, which will happen in later
commits).

Change-Id: I346d7910ad8fa30951a7168e9b257f039f016298
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 18:44:34 +03:00
Ahmad Samir
e0573e7364 QTimer: split QSingleShotTimer to a private header
So that it can be used in QTimer and soon-to-added QChronoTimer, this is
less code duplication.

Change-Id: Icc5f2028d776a34c06ba20fe41f571cd3821c64c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 18:44:34 +03:00
Assam Boudjelthia
6f1449c7ae Android: fix ClassLoader warning
The Dex value provided is an empty string which leads
to this system warning when initiating an instance of
the ClassLoader

 W System  : ClassLoader referenced unknown path:

This patch fixes it by providing a valid path.

Task-number: QTBUG-115016
Change-Id: I6dcd396a07337278224e07b0271f49bb829ea0ce
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-10-27 17:22:59 +03:00
Assam Boudjelthia
db91947eb0 Android: remove redundant QtNativeLibrariesDir class
This class is now not used anywhere after QtLoader refactoring.

Task-number: QTBUG-115016
Change-Id: I3399ba68fe85396f88766e9547cdfefc30baf6ed
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-10-27 17:22:59 +03:00
Assam Boudjelthia
3a505a859a Android: modularize and simplify QtLoader classes
The Qt loader is now expected to work in the following way:

QtActivity.onCreate()
--| QtActivityBase.onCreate()
----| Initiaze the delegate
----| Creates QtActivityLoader()
------| Creates QtLoader()
--------| Initialize the class loader
--------| Initialize static classes context
--------| Initialize Context Info
------| Sets common environment variables and parameters from metadata
------| Setup style extraction
------| Sets Activity specific metadata
--| Handles Activity themes
--| Call QtLoader.loadQtLibraries()
----| Fetch and load Qt native libraries
----| Fetch and load the app's main library
--| Start the Qt Native C++ app via the delegate

Few things are done in patch to simplify the Qt loader mechanism:

1)
Get rid of some unused methods, and move the loader instances
to be local instead of global.

2)
Split the awfully long methods in QtLoader into smaller methods for
readability and as preparation for next simplifications.

3)
Refactor Qt libraries loading code from the Delegate classes to
the Loader classes where it makes more sense to be at. At the same
time simplify some code into smaller logical blocks.

4)
The same boilerplate code for loading (with System.load()) Qt libs
and the main library was done twice between the Activity and Service
loaders, that is now done directly under the QtLoader. Same story
for initializing static Java classes with activity/service/context.

With this change All relevant Qt library loading logic is now under
QtLoader classes, and the latter have clear loader responsibilities
reflected in the code.

Task-number: QTBUG-115016
Change-Id: Ib76621d8beff4917c932456c5401ea4586942213
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-10-27 17:22:59 +03:00
Volker Hilsheimer
7c59c5ed13 Examples: remove OpenGL code paths from painting examples
The extra code for using the OpenGL paint engine is significant enough
to be distracting from what the examples are supposed to show. If we
want to show how to use QPainter on an OpenGL widget, then we can make
dedicated and documented examples for that, in the OpenGL category. And
we have such examples in the Qt OpenGL module anyway.

As is, the examples feel more like manual tests of the OpenGL paint
engine; if we need more coverage there, then we can add it there.

Change-Id: I7b56ea6d08c02cd0a1050ab03991656a0538498d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-10-27 16:22:59 +02:00
Dimitrios Apostolou
333650c596 Increase Coin timeout for ctest command under sanitized testruns
Reason is that after changing the sanitized testruns to quiet, we
have been hitting the 15min output-inactivity timeout.

Set it to the same value as the total workitem timeout, effectively
disabling it.

Pick-to: 6.6 6.5
Change-Id: I13c2d97b25cf338873bb89ef1ed45d58e3cdd170
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2023-10-27 13:46:37 +00:00
Cajus Pollmeier
ac039776a6 Avoid ${...} to be replaced by configure_file
When running configure_file without @ONLY, the exit code details get
stripped out by CMake. This leads to an empty application exit status
shown on the boiler plate HTML.

Fixes: QTBUG-117997
Pick-to: 6.6
Change-Id: I4ab25960412da17c9509a66c1019c3b2b71ed108
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-10-27 13:48:53 +02:00
Edward Welbourne
58fd829cdf Use localized time-zone abbreviations or offset
The actual formatting of date-time strings is handled by the calendar
backend, but the code's in qlocale.cpp as it uses some of its tools.
When feature timezone is unavailable, we're stuck (as before) with
using QDateTime::timeZoneAbbreviation(), but when it's available we
can use QTimeZone::displayName() to get the localized form of the
abbreviation and offset string.

Make matching changes in QDTP so that it recognizes these localized
abbreviations. We now have another candidate for what local time might
be called, to add to those that must be checked.

This naturally implied some changes to tests. It turns out ICU
believes en_US uses GMT+1/GMT+2 for CET/CEST. Replace some MS
QEXPECT_FAIL()s by including the non-abbreviations we do in fact use
on MS in the lists of "abbreviations" to accept.

[ChangeLog][QtCore][QLocale] When a datetime format includes the
timezone (or offset), the appropriately localised form is (to the
extent the timezone backend in use supports this) used where,
previously, a haphazard choice of system and C locale was used. This
applies to both serialization and parsing.

Task-number: QTBUG-115158
Change-Id: I04f9c1055c3b9008320bb8b758490287fd8be5cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 10:52:48 +02:00
Edward Welbourne
4756062828 Have QDTP match longest form it can for local zone name
Previously, three candidates were tried (there shall soon be more) and
the length of the first to match was returned. This could go wrong if
tzname[] = { "GMT", "GMT+1" } and our text starts with the latter; we
would have only matched it to the former.

Change-Id: I8e7b9e6a382bdd527bb98be7c86ea67b11cdc13a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-27 10:52:44 +02:00
Volker Hilsheimer
bd5c6fab40 QueuedCustomType example: use QThread::requestInterruption
Drop the home-made solution with mutex and bool (which could have been
an atomic, but we have had a ready-made solution in QThread for a long
time).

Pick-to: 6.5 6.6
Change-Id: Id213a021f0ae94215afb28ff874fcb597dd1e6f9
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Ed Cooke
2023-10-27 07:55:42 +02:00