[ChangeLog][Third-Party Code] Sqlite was updated to version 3.16.2.
Change-Id: Ib3e9c3a7021760e3cfa6dbd44f67b9da4abbe367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Same as with receiving data, the "newConnection callback" might be
triggered late and cause a crash if it accesses data of a destroyed
object. By moving the handling of this callback to a worker without
much logic we can prevent these late callbacks from doing any harm.
The signals are no longer connected and thus do not trigger any
problems.
Change-Id: Ic61584f12a46506abe12d7b21403d0c0970c0aae
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
QList::erase(it) is a linear operation. Calling it in a loop
constitutes quadratic behavior.
Fix by using the erase-remove idiom.
Write a generic function object QtFunctionObjects::IsNotValid, instead
of a lambda, because I am building up a collection of such function
objects in my tree, to be submitted any time now™, so this will reduce
the churn once that gets merged. Wrap it in the unnamed namespace to
avoid ODR violations in case this pattern repeats.
Replace an existing erase-remove idiom's isNotValid lambda function
with the new function object.
Change-Id: I4f0af04e7b201eb168e79beeda332eee3c6f33c3
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
If you keep around QTextLines referring to the previous contents of
the layout, you can experience crashes when using these after the
layout has been cleared. Since QTextLine is a value type, this is
not very obvious in the API, so we should at least give a warning
in the docs.
Task-number: QTBUG-60804
Change-Id: I81b2b640eec5f62b0af1e878aadd9fa23654ec18
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Our OpenSSL backend allows missing symbols and in general protected
from possible related failures. Unfortunately, for OpenSSL 1.1 this
means not only missing symbols (removed functions), but new incompatible
opaque data-structures and our 1.0 code trying to use them and probably
accessing some data-members via macros - we end up in UB and crashes.
SSLeay, which returns a version number, was removed in 1.1. A failure
to resolve this symbol we consider as a version mismatch and we make
'supportsSsl' to return false.
Task-number: QTCREATORBUG-18137
Change-Id: I5cd270f9c61a729105149779ee7277816f9467d7
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Combining libEGL and libGLESv2 into QtANGLE cannot be the default
any longer, as the change was binary incompatible. We just had to
return to previous behavior temporarily to be able to fix
qtlocation.
This reverts commit 97ab65076e30d8cd0cbe6bdbdb51d1dc2c0ff7e7.
Task-number: QTBUG-60795
Change-Id: I3095cb5f9da30e2d873d9a186cfbc5aee3fb10b2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Running:
tst_qapplication focusMouseClick touchEventPropagation
produced:
FAIL! : tst_QApplication::touchEventPropagation() 'window.seenMouseEvent' returned FALSE. ()
since QGuiApplicationPrivate::mouse_buttons was not cleared
when destroying and re-instantiating QGuiApplication.
Add more initialization and clear screen list on exit.
Change-Id: I0d814852c362d4a86f1ff5d6a94ab00d32ed30b9
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: Ib3a5b071f1cc66992969a85a092f8111e57dea44
Task-number: QTBUG-60786
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 7da9fa2890)
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This reverts commit ac0184d608. That
commit added the use of qHash in qt_safe_ftok, which made ftok even more
unsafe than previously. Since the algorithm in qHash can change across
Qt versions, we need a stable algorithm instead.
[ChangeLog][Important Behavior Changes] Reverted a change that caused Qt
5.6 through 5.8 not to connect to QSystemSemaphore and QSharedMemory
created by running applications using Qt earlier than
5.6. Unfortunately, this means that Qt 5.9 will not connect to 5.6-5.8.
Task-number: QTBUG-60771
Change-Id: Ibc3472e1c11d46358357fffd14bf51aeb48ef2c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
As qtlocation's mapboxgl plugin links to QtANGLE if dynamic opengl is
used, we have to keep the combined library being the default until
qtlocation is fixed.
As soon as the qtlocation fix has landed in 5.9.0 this change should be
reverted.
Task-number: QTBUG-60795
Change-Id: I0781695e085a28a8971a6245a352413c0f779025
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This reverts commit daeb334039.
The commit was causing race conditions, and random failures in CI.
Task-number: QTBUG-60792
Change-Id: I6e49b733965632a1a268f0e88809794098465ec0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QPainterPath could in certain cases where sub-path points were on the
border of a rect fail to calculate intersects() correctly.
The patch adds handling of such cases by looking if end points cross in
or out of the rect. Other cases are already caught.
Task-number: QTBUG-31551
Change-Id: I6284da8ff8646d4636702923a76362302dde5767
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
An embedded view does not have a QCocoaWindow parent, but that doesn't
mean it's a top level.
Improved debug logging to make issues related to this code easier to
spot in the future.
Change-Id: I15b5acdd8d7112600618465a3b65b64fddc306f7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
To avoid a compiler warning due to a wrong Apple api, a wrong
workaround was introduced. This caused the hide of the shortcuts as
expects but the visual space reserved for shortcuts was still visible
as at top with a height of ~55pixels.
While this is not important because the default virtual keyboard
is always shown, it become a problem when one want to introduce his own
virtual keyboard (UIResponder.inputView) with no shortcuts bar.
This fix really hide the shortcuts bar.
Task-number: QTBUG-60812
Change-Id: I0da44dfc3fda15af3351543c0a05aac973b899b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is one of the main use cases for QDirIterator, but it wasn't
obvious enough that it's possible.
Change-Id: Idae11cfe75dd0e16f1a960bba2470b1695d11241
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Prospectively helps to fix Qt::WindowStaysOnTopHint not working reliably
on Windows by preventing HWND_TOPMOST being cleared in raise().
Task-number: QTBUG-50271
Change-Id: I88f916a1cf8a2082236360b9eab874ad22b85762
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
when the dbus tools are bootstrapped (which is the case in x-builds and
when above feature is disabled), they are built asynchronously to the
corelib module. but as qdbusxml2cpp's project file needs to check the
need for bootstrapping, it needs corelib's configuration. so pull it in
explicitly.
Change-Id: I559c7590a3eba8d3f8a03c44fe3a6d56f1c56db0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The table is woefully outdated. Instead of shipping stale documentation
I think it's better to just reference the generic API for this.
Change-Id: I619113ab5140ccf65b774e69e836b27001bb0a18
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
As Qt applications using OpenGL are linked against these libs, merging
them into QtANGLE by default (780105f906)
was a binary incompatible change. This change restores the default
behavior to the one before given change.
If the user wants the libraries to be merged, he can pass
combined-angle-lib to configure.
Task-number: QTBUG-60373
Change-Id: Iedbd3f2ce9284fdde924cfae8d915d6d5fef00db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It's possible that some code executes after QDBusConnectionManager is
destroyed and still tries to access QtDBus. Protect against such
crashes.
Change-Id: I87e17314d8b24ae983b1fffd1453c13fbd3cf48e
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This allows us to get rid of two Q_GLOBAL_STATIC in QtDBus, which means
fewer opportunities for screwing up the order of destruction. And since
QDBusConnectionManager now ensures that the types are initialized, we
don't need to re-initialize them everywhere.
The Q_GLOBAL_STATIC for QDBusConnectionManager ensures the proper
thread-safe locking, so we don't need to lock for every type that we're
trying to register. This should make things faster.
But as a side-effect, trying to register a D-Bus metatype will cause the
QDBusConnectionManager thread to start too.
Change-Id: Ifea6e497f11a461db432ffff1449a4e535234485
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This fixes shared library builds of Qt on iOS and tvOS.
Change-Id: I29d4c7e779e51b1adc19ca9dc18bc46a45a60093
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This commit fixes two bugs:
1) Two ranges should not be merged if they are of different columns.
The old code would have merged (0,0) with (1, 1). Tranforming a selection
of just two indexes in a rectangle of four indexes.
2) The QItemSelectionRange appended had wrong column and worked only for
indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1)
so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)).
This QItemSelectionRange is invalid because topLeft columns is greater than
bottomRight column. The fix take in consideration the bottomRight column.
Task-number: QTBUG-58871
Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
And unify all of them to use regular pointer check syntax, to stay
consistent with other uses of non-smart pointers.
Change-Id: Ic55d7a16f2010120aaa8eac5b2df8189490671a2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
... and update the unittest accordingly.
Compared to the 1.8 release there is one change in freedesktop.org.xml,
the magic for application/x-java-keystore was changed from host32 to
big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328
Task-number: QTBUG-60608
Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Due to the text blend routines being used by ARGB32 and due to another
bug on invalid premultiplied buffers, we need to keep using the naive
blend on non-opaque pixels for now.
Task-number: QTBUG-60562
Task-number: QTBUG-60571
Change-Id: Idfbb2c2e24dd840189c4fbed4e167f03bbc6ca8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Some AMD cards have been reported to not update otherwise.
Task-number: QTBUG-60527
Change-Id: I84d57a57eb2b76fb31255ae42b79b96ab7b257c9
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
ProtocolInvalidOperationError are meant for actual replies from the
server indicating that the operation is not valid (HTTP 400 Bad
Request).
Change-Id: I9ad33fff8b634979bdbafffd14bbc57e4b21d6bf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The operator double() and operator long double() members of qfloat16
are causing cast ambiguities. This removes them, leaving only
operator float() which seems to be adequate.
Also, additional arithmetic operator tests were added which without
this removal fail to compile.
Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They're deprecated since C++11 and removed in C++17.
Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QLocaleData::unsLongLongToString uses qulltoa, which will allocate a
zero-length QArrayData. Then with padding a single 0 was put in a
QString, which gets prepended to the result. By taking care of this
special case, we can now also fast-path the common case where base=10
and no flags nor precision was provided.
Change-Id: Ia893b0ea4c77634c24e7cef5aafb06d0ef44c507
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The existing QHash::operator== does not work when the same
keys appear in different order between the two hashes being compared.
However, relying on iteration order on a QHash is (as usual) a bad
idea and one should never do it.
Task-number: QTBUG-60395
Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Compilation and link times in CPU seconds with GCC 7, using precompiled
headers (not including moc, rcc, uic, etc. steps or headersclean):
Before After
Debug -O0 198,1 180,3
Debug -Og 240,7 229,2
Release -O3 267,1 249,2
Release LTO 239,4 229,8
QtCore required a little manual adjusting because some files are
bootstrapped into moc itself and into qmake.
Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
There's no need to derive. This fixes the build with MSVC 2017 under
/permissive-. I don't know what was wrong (ICC, Clang and GCC don't
complain), but it must be related to "Lookup members in dependent base"
in [1].
[1] https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance
Change-Id: I9ad33fff8b634979bdbafffd14bb8016f5dc98b3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This part has not been implemented before.
Also replace deprecated android.text.ClipboardManager with modern
android.content.ClipboardManager.
Task-number: QTBUG-58548
Change-Id: I190208042af8a6c87ed391c6c72f3f51e58dfad3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Change-Id: I26e8c5caca31e842adc7a09151b6de2cc17698ed
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Many QMenu related functions end up calling sizeHint() which
does call updateActionRects(). Since we try not to update the
action rects if no action has changed, we must be careful to
call it the first time with the right screen geometry. Other-
wise, multi-display setups may get the action rects based on
the wrong display.
In QMenu::popup(), this can be solved by using the position
passed as argument. Incidentally, we were already computing
the right display geometry in the same function, only a bit
later. The updated position around an eventual push button
menu should not change the screen onto which the menu popup
will be displayed.
Tested with the multiscreen-menus manual test.
Change-Id: Id7fc24be6908b4a9d24b8b9c8b8006efe45d69be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
We can't depend on QT_HAS_INCLUDE for such an important functionality in
QtQml, so detect at configure time.
alloca() is not a POSIX function (it apparently first appeared in
Version 32V AT&T UNIX), so the actual header that defines it varies from
system to system. Clearly, if alloca.h exists, that's the one, so we try
it first. On most other systems that don't define it, it's in stdlib.h.
The only exception is Windows, where it's actually defined in malloc.h.
Task-number: QTBUG-59700
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4b2b389a4684e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Even if a callback type is not automatically re-enabled, callbacks are
implicitly enabled when the source has been added to the run loop.
In this case, calling CFSocketEnableCallBacks() could produce an extra
notification if there is a pending event in the queue.
The bug is quite unstable and completely depends on the internal OS
delays. So, it can't be tested inside Qt.
Task-number: QTBUG-59930
Change-Id: I751b8b8cf99cb86b80055f2214a42a638f01abe4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The problem was introduced in Qt 5.7.
Task-number: QTBUG-60297
Change-Id: I46265b24e104e08fe5b8026e5441514a438582c9
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
It's an iterator, not a const_iterator. Let QDoc figure out the correct one.
Change-Id: I7ddd1568adbf811b801c170794465ba14ceed05e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Return an empty size if no suitable entry found to avoid mismatch with
the returned pixmap()'s size (the QIconEngine::actualSize() returns the
originally requested size).
Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There were still two cases where spurious notifications would be
possible:
- user calls hasPendingDatagrams()/pendingDatagramSize() on UDP
socket somewhere outside the slot connected to readyRead()
signal (::WSARecvFrom posts FD_READ notification, even if
a notification for incoming datagram already exists in the
message queue);
- a socket was registered to receive several types of event and
WM_QT_ACTIVATENOTIFIERS message is located between the
different events for this socket in the queue.
Provided patch ensures that the message queue is synchronized with
the Qt event processing mechanism and adds a way to detect spurious
notifications inside the window procedure.
Task-number: QTBUG-58214
Change-Id: I49609dace601f300de09875ff1653617efabd72f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
complements commit c5e687895d
added missing noexcept (void)StoredMemberFunctionCall specialization
to disambiguate template selection.
Without these specializations, StoredFunctorPointerCall was a better
match, which led to compilation failure
Task-number: QTBUG-58142
Change-Id: Ibd41057d9a497f057a895d73277902e90300ed7a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Significantly reduces the number of objects left to rot in the root pool,
which is only drained on application shutdown.
Change-Id: Iad7520ab083715416d95413a63474b9153f22fb5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
So that any objects autoreleased during application initialization are
released. Otherwise they will end up in the root level pool and only
be released when the application exits and the application goes out
of scope.
Change-Id: If02d24fd70098f9b4b1b0ea3218e0a15e438b9db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Otherwise dashed polygons will not be closed when stroked like they
are documented to be.
Task-number: QTBUG-60397
Change-Id: I58e9e3a06af157f9a2789ccab640c9da75867962
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When handling WM_NCCALCSIZE in a global filter, the associated platform
window needs to be assigned to platformWindowPtr so that its frame
margins can be updated on return.
See also 3035400f36, which introduced the
platformWindowPtr out parameter for this purpose.
[ChangeLog][Platform Specific Changes][Windows] Fixed frameMargins for
WM_NCCALCSIZE when handled inside with QAbstractNativeEventFilter.
Change-Id: I7827b81d30a5c80dad591206a88712169dea0108
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Cleans up the rgb32 text-blending functions, so they now follow the
new pattern used in the new generic text-blending functions. This
also means they can now handle gamma-corrected blending on top of
transparent destination pixels instead of falling back to naive
blending.
Task-number: QTBUG-60469
Change-Id: I154ba513ff99c0cefab8fa12f4ed43fcd6563a6a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When the tabbar styling was improved in change
175f33ed85 it changed
PM_TabBarBaseHeight to 21 which is incorrect as this value represents
the spacing between the tab pages and the tabbar. In macOS style
there is no space so this should be set to 0.
Task-number: QTBUG-60307
Change-Id: I2ce39ff2fc924d2d83843fab78b311153b4ee08f
Reviewed-by: Oleg Yadrov <oleg.yadrov@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
If the user calls QLocalSocket::setReadBufferSize() with a value less
than the current size of the pipe buffer, startAsyncRead() would call
ReadFileEx() with invalid parameters:
ReadFileEx(handle, nullptr, some_big_value, ...);
Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In some cases, we'd want such value to come from the
platform theme, but we'd need new API for this.
Change-Id: Ic7053fa17ac8b2f207db031095c4e4aefae000c2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
If vaoHelper is not valid the vao variable was being initializated with
a random value.
Change-Id: I44962841baeb1a1cff3124d6126e19c791feaea3
Coverity-Id: 171484
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Fix a few lingering doc references to the old classes.
Task-number: QTBUG-59815
Change-Id: Ia6b406485260c943b018422aaeb8e22ca4406e81
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
... as this would require us to remove usage of QAbstractEventDispatcher::flush
from Qt source code as well. We can not do this already in Qt 5.9 as there are
few event dispatchers in Qt that actually do override the ::flush (with non empty
bodies). Removing this code could result in behavior changes (not very likely) for
some user code. This method will be removed in Qt6.
Instead mark it with a well known "### Qt{Version}" comment.
This patch amends 41eefd7. The warning was:
qcoreapplication.cpp: In static member function ‘static void QCoreApplication::flush()’:
qcoreapplication.cpp:733:48: warning: ‘virtual void QAbstractEventDispatcher::flush()’ is deprecated [-Wdeprecated-declarations]
self->d_func()->eventDispatcher->flush();
Change-Id: I48a1c68b84ff93268956205e1205e6d4b5d48664
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ib7cf5db6c9a49e7f359410bc0ec3d1ceadcde5cf
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The intersection algorithm for intersection with rects, might return
one edge of the rect even if that edge does not intersect with the path.
To deal with that we collapse paths with empty bounding rects to the empty path.
Task-number: QTBUG-60024
Change-Id: I3e305983c66548e772d7d7ce3de99d715edbdd1b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
I don't know how widespread this use is, but apparently sddm seems to
set DESKTOP_SESSION to be the .desktop file that it used to launch the
session (minus the .desktop extension). In that case, we should read the
DesktopName entry from the file to get the actual desktop type.
And since the desktop detection from QGenericUnixServices should
suffice, we don't need to repeat the same code in QGenericUnixThemes.
Change-Id: I0e1a09998253489388abfffd14b5eeefbd7fe740
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
The text member was never filled and thus was not set in onKeyUp.
Change-Id: I0d0094745c385e0942635da643d863868b010c2a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The event's count parameter is used to determine the number of keys
involved in the key event, not the repeat count of the key press.
The desktop windows implementation does not pass the "count" parameter,
so we omit it as well.
The tryShortcutOverride parameter is only used on macOS and thus can be
omitted as well.
Change-Id: Id7554e43cc73ec616f68444e82a38418e622e20a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The QOpenGLWidgetPrivate destructor calls reset(), which accesses
the Q-pointer. Calling Q_Q(Class) while still inside the private
class's destructor is wrong due to the cast in q_func() which is
undefined behavior at that stage.
Here is the UB report:
qopenglwidget.cpp:548:5: runtime error: downcast of address 0x000016d0e200 which does not point to an object of type 'QOpenGLWidget'
0x000016d0e200: note: object is of type 'QObject'
00 00 00 00 10 30 32 0f 00 00 00 00 40 e2 d0 16 00 00 00 00 80 7b 42 0f 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QObject'
0 QOpenGLWidgetPrivate::reset qopenglwidget.cpp 656 0x607e667
1 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 570 0x60982ab
2 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 569 0x6098516
3 QScopedPointerDeleter<QObjectData>::cleanup qscopedpointer.h 54 0xcbf7058
4 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::~QScopedPointer qscopedpointer.h 101 0xcbde858
5 QObject::~QObject qobject.cpp 1042 0xcb94792
6 QWidget::~QWidget qwidget.cpp 1701 0x5e173f7
7 QOpenGLWidget::~QOpenGLWidget qopenglwidget.cpp 946 0x608d72b
8 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58237b6
9 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58238c6
Change-Id: If13932ac657afb9d1358ac82ab911a05e96cfbcd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This should not change the result since fixed1616ToReal also divides
by 65536. It's just to make it consistent with the other places that
we use fixed1616ToReal.
Change-Id: I96b3a07d1cbc98d7bdbe7a3b6035b196e34a5abc
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
qdbusplatformmenu_p.h:131:9: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field]
qdbusplatformmenu_p.h:192:10: error: private field 'm_isSeparator' is not used [-Werror,-Wunused-private-field]
etc.
Change-Id: I84e363d735b443cb9beefffd14b8bc4253081145
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
These are in public classes, so we can't remove them until we get to
Qt 6.
qtimer.h:231:20: warning: private field 'del' is not used [-Wunused-private-field]
Change-Id: I84e363d735b443cb9beefffd14b8b5fb720c9e41
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
ICC 17 does not yet implement C++17 [[fallthrough]] nor does it support
GCC's __attribute__((fallthrough))
Change-Id: I84e363d735b443cb9beefffd14b8aba60a7e3f81
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Calling SecTrustSetAnchorCertificatesOnly(trust, false) we actually extend
what our user provided in QSslConfiguration as CA certificates (caCertificates,
setCaCertificates) - Secure Transport will also use a default set provided
by the system and SSL handshake can surprisingly (for a user) succeed.
And the default content of these caCertificates, if not altered by setCaCertificates
call - are those system CA certificates.
Task-number: QTBUG-60233
Change-Id: I8c1094bb7eec260f5202a47085f9f75e720eda7b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We might call updatePreeditText from the QCoreApplication dtor by
running an event loop from inside a "post routine" added with
qAddPostRoutine().
Task-number: QTBUG-60000
Change-Id: I04c08fe36bfa63ac345a06e50952d2ec83a78ac0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: Ifa3382098c8f7c2cb1750b7ac5e583ddd71895e2
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Change-Id: I58a2bd715ff1767571d076a881872bd5eab2caec
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Android 4.1 has a limitation on how many slots are available
for eglGetProcAddress().
This reverts commit 7e393280e4
("OpenGLES20 direct function call removed") for the Android platform only.
Task-number: QTBUG-60318
Change-Id: I4a7224583e775143021735c037af07a95abbd6bf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
We guarded against the Unicode form being invalid and did not produce an
encoded form. But we did not guard against proper Punycode sequences
that decode to forms that had not passed the proper Nameprep stage. So
check for that and, if it fails, just keep the label in the form we
found it in (it's valid STD3 anyway).
[ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names
that look like Internationalized Domain Names to become corrupt in
decoded forms of QUrl, notably toString() and toDisplayString().
Task-number: QTBUG-60364
Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The whitelist is kept in ACE form, so if the TLD came in Unicode, we
need to run ToASCII before we can check the whitelist. This is slightly
inefficient because we'll run the same operation later in this domain.
Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
.. when running event loop with QEventLoop::ExcludeUserInputEvents.
In a properly functioning code, g_main_context_iteration is expected
to block until any event source becomes ready to dispatch an event
(or interrupt occurs). Qt provides several custom event sources to
the Glib event loop. The bug (busy loop) was caused by faulty event
source implementation when QEventLoop::ExcludeUserInputEvents is set.
As long as the window system's event queue was not empty, we signaled
to the event dispatcher that there is an event ready to be dispatched.
This results in the dispatcher calling the relevant dispatch function
(which does handle the ExcludeUserInputEvents flag correctly). As we
do not dispatch user events, the window system's event queue never
becomes empty and we enter a busy loop (CPU running at 100%) where we
signal that we have events to dispatch, but we actually do not dispatch
them and g_main_context_iteration never gets to block.
This busy loop can cause blocking GTK functions such as gtk_dialog_run()
never return.
Task-number: QTBUG-59760
Task-number: QTBUG-57101
Change-Id: I545b7951108eeaba019614ae8f5a1168c8b26c27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Add it to the qtcore documentation, but mark it as a tool (code does
not get shipped with customer application).
Change-Id: I75cc199a2bbd86f9e40a75396144645ea69a7bd1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Strip the quotes from the field name in QSqlRelationalDelegate
implementation to able to find the field in the dictionary.
Task-number: QTBUG-59137
Change-Id: I2f1dc9ce3b9c91ca6cc3d3b82e61e1456c3b22c7
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Tablet vendors allow user configurable pen buttons
where the user may assign a logical mouse button to
a given physical button.
In the case of Wacom tablets this mapping is not reflected
in the buttonMask API, which returns the state of
the physical buttons.
Use NSEvent buttonNummber instead, which returns the
logical button number, after applying user mappings.
Unifiy button state stacking with the mouse handlers.
Handle a special case where buttonNumber returns 0
for tablet right mouse presses. We get these events
via rightMouse* event handlers and can hardcode the
button number.
Change-Id: I06b9b1aa98c49b84f7e3871e694c22c7ad0169d6
Task-number: QTBUG-57487
Task-number: QTBUG-54160
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The widget might be in the QObject destructor when the event is received,
so we can't static cast.
There is no need to check for isWindow for ChildRemoved because it would
not otherwise be on our list.
Change-Id: Ifc0a2979f1f6720f1963399276a28ac4a3224fff
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The destructor of QStandardItem needs to access the model. So we need to
destroy them before the QStrandardItemModel gets destroyed.
In the destructor of the private, it is already too late because we are
already in the ~QObject
Since the destructor of QStandardItemPrivate is now empty, remove it
completely. There is no need for QStandardItemPrivate to have a virtual
table as there are no class that inherit from it.
Change-Id: Id6639e21f277f1c4e85c3f9bc720b4f29eb16c2c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
... as it has outlived its original purpose:
Qt3 implementation on X11:
void QApplication::flush() { flushX(); }
void QApplication::flushX() { if (appDpy) XFlush( appDpy ); }
Qt4 implementation on X11:
Did nothing when QApplication::flush() was called (the flush()
overrides in {unix,glib} event dispatchers with empty bodies).
In Qt5 this function somehow has been repurposed (inconsistently)
to do what QCoreApplication::sendPostedEvents already does:
QAbstractEventDispatcher::flush() = 0;
=> QCocoaEventDispatcher::flush() {}
=> QEventDispatcherCoreFoundation::flush() {}
=> QIOSEventDispatcher (does not override ::flush())
=> QEventDispatcherGlib::flush() {}
=> QPAEventDispatcherGlib (does not override ::flush())
=> QEventDispatcherUNIX::flush() {}
=> QUnixEventDispatcherQPA (when QT_NO_GLIB=true)
::flush() { if (qApp) qApp->sendPostedEvents(); })
==> QAndroidEventDispatcher (does not override ::flush())
=> QEventDispatcherWin32::flush() {}
=> QOffscreenEventDispatcher::flush() {
if (qApp) qApp->sendPostedEvents();
QEventDispatcherWin32::flush();
}
=> QWindowsGuiEventDispatcher (does not override ::flush())
=> QWindowsDirect2DEventDispatcher (does not override ::flush())
=> QEventDispatcherWinRT::flush() {}
=> QOffscreenEventDispatcher::flush() {
if (qApp) qApp->sendPostedEvents();
QEventDispatcherWinRT::flush();
}
=> QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush())
=> QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush())
Whatever this function was doing on macOS in Qt3 and Qt4 also has been
dropped in Qt5. It appears that the other event dispatchers in Qt5 that
have overrides for flush() have simply copy-pasted this logic.
Clearly the documentation of QCoreApplication::flush() is outdated and
has nothing to do with the actual implementation in Qt5.
This function is rarely used in Qt5 sources. It should be safe to remove
the calls to QCoreApplication::flush() from Qt source code, as this
function has been doing nothing on most platforms anyways. Repurposing
it even broke handling of posted events (see QTBUG-48717).
[ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now
deprecated. Use QCoreApplication::processEvents() and
QCoreApplication::sendPostedEvents() instead.
Task-number: QTBUG-33489
Task-number: QTBUG-48717
Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
This was simply not working for two reasons:
- The index passed to QMetaObject::metacall was not right (there was an offset
because of the return type)
- If the registration succeeded, the arguments were not even initialized.
The tests in tst_moc always called QMetaMethod::parameterType before calling invoke,
which was properly registering the type. So this was not seen in the tests before.
[ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and
types whose metatype gets automatically registered.
Task-number: QTBUG-60185
Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calling initWithFrame repeatedly on the same object
leaks memory since internal structures allocated on
the previous init call will not be released.
However, initWithFrame is the only API that can set
scroller direction, which is does based on the geometry.
Use two scroller objets, one for each of the horizontal
and vertical cases.
Task-number: QTBUG-60004
Change-Id: I5d07b62e6969a1824ab705941ac4d0340139b99c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Cocoa is better than us at vertically flipping views,
so we use that API instead of fiddling with the graphics
context transforms. But only so from 10.12 onwards. Go
figure.
This also fixes a one pixel offset with horizontal sliders
handle on non-retina displays.
Change-Id: Ia3da8431ad0499a4b6fb7bf6973ed353d91c2905
Task-number: QTBUG-59666
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
After 5b78fcd03b the raster backingstore tries to use the platform window
to resolve the native DPR, but we might not always have a platform window.
Instead we go though the window, like before, which has fallback paths for
the case of no platform window, and then remove the Qt scaling factor
manually.
Change-Id: I19c8383b0a33f3d97aaf0d0e886ed03e14cb1592
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::UserVerifiedRedirectsPolicy'
Change-Id: Ic96f834f3ca9984f626833e45e69f6322b83d12d
Reviewed-by: Martin Smith <martin.smith@qt.io>
Getting the localized family name of a font involves quite a bit of work
internally in CoreText, e.g. creating and sorting font descriptors.
By deferring population of family aliases until a font match misses
we shave off ~1 second of startup time for applications that use non-
localized font families (most applications).
Change-Id: I021952c311c0d70d7769ccf764dbf997ebf30a4b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
QGuiApplication::devicePixelRatio() should only be used when we don't
know which window we're targeting. For QWindow::devicePixelRatio(),
we can go though the associated screen to get a more accurate DPR.
Change-Id: Idf511fa5c09562a6daf391cd4d0b8b99471045e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qstringbuilder.cpp:75: warning: Command '\li' outside of '\list' and '\table'
Change-Id: I2353462cfd14a4f7cf60d5064ecb069155d1cd34
Reviewed-by: Martin Smith <martin.smith@qt.io>
It only contained a concatenation of the individual rule sets,
probably to fix their order in a central place, as well as
simplifying iteration in defaultCategoryFilter().
Fix these two issues differently, but introducing a RuleSet
enum that lists rule sets in the order in which they should
be applied by defaultCategoryFilter(), and turn individual
rule sets vectors into a C array of vectors.
This enables two nested loops in defaultCategoryFilter to
replace the one loop over 'rules'. Apart from building up
'rules' in updateRules(), this was the only access to that
member. That leaves updateRules() with just the task of
running defaultCategoryFilter() on the new rule sets.
Consequently, a call to updateRules() can now replace the
identical loop in installFilter().
Performance should not suffer. Iterating over a fixed-size
array of vectors is hardly any slower than iterating over
a single vector, and while the construction of 'rules'
was probably a one-off task in most programs, this way
of keeping the rules also saves memory because rules are
not kept in two different vectors.
It is also more maintainable, of course.
Change-Id: Ibc132d096c8137dd02b034752646212e51208637
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Nothing seems to be telling the popup on which screen it should be shown
on. To fix this, simply set same screen the QComboBox uses to the popup.
Task-number: QTBUG-58392
Change-Id: If62a26fe4e51bcf3d770ee72c9baa998541618f4
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Extract Method msgType2i18nString() and use it to build 'rich' in a
single QStringBuilder expression.
Replace the switch over QtMsgType with an array of QT_TRANSLATE_NOOP'ed
strings. That introduces a dependency on the order and amount of enum
values, so add static and dynamic asserts to catch any change.
Saves memory allocations, as well as nearly 300B in text size on GCC 7
optimized Linux AMD64 builds.
Change-Id: I48cc916cba283e482a90ca4ae28aa17b26a4e5ab
Reviewed-by: David Faure <david.faure@kdab.com>
Since commit bf2160e72c, we can rely on
charNN_t support in all compilers except MSVC 2013, and since that
commit, we use (in 5.10, not 5.9, yet)
!defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS)
when we only need charNN_t, the type, as opposed to its library
support (u16string, char_traits<char16_t>, ...).
This patch splits the Q_C_UNICODE_STRINGS macro into two, adding
Q_STDLIB_UNICODE_STRINGS for when we need std::uNNstring, leaving
Q_C_UNICODE_STRINGS for when we need just charNN_t support.
In QDebug, when constructing a QChar out of a char16_t, cast to ushort
first, since QChar(char16_t) was only officially introduced in Qt 5.10.
[ChangeLog][Potentially Source-Incompatible Changes] The internal
Q_COMPILER_UNICODE_STRINGS macro is now defined if the compiler
supports charNN_t, even if the standard library does not. To check for
availability of std::uNNstring, use the new Q_STDLIB_UNICODE_STRINGS
macro.
Change-Id: I8f210fd7f1799fe21faf54506475a759b1f76a59
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That's before the return type or static, inline, constexpr or such
keywords (if any).
Perl Script:
s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/
Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
They're not affected by the GCC bug noted in the comment.
Change-Id: I7814054a102a407d876ffffd14b69e8a8e2527f1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Creating a precompiled header exclusively for a one- or two-file module
is wasteful. The time that it takes to build the precompiled source is
on the same order as a regular compilation, so enabling precompiled
headers for those modules just makes the build slower.
Also make it possible to override the precompiled header by just setting
PRECOMPILED_HEADER to empty.
Change-Id: I0e1a09998253489388abfffd14b5f221288c4826
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Do not use a self-assignment, as that may trigger compiler warnings.
Casting to void is also what Q_UNUSED is doing these days, but we can't
use it here because qgrayraster.c does not include qglobal.h.
Remove a 15-years old comment related to the self assignment.
Found by clazy.
Change-Id: I8cc92b7a1b0b5fb13824959740243e17606ec753
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 47cc9e23a3.
We use QCoreApplication::applicationDirPath in the logging initialization to find
a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires
a QCoreApplication instance this leads to a qWarning, which in turn leads to a
recursive call to the logging initialization, and in turn to a recursive mutex deadlock.
Task-number: QTCREATORBUG-18031
Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Delete the QGraphicsEffect from the QWidget destructor instead of from
the QWidgetPrivate destructor. The destructor of QGraphicsEffect still
access methods of the QWidget, but the QObjectPrivate being destroyed
from ~QObject, the pointer is no longer a QWidget.
Fix warning with UB sanitizer in tst_QWidget::setGraphicsEffect
qwidget_p.h:900:23: runtime error: member call on address 0x000001d822c0 which does not point to an object of type 'QWidget'
0x000001d822c0: note: object is of type 'QObject'
00 00 00 00 b0 46 5f 40 e5 7f 00 00 00 23 d8 01 00 00 00 00 f0 e6 00 44 e5 7f 00 00 00 00 74 47
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QObject'
#0 0x7fe54767db76 in QWidgetEffectSourcePrivate::detach()
#1 0x7fe548f29815 in QGraphicsEffect::~QGraphicsEffect()
#2 0x7fe548f2a1b7 in QGraphicsBlurEffect::~QGraphicsBlurEffect()
#3 0x7fe548f2a208 in QGraphicsBlurEffect::~QGraphicsBlurEffect()
#4 0x7fe5475cd463 in QWidgetPrivate::~QWidgetPrivate()
#5 0x7fe5475ce62c in QWidgetPrivate::~QWidgetPrivate()
#6 0x7fe5400d0dda in QObject::~QObject()
#7 0x7fe54763d411 in QWidget::~QWidget()
#8 0x7fe54763d7f4 in QWidget::~QWidget()
#9 0x4cc309 in QScopedPointerDeleter<QWidget>::cleanup(QWidget*)
#10 0x4cc309 in QScopedPointer<QWidget, QScopedPointerDeleter<QWidget> >::reset(QWidget*)
#11 0x4cc309 in tst_QWidget::setGraphicsEffect()
Change-Id: I19c049e979cfce2adda908af8336cb4adac8f6c4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We can't just static_cast a child to QLayout, because the child might
not be a QLayout, and even if it was, we might be called from the
QObject destructor so we would not be a layout anymore.
Instead we can just qobject_cast the deleted object to a QLayout and
remove it from the layout with removeItem.
This would not take in account the case where we would be called because
the QLayout gets destroyed, so we handle this case from ~QLayout by
removing ourself from the parent.
Note that the comment in ~QLayout was wrong, as the layout gets destroyed
explicitly from ~QWidget, not from ~QObject.
Change-Id: I49c6f17a76f207b9d750b6e5d987469498b96b31
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We don't need to defer to NSWindow creation before determining the initial
window geometry, and we don't need to redetermine each time we re-create
an NSWindow for a QCocoaWindow.
Change-Id: Ie13380830b44e96670ff16513f29deef5f5ae313
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qimage.cpp:2127: warning: Can't link to 'isDetached()'
qmatrix4x4.cpp:1933: warning: Can't link to 'operator()()'
Change-Id: I93a2ead9650faf139040173f8d3b24cfa1e730ae
Reviewed-by: Martin Smith <martin.smith@qt.io>
CoreWindow::GetAsyncKeyState returns flags and not enums so checking
equality does not give the needed result.
As seen in qwindowskeymapper.cpp key events that only contain a modifier
key should not have the key itself as a modifier when calling
handleExtendedKeyEvent.
With the current approach the modifier states are the same as
on desktop Windows.
Task-number: QTBUG-58750
Change-Id: Ie0f3e1d3e8294e1a6b41c9223a7a5153306579f6
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
CorePhysicalKeyStatus::KeyStatus does not give the information we are
after so we have to keep track of "auto repeat" state of the keys
ourself.
Task-number: QTBUG-59232
Change-Id: I22aa185780e5fa1f7f3c23c2deb2a0dde0c4a582
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Fixes two separate errors. QImage::transform was incorrectly adding
colors to the color-table of the returned image when the converted image
would not be indexed, and qpnghandler was looking at non-empty color-
table instead of color format.
Task-number: QTBUG-43708
Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QLineEditIconButton currently draws a fully transparent pixmap in its
paintEvent() function, when the line edit is empty. This does not work
when there is another trailing QAction that is visible even when the
line edit has no text, as reported in QTBUG-59957.
To fix this issue, make sure the clear button is always the leftmost
button.
Task-number: QTBUG-59957
Change-Id: I8a4f96aae07856aa0e1053ebb338ba9bdf052a16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
A signal emitted after the first 'isOpen' check on QNetworkReply can
trigger a slot that aborts/closes our reply. So before we can append
any data to reply's buffer, we have to re-check that we're still open.
Task-number: QTBUG-59909
Change-Id: I781d5a4fd5fc30d485af63f45cf36c254378af64
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>