When a date-time was parsed from a string, the result was equal (as a
date-time) to the correct value, but had (at least in some cases) the
wrong spec, where it should have had a spec reflecting the zone
specifier parsed.
The time-spec imposed for the benefit of QDateTimeEdit is now moved
from QDateTimeParser to QDateTimeEditPrivate, which takes over
responsibility for imposing it. QDateTimeParser assumes Qt::LocalTime
in member functions (where applicable) and uses the time-spec parsed
from the string when constructing the date-time.
QDateTime::fromString() and QLocale::toDateTime() are updated to
use the full QDateTime returned by QDateTimeParser.
Fixes: QTBUG-83075
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I8b79add2c7fc13a200e1252d48dbfa70b36757bf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Due to the bug related to the 'new syntax' signal/slot connections,
it's unfortunately possible to have a connection not deleted properly
by the moment children objects get deleted. Then, as a result,
in e.g. QSslSocket's destructor the socket will change its state,
triggering the (now deleted) UI elements' access.
Note - the original bug was reported, the patch (only possible?) was
not accepted.
Fixes: QTBUG-83659
Change-Id: I2965532485bcd46f93f8449e4d0a30da92b572c5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This reverts commit 3a6d8df521.
That change is only for 5.14.
Conflicts:
src/plugins/platforms/wasm/qwasmeventtranslator.cpp
src/plugins/platforms/wasm/qwasmintegration.cpp
src/plugins/platforms/wasm/qwasmopenglcontext.cpp
src/plugins/platforms/wasm/qwasmscreen.cpp
Change-Id: I2d845c795a683e1542201cfb6fdd185fec2b17ab
This reverts commit 3a6d8df521.
That change is only for 5.14.
Conflicts:
src/plugins/platforms/wasm/qwasmeventtranslator.cpp
src/plugins/platforms/wasm/qwasmintegration.cpp
src/plugins/platforms/wasm/qwasmopenglcontext.cpp
src/plugins/platforms/wasm/qwasmscreen.cpp
Change-Id: Ib9151e199291fe6eb4151027b515393c05303d65
qsocketnotifier.h:113:69: error: cannot initialize return object of type
'Qt::HANDLE' (aka 'void *') with an lvalue of type 'const
QSocketDescriptor::DescriptorType' (aka 'const int')
qsortfilterproxymodel.cpp:2938: error: out-of-line definition of
'recursiveFilteringEnabledChanged' does not match any declaration in
'QSortFilterProxyModel'
qline.cpp:376: (qdoc) warning: Cannot find 'QLineF::IntersectionType'
specified with '\enum' in any header file
Fixes: QTBUG-83676
Change-Id: I57b51f4ad15fdc50db88100ad5b1cb85ed394b7a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
- 2019 still uses VCLIB version 140
- minVersion and maxVersionTested have to be set for every MSVC version
Change-Id: I9300e03115e2e99fd250ec85bdd7f3367ab00d48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Both Negotiate and NTLM are conditioned on the 'challenge' being empty
when starting the authentication process. So let's reset it when we
start the authentication process.
Fixes: QTBUG-83370
Change-Id: I41af6d5bcfe3dd980ca2bedce10ceff4f61047ff
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The CommonMark spec shows that it's not necessary to have a space
between the code fence and the language string:
https://spec.commonmark.org/0.29/#example-112
This also avoids a needless trailing space after a code fence that
does not include a language string.
Change-Id: I2addd38a196045a7442150760b73269bfe4ffb22
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The end of a code block nested in a list item is now detected;
and if the text of the list item continues after the code block,
it continues to be indented.
Code blocks should never be word-wrapped.
Fixes: QTBUG-80603
Change-Id: I4427f8b1d4807d819616f5cb971e2d006170d9be
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
From 11.7.6 onwards you need to select if your build is rel/dbg/chk/cov.
Added env variable where you can add which build target to configure.
Task-number: QTBUG-74716
Change-Id: I9ab3dd6177c5c5fa1da6aa7556784fa86d0d0348
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Various benchmarks were still using the deprecated timing API.
One didn't even *use* the timer it implemented this way.
One was just using start as a short-hand for assigning to currentTime().
Change-Id: If406d0fb606e454fec056f386bcd0aa6726ee96e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This was taken from 4a302b42c7bf5e11 in SQLite, ref:
https://www3.sqlite.org/cgi/src/info/4a302b42c7bf5e11
[ChangeLog][QtSQL][sqlite] Fixed CVE-2020-11655
Task-number: QTBUG-83652
Change-Id: I5ead78d9ee63aa0f12f1c1014c79373728569f30
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
They come in as a different relative axis, and we need to ignore the old
axis to not scroll double.
Change-Id: I808cce95417ec9f8058dee26d0a2694dda27944d
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
We removed this logic in 059c3ae66a under the assumption that the icon
would always provide a set of sizes, but for SVG icons this is not
the case.
Change-Id: Ib3cc5740bca32cf4068a71baf99b52fa536da2ca
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
A typical case is trying to load an SVG icon without the QtSvg module
built. You want to know what's going on instead of trying to debug why
the icon doesn't produce any valid images.
Change-Id: I4418ad758a1232f1394058368c50e0d87235271e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Doing so results in exceptions inside AppKit when passed on to APIs that
expect valid images. It's better to produce nil-images.
Fixes: QTBUG-83494
Change-Id: I1e5bfa2a7fecd75a1ddb95bd1a6dc2e8db6b24f8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Android variable are missing from the list of QMake variables...
Task-number: QTBUG-80390
Change-Id: Ic10f96687334eea99c0302d7137685b1bf6e56c6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
We agreed to make the type internal but somehow it slipped my mind to
actually label them as such.
Task-number: QTBUG-70441
Change-Id: Id90521ecc09bfa1db29601b96ba70bcdcb64d458
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We don't set this flag ourselves, but clients may do via winId(). If set,
the panel will only activate if a view with needsPanelToBecomeKey is clicked.
We do not implement needsPanelToBecomeKey in QNSView, which we ideally should,
by e.g. looking at the IME hints. This still works as expected, as QtWidgets will
make sure to activate the window as part of the normal focus handling. For other
use-cases the user will have to catch the mouse event and activate the window
manually.
Change-Id: I4bacdd44b2f7df5920c6334806303bb5eb502b48
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Commit 593ab63860 ensured that non-modal windows would not be activated
during a modal session, which makes sense for windows that can't be
interacted with. But some windows can, and we should activate them
as normal.
Task-number: QTBUG-46304
Change-Id: I4a9b7ec53157b042d4d6e9535336fa3254f41e0e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of basing the worksWhenModal property on the window type, which
will include both windows inside the current modal session (as intend),
but also windows below the current modal session (wrongly), we check
to see if the window is a transient child of the current top level
modal window.
Going via NSApp.modalWindow means we also catch cases where the top
level modal session is run by a native window, not part of the modal
session stack in the Cocoa event dispatcher.
The new logic relies on windows such as popups, dialogs, etc to set
the correct transient parent, but this seems to be the case already.
To ensure the window tag is also updated, we call setWorksWhenModal
on modal session changes. We could change worksWhenModal into e.g.
shouldWorkWhenModal and always use the setter, but that would mean
the initial window tag update in [NSWindow _commonAwake] would pick
up the incorrect value. And if the window tag is not updated after
that due to the workaround in [QNSPanel setWorksWhenModal:] being
compiled out, the window would not be possible to order front,
which is worse than being able to order front a window with
worksWhenModal=NO.
Fixes: QTBUG-76654
Task-number: QTBUG-71480
Change-Id: I38b14422d274dcc03b4c7d5ef87066e282ed9111
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
That was already done to pass the auto tests, but the randomization also
bites for reproducible builds.
Change-Id: Ibf4da513059deb5a806d2ac1a83c1994edf09d4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The snippet didn't quote the QLibrary header correctly, and didn't
register the flags type, but only the enum type with the meta object
system.
Update example to use QItemSelectionModel instead as a more relevant
class for readers, and restructure the text a bit.
Change-Id: I572e2aaac4601087e7aa6d2ea7a8f8fd65d82539
Fixes: QTBUG-83474
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The pre-existing overload passes an int, but this can mean the
descriptor gets truncated in compilations where the descriptor
is 64-bit.
The old overload with int is visible when querying the metaobject system
so string-based connects still work as before, and connecting to it will
produce a deprecation warning in the output.
At the same time the PMF-based connect will, on recompile, pick the
QSocketDescriptor overload. As an added improvement it also comes with
the notification type, removing the need for separate slots where the
code would be mostly shared anyway.
The QSocketDescriptor type can be implicitly converted to and from
qintptr to ensure existing code still compiles. It can also be
constructed from Qt::HANDLE on Windows.
In this same patch I also update the existing string-based connects in
this module, which then includes updating the parameters for some slots
as well.
[ChangeLog][QtCore][QSocketNotifier] Added
QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type).
This replaces the activated(int) signal which in 64-bit environments
could truncate the socket descriptor. If you use "activated" with the
string-based connect() then you need to update the parameter type of the
signal and slot if it had one. If you use it with the pointer to member
function based connect() then all you need to do is update your slot's
parameter type if it has one. If you need to compile your source code
with multiple versions of Qt then connect() to this function using
pointer to member function and update the slot's parameter type if
needed.
Task-number: QTBUG-70441
Change-Id: Ic43d6bc4c5bcb4040867b2ffad8d36fb01eed8af
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Following up on commits 4fa8dfee5d and
c20c7efea9, where I apparently got the
call to Java's getDisplayName() method wrong. Use the same code as our
own displayName() method used for this, pulled out as a function to be
shared by the two callers.
This requires a locale and it's not immediately obvious which to use,
so try the three most plausible candidates: C locale because IANA IDs
are typically in it; default because that's most likely what language
a user-supplied locale name might be in; and system because the name
may have come from the system, not the user.
In the process fixed some loops that didn't visit all the values they
thought they did.
Fixes: QTBUG-81975
Change-Id: I7867ca6f46951315a41c389107439acb439eaf08
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Do not call SSL_shutdown on a session that is in handshake state (SSL_in_init(s)
returns 1). Also, do not call SSL_shutdown if a session encountered a fatal
error (SSL_ERROR_SYSCALL or SSL_ERROR_SSL was found before). If SSL_shutdown
was unsuccessful (returned code != 1), we have to clear the error(s) it queued.
Unfortunately, SSL_in_init was a macro in OpenSSL 1.0.x. We have to
resolve SSL_state to implement SSL_in_init.
Fixes: QTBUG-83450
Change-Id: I6326119f4e79605429263045ac20605c30dccca3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8907635da5)
Return %USERPROFILE%\AppData\LocalLow instead of %USERPROFILE%\AppData\Local
when running in a low-integrity process.
[ChangeLog][QtCore][QStandardPaths] When used in a low-integrity process
on Windows, QStandardPaths::writableLocation returns respective low-integrity
paths.
Fixes: QTBUG-83453
Change-Id: Ie5e4625a34d08e4ef54be4ba45b2dae9e60feb63
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Apparently it has trouble with multi-threading from the main thread.
Change-Id: Ib544d69270c2780d4a42bde6fd7f491e32f29cd2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Following the deprecation of the signal overloads, the remaining signals
did not provide equivalent functionality for connecting a slot expecting
an integer. The mapping from QAbstractButton* to the ID is comparatively
cumbersome to do in the connected slot.
Add uniquely named signals that emit the ID of the button directly.
[ChangeLog][QtWidgets][QButtonGroup] Added signals
idClicked/Pressed/Released/Toggled that replace the deprecated signal
overloads.
Change-Id: I77215e4f815c4fb7dd6326e1f431230e6601e8f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Following up on header review.
Change-Id: I88553fdaa56364fe93e7eac5d2b062402c760be4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The includes can be sorted and unified even more, but that's left for
another rainy day.
Change-Id: I4d5670d6d8389f69d2631b83b8f421d1f685a0f9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There are several places in the code where a full expose
event is fired, but the geometry in logical coordinates is
used (pre-dating High DPI scaling). Fix by introducing a
helper function for it.
Task-number: QTBUG-83449
Change-Id: Ie8bb306de0b9b2b85306ed1bb6ba71181b76a958
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Do not call SSL_shutdown on a session that is in handshake state (SSL_in_init(s)
returns 1). Also, do not call SSL_shutdown if a session encountered a fatal
error (SSL_ERROR_SYSCALL or SSL_ERROR_SSL was found before). If SSL_shutdown
was unsuccessful (returned code != 1), we have to clear the error(s) it queued.
Fixes: QTBUG-83450
Change-Id: I6326119f4e79605429263045ac20605c30dccca3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Translucent (layered) windows require an additional expose
event. This was sent with the wrong size since the order of
handleGeometryChange(), handleWindowStateChange() in
handleResized was wrong.
Fixes: QTBUG-83449
Change-Id: Iafd3fa8c0893aa28079201f73b7eb529087ba079
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>