Commit Graph

37749 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
8ec98fc2dc Fix launching with depth 30 XOrg
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>
2018-10-14 20:41:49 +00:00
Alexandra Cherdantseva
1192c463db QImageWriter/QPNGHandler: Quality option should be CompressionRatio
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>
2018-10-14 19:36:33 +00:00
Gatis Paeglis
502a6cc253 xcb: localize handling of Qt::AA_Compress* flags
Handle both of them inside the QXcbConnection::compressEvent().

Change-Id: Ibe7184ba5c5b636013145e887c817dca701345ad
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-10-14 18:40:07 +00:00
Gatis Paeglis
243c3044b6 xcb: lock-free event processing
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>
2018-10-14 18:38:24 +00:00
Gatis Paeglis
a880780ff9 Revert "XCB: Do not create instance of QPlatformIntegration for invalid displays"
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>
2018-10-14 18:38:07 +00:00
Gatis Paeglis
3af4b59e8b glib dispatcher: rework userEventSourcePrepare() event source
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>
2018-10-14 13:41:16 +00:00
Timur Pocheptsov
f5204067a0 qt_mac_createRolePalettes: fix the highlight color for ItemViewPalette role
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>
2018-10-14 09:49:47 +00:00
Miguel Costa
0a7aebadfb Update ANGLE to chromium/3280
Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-13 21:36:35 +00:00
Timur Pocheptsov
656e89f875 qnsview_keys - fix a typo
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>
2018-10-13 05:10:14 +00:00
Christian Ehrlicher
bbe08d6b68 QCss: properly parse functions which contains additional spaces
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>
2018-10-12 22:01:14 +00:00
Oswald Buddenhagen
473d9a5fc7 qmake: fix the precedence of QMAKE_LIBDIR_POST
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>
2018-10-12 18:06:49 +00:00
Oswald Buddenhagen
342b13944c qmake: document {,QMAKE_}LIBS_PRIVATE
Change-Id: I6637d5f57d372f63b3cfaeb28c7e48c940887db6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:43 +00:00
BogDan Vatra
56f949ad3c Android: fix compile with NDK r18+
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>
2018-10-12 18:06:38 +00:00
Oswald Buddenhagen
405c73e495 qmake: make sure QMAKE_LIBS{,_PRIVATE} comes after LIBS{,_PRIVATE}
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>
2018-10-12 18:06:33 +00:00
Oswald Buddenhagen
2a3695b7e0 qmake: nuke QMAKE_INTERNAL_PRL_LIBS
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>
2018-10-12 18:06:21 +00:00
Oswald Buddenhagen
d30de09000 qmake: remove support for static archive splitting
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>
2018-10-12 18:06:15 +00:00
Thiago Macieira
b7887f9b4f Linux: Remove our use of syscall() for statx(2) and renameat2(2)
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>
2018-10-12 15:39:32 +00:00
Andre de la Rocha
4d51e099b3 WinRT QPA: Fix crash in QWinRTBackingStore::flush()
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>
2018-10-12 14:42:03 +00:00
Liang Qi
3eebadc173 Modernize the "mimetype" feature
Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:33 +00:00
Liang Qi
9c8ca26a48 Modernize the "codecs" feature
Change-Id: Idee19112581bff64a2e0b8e331dd3d779aca165b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:27 +00:00
Liang Qi
4e7b58629a Modernize the "big_codecs" feature
Change-Id: Ic23f4a1f81a21711cd81aaa2942b493aca5b38b8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:22 +00:00
Liang Qi
c593492d16 Modernize the "animation" feature
Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:15 +00:00
Laszlo Agocs
9098ef697a windows: Disable shader disk cache for all Intel GPUs
Follow up to dff9bb2f9b

Task-number: QTBUG-64697
Change-Id: I73a114dd3c75f3ed1272fa73dad378ecfdc0db09
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-12 14:09:38 +00:00
Martin Storsjö
d92c25b1b4 qmake: Fix building with lld with mingw makefiles
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>
2018-10-12 14:01:59 +00:00
Allan Sandfeld Jensen
8d2deea49c Report compiler and version in configure overview
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>
2018-10-12 13:24:19 +00:00
Gatis Paeglis
8315acfb16 Revert "glib dispatcher: ensure all window system events are flushed"
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>
2018-10-12 10:21:32 +00:00
Gatis Paeglis
466d65cd5b xcb: remove runtime check for xcb_poll_for_queued_event
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>
2018-10-12 10:21:22 +00:00
Kai Koehne
0509383cf2 Bump copyright year in executable metadata
Change-Id: I67d06eae963c7fbbbbf13c5f9ab1195cbc5d7eb1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 09:36:21 +00:00
Eirik Aavitsland
0d7c049e44 Update bundled libpng to version 1.6.35
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>
2018-10-12 08:14:03 +00:00
Andy Shaw
dc5f9d0c31 Only use a translucent background if there is support for alpha
Change-Id: Ia8d9e543fac4b6e790fa38cf04c5a782d72d72df
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-10-12 07:26:55 +00:00
Paul Olav Tvete
091a386eaf Use native visual ID when creating GBM surfaces for KMS
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>
2018-10-12 07:22:57 +00:00
Anton Kudryavtsev
02f7caaa7d QPixmap: use rvalue more
Change-Id: Ifb8c014abf6e02dc782fab2d653e4edfc4972125
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-10 12:20:32 +00:00
Allan Sandfeld Jensen
f864a62ccd Add missing null checks after detach
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>
2018-10-10 08:23:31 +00:00
Mårten Nordheim
4dc251879c Ssl: Fix contrived crash when calling resume
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>
2018-10-10 07:45:09 +00:00
Martin Storsjö
9436e3c315 configure: Treat win32-clang-g++ the same as win32-g++
This fixes configure with win32-clang-g++ as the native compiler.

Change-Id: Iced43d70b9a0aa413d1f5f6034b42b976cb7c39e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-10 04:10:40 +00:00
Lorn Potter
49f1f944bc wasm: rewrite QNetworkReplyWasmImpl to remove EM_ASM
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>
2018-10-09 20:44:24 +00:00
Allan Sandfeld Jensen
b7c5c2e65b Add NEON optimized ARGB32 unpremultiply routines
Mirroring similar routines recently added for SSE4.1

Change-Id: Ibb9d10cc34655ce1dc0e97fdff4e4f6a81d47d05
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-09 13:17:47 +00:00
Allan Sandfeld Jensen
25830cf912 Fix builds without DTLS
Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b
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>
2018-10-09 13:14:42 +00:00
Edward Welbourne
ba0ff45109 Update the DNS public suffix list from publicsuffix.org
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>
2018-10-09 09:43:48 +00:00
Eskil Abrahamsen Blomfeldt
5c94130a67 doc: Document version of bundled Freetype in qt_attribution
Task-number: QTBUG-70901
Change-Id: Ibc330320cf3851e9aed13a66a3552bd8b2ad34da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-09 06:26:52 +00:00
Lorn Potter
b2fd16b478 wasm: fix parse error
Task-number: QTBUG-70952
Change-Id: I8a39de1d16b5301d221be4e9e47cabd4827b71aa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-08 23:46:41 +00:00
Marc Mutz
8e5a2f63c3 Fix UB (invalid pointer comparison) in QList, QVector, QVLA
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>
2018-10-08 16:18:53 +00:00
Edward Welbourne
55d640483c Update 3rdparty valgrind headers to Valgrind 3.13.0
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>
2018-10-08 14:18:54 +00:00
Edward Welbourne
bc099f33dd Support QCborMap::operator[] taking a string literal
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>
2018-10-08 14:11:23 +00:00
Edward Welbourne
ff7f09d187 Change QCborArray to pad with invalid on inserting past end
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>
2018-10-08 14:11:08 +00:00
Christian Strømme
7f079bf9d0 Android: Update the targetSdkVersion in the manifest to 28
Change-Id: I9fe8117ed75f82638b6a03166434bf83e23f166f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 11:14:03 +00:00
Christian Strømme
52813712c4 Default to no style extraction on Android P when the target SDK is < 28
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>
2018-10-08 11:14:01 +00:00
Liang Qi
1170e707b7 Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-10-08 11:10:14 +00:00
Alexandru Croitor
836a2fb887 [macOS] Fix position of sheets when using unifiedTitleAndToolBarOnMac
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>
2018-10-08 10:38:37 +00:00
Qt Forward Merge Bot
b4da5c6b93 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/tools/qtimezoneprivate.cpp

Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
2018-10-08 10:00:49 +02:00