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>
that resulted in 'Cmd' reported as combo of Qt::Meta/Qt::Control and
Qt::KeypadModifier.
Task-number: QTBUG-71006
Change-Id: I3dddc56f4d404a1ceefb21d57ac120b6273456ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When there were additional spaces between the function definition and
the first parameter, the parser failed to parse it when it contained
another function (e.g. 'qlineargradient(... rgb() ...)').
The reason for this was that ::until() needs the function at index-1 so
it can correctly count the opening parenthesis.
Fixes: QTBUG-61795
Change-Id: I992f556e7f8cd45550f83bc90aa8de2b4e905574
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
it must end up in front of QMAKE_LIBS{,_PRIVATE}, but not of
LIBS{,_PRIVATE} (which are preceded by QMAKE_LIBDIR).
Task-number: QTBUG-61982
Started-by: Liang Qi <liang.qi@qt.io>
Change-Id: Id3de01ee0e9b66af02f79949aeb5a0eabd55363f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In NDK r18, libc++.so was renamed to libc++.so.XX where XX is the Android
API level.
[ChangeLog][Android] Fixed build issue with NDK r18+.
Task-number: QTBUG-70631
Change-Id: Id0d2955648197e3054e3c69263b5a90d57964f6c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
the early merging of LIBS* into QMAKE_LIBS* meant that we could not
interleave them properly. defer the merging until the points of use.
Task-number: QTBUG-70779
Started-by: BogDan Vatra <bogdan@kdab.com>
Change-Id: I890f98016c3721396a1f0f6f149a9e2b37d56d8e
Reviewed-by: Liang Qi <liang.qi@qt.io>
it's unused now, and just complicates matters. its interaction with
LIBS_PRIVATE & co. has always been a bit shaky. google produces no
public hits outside qt itself, so let's assume it really remained
internal.
Change-Id: I6606bbabd44f1b76d84e97219e155e38d6f1b3a6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
this was introduced in 2002 supposedly for qnx4, but doesn't appear to
have actually been used ever. remove it, as it's in the way now.
Change-Id: I54dcabb61e1d3609a1e7a9fa4ff4b25509cfdb7a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Those system calls are present in glibc 2.28. Instead of using
syscall(3) to place the system calls directly, let's use only the glibc
functions. That also means we no longer accept ENOSYS from either
function, if they were detected in glibc.
Change-Id: I44e7d800c68141bdaae0fffd1555b4b8fe63786b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
QWinRTBackingStore::flush() was not considering the possibility
that the supplied region may fall partially outside the bounds
of the paint device. This resulted in possible accesses to invalid
memory addresses, causing a crash. This bug was exposed by an update
in ANGLE that was causing a crash when running tst_QTableView::bigMode
with a small screen size. With this fix the function will use the
intersection of the supplied region with the paint device bounds.
Change-Id: I2f0f0f7f5510688bfa1459320a0c146df6be65d1
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
lld for coff/mingw doesn't support linker scripts, which qmake used
for passing larger numbers of input file names to the linker.
Instead of using a fullblown linker script for this, just use a plain
response file, which both lld and binutils ld support.
Change-Id: I3aace7902fa6ca861a0a9fe67feaa236e7ea417b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
It is not always easy to spot the compiler version in the build or
configure log, so report it explicitly to make our lives easier when
trying to figure out why a specific build might have failed.
Change-Id: I1c84199aad4a98a30b0b4c4fbf2554008dc3ba2d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This reverts commit 341bfcd1ea.
As it turns out there might be use cases where we want to have proper
windowing system event integration with glib dispatcher via g_source_attach().
For example with gtk_dialog_run, where GTK blocks in a recursive main loop.
We want to continue dispatcing our windowing system events during this nested
event loop. Not having a proper glib integration can result in rendering issues,
e.g. when resizing parent window via mouse while GTK-based dialog is shown. Can
be seen on examples/widgets/richtext/textedit/ -> Format (from menu) -> "Color..."
The issue from 341bfcd1ea actually should be fixed inside XCB platform plugin,
by improving integration with event dispatcher. That is handled in follow-up patches.
Change-Id: Icabc6d841a554aefbdd460765a3165d22e65f651
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
xcb_poll_for_queued_event() was introduced in libxcb 1.8.
The minimal required libxcb version was bumped up to 1.9 in
1f5d791708. Before this version
bump we needed the runtime check to support older versions
of libxcb.
Updated connections in the event reader to use the new signal
and slot syntax. Removed threadedEventHandling() method because
now it is always 'true'.
Change-Id: I0bce61fd478a871d35e676239ee5280c4f40be8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The remaining diff to clean 1.6.35 is archived in the qtpatches.diff file.
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.35
Change-Id: I925b3d95f6da20e12fc3274b4713e3fea05094f7
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
According to the Khronos documentation, gbm_surface_create() will give
a BAD_MATCH error if the format does not match the EGL_NATIVE_VISUAL_ID.
Newer drivers have started to enforce this.
Change-Id: I61360b0f52965ad8057e7de8f824ffca64fea904
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
A few places we didn't check if detach() succeeded including
in reinterpretAsFormat(), where it can be undone.
Task-number: QTBUG-70785
Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
If you, directly after connecting, call "ignoreSslErrors()" followed by
"resume()" then you will most likely crash.
It is very contrived and there's no reason to do this.
Change-Id: I949a303238f5012296d0e84eb76173764eb9de2e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This fixes configure with win32-clang-g++ as the native compiler.
Change-Id: Iced43d70b9a0aa413d1f5f6034b42b976cb7c39e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
and fix handling of incoming binary data
Change-Id: I31e97505ad4ff64cf8e380df5d0d6b70c3cd60b0
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
It has had some changes and should be kept up to date.
Fixes: QTBUG-70386
Task-number: QTBUG-70852
Change-Id: I868a558811c34cf5a800c3087a0ca96e7fb49b1a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QList, QVector and QVarLengthArray check the validity of iterators
passed to member functions using isValidIterator(), which checks that
the underlying pointers are in the range [begin, end]. This check is
well-defined when the outcome is positive, ie. when the iterator is
valid. But if the iterator is not valid, and does not happen to point
into [end, begin + capacity], the comparison, which uses normal
operator<, invokes UB.
Fix by using std::less<T*>, which defines a total ordering.
Change-Id: I1e5757789b4b9779f5e3e298e7f2b2dd0b27576c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The version we're using is at least seven years old.
Let's try staying up to date ...
Change-Id: I450a2fc37c22740fe554a81b471bf0fad340498e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use a template on the size of the char[], as suggested by Ville
Voutilainen. This resolves ambiguity about whether such look-ups
should be done via QString or QCborValue (not that it would have made
any difference).
When we come to add mutating indexing of QCborValue, chained
dereferences like map[i][j][k] need to stay in operator[] const
throughout, to avoid detaching intermediates to create references into
them due to using the mutating operator[] on the earlier dereference's
return. So const-qualify the QCborValue operator[] const variants at
the same time, to match those of QCborValue itself.
Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Likewise have mutating operator[] insert an invalid entry at its
target index, if beyond the end of the array. This makes it possible
to fill an array from high index to low, for example.
Change-Id: If71699c20e2623142214ce2c11c4d6e4a120c989
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Applications with target SDK version lower then 28 running on a device
with version greater or equal to 28 will cause compatibility warnings,
so default to none when the extract_android_style value is set to
default.
Note that the new value "default" was introduced to allow this kind
of changes in the future, i.e., selecting the best solution based on
some simple heuristics. Adding a new value also keep compatibility and
allows the user to explicitly set a value when needed.
Task-number: QTBUG-69810
Change-Id: I68301716767870ce6de40e45742d9c5fc263ee25
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Modal sheets are supposed to appear below the toolbar if a toolbar
exists, or below the title bar if a toolbar doesn't exist.
In the unified title and toolbar mode, sheets should to appear
directly below the toolbar, if the toolbar is positioned at the
top of the window.
Code-wise we achieve that by calling setUnifiedTitleAndToolBarOnMac on
a QMainWindow, which results in adjusting the top content border of
the NSWindow via [NSWindow setContentBorderThickness:forEdge], which
Cocoa uses to position a modal sheet (the sheet top edge is aligned
with the top edge of the content view + the Y border thickness
value).
The issue is that because NSWindow.titlebarAppearsTransparent is set
to YES, for sheet presentation purposes, Cocoa considers the content
view to begin at the position of the top left corner of the
frame (where the title bar is), and thus sheets appear somewhere
in the middle of the unified toolbar.
To fix that we need to account for the title bar height in the
border thickness value.
Compute the title bar height from the window frame height - window
content view height, and add it to the top border thickness value.
Amends 8ac9addd94
Change-Id: Icf85c513035cc3710b438e60eb14dc04c5bbaced
Fixes: QTBUG-65451
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>