So we don't have to do this multiple times when calling the function.
Pick-to: 6.6 6.5
Task-number: QTBUG-118185
Task-number: QTBUG-105105
Change-Id: Ifa72eedd5f71365618ec6b67fa3047f90f4eb541
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both to store and to restore.
Without this a 3 or more octet sequence would cause errors or wrong
output. This can be seen with GB 18030.
Pick-to: 6.6 6.5
Fixes: QTBUG-118318
Task-number: QTBUG-105105
Change-Id: Id1f7f5f2fba4633b9f888add2186f4d8d21b7293
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A few code pages do not support this flag[0]. It's also deprecated[1]
and is what Windows prefers to generate by default. So let's drop it.
[0] https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar
See note at the end for the dwFlags parameter.
[1] It's mentioned in the header files, but not online...
Pick-to: 6.6 6.5
Task-number: QTBUG-118185
Task-number: QTBUG-105105
Change-Id: I798c387170c73a953be874de139868543b2d775e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of having separate variables for the state, that we then
store back at the end, let's just make state-handing explicit, making
the logic around it easier to follow.
We now output Replacement Characters, if we try to decode stateless and
have an invalid sequence at the end. Otherwise we fall back to
convertToUnicodeCharByChar as before.
Pick-to: 6.6 6.5
Task-number: QTBUG-118318
Task-number: QTBUG-105105
Change-Id: Ifea64bc241113f468b69cad16fc3cc97a6ebe646
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Not reproducible locally. Possible permissions issue in CI.
Pick-to: 6.6 6.5 6.2
Change-Id: Ibf2255da71aaa882a2d154db6523e1af27264d4c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It was already blacklisted for macOS 13, and has also been blacklisted
on macOS many times in the past.
See also a9005a70d5.
Pick-to: 6.6 6.5 6.2
Change-Id: I9dc87ef409dd1fcc0f47d5e776927e8912ab40e0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Add method stdSysDaysToJulianDay(), which implements the conversion
from std::chrono::sys_days to Julian Day in a constexpr and noexcept
manner. Use it in the fromStdSysDays() method instead of addDays(),
and also in all constructors from std::chrono types.
This allows all constructors to be constexpr and noexcept.
Simplify toStdSysDays() so that it could also be constexpr and
noexcept.
Add compile-time roundtrip tests between QDate and std::chrono types.
Fixes: QTBUG-118221
Change-Id: Id35a669430162f1932ad8d28b553af2fd7f5c6de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These get methods (sslContext and connectionType)
are part of private API, so it's safe
Change-Id: I6c2e14d5dbcbefc051d69985d1e9b490274ba7ef
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
[ChangeLog][QtNetwork] Ported hasRawHeader and rawHeader of
QNetworkReply and QNetworkRequest to QByteArrayView.
Change-Id: Ife71ba11b1ee8907c104dba3210d7a033568edf4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
In be268ae197 we made QCocoaWindow::setVisible
idempotent by checking if NSView.hidden needed update.
This failed to take into account the case when a window is moved from
being a child window to a top level, where the window is still visible
and the NSView's hidden state doesn't change, but we need to order in
the NSWindow that we're now managing.
We now check NSWindow.visible as well, if we're a top level window.
Pick-to: 6.5 6.6
Change-Id: I94434d6ebfe2c9ece6eac7f83f17ead250ccc07a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The old name didn't say what sort of thing it was converting; and our
guidelines for examples discourage using the word Example in the
title. Also reword the description of the tool in the command-line
parser and an assertion.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I6f52f5227362b4b807c8aabfd2103287af42bca0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
- Do not require feature library
- Load static plugin
Change-Id: I6c3ec72e20b9f2800c1d350dac795fccbb8c381e
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Move all clipboard management logic outside of QtNative and
to own QtClipboardManager class. Also, don't keep any keep
Activity objects under it to avoid memory leaks, the native
c++ clipboard manager should be responsible of passing a
context when needed instead.
As a pass-by, use newer JNI APIs for C++ QtAndroidClipboard
code.
Task-number: QTBUG-118077
Change-Id: I61726e84a75918d80329f753e9e1c6ebde179bf4
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
QDoc automatically generates include statements for types, by a set of
rules used to determine Qt's convenience header. For the
`QWaylandApplication` struct, no such convenience header is generated.
Use QDoc's `\inheaderfile` command to specify the correct header for
access to `QWaylandApplication`.
Fixes: QTBUG-118315
Pick-to: 6.6 6.5
Change-Id: Ib3b120e3ce6b5d4df74078a21bb137adaaffa2ce
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The serialization conversion example used raw C's way to abort on
error; change to using Qt's way of doing the same. Likewise, convert
the various other uses of fprintf(stderr, ...) to qWarning() and of
printf(...) to qInfo().
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ia8821d3c20f58f71c106028ec422ad473c11e164
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Plain frames and group boxes are now drawn with rounded edges. In
QWindows11Style.
Change-Id: I576873d31c2252b7a22d84e8e86c64e09e2e5023
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
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>
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>
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>
QComboBox is adapted to use the WinUI3 style.
Task-number: QTBUG-113513
Change-Id: I300157a7ce9162be73ccd4acfc50b12f7166dc2d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
Introduce a TextEdit that is accent colored highlighted when selected.
Change-Id: I84813a85a570d37a178c605ec88dab1ad2f04d4e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
Introduce a rounded LineEdit, which is highlighted in AccentColor when
active.
Change-Id: Ia836ce8646ec0f8519ac8816d8231440a630b610
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Introduces Windows 11 styled scrollbars to QWindows11Style.
Change-Id: I720f7d68f94c867a9fdd7142ea60fe46a8b7485c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
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>