Commit Graph

32258 Commits

Author SHA1 Message Date
Thiago Macieira
d56c6cf7a4 Work around uname(2) on Apple mobile OSes not returning the proper arch
Task-number: QTBUG-61205
Change-Id: Ia3e896da908f42939148fffd14c46fc991650f6f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-06-05 06:33:52 +00:00
Sérgio Martins
acaaa84d7e Fix build with clang 4.0 and libstdc++ 7.1.1
With this setup clang cannot use c++1z yet.
Fixed with clang 5.0.

In file included from /data/sources/qt/qt5/qtbase/src/corelib/codecs/qtextcodec.cpp:53:
In file included from ../../../include/QtCore/5.9.1/QtCore/private/qcoreglobaldata_p.h:1:
In file included from ../../../include/QtCore/5.9.1/QtCore/private/../../../../../../../../../sources/qt/qt5/qtbase/src/corelib/kernel/qcoreglobaldata_p.h:55:
In file included from ../../../include/QtCore/qmap.h:1:
In file included from ../../../include/QtCore/../../../../../../sources/qt/qt5/qtbase/src/corelib/tools/qmap.h:52:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/map:60:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/stl_tree.h:72:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/node_handle.h:39:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:27: error: use of class template 'optional' requires template arguments

Change-Id: Ib4cd8a9f5791a6e6cae4e6d61dfec3ad50dd63ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-03 18:10:31 +00:00
R.J.V. Bertin
6e97d091e4 define QT_NO_EXCEPTIONS reliably when using Clang
Clang's definition of the __EXCEPTIONS macro is inconsistent across
platforms. When compiling for Darwin, Clang 3.6 and newer will set the
token when exceptions are enabled in either C++ or ObjC. This change
adds the reliable check described in the Clang 3.6 release notes to
ensure that QT_NO_EXCEPTIONS is defined when required.
The check requires the use of the Clang-specific __has_feature()
syntax for which a new proxy macro QT_HAS_FEATURE(x) is added in
qcompilerdetection.h

Task-number: QTBUG-61034
Change-Id: Ie7b482dfa1a4a5b700a6b97562c26b626be1fc04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-03 07:22:06 +00:00
Thiago Macieira
b7d76e533c MSVC: Enable standard-conformance mode by default
That's not the same as -Za.

Change-Id: Ica9894dc9b5e48278fd4fffd14bb316b687abffe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-06-03 03:35:57 +00:00
Thiago Macieira
e4eaa62943 Disable bogus GCC 7 warning about string op overflow
Analysis proves this is a false positive:

 qarraydataops.h:69:17: error: ‘void* memset(void*, int, size_t)’: specified size between 18446744056529682436 and
 18446744065119617024 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]

Change-Id: I7814054a102a407d876ffffd14b6ab0be9e222fc
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-03 03:35:54 +00:00
Timur Pocheptsov
4fb1745639 Ssl socket - fix broken certificate verification
On iOS QSslConfiguration always has an empty list of system CA certificates.
Calling SecTrustSetAnchorCertificatesOnly(.., TRUE) on iOS  results in
SecTrustEvaluate failing to verify a valid certificate, since there
are no 'anchors' at all. We can use SecTrustSetAnchorCerificatesOnly(.. TRUE)
on macOS only, where we do extract/copy system certificates using
SecTrustSettingsCopyCertificates and save them in a QSslConfiguration's
list.

Task-number: QTBUG-61053
Change-Id: I70d4e46273d78414baaac8531273def707c3eebc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-06-02 12:34:22 +00:00
Oliver Wolff
91ef71b7bf winrt: Get rid of one deferral when handling socket data
Instead of defering one more time by emitting the signal, we can add
the data to the list of available data/pending datagrams. For TCP
readNotification can be invoked directly so that emission of the
readyRead signal is tightly coupled to the availability of new data.
For UDP sockets calling readNotification directly stops handling of
more data and thus cannot be done.

With the old approach it was possible, that the last bit of TCP data
was lost, because the socket was closed while the data was still being
processed/transferred from the worker to the engine.

Task-number: QTBUG-61078
Change-Id: I9330b87876be853d310dc9e8e817ab344939d5dd
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-02 12:30:25 +00:00
Allan Sandfeld Jensen
8c620d24bb Fix semi-opaque linear gradient on ARGB32
The qt_gradient_argb32 routine optimizes linear gradients with the solid
blend routines that is ARGB32PM only. If the gradient is not solid, it
will not get unpremultipled on write like it should for ARGB32.

Covered by lancelot, but the change is less than 5%.

Change-Id: Id99f2fa125cc091f3b5b29ec2d06618785d628fa
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-06-01 12:00:59 +00:00
Giuseppe D'Angelo
49fc750ee4 QStringLiteral/QByteArrayLiteral: fix/add documentation
Various editorial fixes. Also, in 5.9 QStringLiteral does
not fall back to fromUtf8 any longer, but guarantees
a compile-time construction.

Change-Id: Ida4698cf8e32a6e3de97b2c16b997fc9630c9db9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-06-01 10:21:48 +00:00
Leena Miettinen
22a52d1d64 Doc: Remove references to screenshots illustrating different styles
... from widget class descriptions.

Use one screenshot from Windows instead.

The styles change and the screenshots become outdated very fast, so
it is easier to update just one screenshot now and then. The styles
can still be seen in the style gallery topics.

The image files will be removed in a follow-up commit after all
references to them have been removed.

Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-06-01 10:08:36 +00:00
Leena Miettinen
96d6e03163 Doc: Fix a typo in QVariant::toPoint docs
Task-number: QTBUG-61050
Change-Id: I517f95df9d1019d37b6484e00220e8e325ee2ecf
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-06-01 10:08:12 +00:00
Oliver Wolff
61f67c12fa winrt: Use styleHint as clue for fallbacks for font families
Similar on how it is done for Windows desktop we also use the given
style hint when building the list of fallbacks a font family.

Change-Id: I71378581d07f20ebe5bf0bc757bba919cc70e118
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-01 08:23:51 +00:00
Tony Sarajärvi
40a7c57ba9 Blacklist tst_QTimer::basic_chrono on macOS
Task-number: QTBUG-61013
Change-Id: I1c877aeb3e141e0e19b71bf9e595ff478e313b10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-01 07:27:59 +00:00
Thiago Macieira
c214c000cc qEnvironmentVariableIntValue: fix the case of a non-numeric value
The documentation says that it's equivalent to
    qgetenv(varName).toInt()

But the implementation wasn't. QByteArray::toInt() verifies that the
entire string was consumed, so QByteArray("1a").toInt() == 0, but
qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1.

The implementation also detected the base, a behavior I kept. Instead, I
updated the documentation.

Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-06-01 06:02:10 +00:00
Liang Qi
e3bc01b0e3 Merge "Merge remote-tracking branch 'origin/5.9.0' into 5.9" into refs/staging/5.9 2017-05-31 18:54:04 +00:00
David Faure
f33cf18d88 QAbstractItemModel::supportedDragActions: fix regression
This method now returns -1 by default, due to commit 6255cb893d
which mistakenly replaced -1 with Qt::IgnoreAction (0x0).

As a result, dropping is forbidden in a number of applications
(I detected this in zanshin).

Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-05-31 18:54:00 +00:00
Allan Sandfeld Jensen
32a94e54b5 Do not always use argb32pm for subsurfaces
A number of drawing paths were never tested by lancelot because we
always used argb32pm for subsurfaces. This patch switches the
subsurfaces to use the painter format or its alpha version. This means
changes to composition tests as it changes precision, especially of
alpha in the a2rgb30 formats.

Change-Id: I24d53bf6e1db8cca36bda69e2ddf07f20256b3c8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-05-31 18:53:57 +00:00
Friedemann Kleint
c76b0c87b0 Revert "Win: If the combined key is unknown then fall back to the original key pressed"
The change has been found to break Ctrl+C/V shortcuts when
using a Russian keyboard layout.

This reverts commit c6ecbd4762.

Task-number: QTBUG-61086
Change-Id: I0dce708b1a65b08ea10317d723c38b0414cbac7f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-05-31 18:53:53 +00:00
Tony Sarajärvi
600454578d Extend blacklisting of tst_QSemaphore
tryAcquireWithTimeout(0.2s) was already blacklisted and
now the same failed with "(2s)".

Task-number: QTBUG-58745
Change-Id: I82363238c08056d2969a7616e3a6e5af080d537d
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-05-31 18:53:50 +00:00
Oliver Wolff
72e9aee500 winrt: Fix tst_QPainterPath
We have to use a temporary data path for winrt, as the applications
are sandboxed and cannot just put data anywhere.

Change-Id: I8f95de132e5b5ac77441cbbf26af873b8018c7cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-31 13:10:05 +00:00
Oliver Wolff
00d9033fa0 Fix tst_QFile for configurations without process support
Change-Id: Icca2d55f0b9402bf4bcb009d972f21075d144f87
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-31 13:10:04 +00:00
Oliver Wolff
a0d3b5bb2b Fix tst_qmessagehandler for configurations without process support
Change-Id: If61a7b1e389e7fffb9cfa85d6b5d77a7b777215f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-31 13:10:03 +00:00
Oswald Buddenhagen
e9c2a363cb fix licheck calls on 32 bit systems
$$QMAKE_HOST.arch isn't very well defined for ia32 - on windows it's
x86, on linux it may be anything from i386 to i686. test for != x86_64
instead.

Task-number: QTBUG-61044
Change-Id: I8f3267b404fffbf479d87bee2e8ee8c6cd404b50
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-05-31 12:57:47 +00:00
Oswald Buddenhagen
d56d2e0cb2 don't redirect licheck's stderr
it uses it for interaction.

Task-number: QTBUG-61017
Change-Id: I9edc0f9aa91793bc451fa78a8f6ad11d61e04b57
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-05-31 12:57:43 +00:00
Oswald Buddenhagen
1a004bf550 quote the confirm-license argument of licheck
it can be (and usually is) empty (if the option was not used), which
would make it disappear from the command line.

Change-Id: Ic682e92a0d20cf849fade8449ebd79a5aa424d21
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-05-31 12:57:38 +00:00
Oswald Buddenhagen
cb4bc34cb1 fix module version number in qt modules' cmake config files
this actually just makes the code more straight-forward.

amends f8607045c.

Task-number: QTBUG-60936
Change-Id: Iaa05b474206cf29352f9bba516936ff30b90a778
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-31 12:57:28 +00:00
Oswald Buddenhagen
9e04102180 fix library retrieval in pkg-config source, take 2
the entry's libs field is supposed to be a single pre-quoted string.
that implies that the libs and libpaths need to be joined first.

amends 7e298e2f.

Task-number: QTBUG-60925
Change-Id: Id85b2784e3c081b3ff8eb9ee2216976691f8580d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-31 12:57:23 +00:00
Oswald Buddenhagen
09e2fc43ab fix configure PSQL_*= being ignored
make qtConfLibrary_psqlEnv() fall back to qtConfLibrary_inline() if
$PSQL_LIBS is not set.

Task-number: QTBUG-59521
Change-Id: Ie293e8bfaa3e113ede166243b345833973cc66f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:19 +00:00
Oswald Buddenhagen
5afde92bd7 make mkspecs not mess up -rpath-link
adding shared install paths via QMAKE_LFLAGS in the spec has the tiny
side effect that they are searched _first_, which is generally a really
bad idea - they should be _last_.

for that purpose, introduce QMAKE_RPATHLINKDIR_POST, and migrate all
specs to use it.

QMAKE_RPATHDIR_POST is added for consistency, but not actually used.

Task-number: QTBUG-59457
Change-Id: Iac6cda5e9111ef8cca454a69861fe8408bb40589
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:14 +00:00
Oswald Buddenhagen
6dcd944dee make mkspecs not mess up library and include search paths
adding shared install paths to QMAKE_{INCDIR,LIBDIR} in the spec has the
tiny side effect that they are searched _first_, which is generally a
really bad idea - they should be _last_.

for that purpose, make QMAKE_{INCDIR,LIBDIR}_POST live up to their names
(i.e., search them actually last) and migrate all affected specs to use
them.

Task-number: QTBUG-40825
Change-Id: Ie0de81c3cc49e193186d2fedd7d6c77590c8ef79
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:09 +00:00
Liang Qi
7ee80242de Merge remote-tracking branch 'origin/5.9.0' into 5.9
Change-Id: I2d7a3f3a80e6287e135e55b650f74f9a540332bc
2017-05-31 08:11:37 +02:00
Tero Alamäki
27f0d8db91 Fix qpa/kms test with Vibrante 4.1.6.0 on INTEGRITY for Drive CX
Change-Id: I44ae001dc9f96ea8819a56a87be9322326dbbb4b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-31 05:13:05 +00:00
Thiago Macieira
fa3940cc4b QStorageInfo: Pass MNT_NOWAIT to getmntinfo
This forces the API not to wait for synchronous I/O from the filesystems
and get the information, but instead just use the cached information
directly. It's a good idea if we have an unresponsive FS, like NFS with
an unreachable server.

Task-number: QTBUG-61096
Change-Id: Iddeeffb6f4ad4a2894a2fffd14c32f6e90664a63
Reviewed-by: Tobias C. Berner
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-05-30 17:29:21 +00:00
Stephan Binner
dbeb748de3 Convert features.printdialog to QT_[REQUIRE_]CONFIG
Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-30 17:21:26 +00:00
Stephan Binner
f209215c0d Convert features.printpreviewwidget to QT_[REQUIRE_]CONFIG
Change-Id: I7e38179acd93bf8c7c48c79ff5e304d893460758
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-30 17:21:17 +00:00
Stephan Binner
e0b39313b0 Convert features.printpreviewdialog to QT_[REQUIRE_]CONFIG
Change-Id: If38d70b1e098c0cc680b913b2c4087681ad2a41e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-30 17:21:12 +00:00
Stephan Binner
18e5d10426 Convert features.cups to QT_[REQUIRE_]CONFIG
Change-Id: I189134b41c4f6e4ac42b5e47ae79338c744b581d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-30 17:21:07 +00:00
Jüri Valdmann
8632614947 QSslCertificate: don't init() if SSL is not supported
QSslCertificate used SSL without checking if SSL is available.

This patch adds such checks to the constructors.

Change-Id: Iea298aded5966641327e22e41ad4665a3d0ec5d3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-05-30 17:12:59 +00:00
Olivier Goffart
c70c1d54f4 QStackedLayout: Fix UB (invalid cast) in qt_wasDeleted()
Fixup of commit b4995eb749.
We can't call QWidgetPrivate::get(w) on a deleted QWidget, because of
the call to the member function QWidget::d_func. We can however call
QObjectPrivate::get since we still are in the QObject destructor.

tst_qstackedlayout now pass without ubsan Warnings.

Change-Id: I4e839a97ddbd1cf21435a8fca76523b98a1f7d9b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-05-30 16:57:30 +00:00
Joerg Bornemann
c3030d7163 moc: remove _MSC_EXTENSIONS #define
Because we obviously don't support Microsoft's extensions in C++. This
is required because some MS headers have code that isn't proper C++,
like iso646.h:
 #if !defined(__cplusplus) || defined(_MSC_EXTENSIONS)
  #define and    &&

Do not pass /Za to MSVC to generate moc_predefs.h, because this option
is incompatible with compiler options like /fp:fast that may be
user-specified.

This reverts commit e1a70ce4 and re-fixes the issue similarly to commit
d72ac3f3.

Task-number: QTBUG-58391
Change-Id: I5c0143283afed09f98200806c87259c039c00ae1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-05-30 15:34:26 +00:00
Mitch Curtis
c25ad981a3 QWidgetWindow: don't give focus to windows that are being destroyed
In the referenced bug report, dismissing a QFileDialog while the
Qt Virtual Keyboard was in use would result in a crash.

Dismissing a file dialog created with
e.g. QFileDialog::getOpenFileName() causes it to eventually be
destroyed. When this happens, it starts deleting its children. Each
child widget's destructor calls clearFocus(). In clearFocus(), there is
a block of code that emits QWindow::focusChanged(), passing the result
of focusObject() called on that widget's window.
QWidgetWindow::focusObject() could end up using itself as a fallback
focus object if it had no other focus objects (e.g. children) to use
instead, even though it was in the process of being destroyed; as were
all of its children. The Qt Virtual Keyboard plugin would then try to
use the focus object, even though it was in an invalid state.

To fix this problem, we return early from QWidgetWindow::focusObject()
if the window is in the process of being destroyed.

Task-number: QTBUG-57193
Change-Id: I137cf9415812ce2e0419c0afe8076ce150f248cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-05-30 10:49:36 +00:00
Kimmo Ollila
88f30250eb Add USB HID device feature to INTEGRITY
This change adds USB mouse handling support for INTEGRITY

Change-Id: I8a2a51c8c3578898e90dd5bbb01f6aed6c64e2a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Tero Alamaki <tero.alamaki@qt.io>
2017-05-30 10:38:12 +00:00
Mitch Curtis
64a4216254 tst_QFiledialog: use escape to close dialogs instead of timer
This makes the test a lot faster and perhaps more reliable.

Change-Id: I055cfde627c75f71735eabbf01af2a196bd8b00a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-30 07:19:42 +00:00
Thiago Macieira
e579c822c5 tst_qudpsocket: Blacklist "utun" interfaces on Darwin
Packets sent to to link-local addresses on it are never received. We
don't know why this happens, as the tooling provided by Apple for
development is close to useless. So we just ignore this interface.

Task-number: QTBUG-61041
Change-Id: Ia608df1fff6bdee5238e107d8a50292a1f9e5c03
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-05-29 17:03:41 +00:00
Allan Sandfeld Jensen
2a0d96daa8 Do not use FT_LOAD_TARGET_LCD when full hinting is requested
In FreeType 2.8.0 FT_LOAD_TARGET_LCD is now a variant of
FT_LOAD_TARGET_LIGHT instead of of FT_LOAD_TARGET_NORMAL. This means
requesting it will get us light hinting.

See https://sourceforge.net/projects/freetype/files/freetype2/2.8

We should just avoid using it all together since we request the LCD
mode separately anyway with FT_RENDER_MODE later.

Change-Id: I9ea2e39a6e9ba25ba11604a194e552fe4240a127
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-05-29 14:09:47 +00:00
Stephan Binner
ad8b4ba014 Convert features.splashscreen to QT_REQUIRE_CONFIG
Change-Id: Ie46b7c6fb52773dea25c552a77c96d800f471738
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-29 10:46:53 +00:00
Stephan Binner
61384e910d Convert features.lcdnumber to QT_[REQUIRE_]CONFIG
Change-Id: Ie99d2ce0a836c27fb882c04ff465e6cdd483d360
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-29 10:46:52 +00:00
Stephan Binner
3945cf1f9a Convert features.movie to QT_[REQUIRE_]CONFIG
Change-Id: I838c7305d4649f953c5bb972f1aa51dbb078afe2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-29 10:46:50 +00:00
Àlex Fiestas
9ec0280714 Make sure QWindow screen is set before calling QPlatformWindow::create
QWindow uses device independent geometry while QXcb and QPlatform
classes do not.

When QXcbWindow::create is called we have no guarantee that the correct
screen has been set in QWindow so the code
attempts to check if "currentScreen" matches "actualscreen". To perform
that operation though we need to convert
the units from "Device independent" to "native pixels" that we do by
calling QPlatformWindow::windowGeometry which
calls QHighDpiScaling::toNativePixels which requires the correct screen
to be already set.

So basically we have a cyclic dependency, to get the correct screen we
require the correct screen to be already set.

To fix this we can:
1-Remove the dependency (Look for the actual screen using device
independent pixels)
This will imply adding code in QXcb to use
QPlatformScreen::deviceIndependentGeometry to lookup the screen up

2-Make sure the Screen is set before calling QXcbWindow::create

This patch implements the first approach that allows us to keep the
changes within the QXcb backend which seems to be the only one affected.

Task-number: QTBUG-53813
Change-Id: I6dc955d63e17c3b3421f3a1a9e0d841e508b2e5c
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-05-29 10:40:53 +00:00
Mitch Curtis
a089de0d99 Fix tst_QWidget::translucentWidget() on high DPI displays
It was grabbing a QLabel without accounting for the size of
the window in the case where the DPI is larger than 1:

FAIL!  : tst_QWidget::translucentWidget() Compared values are not the same
   Actual   (actual.size())  : QSize(32x32)
   Expected (expected.size()): QSize(16x16)

Change-Id: I4873f3c6364ee2696f5612d91e6c97c60b2cd915
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-29 10:35:46 +00:00