Commit Graph

27251 Commits

Author SHA1 Message Date
Anton Kudryavtsev
e27c07389b QString: adapt chop() auto test as data-driven test
Thiago Macieira asked to do that.

Change-Id: I9a07dad7ff2bfebc2f863e0e9f151aab66450bcf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-11 13:22:46 +00:00
Sérgio Martins
a0bb2fc406 Fix typo in QStyle documentation
Change-Id: Id1f65dcc473effbdd0ccd7362b2986382c827ed8
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-07-09 10:39:19 +00:00
Gabriel de Dietrich
38b09d3421 QCocoaMenu: Attach late items to their submenu
Because the QMenu::aboutToShow() signal is emitted
way after -[QCocoaMenuDelegate menu:updateItem:
atIndex:shouldCancel:], we miss the opportunity to
attach the submenu to the menu item.

The solution is to track the "open" state of the
NSMenu. Then, if any submenu item gets added while
the NSMenu is open, then we immediately attach the
native item to the menu.

Change-Id: I1f3a84ed3832520344da07e06cb3483ad6bd4ffd
Task-number: QTBUG-54633
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-07-08 20:18:20 +00:00
Anton Kudryavtsev
6bafb9da71 QString: fix incomplete doc of chop()
Change-Id: I84de848681e793e68e0c290719a7f961aca48f4e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-08 06:43:06 +00:00
Andy Shaw
deb2728a86 [macOS] Check that the screen's index is still valid after updating
It is possible for a screen to be disconnected while it is doing an
update of the available screens. Therefore before returning the pointer
to the screen then it should be rechecked that the index is still within
the range of available screens.

Change-Id: Iaa08070e79a72cb309d8a24cea786a5dccf6b719
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-08 05:19:32 +00:00
Friedemann Kleint
14c6f80f4b Testlib: Replace QString::arg() formatting by snprintf()
Formatting of values needs to be fast since QTestlib always
pessimistically formats the values passed to QCOMPARE even if
they match.
Speeds up tst_qrect by factor 1.5..2.

Task-number: QTBUG-38890
Change-Id: I3627db77a305a46c1d51a14c04b88db8018faa60
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-08 05:06:32 +00:00
Boris Pek
c8aa7eda3a Fix build of the minimal platform plugin for MS Windows
when qtbase is configured with -fontconfig and -system-freetype.

This fix is necessary after 060e0f6628.
Used the same approach as in 16864c42d6.

Change-Id: Idece0dc11d89e38266c95de1769be751c06324ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-07 19:26:20 +00:00
Anton Kudryavtsev
b36c6bab8d QString: add auto test for chop()
Change-Id: I8fc65c65776a64cc92e8cba3993d17746be81ba1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-07 15:03:30 +00:00
Alexandru Croitor
b6c10cf331 Improve lookup speed for QAccessible::uniqueId
When QAccessible::uniqueId was called, it would call QHash::key(),
which has linear time performance. This can cause application
slowdown if a big number of QAccessibleInterface Ids have to be found.

The patch adds an additional QHash to keep track of the inverse
relationship from QAccessibleInterface pointers to their Ids.

Change-Id: I975e3dc0e6c628e2ea701323d8b87184ad133cfb
Task-number: QTBUG-54491
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-07-07 14:50:00 +00:00
Ralf Nolden
3658354a7d OpenBSD: redefine g++/gcc commands to eg++/egcc to use newer gcc 4.9
On OpenBSD, the system compiler shipped is still gcc 4.2.1 but for proper
C++11 support in Qt, QtCreator and Qt-based projects we need to use
the compilers provided in ports/packages which have the binaries renamed
to eg++/egcc. Therefore, redefine the variables from g++-base.conf to
use the newer compilers.

Change-Id: Ic8ea1c5d2c2c0263dad5ae85c8c747bcd3985b7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-07 09:24:53 +00:00
Roger Maclean
abc29084fa QNX: Ensure invisible 1x1 raster windows are posted.
Non-top level raster windows still have screen windows associated
with them though they are not intended to be visible.

This causes problems if they have children (as they do when QGLWidgets
are used) since their children will also not be visible.

So, if we have a window with a parent, force them to post but set the
transparency to discard so they remain invisible.

This allows the example hellogl_es2 to run correctly.

Change-Id: I67e24dc59b29ce789376498c2477349fa50020e1
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2016-07-06 18:15:48 +00:00
Thiago Macieira
1575f2fc3c XCB: Update the high DPI scaling in more conditions
I don't think fae8ee8b42 was enough. I've
started getting small fonts in Qt Creator under some other
circumstances.

Change-Id: I1cc7601489634e96833cfffd1456caea823aa84a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-07-06 18:09:19 +00:00
Gabriel de Dietrich
16fefc258e Remove QCoreTextFontEngine::supportsColorGlyphs
This is always true on the versions we currently support.

Change-Id: I1aecbbd1f41e0f4f03b380358cd762ca00bb1e97
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-07-06 17:37:24 +00:00
Gabriel de Dietrich
9d620483c6 QCocoaTheme: Remove unreachable code
The condition
    iconType != kGenericApplicationIcon
is never false, therefore we will never execute
the else statement. Consequently, overlyaIcon
will always be null.

This was triggered by the deprecation of
ProcessSerialNumber related APIs since 10.9.

Change-Id: If9eec1d2cc6e7e5b0c5323d4550f0c823a5eb0d8
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-07-06 17:37:04 +00:00
Marc Mutz
631b143b3f QComboBox: fix crash on setEditable(false) called from editTextChanged()
QLineEdit::setText() emits QLineEdit::textChanged(), which is
connected to QComboBox::editTextChanged(). When a user slot
connected to editTextChanged() sets QComboBox::editable to
false, the line edit will be deleted in setEditable() and
when control returns to QComboBoxPrivate::setCurrentIndex(),
the formerly non-null 'lineEdit' has changed to nullptr,
leading to a nullptr dereference when attempting to set the
completionPrefix on lineEdit->completer().

Fix by re-checking 'lineEdit' after returning from the
QLineEdit::setText() call.

Add a test.

Task-number: QTBUG-54191
Change-Id: I94154796cfde73fb490f8471c48b9d6f62825a92
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-06 10:34:43 +00:00
Marc Mutz
a91d0dd369 Q_(U)INT64_C is not a type, so don't use it as if it was
These expressions only work because they contain no non-parenthesized
commas and an int literal is last.

Fix by wrapping only the integer literal in Q_(U)INT64_C.

Change-Id: I6b8e508b6c7c022f4b3342f65c26aab89ce17702
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-06 10:34:38 +00:00
Marc Mutz
4927fdb389 Fix misleading code in QAbstractSpinBox::event()
A static_cast never returns nullptr unless its argument
already was nullptr. But we dereferenced 'event' already
by the time we reach this code, so the if is always true.

Fix by removing the temporary variable.

Change-Id: Ia869d37eda74f0bcdd616e1f57f429cc86e9e525
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-06 10:34:34 +00:00
Olivier Blin
3cc2884c03 Fix defining QGuiApplication::sync() when QT_NO_SESSIONMANAGER is set
sync() is unconditionally declared in the QGuiApplication header, but
the definition was under QT_NO_SESSIONMANAGER guards.

This commit moves the definition of sync() outside of
the QT_NO_SESSIONMANAGER guards, since the sync code has nothing to do
with session management.

[ChangeLog][QtGui][QGuiApplication] Fixed a bug that would cause
QGuiApplication::sync() to be left undefined for Qt builds without
session management support.

Change-Id: Ieb46f7c90c9193e89469126170117d9df672f4cb
Task-number: QTBUG-51703
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-06 09:09:35 +00:00
Andy Shaw
8f85e82c5d Windows: Handle theme switching correctly if a palette is set
If a palette is set on the application object and the user does
something to trigger a theme change, i.e. connects via remote desktop
or logs out and in again, then it will cause Qt to render incorrectly.
Therefore we should only update the palette from the new theme if we
don't have our own already set.

Task-number: QTBUG-52962
Change-Id: I4e2288efd82ad98b698cc09f26ad188064ec7b2a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-06 08:47:01 +00:00
Friedemann Kleint
a9613ba3f1 Testlib: generate_expected_output.py: Run in C locale
Otherwise, float numbers are formatted using a decimal comma
in German, causing huge diffs and failures.

Change-Id: Icd85a293d0564cac6be244eb0793611920d0c89c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-05 15:00:58 +00:00
Ralf Nolden
b7744e0b05 Replace LLINDEX macro not present on all BSDs with the code
FreeBSD < 10 doesn't have the LLINDEX macro either in net/if_dl.h, so besides
OpenBSD yet another condition to declare the LLINDEX macro for systems where
it isn't present does make it more complicated than replacing its usage with
the actual code.

Change-Id: I7e8ef3e265564526e05ec3115f9fa765d399f045
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-03 10:54:42 +00:00
Giuseppe D'Angelo
daade9b90d QEventLoop: better describe the exception safety of Qt
1) In general it's unsafe to let exceptions propagate through Qt code,
so document that.

2) Add a note that overriding notify() makes sense only in Qt 5, in Qt 6
it's going away.

3) The advice applies also to applications not using QApplication, but
just QCoreApplication.

Change-Id: I4f6e74c53da757faf2eeaa9de226ceba55c52536
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-07-02 19:36:10 +00:00
Thiago Macieira
3b5db8f3a6 Examples: Fix stringification of the Qt version
(QT_VERSION % 0xffff00) is useless for now, as QT_VERSION < 0x1000000
(for now). The author of this code probably meant to use bitwise-AND.
But even that is unnecessary as the right shift discards the lower 8
bits anyway.

Change-Id: Ie585843cfb684bc3b6e3fffd145d533b05288dfc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-02 16:38:39 +00:00
Thiago Macieira
946c1a578a Fix build: ftok(3) requires sys/ipc.h
Task-number: QTBUG-54069
Change-Id: Ib57b52598e2f452985e9fffd1457fa9c7ad3bac0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-07-02 16:37:03 +00:00
Thiago Macieira
4f3eb66173 QUrl: Test that we do correctly accept valid schemes
... and reject invalid ones. There was one error: we accepted schemes
starting with pluses, dashes and dots.

Change-Id: Ie585843cfb684bc3b6e3fffd145cfe12227ec4ad
Reviewed-by: David Faure <david.faure@kdab.com>
2016-07-02 16:36:50 +00:00
Thiago Macieira
cf9b445ed4 Fix the naming of an LLVM tool in common/clang.conf
Probably was copied from the gcc equivalent.

Change-Id: I87e17314d8b24ae983b1fffd14535b9d7f616a1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-02 16:35:01 +00:00
Olivier Goffart
9cb8ca2b55 Allow to drag a QDockWidgetGroupWindow into one of its QDockWidget
This fixes the 2. of QTBUG-52108

Change-Id: Id887f470c7822f6b264d6b739e8658d9809f6609
Task-numer: QTBUG-52108
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-02 13:07:29 +00:00
Olivier Goffart
27df6cb32d Fix the QMainWindow context menu when there are floating tabs
If QMainWindow::GroupedDragging is enabled and there are QDockWidgetGroupWindow,
we should still show actions for these QDockWidgets in the context menu

Addresses point 4. of QTBUG-52108

Task-number: QTBUG-52108
Change-Id: I11ae401c4fe15e213b0f26e7579634e2062e953c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-02 13:07:21 +00:00
Urs Fleisch
3d621af54b xcb: Send also "text/plain" when a "text/uri-list" is dropped.
This will allow dropping of files from Qt applications to applications
like Skype, which only accept "text/plain", but not "text/uri-list" or
"text/x-moz-url".

Task-number: QTBUG-53238
Change-Id: I01bca5c8e20647cedfc9323f542ab07f0cc48658
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2016-07-02 09:03:43 +00:00
David Faure
1af4916e11 QTime: restore Qt3 compatibility in the QDataStream operators
A Qt5 program writing a null QTime() using setVersion(QDataStream::Qt_3_3),
and then a Qt3 program reading that, would lead to a weird QTime,
with isNull=false, isValid=false, hour=1193, minute=2, second=47, ms=295.

This commit restores interoperability, by writing out the expected value
(0) for a null QTime rather than the -1 value used by Qt4 and Qt5.

Change-Id: Icde468a8f6fc9434ef7018296725819b44d672af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-02 08:13:44 +00:00
Kai Koehne
9964b850ad Doc: Improve QJsonDocument::fromJson documentation
Be explicit on how to check whether parsing succeeds.

Change-Id: I44f408cb6e5a830826b84dfb3a8af331f03e58cc
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-07-01 14:55:29 +00:00
Andy Shaw
c3f645a24a Windows: Add support for the PdmDevicePixelRatioScaled metric
Change-Id: If65018a86e386a54f40ee12e81b5137e3412d655
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-07-01 11:42:52 +00:00
Ralf Nolden
cc42979e46 NetBSD: add QMAKE_RPATHDIR for standard QMAKE_LIBDIR
NetBSD is heavily dependent on using rpath, so we need to add the
lib dir QMAKE_LIBDIR and QMAKE_LIBDIR_X11 to QMAKE_RPATHDIR
explicitly to avoid linker errors. See http://www.netbsd.org/docs/elf.html
for more info.

Change-Id: I225143d5e2d9a125060b14e3a8a7953927d63b33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-01 07:53:07 +00:00
Giuseppe D'Angelo
890edc45d8 QSslSocket: improve documentation of the supported protocols
1) To describe a protocol version we should use an "ordinary" name,
not use the values out of the QSsl::SslProtocol enum.

2) Say that we support the latest stable TLS version (1.2, not 1.0).

3) Fix a statement about which protocol is the default one.

Change-Id: I18732914d55060a0c3920f7082f986c262a71ded
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-07-01 07:49:24 +00:00
Maurice Kalinowski
1e662ff166 winrt: Set minimum SDK version to 10586
10586 reflects Update 1, which is the mininum supported version for many
months, hence reflext this in the manifest template as well.

There are additional features (like drag and drop) which require and
even later SDK version. However, they do not reflect the minimum.

Change-Id: I6d71dc499c928ed98c8a25283e0b53994317bb00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-01 07:45:07 +00:00
Oswald Buddenhagen
d0055e9fd7 nuke dead expandVariableReferences() overload prototype
Change-Id: I0c6fceac0b984e4613932b8507a632dd83d0e79b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-30 15:49:58 +00:00
Friedemann Kleint
25db59d772 Fix QLineEdit not showing clear button on macOS
Restore code path returning the resource pixmap for platforms
that do not have themes in QCommonStyle.
Amends change b657496a0b.

Task-number: QTBUG-54425
Change-Id: I764408622b825b86afbe7ccf37e1498d3efb3850
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-30 08:03:14 +00:00
Alexander Volkov
c376e3fbf0 QDir: Remove redundant QString wrapping
Change-Id: I8368b137d15509cdec575a17f5dae3c0c343400f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-30 15:28:30 +00:00
Edward Welbourne
f3df265a38 QDateTime: early return to make a Q_UNREACHABLE actually true.
It could be reached when QT_BOOTSTRAPPED was defined.

Change-Id: I632d6f908a3bcbde81a6ebbadcaf2800dfe1449d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-30 12:27:00 +00:00
Maurice Kalinowski
dfd62a8f36 winrt: Clean up function signature
Change-Id: I006d4a2295103c8e4169945dfb451ee55598ec87
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-30 11:54:30 +00:00
Maurice Kalinowski
ed32af3506 winrt: fix conditional
Seems the previous check was a leftover from debugging. Tests still pass
and loop checks properly now.

Change-Id: Ic12cd49881f6d146687e257794b3028f6c8e874c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-30 11:54:26 +00:00
Timur Pocheptsov
faeaddc1b9 QSslSocket::transmit (macOS/iOS) - do not use invalid context
1. QSslSocketBackendPrivate::transmit can invalidate SSL context
  causing subsequent SSLWrite or SSLRead calls to fail; these report
  errSecParam (as null context is an invalid parameter) spuriously,
  when we should rather report the cause of invalidation.  The OpenSSL
  backend can trigger this when it aborts connection during an SSL
  handshake, on an sslErrors signal.  As transmit() emits readReady(),
  a directly connected slot can trigger the same problem if it aborts or
  closes.

2. If during peer verification (and in checkSslErrors) we disconnect
on sslErrors signal, peer verification must be considered failed and
should not continue handshake/set connectionEncrypted.

Task-number: QTBUG-52975
Task-number: QTBUG-53906
Change-Id: Iacd3b489a4156e25ef3460ace40d21f34a946bed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-30 08:04:55 +00:00
Olivier Goffart
7a8330ddf7 Fix QDockWidget losing decoration on undocking when GroupedDragging is enabled
We should not remember the wrong undocked geometry. If the dockwidget is not floating,
the geometry is not relative to the global coordinate, it makes no sense to store it.

Task-number: QTBUG-53808
Change-Id: I242467d8da62d7c787eca2c784aeec646236cb44
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-30 07:52:46 +00:00
Bernhard Scheirle
db1a6ac357 Fix shortcut handling for level three and above shortcuts
Calling `xkb_state_update_mask` with correctly set `depressed_mods` allows xkb to
return keys on level three or above (and not the equivalent level one key).

To preserve level two shortcuts (return equivalent level one key)
`depressed_mods` gets only set, if the pressed key is on level three or above.

Example shortcuts which now will work:
  Shortcut  German Layout (de) [AltGr is a level three switch]
  Ctrl+@    Ctrl+AltGr+Q
  Shift+1   Shift+1  (as before)

  Shortcut  German Neo Layout (de neo) [1] [AltGr is a level five switch]
  Left      AltGr+S

[1] http://neo-layout.org

Task-number: QTBUG-53121
Change-Id: I637a01edc9f2f92a5d3e7a24f5051fb1d3ac2f7f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2016-06-30 07:11:15 +00:00
Friedemann Kleint
2714d94ff4 Fix tst_QNetworkReply::qtbug45581WrongReplyStatusCode() on Windows
The file is read using CRLF line convention on Windows.

Task-number: QTBUG-24226
Change-Id: Ie08fa603e29c80a42de4bfbfd1f4237f53c22b98
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-06-30 07:07:11 +00:00
Friedemann Kleint
df9aee2150 Fix URL to ANGLE
Point to the README.md of the project; the old URL
http://code.google.com/p/angleproject is now redirected
to the bugtracker.

Change-Id: I293fc150d5b6c08f16effe8921010050faa264b5
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-06-30 07:06:39 +00:00
Friedemann Kleint
596ce989b5 Windows QPA: Improve warning about SetProcessDpiAwareness() failure
Silence warning in case DPI awareness was set externally unless
debug is enabled.

Task-number: QTBUG-54416
Change-Id: Id48769e3d4be3047f582e331633905c640930f21
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-06-30 07:06:30 +00:00
J-P Nurmi
be6921e860 Doc: fix app type notes for QDirModel and QFileSystemModel
"GUI application" is quite confusing, because in fact, these models
are part of QtWidgets and thus require QApplication instead of
QGuiApplication.

Change-Id: I35ccc8bfeb74c75a84b2ffbe1cab0c0839495980
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-30 06:19:52 +00:00
James McDonnell
0d720a000f Improve SQLite3 configuration test
Reference an SQLite3 function to verify that the library is being
linked.  Discovered that the test didn't do this when I switched the
Windows configure to use a compile test to determine whether the
system has SQLite3.  The test passed even though the initial
configure changes failed to provide the test with information about
the SQLite3 libraries.

Change-Id: I3114cfc2dec3a42a60c8e1e432eb8375b440d7e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-28 14:36:01 +00:00
Laszlo Agocs
2a7cee47e5 Avoid artifacts when hiding or closing a QOpenGLWidget or QQuickWidget child
windows and xcb enables SwitchableWidgetComposition meaning that widget
backing stores will fall back to the normal flush path when no render-to-texture
widgets are visible anymore in the window. This switch however can lead to
artifacts with the image of the rtt widget remaining visible until the next
full bacinkgstore sync. The safe and simple way around this is to do the
switch only in the next flush, keeping the flush where the switch is
discovered on the OpenGL-based composition path still.

Task-number: QTBUG-54241
Change-Id: I1d3f10999f69c58efa791dd724891add56949dee
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2016-06-28 06:48:39 +00:00