OpenSSL 1.1.x libs must be suffixed otherwise it will use the system ones which on API-21 are OpenSSL 1.0 not 1.1
Fixes: QTBUG-76884
Change-Id: I7d4052be68cf7dc65f74a48da8e1e37182056a5e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Amends 136c5b9338.
Before that change, each of the three members was a separate
Q_GLOBAL_STATIC, so checking resourceList() for nullptr was the
correct thing to do to find out whether the static was already
destroyed.
After the change, the resourceList() function will never return
nullptr. Either resourceGlobalData.isDestroyed(), in which case
dereferencing it asserts, or it isn't, in which case resourceList()
returns a valid pointer.
An explicit isDestroyed() check was added to the unregister function,
but the register one was also checking resourceList() for nullptr,
and this was left unprotected.
Add the check and remove the now-tautological checks for nullptr
resourceList().
Change-Id: I41fe66939ce858a77802b8af04c1de6e4fafe048
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It's a bit cheesy solution, but works as I've noticed first on
QSlider's with a ticks direction 'both'. Works because we were
already using numberOfTickMarks property to trigger a special
behavior for HIG non-compliant widgets. Works for our case too
- we trigger a geometry update.
Fixes: QTBUG-76811
Change-Id: I2cbf00d42d98e78519b281d138a2f74227ef5449
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QNetworkAccessManager::connectToHostEncrypted()/connectToHost()
creates 'fake' requests with pseudo-schemes 'preconnect-https'/
'preconnect-http'. QHttp2ProtocolHandler should handle this
requests in a special way - reporting them immediately as
finished (so that QNAM emits finished as it does in case of
HTTP/1.1) and not trying to send anything.
We also have to properly cache the connection - 'https' or
'http' scheme is too generic - it allows (unfortunately)
mixing H2/HTTP/1.1 in a single connection in case an attribute
was missing on a request, which is wrong.
h2c is more complicated, since it needs a real request
to negotiate the protocol switch to H2, with the current
QNetworkHttpConnection(Channel)'s design it's not possible
without large changes (aka regressions and new bugs introduced).
Auto-test extended.
Fixes: QTBUG-77082
Change-Id: I03467673a620c89784c2d36521020dc9d08aced7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Winrt does device independent scaling by default so that overwriting
pixelDensity for QWinrtScreen will break the use case of setting
Qt::AA_EnableHighDpiScaling. That mode is basically always active on
winrt.
Task-number: QTBUG-76363
Change-Id: Ib522201850d17757be4a80aa819c3f1245ca7147
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Imports were expanded in the list of commands every time they were
evaluated. This meant any test with imports ran slower and slower the
more iterations it got through.
Fixed by creating a new PaintCommands object every time and living with
initialization of it being part of the benchmark results.
Change-Id: Ib53a3a25f1393437452bc5aede04ccb63e8715a6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Emscripten has changed the key code to include the string 'Digit'
on numerals. We use this to detect and translate any Dead keys that
may be pressed.
Fixes: QTBUG-77041
Change-Id: I054e98a6cf66390b1154f25fe385e5b12840851f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Beta version of Xcode 11 changes the format of the json object
returned by simctl and used to detect running simulators.
While multiple versions of Xcode can coexist on the same system,
they share the same simulator infrastructure so installing
Xcode 11 Beta affects projects using previous versions.
Change-Id: Icf06a794aa5ba3624163ace2ce827c0ecf97c38c
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Explicitly setting the application font and palette will actually
persist the current state of the application font and palette to
the widget, and it will stop reacting to system style changes.
Change-Id: Ib856fe86cd3edb618b7ee5819d6c6c892c61fd1d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It conflicts with 'requires' keyword.
Fixes: QTBUG-77093
Change-Id: I85e8f530dd1e2bf9a31906dd6c5123b947235b01
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When successfully finishing a parse, it's reasonable to expect that the
QIODevice was advanced to the end of the input data.
[ChangeLog][QtCore][QCborStreamReader] Fixed a bug that caused the
QIODevice that the data was being read from not to show the entire CBOR
message as consumed. This allows the user to consume data that may
follow the CBOR payload.
Fixes: QTBUG-77076
Change-Id: I1024ee42da0c4323953afffd15b23f5d8fcc6f50
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Docker creates really long lines due to the multiple levels of overlays
in the overlayfs. Our limit of 1024 bytes was too short.
[ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused QStorageInfo
to be unable to report all filesystems if the options to mounted
filesystems were too long (over 900 characters, roughly), such as those
found in Docker overlay mounts.
Fixes: QTBUG-77059
Change-Id: I6aed4df6a12e43c3ac8efffd15b1ba4231e60b4a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Moves and improves the logic for lowering splash screens to a dedicated
window manager, which will learn more tricks in patches to come.
Change-Id: I8b8fd1dd78fdaf6f106a59c84d2a59254f3539c3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Since we need to set the delegate on the defaultUserNotificationCenter,
which is a gobal object, we have to update the delegate when we show
the message. Otherwise, the last delegate created and set will receive
the notification, and the last QSystemTrayIcon created will emit the
activated signal.
Before clearing the delegate upon destruction, make sure that it's
the right item first.
Also updating coding style in the respective parts of the code, and
plugging a memory leak.
Change-Id: Ife62ae0776a5a610a6fd735b2959b807c3a410c7
Fixes: QTBUG-77003
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
ProFunctionDef is move-enabled, meaning its `m_pro` field can
become nullptr. Its usage in the assignment operator and the dtor
must therefore be protected with a check.
Amends 9c63ad562b.
Change-Id: I0c77b07dc83969565480bbb9d9fc80751d4246b1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
1. Use per-case QNAM objects
2. In a slots (connected to QNetworkReplies) - if an error detected - stop
the event loop (no reason to continue waiting) and then do normal
QVERIFY/QCOMPARE things.
3. In tests, check QTest::currentTestFailed after the event loop returned -
if an error was detected by a slot, no need to continue with QCOMPARE/QVERIFY
in the test itself.
Task-number: QTBUG-77053
Change-Id: I3827a629a2749becd3dc6eee7fd6994d96441e65
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It's not <APPROOT> (any more, or was ever).
Fixes: QTBUG-76911
Change-Id: I6aed4df6a12e43c3ac8efffd15aed22128862c23
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The textdate API methods are deprecated in favor of QLocale; so
suggest use of QLocale in place of them. Don't credit the deprecated
methods as being used where they aren't.
Change-Id: I0abcb1f69729760ae1b86cb8088e4158c0ad6010
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
Allows us to reference captured variables and keeps the function
local to where it's used.
Change-Id: I609892888720202021862d26a74ceb50e232f356
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
So that the context can be referenced during initialization.
Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Well, yeah, it technically does...
qcborstream.h:245:15: warning: declaration shadows a typedef in the global namespace [-Wshadow]
/usr/include/libkern/OSTypes.h:36:26: note: previous declaration is here
Fixes: QTBUG-75825
Change-Id: Idce141629dd34287808bfffd159ee2a75428bf12
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Caused by commit 01301b0b34, which made
vector.resize(vector.size()) not to detach, which was used by fill() and
assumed that detaching happened. The test does not test the resize()
behavior, only that fill() is not broken anymore.
[ChangeLog][QtCore][QVector] Fixed a regression that caused fill() not
to detach, corrupting shared copies.
Fixes: QTBUG-77058
Change-Id: I6aed4df6a12e43c3ac8efffd15b1b527a8007bf3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When changing the primary screen, the various changed signals of
QScreen were out of order. Most notably, the wrong DPI value was
emitted since QGuiApplicationPrivate::processScreenGeometryChange()
checks and emits DPI and orientation as well. Rearrange the code to
assign new the values and emit DPI first.
Task-number: QTBUG-76902
Change-Id: If4037108391c36ab3a8bfcb9b2989d5bea41202f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
fix the bloody test for good - the idea to have a shared QNAM (shared
by test cases in this test) was somewhat wrong to start with.
Fixes: QTBUG-77053
Change-Id: I5755e96ec988e2dd546f527f3f902fc43914b0b7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
As noted in RFC7230 Section 6.1 the 'Connection' options are case
insensitive.
https://tools.ietf.org/html/rfc7230#section-6.1
Change-Id: I80b98d82eaa5572d38a6c3f99383bc059ec91c54
Fixes: QTBUG-76990
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The public QWidget::create still has them, but we don't need to
propagate them on - that just makes debugging the window creation
flow harder.
The window argument to QWidget::create is technically used to
guard an early exit in the function, but to keep behavior the
same we leave it for now.
Change-Id: Ic0287575aa25f1272e216adc1b75e34d6f55f6d9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This reverts commit a9246c7132.
The QWidget machinery is way to fragile to reset the winId under the
feet of QWidget like that. We would potentially need to include all
the logic in QWidget::destroy. This also ties into the flow between
QtGui and QtWidgets during window closing, which is still unresolved.
Change-Id: I168048a63c89796398eb5331a80ce3e5c8d9a208
Fixes: QTBUG-76588
Task-number: QTBUG-69289
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Conflicts:
configure.pri
Also required s/solid\.color/solidColor/ in a couple of places in:
src/gui/painting/qpaintengine_raster.cpp
Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
A switch statement was comparing enum values of a different enum.
Change-Id: I578f79b15b1007afaa64cd3a2a80d6a75d3bed77
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
... irrespective from the users current locale.
Fixes: QTBUG-76938
Change-Id: I78810a75ecf9e9f1067363ce56656124b6ddcefd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The Clang parser in QDoc fails to parse the .mm source files if their
include files are not found. Add a dummy 'AppKit.h' file under the
/doc directory for this purpose, and add its include path to
qtwidgets.qdocconf.
Task-number: QTBUG-77009
Change-Id: Iaa984cb8f860367cbb7aa95808d26fb69d7da349
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The icon provided was ignored, even though NSUserNotification provides
the option to specify a contentImage.
The message popping up will show that image on the right side of the
notification; it will not repace the application icon on the left side.
[ChangeLog][Widgets][QSystemTrayIcon] On macOS, show the icon passed
into showMessage in the notification popup
Change-Id: I8ecda7f893006e74a4f35f37ddc07063ebfe4e83
Fixes: QTBUG-76916
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A function may almost always have static storage duration, but that
does not necessarily mean that we can store and load pointers to them
without memory ordering. Play it safe and use store-release and
load-acquire for them (which combines to ordered for the fetchAndSet
call in qInstall*Handler(), as we don't know what the caller will do
with the returned function pointer).
Also change the initial value of the atomic pointer to nullptr.
Nullptr already signified the default handler in qInstall*Handler(),
so the API doesn't change. But by using nullptr to mean default, we
place these variables in the BSS segment instead of TEXT, save dynamic
init, or at least a relocation, and we dodge the smelly comparison of
function pointers, using comparison against nullptr instead.
Also, as a drive-by, put the call to ungrabMessageHandler() in a
scope-guard. Both the message handler, as well as the Qt code calling
it (toLocal8Bit()!), may throw, and that would stop all further
logging. In Qt 5.9, we can't use qScopeGuard(), yet, so use a local
struct calling ungrabMessageHandler() in its dtor.
The code still has one problem: When a logging action is underway, and
another thread exchanges the message handler, we might still execute
code in the old handler. This is probably not a problem in practice,
since no-one will use a dynamically-compiled function for logging
(right? :), but should probably be documented or fixed. This patch
does not address this issue, though.
Change-Id: I21aa907288b9c8c6646787b4001002d145b114a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cd401b74a1)
(cherry picked from commit ea16c860bd75a35134ebb1d4f3be5db58f4a4e21)
The call to QFileDevice::unsetError() in QSaveFile::open() does
not clear QSaveFilePrivate::writeError. Clear it in addition.
Fixes: QTBUG-77007
Change-Id: I5e5009750f1726d1c74c1b4eb1c33f3a5393fe4f
Reviewed-by: David Faure <david.faure@kdab.com>