Commit Graph

25971 Commits

Author SHA1 Message Date
Alex Trotsenko
3d93fb0771 QAbstractSocket: simplify a check for data availability
We know that the QAbstractSocketPrivate::canReadNotification() slot is
called by the engine's read notifier only when new data is available for
reading, or when the socket has been closed. This allows us to remove
additional checks for engine validity and data availability for unbuffered
sockets.

Change-Id: Ic278cf2214d418d8fe471ea24a765b8d5840b0a5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 14:58:11 +00:00
Laszlo Agocs
7c6625b105 Support mixing native child widgets with texture-based ones
Currently QOpenGLWidget and QQuickWidget do not support having native
child widgets inside the same top-level window. In some cases this is
inevitable, f.ex. multimedia may require native windows when used from
widget apps. winId() calls made for various (valid or invalid) reasons
are also problematic.

There are no blockers for supporting this setup, however. By storing
multiple texture lists (one for each subtree where the root is a
native widget), adding the missing markDirtyOnScreen calls, letting
each native widget access the correct texture list (i.e. the one
corresponding to its children) when they are (separately) flushed, and
fixing composeAndFlush() to take the update region and the (native
child) offset into account, it can all be made functional.

The change also fixes the issue of keeping GL-based compositing
enabled even after all render-to-texture widgets in the window become
hidden. Due to the changes of how such widgets are gathered,
composeAndFlush() is not invoked anymore when no such widgets are
discovered for a given native parent. This is great since having
compositing enabled infinitely is an issue for applications like Qt
Creator that implement certain views with QQuickWidgets but cannot
afford the cost of texture uploads in other places (e.g. for the text
editor) on slower machines.

The openglwidget manual test is greatly enhanced to test various
situations (MDI, scroll areas, tab widgets, QOpenGLWidget as native
child, QOpenGLWidget with non-tlw native parent, etc.)

Task-number: QTBUG-48130
Task-number: QTBUG-49172
Change-Id: Iad098359c8bcf749f01c050da0853415e1550eda
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-19 13:56:52 +00:00
John Cumming
208496091d Add Section Symbol at end of text flow when showing paragraphs
Insert a section symbol (U+00A7) to the end of a text flow instead of a
space as many text layout applications do.

Task-number: QTBUG-49252
Change-Id: Ib1276b508c24824b6329e0458ae5171bc1a288c3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-19 11:53:30 +00:00
Andrey Bienkowski
a7db6e3467 Fixed memory leaks in the "40000 chips" example.
Two QObjects had no parent. This caused memory leaks on app close.
Confirmed with the valgrind memory analyzer tool from Qt Creator.

Change-Id: I9294099ca819be1a9c5b74b3cec5bf197be06433
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-19 11:30:50 +00:00
Marc Mutz
bbe65832f5 QString::vasprintf: avoid allocating memory for format text copied verbatim
... by using the new QUtf8::convertToUnicode() function in
conjunction with QString::resize().

For this to be a clear optimization, resize() must be banned
from shrinking capacity, which another patch will implement.

Change-Id: I6394af95ef1aaae131e23a4227734eb76fa685cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:43 +00:00
Marc Mutz
db9a0befca Add a QUtf8::convertToUnicode() overload that operates on an existing buffer
... and therefore doesn't need to allocate and thus
can be marked as nothrow.

Technically, the function doesn't have a wide
contract, because it has the precondition that
the buffer pointed to by the first argument needs
to be large enough to hold the result.

But that precondition can't be checked from within
the function, so no failure can be generated for
it and thus the nothrow guarantee is acceptable
(and desireable).

Change-Id: Iaf6ea6788ef6b4bbb6d8de59a3d0b14d66582307
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 11:30:37 +00:00
Marc Mutz
110e82f5e9 QString::vasprintf: avoid allocating memory just to parse a number
Port parse_field_width from constructing a QString and
then calling toInt() on it to use qstrtoull().

Not only do we not allocate memory anymore, we even
don't need to copy the digits out of the format
string - qstrtoull() does it all for us.

In order to preserve behavior with the previous code,
which consumed all digits before performing error
checking on them, we also consume all digits, even if
qstrtoull() would have returned the start of the range
as the end pointer.

Change-Id: Ief941ce3a8ea43d2e5475d9eab77d7d0d7abc450
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:30 +00:00
Marc Mutz
e17629e32d QString::vasprintf: Extract Method parse_field_width
... and reuse the function to parse precision, too.

This also allows to more easily simplify it (done in a
follow-up commit).

Change-Id: I9da27c4b06565f676e15ef9cab7c53b5d464515e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:23 +00:00
Marc Mutz
139fd9bd0d QString::vasprintf: Extract Method parse_flag_characters
... and simplify the method afterwards:

Drop the boolean that was used to control program
flow when the code was still part of vasprintf(),
by taking advantage of the fact that we can now
just return from the function to break out of both
the switch and the loop.

Change-Id: I97f050b63c0c309aaed3cb0fe979d53c8d970003
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:07 +00:00
Erik Verbruggen
72c68f5f22 Reimplement qt_inf/qt_snan/qt_qnan using std::numeric_limits.
Qt already assumes a working IEEE-754 implementation, so we can rely
on a working std::numeric_limits<double>.

This patch also gets rid of three cases of type-punning with unions
(which is undefined behavior in C++).

Change-Id: Ic3747f49d55e372960abf2091c1d5752c1eccdff
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 10:56:41 +00:00
Laszlo Agocs
e1fb3b0b3e Add EGL stream state defines used by Qt Wayland
Change-Id: I7318de90477aa92abd782cf2038e882152b515bf
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-11-19 08:33:41 +00:00
Laszlo Agocs
3f937393d5 Add Xlib for eglconvenience
This used to work by accident but now with the recent build system changes
the problem became apparent. Not listing the X11 libs is wrong anyway.

Change-Id: I6f75dafa81510d6d6a7571a9fe156cc7b968c8dc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-19 08:33:31 +00:00
Eirik Aavitsland
711f799298 Make the ppm image handler corrctly handle long comment lines
The ppm decoder used a fixed size buffer to discard comment lines,
which would fail for comments longer than 100 characters.

Task-number: QTBUG-49414
Change-Id: I92e910e025cf7584a6ff1c0e5b0e8a4ab281d479
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-11-19 08:06:07 +00:00
Marc Mutz
912df566d0 tst_compiler: make the check for C++14 return type deduction harder
Recurse into self must work, e.g.

Change-Id: I2cccd3d40d2ab5c75a18bf4425b790d30b4d7af0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 07:43:34 +00:00
Marc Mutz
62f2a0fb0d QXmlStreamStringRef: unbreak move special member functions
The QXmlStreamAttribute move operations expect QXmlStreamStringRef
to have move special member functions, but in fact the non-trivial
QXmlStreamStringRef dtor prevented them from being generated by the
compiler. We can't remove the dtor, because it's exported :(

So provide all the move special member functions by hand, and since
their presence in turn prevents the copy special member functions
from being generated, provide those too.

Change-Id: I494aea24981cdb661abe33a96976a363cfe7ef1b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-19 07:40:49 +00:00
Marc Mutz
2697d77141 QXmlStreamStringRef: mark as shared-not-movable-until-qt6
Requires adding member swap. Member-swap is also
necessary to fix the deleted move-assignment operator
of this class, on which QXmlStreamAttribute heavily
relies for its own move assignment operator.

That's why it's not proposed for dev, but 5.6.

Change-Id: Id7d0823d44fc6e55ada7c096ae95444f6bb50963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-19 07:40:39 +00:00
Marc Mutz
f9de9eae3a Replace backwards Java-style iteration with new reverse_iterators
Faster, and, thanks to the new reverse_iterators, just as convenient.

Change-Id: Ibc6c64051a8ede4a47428e9271ffbeaa921fc255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-11-19 07:40:29 +00:00
Marc Mutz
80d7b19b80 QCommonStyle: remove use of obsolete QStyleOption*V<N>
They are obsolete since Qt 5.0.

Change-Id: I96b03fa6b4986de7571caf368b692d2a037a026f
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-11-19 07:40:22 +00:00
Friedemann Kleint
efd8e6922c QSqlQueryModel::clear(): Call begin/endResetModel().
Call begin/endResetModel() in QSqlQueryModel and all
derived classes.

Task-number: QTBUG-49404
Change-Id: I11492d6386efb4c945c246a6379aaa6ca4502a25
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-11-19 07:24:13 +00:00
Tim Blechmann
970f44bf48 qfactoryloader: static qt compile fix
statically linked qt does not compile, as versionKeyLiteral() is unused,
causing clang to complain:
error: unused function 'versionKeyLiteral' [-Werror,-Wunused-function]

Change-Id: I6a233081e7c58fce75ece82616f937f29a23a81b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-19 07:09:10 +00:00
Oliver Wolff
36f3288a23 Use standard error handling in qhostinfo_winrt.cpp
Change-Id: I83555bf9952c01c68fb270a7e1f88ac0ee6ed373
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-19 06:55:26 +00:00
Oliver Wolff
c63dbf8419 winrt: Set error if host cannot be found in QHostInfoAgent::fromName
Task-number: QTBUG-49478
Change-Id: Iab745100621db51219a42d575020783f6e9f310a
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-19 06:55:24 +00:00
Oliver Wolff
fecbe76d6e winrt: no assert when device is in airplane mode/has no internet connection
Task-number: QTBUG-49478
Change-Id: I1b95ca736d454f82f84374554e6cdec2555d29de
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-19 06:55:20 +00:00
Tor Arne Vestbø
2ab6963e95 iOS: Update pixel density (PPI) logic to detect new iOS devices
Since the iPhone 6(S) Plus devices have a PPI of 401, we change the
logic from storing the unscaled PPI to storing the scaled PPI, and
applying that to a scaled geometry when computing the physical size.

Task-number: QTBUG-49467
Change-Id: I1741ff075749a301d2434cd35f642fcc9ea4b581
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-19 06:06:59 +00:00
Alex Trotsenko
7a8c612847 QNAM: clean the channel request data on server disconnect
Otherwise, we have unexpected channel close initiated by reply
destructor.

Change-Id: I15ad076ff20546e78787e19155544a2e5f8047a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2015-11-18 14:14:36 +00:00
Morten Johan Sørvig
6f8a19846b Input: Convert QScreen geometry to native pixels
Low-level input handling uses the native coordinate
system and the (device independent) coordinates from
QScreen needs to be converted.

Change-Id: I501dc77f5e51be01a42e533cd0609e069b8d228b
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-18 14:11:41 +00:00
Morten Johan Sørvig
3510c7324d topLevelAt(): convert to native coordinates.
QPlatformScreen works in native pixels and the
(device independent) coordinates from QWindow
needs to be converted.

Change-Id: I85ff45d66dc501e8c3c1c7a18f87448c92d79b9d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-11-18 14:11:31 +00:00
Morten Johan Sørvig
c87f3b2292 Call QPlatformCursor::pointerEvent with native coordinates.
It's a QPlatform* class and works in the native (platform)
coordinate system.

Change-Id: Ibf36bc68d84ecd668b35e0c22e1fa35cfc456a5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-18 14:11:21 +00:00
Morten Johan Sørvig
d98415dd6b eglfs: Enable use of Qt::AA_EnableHighDpiScaling
Support use of Qt::AA_EnableHighDpiScaling and 
QT_AUTO_SCREEN_SCALE_FACTOR.

This makes the high-dpi scaling system use the screen
configuration set with QT_QPA_EGLFS_PHYSICAL_WIDTH and
QT_QPA_EGLFS_PHYSICAL_HEIGHT.

Implement QEglFSScreen::pixelDensity() and make it return
the scale factor for the display. The scale factor is computed
as the ratio of the logical DPI to the base DPI.

Change-Id: I14ed5da058024128479cb5508e056c39bd2f7563
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-18 14:11:04 +00:00
Liang Qi
c7934f2489 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/network/kernel/qnetworkinterface_winrt.cpp
	tools/configure/configureapp.cpp

Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
2015-11-18 09:01:51 +01:00
Oliver Wolff
08f9a1bd6a winrt: Fixed listening to tcp socket
For some reason add_ConnectionReceived has to be
called on the Xaml thread now. Otherwise the callback
function won't be called and thus listening on a TCP
socket won't work at all.

Task-number: QTBUG-49121
Change-Id: I11ce2f72b0c1d3bb20e9579de5a2ce5150ca966a
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-11-18 06:05:44 +00:00
Samuel Nevala
aecf3006bd winrt: Fix startup orientation handling
Calling QWinRTScreen::onOrientationChanged in the class constructor
can lead to situation where QWinRTScreen is expected to be fully
constructed. Moving the onOrientationChanged call to
QWinRTScreen::initialize ensures that QWinRTScreen is fully
constructed when it is called.

Task-Id: QTBUG-49470
Change-Id: I52748f33a9011dec3a172c1a74023cad15aae38a
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-18 06:05:23 +00:00
Thiago Macieira
3dd6ac244f Add support for the C++11 features fixed in MSVC 2015 Update 1
This brings MSVC 2015 support to almost C++11 feature completion.
Constexpr support still has one annoying bug, for which the fix is
promised for Update 2.

Change-Id: I92c2ee6638625c61e3a16690563434e32d853368
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-18 00:30:47 +00:00
Thiago Macieira
7ad560b2bc Fix build with OS X 10.8 SDK
The ffsll function is missing with that SDK, but Clang and GCC support
it as the builtin.

Change-Id: I9f4d900898814b569c1affff140e15fb59fb45d8
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-11-18 00:30:45 +00:00
Thiago Macieira
e8d9bb906b tst_compiler: Silence MSVC 2015 warning about unused variable
tst_compiler.cpp(639): warning C4101: 'c': unreferenced local variable

Change-Id: If0101953ceb66bc8e8f5ab969d54f4e1c25dd414
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-18 00:30:43 +00:00
Thiago Macieira
1378e7af1d qdrawhelper.cpp: Fix constexpr build with MSVC 2015 Update 1
error C2397: conversion from 'uint' to 'uchar' requires a narrowing conversion

Change-Id: Ic1b9e0a78b2faa5a0ae4e6de33ab2ee4b654af5f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-18 00:30:41 +00:00
Thiago Macieira
f29b6943f0 QString: Fix in-place toUpper/Lower when there's size expansion
When that happens, we need to detach (in-place conversion won't work),
so we recurse back into the same function, but the template version that
does detaching.

Task-number: QTBUG-49181
Change-Id: Idba8c29717f34c70a58fffff1412fea3acc95f98
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-18 00:30:40 +00:00
Thiago Macieira
7c05a0cc99 Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-11-18 00:30:38 +00:00
Oswald Buddenhagen
b72d1db446 centralize determination whether a module is built as a framework
Change-Id: Ie5f8ab6bb789536707050f0fd83b953650028cf2
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-17 20:22:33 +00:00
Oswald Buddenhagen
6c5d227da1 don't create .pc files for frameworks and internal modules
frameworks are currently broken anyway, and we don't create .pc files
for the private part of public modules, so creating them for entirely
private modules is just inconsistent.

Change-Id: I98da8def73d72ac69b9b246687dce6b1fd150f61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-17 20:22:29 +00:00
Oswald Buddenhagen
004aeff8ee don't create distclean targets in minimal syncqt mode
the projects which use full mode with the named modules have them.

Change-Id: I3b9383d1cc2b43411c25690a5e35e7e84a55aa23
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-17 20:22:25 +00:00
Oswald Buddenhagen
5c2c890b01 (re-)move qt build specific dependency checks from generic paths
the check whether a module depends on itself should be done by the code
which *builds* modules, not which *uses* them.

the check whether a plugin tries to use itself seems kinda pointless in
the first place, so just remove it.

Change-Id: I89b357dae7d7979d131b6824f197e7088047272f
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-17 20:22:21 +00:00
Oswald Buddenhagen
ded63fbb94 make a proper header-only module for QtZlib
that way other modules can use the headers without hacks.

this required making the base directory for paths in headers.pri
configurable in syncqt.

Change-Id: Id35cfe05bcf4c576d3f2d0d8d09590a5e23d21d3
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-17 20:22:17 +00:00
Oswald Buddenhagen
3d3b4129cd unbreak relative rpaths on darwin
check the right variable.
amends 8e846b33.

Task-number: QTBUG-49369
Change-Id: I9108d13b5e9c93aadaa802a62ba64816d81448d5
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-11-17 20:22:08 +00:00
Oswald Buddenhagen
0dcf35cdd9 don't create version script for header-only modules
there is nothing to link with it anyway.

Change-Id: I2e942d24bb39855b3682f3e8d85cb6abca75cb61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-17 20:22:05 +00:00
Oswald Buddenhagen
8df17d233c introduce -optimized-tools option
instead of building host tools always in debug mode, follow the overall
build type, and provide an option to override it.

this supersedes the pre-existing -optimized-qmake option.
however, that option never existed in the windows configure, and this
legacy continues as far as qmake is concerned (msvc builds of qmake are
always somewhat optimized, but not mingw builds).

Change-Id: I42e7ef1a481840699a8dffff13fec2626af19cc6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-17 20:21:54 +00:00
Alexander Volkov
2047fe9253 xcb: Process _NET_WORKAREA and screen geometry changes separately
This commit allows to avoid superfluous calls to the X server.
We don't request _NET_WORKAREA values when the screen geometry changes,
and we avoid RandR calls on each _NET_WORKAREA change.
Besides, update the available geometry of all screens with the
same root window, rather than only that one which corresponds
to Qt::Desktop window.

Change-Id: I5ec624717f5f261c986cd9aaf2425f22985e11c0
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-11-17 18:08:31 +00:00
Alexander Volkov
8beec99899 xcb: Handle screen siblings in QXcbVirtualDesktop
Change-Id: I2f3c3ad75bb3914667cf6f27dc2d91aac103607b
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-11-17 18:08:21 +00:00
Volker Krause
874aaa6ea0 QTest::mouseEvent expects window-local coordinates.
This makes the automatic center click feature of the mouse event methods
also work if the target window isn't positioned at 0,0.

Change-Id: I0d711e484620900ba2ffc4139f7e13346a7482d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-17 15:30:40 +00:00
Samuel Nevala
4f1234033b wirt: Fix cursor position method.
The native position is given in device-independent pixels, so multiply
that by the window scale factor. If no cursor is present (e.g. on
Windows Phone), the native API returns SHRT_MIN as the coordinate values.
Catch that and pass Infinity instead in order to enable the cursorless
fall-back behavior in QQuickMenu::popup().

Change-Id: Ibe8ebcdbe257e8df25eea9873e8f4fa647ae1ab2
Task-Id: QTBUG-48265
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-17 14:59:47 +00:00