Commit Graph

28631 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
3cae115d6d Correct compositionMode documentation
Most composition modes require an alpha-channel to be meaningful, but
not all, and there is no requirements of specific formats.

Change-Id: I11e930ccc07e9ff5df06dbda6745e4afb79f5e08
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-05-23 18:21:03 +00:00
Friedemann Kleint
ffd99e1d18 Add section "Getting Started" to QPlatformHeader's documentation.
Change-Id: Id57c65a5f5281ed0ff8f4e5876cf121781f2ae90
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-05-23 14:05:15 +00:00
Ralf Nolden
644d0e7524 Cleanup NIS support leftover from Qt 3/4
Qt 3/4 had NIS configure options and tests for NIS defines,
those were used in QPrintDialog at the time to support
NIS-printers. As the implementation went away a long time ago
and no NIS featueres are implemented anywhere in Qt, the
configure options and config.tests for NIS can be removed.

Change-Id: Ie920e6a422540bf938623265b6ee68c793aeff84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-23 13:48:23 +00:00
Allan Sandfeld Jensen
f15c0b695a Optimize QImage checkForAlphaPixels
This routine is often called to down-convert pixmaps and backing
stores to RGB32.

This patch replaces a comparison in each pixel, with a single AND in
each pixel and a comparison at each line. The new form is also auto-
vectorized by at least GCC.

Change-Id: I3e07585a3ec12f888321d35da57ac99b561dbec4
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-05-23 13:31:57 +00:00
Laszlo Agocs
1937a4e8b9 Add a workaround for render-to-texture widgets in fullscreen windows
The performance optimization of falling back to flushing windows the normal
(raster) way once no render-to-texture widgets are visible has issues with
fullscreen windows, presumably due to the compositor's special handling of
such windows. Disable our smartness and stick with composeAndFlush for
ever in case the window is fullscreen.

Change-Id: Ifb31e0d36bd0a3933fcfe55a9a7d502513d6e3cf
Task-number: QTBUG-53515
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-23 12:37:34 +00:00
Laszlo Agocs
bdb1c18e41 windows: Fall back to D3D9 when 11 fails
It is assumed that this happens automatically but that is not always the
case. Do not become stuck with a non-functional D3D11-backed EGL environment.
Instead, try again as if QT_ANGLE_PLATFORM=d3d9 was requested.

Task-number: QTBUG-52056
Change-Id: I12ac6ca5f1d06f9504d05120d8e1053e97edfab3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-23 12:37:23 +00:00
Ralf Nolden
5c6d27b8df Make eglfs-egldevice check work with pkgconfig as well
Until now the check didn't use pkgconfig at all, but using pkgconfig
alone does not work for some devices (special cases), so we have to
use a combination of both here.

Change-Id: Ia19a279d80a65352c467661d91a3762448c23ae6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-05-23 11:24:36 +00:00
Lars Knoll
aa2a310267 Deprecate QLibraryInfo::licensee()/licensedProducts()
This info wasn't really very helpful, and would anyway always
contain either Preview, OpenSource or an empty string for
commercial users.

Change-Id: I311b991834fa83cf1a183083acd5112cda3d2e41
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-23 11:19:45 +00:00
Edward Welbourne
932cce18f7 QSocks5SocketEngine: connect after auth fail as if connecting afresh.
If the client has responded to an earlier auth fail sensibly, further
use of the socks connection probably means we have fresh credentials.
So treat AuthenticatingError like Uninitialized.  This makes
tst_QNetworkReply::authenticationCacheAfterCancel(*+socksauth) work
again.

Task-number: QTBUG-51545
Change-Id: I237ca5a3194b093cc6480dd33aa7709b7b584941
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-23 10:55:00 +00:00
Ralf Nolden
5f02feae05 Compile fix: add -lexecinfo on NetBSD and OpenBSD
Add -lexecinfo for backtrace(3) on NetBSD and OpenBSD. Without,
qlogging.cpp linking will result in undefined references to backtrace
and backtrace_symbols. The behavior required is identical to FreeBSD so
no additional fixes are required (see src/corelib/global/global.pri:41)

Change-Id: I3cfd1d75f1fb5b8505c08a880f91e7b39a5a650d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:39 +00:00
Ralf Nolden
e3d1058ae9 Compile fix for NetBSD: only BSD using statvfs, disable f_flags define
Compile fix for NetBSD's use of statvfs having f_flags.All other BSDs use
statfs instead of statvfs, so the f_flags define needs to be prevented
on NetBSD.

Fix obtained from Kamil Rytarowski <n54@gmx.com>, NetBSD qt ports
maintainer.

Change-Id: Ifbd7ba0cba7f6cf280f5984c64abd7649f667332
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:35 +00:00
Ralf Nolden
f8c3820de7 Compile fix: remove unused variable bool isEmpty
The local variable isEmpty triggers a compile warning with GCC:
variable ‘isEmpty’ set but not used [-Werror=unused-but-set-variable],
so remove the variable assignment and declaration.

Error is triggered on FreeBSD and NetBSD with gcc.

Change-Id: I37bdb3408ad69093708f2d4bdb04392da66e04e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:30 +00:00
Ralf Nolden
725a9c2702 Compile fix: add NetBSD define for ffsll usage
On NetBSD, ffsll needs to be defined to compile. The fix adds the
according Q_OS_NETBSD define to the list of operating systems
needing the define.

Fix obtained from NetBSD port maintainer Kamil Rytarowski <n54@gmx.com>
via IRC.

Change-Id: I966a7b3fba43fb56e72f19f6b7f7cacc19c3c6cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:26 +00:00
Ralf Nolden
9b153f989b Compile fix: convert argument to long to match parameter comparison
GCC creates a warning "enumeral and non-enumeral type in conditional
expression" as the types of the two arguments don't match. Fix
the compile warning by converting the first argument to (long) to match
the type of the second parameter.

Fix confirmed to work on NetBSD and FreeBSD, obtained from
Kamil Rytarowski <n54@gmx.com>, NetBSD qt ports maintainer.

Change-Id: I777dd066a0a8cc8a46e34bd39b256882080a7773
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:22 +00:00
Ralf Nolden
14ae00dd50 Compile fix: undefine types before defining them
On NetBSD, the types uint64_t, uint32_t and uint8_t
are already defined in sys/types.h which leads to compile errors.
Those types need to be properly undefined before defining
them with the Qt code.

Change-Id: Icd58f421619f15b899cf5c5de1cfb22a519a4e4b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:18 +00:00
Ralf Nolden
e91be71ef0 Add OpenBSD to list of BSD systems defines using kqueue too
Besides FreeBSD and NetBSD, OpenBSD uses kqueue too, so
add the according Q_OS_OPENBSD define here to make that work.
Patch obtained via OpenBSD qt ports maintainer Vadim Zhukov
<persgray@gmail.com> from OpenBSD qt ports patches.

Change-Id: Ib9e6f6303b661beb88666bd3c2bf36a77e929f9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:13 +00:00
Ralf Nolden
defec688d2 Use -liconv on OpenBSD as well in config.tests
OpenBSD iconv is in -liconv, so it needs to be added here. NetBSD
has iconv in libc, so only OpenBSD is affected.

Patch obtained from Vadim Zhukov <persgray@gmail.com>,
OpenBSD qt ports maintainer.

Change-Id: Icce25d154857f0ce161b5f6b7ddac3c150a02bb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:09 +00:00
Ralf Nolden
e28d31dbfa Move freebsd-g++ mkspecs back for supported FreeBSD 9.3 and up
FreeBSD 9.3 is still supported and uses gcc as the default
compiler, therefore FreeBSD ports require patching the mkspecs
back. To avoid patching, move the mkspecs back to the right
place and adapt the path in the qmake.conf/qplatformdefs.h

[ChangeLog][FreeBSD] The freebsd-g++ mkspec was moved back and no
longer requires the "unsupported/" prefix, matching the FreeBSD
ports tree, as FreeBSD 9.3 still defaults to using GCC. Users of
GCC that did not previously use the ports patch will need to adapt their
build scripts and drop the "unsupported/" prefix.

Change-Id: Ideda4a33cccf5381000f6f50b6ae92a5c24ba9d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-23 09:51:02 +00:00
Ulf Hermann
eda29451e9 Enable -separate-debug-info for mingw toolchains
Having the debug info in separate files is very helpful, especially on
memory constrained 32bit systems. When the debug info is compiled into
the object files, processes can run out of memory when trying to load
them.

Change-Id: I1808a32e855d6a62e17e1b734c511b31db5f03f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-23 09:49:46 +00:00
Maurice Kalinowski
11f14a0442 Turn off optimization for checkForAlphaPixels on Windows ARM
This function is optimized in a way that it returns bad results with the
arm msvc compiler.

Task-number: QTBUG-52007
Change-Id: Ica4517dfb7dde5a78d563f9253c4c907090c9459
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-23 09:35:32 +00:00
Friedemann Kleint
b8a0c6e7c5 Windows QPA: Format window title correctly when creating a window.
Add convenience QWindowsWindow::formatWindowTitle() and use
that in QWindowsIntegration::createPlatformWindow().

Task-number: QTBUG-53394
Change-Id: I76ebade97c5af71ffa3d11075511b94a54a3dbf8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-05-23 08:41:36 +00:00
Jesus Fernandez
c18b802e33 Fixed variable type
A port was being assigned to qint16 instead of quint16.

Change-Id: I9414e2dcca52beab1bc17ef61cfff56db8ab83a0
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-21 19:59:06 +00:00
Ralf Nolden
d2af1d71c1 Remove obsolete freebsd-icc mkspecs
The freebsd-icc mkspec was intended to be used with the Intel
compiler, which nowadays is still only available in version
8.1.038 (https://www.freshports.org/lang/icc/) and for i386 only
while the current version is around 17. On FreeBSD the port
was actually never supported by Intel anyway.

Change-Id: I03b1939be63eef4363bd6b074a6b739365f495ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-20 21:51:50 +00:00
Oswald Buddenhagen
36c025a8d6 Merge 5.7 into 5.7.0
Change-Id: I416c79d9afde98efc9e78b3a74e17dfbb2409602
2016-05-20 19:31:19 +02:00
Maurice Kalinowski
8e8bd90e44 Fix compilation without process support
Change-Id: I88ef96bf15f40e459bacc4b2abe4dfe84e257495
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-20 10:37:18 +00:00
Mike Krus
9fd407fc6a Fix tvOS build
QIOSTextInputOverlay was excluded from build not member variable was
not, leading to link errors

Change-Id: Ia9c09c503decb596907a17dc8fe8fd0f8d5f657f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-05-20 07:14:24 +00:00
Marc Mutz
d55f2b1fb9 Revert "QDBusArgument: remove useless op<< overloads"
This reverts commit 5f542f3cca,
since it breaks streaming of types derived from QList and
the docs state that this should be possible without providing
custom op<</>> for such types.

Task-number: QTBUG-53376
Change-Id: I2bde714ac384f2aed67ad30decea702fb79aef1b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-20 07:09:52 +00:00
Gabriel de Dietrich
9e3e987590 QNSView: Pass on the responder chain if deletion is pending
Change-Id: I7d098b61f6feb2ac38582c0efb1bbdf25a83e967
Task-number: QTBUG-53398
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-05-20 06:09:06 +00:00
Oliver Wolff
a1dccd0708 WinRT: Do not assert on socket close
If no read was established before (no IO pending) the function
will fail. In this case there is no need to assert though.

Change-Id: Iaa18e4124389783fc2b8363a85c60a308903a713
Task-number: QTBUG-53424
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-05-20 06:08:57 +00:00
Oliver Wolff
c276aa5130 ANGLE: fixed usage of shared handles for WinRT/WinPhone applications
Both checks are not relevant in Qt's context and were skipped before but
they sneaked back in with the latest ANGLE update.

Change-Id: Ic44de5468a3254afd76ef4804d97d245676daeb1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-05-20 05:27:29 +00:00
Laszlo Agocs
20211c4213 Avoid failing on 64-bit ARM
Affects systems like the NVIDIA DRIVE CX. This did not show up so far
because there was no error when Q_PROCESSOR_ARM was not set.

Task-number: QTBUG-53493
Change-Id: I107155b6dc1a881eca6f57374ad8db4458875243
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-19 18:28:07 +00:00
Gabriel de Dietrich
1acb29c3dd QMenu auto-test: Add test for two-level tearable menus
This has been fixed in 5.6.1 but we can afford the extra test
to guard against regressions.

The setup for this test is two menus, one parent of the other.
The submenu is tearable. We open the parent menu, open its
submenu and then move the mouse cursor straight over the
submenu's tear-off area. The submenu should stay open even
after a short delay.

Change-Id: Ia8ad326d78dde31b6dd91b0ebacf0db1898715d4
Task-number: QTBUG-53068
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-05-19 18:17:40 +00:00
Ralf Jung
cdf1e67de1 QDesktopWidget: fix tracking QScreens.
The old code failed to reliably detect new QScreens and connect their signals to
its own slots.  For example, if the QApplication added a new screen at the
beginning of the screen list (which happens if the new screen is primary), the
signal-connecting loop would actually instead add the now second screen to
QDesktopWidget's list *again*, and connect its signals, but not connect any
signal to the new, first screen.

Furthermore, QDesktopWidget would miss geometry changes because QWidget (and
hence QDesktopScreenWidget) automatically shrinks when the screen it is on gets
smaller.

To fix all of this, QDesktopScreenWidget now keeps its own record of the screen
and its geometry, and it always scans over the entire screen list without
relying on any ordering guarantees on behalf of QApplication.

Change-Id: I2ee8361adf643849f43b7dd9a95966920fd13528
Task-number: QTBUG-52101
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-05-19 18:13:33 +00:00
Liang Qi
1f8bc502c8 Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-05-19 17:50:46 +00:00
Oswald Buddenhagen
b98f599948 add missing install target
Change-Id: I4bf0224fb58297ab6e3b8f966f3b180f91d16279
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-19 17:49:19 +00:00
Oswald Buddenhagen
e6b755e702 add ProString::toLongLong() and make use of it
this is just a bit cleaner.

Change-Id: I03e628aca9e2e53c602a4db724da277a0e2c2486
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-19 17:32:50 +00:00
Oswald Buddenhagen
7931395d5b remove pointless conversion to QString in isTrue()
Change-Id: I7766672018dd4acf9b9fb89acfe664671de4bc3d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-19 17:32:47 +00:00
Oswald Buddenhagen
a7a3cd643a remove pointless conversions to QString when converting to int
this doesn't change a lot, but is cleaner.

Change-Id: Ia89c399d6df7cc6264954cf309d2c971a5592d6b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-19 17:32:41 +00:00
Oswald Buddenhagen
e8bdca74b5 optimize ProString::toInt()/toShort()
QStringRef has respective overloads now.

Change-Id: I9b94c53092ef3fdd62a68f5d3c5bacb98a14d8ec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-19 17:32:27 +00:00
Maurice Kalinowski
34fd680802 winrt: Remove explicit exit call
8c3ae221 introduced a mean to actually close an application. Otherwise
the application was in an undefined state and did not exit.

Since 5.6 we switched to Xaml and the explicit call to Exit() is not
required anymore. This also allows using multiple application objects
sequentially as the unit tests do in some cases.

Change-Id: I9030afec72a4534e818c77c373dc3a81b922a480
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-05-19 17:07:44 +00:00
Maurice Kalinowski
ba3d492134 winrt: fix compilation
Change-Id: I63e1d8f6bb01d0adfd360f3257e98e94ae96c3d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-19 17:05:43 +00:00
Joerg Bornemann
9c0a7cac83 Doc: Fix references to QGuiApplication::clipboard()
QClipboard's documentation still referred to QApplication::clipboard(),
where the method was located in Qt4.

Change-Id: I7fc31bacf5afa783f8ca38723773f24cd0bda347
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-05-19 13:09:44 +00:00
Robin Burchell
b2e9c680e3 qpa: Use LIBS_PRIVATE, not LIBS when linking in font database bits.
LIBS_PRIVATE is more correct (these shouldn't be part of the public API),
and additionally, using LIBS_PRIVATE also ensures these libraries come last
on the link command, which fixes builds using -Wl,--as-needed.

Change-Id: I9f2e4e78855a30a53ce9013623597b840a2832bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-19 12:45:36 +00:00
Tor Arne Vestbø
b88573e29b Collate conversion functions for Core Foundation/Foundation types
Makes it easier to apply similar changes across all related functions,
and to implement functions for new types by having the previous
approaches available in one place.

Change-Id: I3f0590d67d0e6deb1c6c856ab1de96b55b6af058
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-05-19 11:20:36 +00:00
Oswald Buddenhagen
eff3a7ded1 delay application of -D/-I/-L/-l on windows as well
clearly, "the windows configure does not have any of this magic to start
with" was flat-out wrong.

Task-number: QTBUG-53312
Change-Id: I80ac10bc8b1581e61c57fcd97f25626990d120ec
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-19 11:06:33 +00:00
Friedemann Kleint
6086c81e4d Windows QPA: Improve workaround for non-Areo theme GL rendering.
Reportedly, clearing the clip region is sufficient to fix the issue.
InvalidateRect() should be avoided when handling WM_PAINT as it
may cause events.

Task-number: QTBUG-7865
Change-Id: Id9a7c280fcc2c8242bb34c34e73e53c3146e7a6e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-19 10:55:54 +00:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Oleksandr Tymoshenko
e9628fbd39 Fix dynamic librariy support detection for platforms without libdl
Some platforms (e.g. FreeBSD) do not have libdl, but dlopen and related
functions are part of libc. So first check for dlopen in libc, and only
if that fails, look for it in libdl.

Task-number: QTBUG-52951
Change-Id: I65a8ed18fce157da32f4e1ffeba30d7513385a8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-19 10:15:42 +00:00
Ralf Nolden
dd8745e1d4 Remove linux only-dependency from devicediscovery
As libudev and libevdev have their config.tests and do work on other
operating systems as well (FreeBSD, evdev), there is no need to
make this exclusive for linux only. Thus, use the checks only;
the else-section can go with that at the end, too.

Change-Id: I2a5175a154b4f3e001bb42d187d8c7640c014049
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-19 10:15:32 +00:00
Błażej Szczygieł
bc410cc706 QtWidgets: Reduce paint events when resizing native widget
This patch reduces paint events by removing code which sets native
widgets dirty in QWidgetWindow::handleExposeEvent. Native widgets are
also marked dirty in QWidgetPrivate::drawWidget, so it is enough for
proper painting.

This restores Qt4 behavior when one resize means one repaint for native
widgets. Without this patch the native widget is marked as dirty on
every expose event, so one repaint is from syncBackingStore and second
(or more) is from marking the widget dirty explicitly.

This patch improves performance of native widgets and it also reduces
locks when paint event is v-synced, e.g. on OpenGL swap buffers or on
any other technology like VDPAU, VA-API, etc.

Added autotest for checking number of paint events for native widgets.

Task-number: QTBUG-50796
Change-Id: I4e1649069e2e73d15b038fd1834d0551915252ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-05-19 10:11:27 +00:00