A few member functions of QCborValue and QCborValueRef were given special
declarations for qdoc to see so that they could be documented as a single
function, but because clang is now used to parse c++, the special declarations
caused parsing errors.
The declarations for qdoc are removed in this update, but the functions are
still documented with a single comment by grouping the \fn commands for the
similar functions together in the single comment.
Change-Id: If97ee2f2bfcd045d2259a4375b31b8884eeb1072
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Use unique_ptr instead of plain array. No need to call 'delete'.
Change-Id: Ia77f4f209b1fd83391428d8b82b7acbba48781b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This doesn't add any value and just complicates things.
Change-Id: I3a011174e330f212eda99371d2806517ceec45d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The function, although implemented differently in each event dispatcher,
is not supposed to process newly posted events, only the events that
were queued at the time of the call.
This is tested by tst_QEventDispatcher::processEventsOnlySendsQueuedEvents,
which is not blacklisted on any platforms, so we know it's the behavior
in practice.
Change-Id: If9a874eeeb8ebcebe88ed119b065ae12fc545129
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Copied from the CSS served by http://doc.qt.io/
Change-Id: Id37447e0f6de4a08a2632df862ae36f73d284814
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
After qtbase/550d2a0a15c9403894448ab83863e71bbac2d349,
pixmap functions are used for icons as well which can cause compile
errors for old UI files that still use them.
Task-number: QTBUG-8563
Change-Id: I61bd4b9c1bf774e071a35c5806657054a77ff4d0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
'description' is used only once in all configure.json files, so
I assume that was meant to be 'purpose'.
Change-Id: I66e9d9196c27d2f2131c2d57ea03895e8f5ce754
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The script taken here is a QChar::Script, not a
QFontDatabase::WritingSystem. This means it was passing QChar::Unknown.
Change-Id: I919ae7187ba277346a7719116a94776dce24dd84
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
It's needed to generate a pkcs12/pfx bundle from our
certificate chains which are then imported into a certificate
store in Schannel and then passed to various Schannel API.
Change-Id: Idb88f42f2aa15eb91c52404ee6c57bf43e983379
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Some of the enums were cast to int on comparison. That just makes it
harder to know what the values were.
And verifyClientCertificate had 4 cases which were named the same as 4
others.
Change-Id: I09e8e346a6f416236a92073cf9a8f349938d37ef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
According to reports Intel on Windows gets confused when feeding
program binaries retrieved from x86 and x64 builds into each other.
Task-number: QTBUG-64697
Change-Id: Ia7748f532ad06942a92c6fbfc4c9d1ad16bc785a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Before commit 4d15f393a7 update requests
were handled by a timer on QWindow. Therefore they survived the closing
and re-opening of platform windows. Now, as the timer was moved to
QPlatformWindow, it gets reset when you close the QWindow, and any
pending update requests are lost. However, we do set the
updateRequestPending variable on QWindow when requesting an update.
Therefore, we can also restore the update timer on the platform window
when creating it.
Change-Id: I23b00f24a46706beac7d1455edd8a5623db46b22
Fixes: QTBUG-70957
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This was a regression from Qt 4.
Before this patch, we supported filtering events only at QWindowSystemInterface
level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent,
we have to filter the events earlier. Now it is possible to enable/disable this
feature for platforms that support native event filtering.
The mapping of which events are user input events were taken from
QWindowSystemInterfacePrivate::EventType.
Task-number: QTBUG-69687
Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This patch reworks 0b1ce5db9e.
Just by looking at the source code it was unclear why is this
signal-and-slot connection necessary. It doesn't do anything on
normal exit - at the time we call dtor of this class,
QCoreApplication::instance() already is nullptr, which means that
no further event processing happens and we never get this signal.
Without digging into git history it may appear that the goal was
to process the remaining events on application exit, which would
be a questionable code by itself.
Change-Id: I202d11584901e3b52254d8e3c347aece17844b72
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The pdf engine uses a resource file, but Q_INIT_RESOURCE() was lacking.
Task-number: QTBUG-71070
Change-Id: I685961b3f2eea0ffe6b5313c72d504a8ad9a98e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Also, call it only if the state really changes. If we stay disconnected
the whole time, there is no point in trying to create the session over
and over.
Change-Id: Ic3a92dd0575bed1a23ae36a944cc51b9741fb64a
Fixes: QTBUG-49760
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
[ChangeLog][Third-Party Code] Sqlite was updated to version 3.25.2
Change-Id: I2d74ee924745a5e1edd6fe511777965313a4b77a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Added eglext_angle.h and gl2ext_angle.h to the list of header files
copied to include/QtANGLE during install. These two header files were
introduced by the recent ANGLE update but were not added to the install.
This was causing build failures when including the ANGLE headers (e.g.
in qtmultimedia).
Task-number: QTBUG-71158
Change-Id: If2f1a9ecfcdf509cccf2b3671adf575cc39892d4
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
- The only place where window flag Qt::WindowDoesNotAcceptFocus changes is inside
QXcbWindow::setWindowFlags and from there we call updateDoesNotAcceptFocus(). The
current code was redundantly calling xcb_wm_hints_set_input in various places.
- Similar as above: call xcb_wm_hints_set_normal/iconic only where it can change.
This hint depends on window state, so update it only from setWindowState().
Removed unnecessary call to setTransparentForMouseEvents(), which is already called
few lines above from setWindowFlags().
Change-Id: I8da919b135a4dfda0c8c1dad51d85d3e706153ab
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QAbstractEventDispatcher::wakeUp is a thread-safe method, using
a queued connection to invoke it is wasteful. This type of connection
involves allocating temporary QMetaCallEvent on a heap and locking of
destination thread's post-event queue. In most use cases this is ok,
and really convenient when target method is not thread-safe. But in
this case the existing solution was suboptimal, especially because
the events we are reading can be high frequency.
The solution that we use here is lock-free. There can be only one
time when it might need to wait for the lock, which is upon exiting
the application. If we have entered the critical section in
QXcbEventReader::run(), then the registered post routine (qAddPostRoutine)
will block the QCoreApplication's dtor (this is where dispatcher is
set to 0) until we exit the critical section. We also know when not
to enter the critical section, in case dtor is already running.
With this approach we might need to compete for the lock at most
once, instead of whole application lifetime, which was the case
with the existing code.
Change-Id: If6737329c972347b0050d67658e28dbaa6f552e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It is necessary for QTBUG-69687. The original code processes the xcb
event queue only when new events have arrived, but if we want to do an
event filtering that buffers some events and processes them later based
on set/unset flags (e.g. QEventLoop::ExcludeUserInputEvents), we need
to call processXcbEvents() on every event loop iteration, not only when
new events have arrived from X server.
The required functionality is implemented by having custom event dispatchers,
instead of using the generic ones from QtGenericUnixDispatcher::
createUnixEventDispatcher() / eventdispatcher_support-private. This also
enables for further customizations, as might be necessary by QTBUG-70095.
Task-number: QTBUG-69687
Change-Id: I1f8b2400d26cccf17279d57bb4b678e40c615f33
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
toolBarArea took non-const even though const would have been enough.
In the public API do this for Qt 6.
Fixes: QTBUG-45953
Change-Id: Ic99f4dd5a7f344d49d046e3b084b68120f8de3c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
We need to override this snippet for the documentation
we generate for Qt for Python, and it is easier to have
it on a separate file.
Task-number: PYSIDE-801
Task-number: PYSIDE-691
Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
In some cases, a tool tip may be shown outside screen geometry, i.e. if:
- QToolTip::showText is invoked manually with a position outside.
- In tst_QToolTip::setPalette if there is no screen at (0, 0). This might
happen in a multi-monitor setups where one screen is taller than the other.
- On Wayland windows are (by design) not allowed to know their position on
the screen. This means that global positions can't be trusted.
This started crashing when QDesktopWidget::screenGeometry(pos) was replaced
with QGuiApplication::screenAt(pos)->geometry() because screenAt will return
null if no screen is found, while screenGeometry defaulted to the primary
screen.
This reverts to the old behavior of falling back to the primary screen.
This won't solve the issue completely for the Wayland case, but at least we
will stop crashing.
Change-Id: I42dd07cc21c2f9f0ea0d69f0c25bd46d8a2615a0
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QImage's operator>>(QDataStream&) did not set an error mode on the
stream on read failures. That would break QDataStream transactions.
Since the current QImage serialization cannot differentiate between
truncated and corrupted data, we set the ReadPastEnd error as expected
by the transaction system.
Also specify the expected file format on decoding QImage from stream,
to avoid all the format handlers' canRead() being invoked. This is
necessary since some of them may call ungetChar(), which fails when
the stream is in a transaction.
Also add testing of this feature to the QDataStram transaction
autotest. That required a slight rewrite of the fake sequential
QIODevice subclass. The previous implementation had incorrect
behavior of peek(), which is required by QImage decoders.
Task-number: QTBUG-70875
Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The dependencies.json file allows to tweak the list of imports the
module is depending on, so that types implicitly imported are not
listed twice.
Task-number: QTBUG-70264
Change-Id: I7a3800e5ea713a8aaae0cddbf4e1607f92c41497
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The correct name is c++1z. Anyhow, this is easy enough to get wrong,
so make sure CONFIG += c++17 works as well.
Task-number: QTBUG-67527
Change-Id: Iea26b18824b38b1b5170f85987cf5c750b8e10ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This fixes qopenglwindow shader in the triangle
Task-number: QTBUG-67338
Change-Id: I8552183bf9ca45e9b56760b340d014ddd34c21f4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Our fallback logic for inexact matches was not very good at accepting
better suggestions.
Change-Id: I40fb78bf583171105725156148e4a2245fb81354
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Wrong option was used to set zlib compression level for png
setCompression with negative value uses default compression
setCompression with value between 0-100 converts to zlib compression level 0-9
setCompression with positive value overrides Quality option
Change-Id: Ic4b048a1e30d6940019c2a00a6c24d0c11e3f821
Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Handle both of them inside the QXcbConnection::compressEvent().
Change-Id: Ibe7184ba5c5b636013145e887c817dca701345ad
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
For details how this works refer to the documentation in the patch.
The follow-up patches will switch to calling processXcbEvents() on every
event loop iteration. With the existing code that would mean frequent
locking of shared data (event queue). Acquiring a lock is fast, but
lock contention isn't. To avoid potential problems, reimplement xcb event
processing to be lock-free. Besides theoretical performance benefits,
this definitally improves code readability in qxcbconnection.cpp. Thanks
to Mikhail Svetkin for questioning the design of the existing code.
Done-with: Mikhail Svetkin <mikhail.svetkin@qt.io>
Change-Id: I935f2b6ca802580f5c80205aef7b2f9afc172d26
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 67cc8fea10.
I forgot about this patch and now it makes rebasing the local changes
too time-consuming. Besides, 67cc8fea10 broke a build for -no-xcb-xlib.
I will restore this patch, with adaptations to the new QXcb*Connection
hierarchy.
Task-number: QTBUG-68859
Change-Id: I938f32b5da22ce18f95d761f9b34e77fff923e24
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This is a better solution for fbb485d4f6.
The existing solution was working fine, but it was exposing logic that is
internal to QWindowSystemInterface and platform plugin interaction. Some
platform plugins do event filtering at native event level - those that
support QAbstractEventDispatcher::filterNativeEvent(). Other plugins rely
on QWindowSystemInterface to do the filtering. Dispatchers should not care
about this.
The new logic rely on the fact that QWindowSystemInterfacePrivate::handleWindowSystemEvent
calls QAbstractEventDispatcher::wakeUp(). The same way postEventSourcePrepare()
rely on QCoreApplication::postEvent() to call QAbstractEventDispatcher::wakeUp().
Event sources run in the order they are attached, postEventSourcePrepare runs
before userEventSourcePrepare(). We rely on that order to pass wakeUpCalled
value.
Change-Id: I0327f4f2398fd863fb2421b8033bb1df8d65f5af
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
While this requires from us calling a deprecated method, a (non-deprecated)
method we were using gives a wrong color which is too bright/saturated.
Task-number: QTBUG-70676
Change-Id: Icebeb53e351caa646c533595ca1a886e5eb6b5b8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>