This update corrects several minor documentation errors that
were introduced by a recent change to QDtls.
Change-Id: I6ee6b0bf74c82dca86ba8d5f39acbd642829ec44
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This reverts commit 823acb069d.
It caused some test failures in qtdeclarative and etc.
Task-number: QTBUG-69891
Change-Id: I2e4038a46de254834e6389c63f6dad0c2e523b8e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This caused a crash on destruction because as soon as you construct a
QTouchDevice it will register itself to a list of devices. On application
exit the function cleanupDevicesList() in qtouchdevice.cpp would go
through all registered QTouchDevices and destroy them. Therefore, there
is no need to delete the QTouchDevice from QWindowsPointerHandler.
This was a regression that was caused by
20d6dac63c
Change-Id: I58fb50016c047c3843a3f9677f2c2ef824223d43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
While the property is deprecated, we should still set it, even in the
legacy free constructor. The window system never sends x and y changes
at the same time, so either coordinate will be null, therefor add them.
This should restore the old behavior.
Task-number: QTBUG-69089
Change-Id: Ie329cb4196f53c70b25934cbbac5e2e48c65d2b3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
It is not relevant anymore. C++11 is a hard requirement for a while already.
Change-Id: Idb8fbdcd13398cc85fba583f40c2b5c4dc7c4943
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This update corrects several minor documentation errors that
cause qdoc warnings. These include incorrect or missing \fn
commands, incorrect uses of \e and \a commands together,
incorrect spellings, etc.
Change-Id: Ib26edef541fa3440025490bcf79cc101623e7f7b
Reviewed-by: Martin Smith <martin.smith@qt.io>
On macOS we pull out all the modifiers up front, which in the case
of incomplete key sequences such as "Meta+Shift+" will result in
an empty string as a result. The cross-platform code does not
handle that case, so we need to exit early.
This fixes an assert in tst_QKeySequence::parseString().
An assert has been added to QKeySequencePrivate::decodeString()
to make the assumption about the 'accel' argument explicit.
Change-Id: I135e62f9051a8b899202e5fb224b5d3c77bf2062
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The CLDR data contains eight locales with numeric territory codes, 001
for World, 150 for Europe and 419 for Latin America. The last was
already known in our enumdata.py, but as "Latin America and The
Caribbean", which is not supported by the CLDR, so I've amended it
while adding the other two. This gives us support for Esperanto and
Yiddish (among others).
[ChangeLog][QtCore][QLocale] Added support for World and Europe as
(numeric) "country" codes ("territory" in CLDR terms), thereby
enabling support for Yiddish and Esperanto, among other locales using
such codes.
Task-number: QTBUG-57802
Change-Id: Ibb1180fb720743a3a0589527649d10f3c9cd123d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These tests kludge round Apple's use of GMT+1 and GMT+2 as names for
CET and CEST on Darwin; but 10.13 actually gets the names right, so
side-step out of the kludge when on this version or later.
Change-Id: Icb8a2f3ac30f0f621a19042dc03e0d281782dd41
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
It ignores its CollatorType, so we can use bool for it and save a few
bytes in QCollatorPrivate. The member using CollatorType follows three
existing bool members: a boolean will fit there, while an int requires
1-byte padding and its 4-byte payload.
Pointed out by Thiago Macieira.
Change-Id: I10c8ea6f1b735b1b872c509f18fd6a93e24c9b86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCollatorPrivate defines a back-end-specific CollatorType and sets a
member of this type to 0; but ICU's version really wants a nullptr not
0. So provide a named constant of the type, that's the NoCollator
value for use there.
Change-Id: Iad4d2f803ff4807ea568755efe00b9a92f1a8eeb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both places that new'd it were then setting its locale themselves;
they might as well do it tidily by passing it to the constructor.
There's also no need to cleanup() in the constructor; every back-end
is a no-op when collator has its initial value.
Tidied up the class declaration in the process:
* moved {con,de}structor to be first methods
* comment on the two methods back-ends provide
Change-Id: I041669637935e68141e002156552af8b475ba36e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCollator::detach() created a new QCollatorPrivate, then set some of
its fields to the values its constructor sets them to. Don't waste
time doing that.
Change-Id: I048a1553753ae2cf03d3f61d45490f2723ee658b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Each of its callers set dirty after calling detach() in any case, so
the call to init() was going to be duplicated (if the instance ever
got used again for something that benefits from it), and the d-ptr is
freshly created in any case, so can't be carrying any stray gunk from
earlier use, that init() might purge.
Change-Id: Id2485889c8ae4ee531c88562ff63f1a8ac0f4a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They have a separate type that we can't recognize directly, but we
can check if we can recognize the QFlags<T> form, though we have to
add a lot of template-conditions to avoid triggering QFlags static
asserts.
Change-Id: I00853682c5376dd3cc411ff151f47bce2389e277
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Adds support for 16bit per color image formats in QImage. This makes it
possible to read and write 16bpc PNGs, and take full advantage of the
16bpc paint engine.
[ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with
16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL
formats.
Task-number: QTBUG-45858
Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Adds an enumName to QMetaEnum to carry the name of the enum since for
flags that doesn't match the name of the Qt type, but is needed if the
flag is scoped.
Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Test that we don't silently replace an invalid TLS configuration with
the default one (for now, the only thing that is considered to be
non-valid - is having non-DTLS protocol set).
Change-Id: I6f714b009cf1345a085a3f26d638fc31330f1a94
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This autotest fails on Ubuntu 18.04.
Task-number: QTBUG-69892
Change-Id: I3673d06f06fcd8db307fc53c27724b227978f20d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
A weird behavior of the DTLS server example, when linked with 1.0.2,
exposed that client code, requesting an invalid protocol (for example, SSLv3)
can end-up with connection encrypted with DTLS 1.2 (which is not that bad,
but totally surprising). When we check the protocol version early in
setDtlsConfiguration() and find a wrong version, we leave our previous
configuration intact and we will use it later during the handshake.
This is wrong. So now we let our user set whatever wrong configuration they
have and later fail in TLS initialization, saying -
'Unsupported protocol, DTLS was expected'.
Auto-test was reduced - the follow-up patch will introduce a new
'invalidConfiguration' auto-test.
Change-Id: I9be054c6112eea11b7801a1595aaf1d34329e1d2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The one we had before was invalid and we ended up with
defaultDtlsConfiguration which has peerVerifyMode == AutoVerify.
Change-Id: I5b9ceb027e90189325c1d8fd0db37d1b212ebbc8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The QTRY_VERIFY was needed because the window doesn't initially have a handle,
and QTest::qWaitForWindowActive(QWidget *) only checks the active state of the
widget if it does, returning false if not.
This broken logic should be fixed, but for now let's make it clear what's
actually going on by using an explicit wait for the window handle.
Change-Id: I6dd89e0894efed14f4b9a2562dfe8ca76b5ef89c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This updates the UI after the accent color or NSApp's effective
appearance have changed. For the accent color, we listen to
NSSystemColorsDidChangeNotification. For the effective appearance
changes, we do KVO on NSApp.effectiveAppearance.
Both changes will trigger rebuilding the system palettes followed
by a ThemeChangeEvent in the window system interface layer.
Task-number: QTBUG-68891
Change-Id: Iab1ec874e05f1f6d54cd60217c273e0f8ffbf49e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We were using CFRunLoopGetMain() everywhere. Get the
correct run loop using CFRunLoopGetCurrent() during
initialization, and store it.
Event dispatcher initialization must now be delayed
until after the constructor has run, since event dispatchers
may be created on the main thread and then moved to
the target thread. Initialize on first call to processEvents()
where the current thread will be the correct thread.
Use the stored m_runLoop instead of CFRunLoopGetMain().
This is required for wakeUp() and interrupt() which
may be called from another thread.
Change-Id: I6fffcfd4394899c4a12f241c42781979aaf99d5e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
And reflow the text where it exceeds the 100 column limit.
Change-Id: I0d270c6a74a4c6ecba30e4e4d38a5d8f2cf81040
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As discussed/proposed previously: remove the duplicated code when converting the
native certificate representation into QSslCertificate (configuration.peerCertificate).
Also, use the correct integer type when iterating - CFIndex is actually long, not int.
Change-Id: Ia6f43172e21b5153a93f1ef2589980d68ec2b39f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
A switch statement using enumeration type midlErrorCheckOption as
condition had an enumeration value from type midlStructMemberAlignOption
as a case label. This had only coincidentally the intended effect, since
the intended value (midlErrorCheckOption::midlEnableCustom) and the
actually used one
(midlStructMemberAlignOption::midlStructMemberAlignOption) have both
the value 0.
Change-Id: I73b337f23e733a1a6fb80517e29365e01838238a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QWindowsWindow::updateTransientParent retrieves the handle of the
topmost owner window, not that of the immediate owner window (which
corresponds to the handle of transient parent window).
Task-number: QTBUG-69620
Change-Id: I1433098e8e93832d97508ee1782f88ccc000ee3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This test was un-blacklisted in 4050ee6ac7
but apparently it is still not stable.
Task-number: QTBUG-69666
Change-Id: Iaf933ee27d54ebbfa52d0a8d7b1def0ca91808e7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
dstZone.offset was being used without initialization.
Coverity-Id: 178898
Change-Id: I8eabef3b4386c3ebfea5d1caffff9add6264bfce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
This isn't necessary anymore, since MSVC 2015 does have Unicode string
support and MinGW (GCC) has had it for a long time. More importantly, we
must remove this macro:
# define QT_UNICODE_LITERAL_II(str) L##str
As the updated MSVC preprocessor will no longer support it. See
"Behavior 2" in [1]
[1] https://blogs.msdn.microsoft.com/vcblog/2018/07/06/msvc-preprocessor-progress-towards-conformance/
Change-Id: Id59bdd8f1a804b809e22fffd15401099a67175d3
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Calling update has a cost, and should only be done when the drawable
object changes size or location. Instead of calling update each time
makeCurrent is called, we listen for the appropriate notifications,
limiting the number of update calls significantly.
The code has also been refactored to get rid of the m_activeWindow
member, as the active window can be tracked through the context's
drawable object property.
There is also no need to clear the drawable when a window is hidden,
so the hook into QCocoaWindow can be removed.
The QPlatformNativeInterface hook is internal and can safely be removed.
Task-number: QTBUG-63572
Change-Id: I70e3267f47882e151144bd36a50abe906164429a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If there's no background, we should copy the backingstore, so that the
backingstore is not blended with the result of the previous flush.
The unified toolbar case is covered by the window having a textured
background.
Task-number: QTBUG-69773
Change-Id: I2f4eed9f44a60ebe7495ce68cf5a54d3d2424b0c
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Specify that we're calling QLocalSocket::close in dtor.
While it's virtual it will not call any overloads at this time.
From cppcheck.
Change-Id: I7b8030ab96e1568cbb2a378ceaf07b2ecabf054f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QNetworkAccessBackend has a QSharedPointer called uploadByteDevice.
QNetworkAccessDebugPipeBackend and QNetworkAccessFileBackend both
duplicated the member, by taking a copy of the raw pointer, while also
shadowing the QNetworkAccessBackend's member by reusing the name.
Change-Id: I91f4e8d43d95c5f30c5bc2571393804209b7a843
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QUnixEventDispatcherQPA has no private class, there is no need to
declare a fake one.
Change-Id: I615304709fbbea83f6747bb6202dbfd2cc03256d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>