Commit Graph

25734 Commits

Author SHA1 Message Date
Liang Qi
8c57e8c012 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/network/socket/qnativesocketengine_p.h
	src/network/ssl/qsslsocket_mac.cpp
	src/network/ssl/qsslsocket_mac_p.h
	src/widgets/kernel/qwidget.cpp

Change-Id: I39592cb37d710dfaf8640769ba3c1b637927d7f4
2015-11-27 08:35:45 +01:00
Laszlo Agocs
b13801fd55 Avoid pulling in X11 headers in brcm backend
In some configurations we may end up using Mesa's EGL headers instead
of the Broadcom ones. Make this work by setting the usual define to
prevent including Xlib headers that then conflict with all sorts of
things in QtCore.

Change-Id: I4970553428e5b0e81bd76694980f3b6b194ae4c2
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-26 17:35:56 +00:00
Oswald Buddenhagen
9b2e98245a use bindir instead of libdir when launching tools on windows
longer term, the redundant .dlls from the libdir will hopefully
disappear. short term, this is a workaround for CI brokenness.

Change-Id: Ia30173355f3aca222d4ca40e7a38c2cf535bbc03
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-26 17:03:39 +00:00
Oswald Buddenhagen
94fb31be98 build QML plugins with relative RPATH as well
amends 967372c97.

Change-Id: I898950d6847e43d565748cd8d1ea583cf5ca5c9d
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-26 17:03:32 +00:00
Oswald Buddenhagen
a3bcb68bc8 fix copy&paste-o in DeviceVar error message
Change-Id: I2b7d95c004ce045527b124ef25b6d224535c895b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-26 17:03:28 +00:00
Allan Sandfeld Jensen
7cbbca5860 Add AArch64 ASM to qimage_neon.cpp
Since AArch64 NEON assembly is different from Arm32 NEON we need to
write a separate version.

Assembly is used over intrinsics as the intrinsics have trouble
efficiently using the vstX and vldX instructions.

Change-Id: I5b67fc87acb2433b503e658099b742d57a9cff18
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-11-26 16:46:06 +00:00
Robin Burchell
4a4b17805c Fix QCOMPARE with enum classes.
As these are strongly typed, they won't implicitly convert to int, so make sure
to cast explicitly.

(cherry picked from commit 9626baaea9, auto test
is not included)
Task-number: QTBUG-49597
Change-Id: I29c4331a9b0c61f2e60c2bcab5a99f65daa7060f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-26 16:00:30 +00:00
Friedemann Kleint
adc4894fca tst_QProcess: Use a QTemporaryDir for files to be created.
Ensure the test works in a working directory with read-only
permission and that the file names are unique.
The test can then be executed repeatedly by COIN even in case
left-over hanging process helpers still lock the files. Also
disambiguate the "data" files used by various tests.

Task-number: QTBUG-47370
Change-Id: I3b9c7b70828da78f400196fcbba27bc61ea4538f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-26 15:53:34 +00:00
Volker Krause
45470e71bc Remove O(n^2) behavior in fallbacksForFamily().
Speeds up application startup by a few percent, even with just a normal
amount of fonts installed.

Change-Id: I4c3d87119ddbc53e66166f21cb72946cdf7e4a41
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-11-26 15:52:07 +00:00
Friedemann Kleint
ee632a21f6 tst_QWaitCondition::wakeOne(): Increase wait interval.
Introduce constants and make the interval for the 2nd thread a bit
longer.

Task-number: QTBUG-49653
Change-Id: I92ac0494ec6c9af5bde858007d08e26210215434
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-26 15:51:07 +00:00
Friedemann Kleint
19e295b330 tst_QWaitCondition: Prevent test functions from interfering with each other.
Introduce a base class for the threads that ensures termination in the
destructor to ensure all QThreads instantiated on the stack are terminated.
This should reduce crashes since the test thread classes have pointers
to stack variables of the test slots.

Set object names on the threads for better diagnostics.

Decouple wakeOne()/wakeAll() that impact each other via the static count
variables of the thread class by introducing a base class WakeThreadBase
keeping a pointer to an QAtomicInt count variable on the stack instead
(similar to the existing pointers to the mutexes, etc).

Task-number: QTBUG-49653
Change-Id: I73537386bf36019efa81e8e24ba9af92506f7794
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-11-26 15:50:36 +00:00
Ilya Kotov
acc3df2c4e Send QEvent::Tooltip to QSystemTrayIcon
QSystemTrayIcon's window should send QEvent::ToolTip to QSystemTrayIcon
main class under X11. This patch fixes regression inroduced in Qt 5.0.

Change-Id: I81f6d85e13f492e5e7d13dacc44185a511e5085d
Task-number: QTBUG-46130
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-26 15:48:34 +00:00
Allan Sandfeld Jensen
07fdfa5598 Detect NEON on AArch64
The __ARM_NEON is the standard define for NEON instructions support
__ARM_NEON__ is only legacy, and specifically not defined in
AArch64 builds, which causes us not to detect NEON support there.

The NEON assembler files doesn't build with AArch64, so the NEON
drawhelper methods must be excluded for now.

Change-Id: Ie32f855bde94ee7efd8a8ddb7766c931778e729b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-26 15:40:41 +00:00
Tor Arne Vestbø
5c446031c3 iOS: Map make install to xcodebuild build for the iOS simulator
The xcodebuild tool only supports the install action for devices, not
for the iOS simulator platform.

Change-Id: I47e8bb7d44962bd4a433a314fa9d315ed3683ca6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-11-26 15:37:58 +00:00
Nicolas Capens
7944706857 Fix potential division by zero.
In a Chrome Remote Desktop session the htotal and/or vtotal timings
can be zero and lead to a SIGFPE exception.

Task-number: QTBUG-49322
Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
2015-11-26 15:37:45 +00:00
Laszlo Agocs
c83eefff97 Remove incorrect assertion from the backingstore
The ifdef gave an impression of the code path being hit only when
texture-backed widgets are present and OpenGL-based compositing is
active. This is false. Asserting on having a context current is
wrong (as shown by autotests on the 5.6 branch).

Change-Id: I2539f0aac75b26597f49f63edcd9580428be79b7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-11-26 05:50:14 +00:00
Tor Arne Vestbø
980f8aed32 iOS: Add support for delivering touch pressure on iPhone 6s/6s+ devices
As 3D touch can be disabled/enabled at runtime on those devices, we need
to watch for changes to the relevant settings and update the touch device
capabilities that we report to the user.

Note that iOS will deliver touchesBegan with a touch force of 0, which
we will reflect/propagate as a 0 pressure, but there is no clear
alternative, as we don't want to wait for a touchedMoved before
sending a touch press event to Qt, just to have a valid pressure.

Change-Id: I47fb8a9f98ab3244e16a337bbfcf1fe24e4c7aa2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-26 02:45:57 +00:00
Allan Sandfeld Jensen
9b28fd5bfc Fix inplaceRgbConversion test on non-x86
We test that inline conversion between same image depths always succeed
inline, but that requires that any direct conversions exists both in
non-inline and inline versions.

This patch adds a non-sse2 inline conversion from ARGB32 to ARGB32PM
which was missing.

Change-Id: I71937cd4b77fb41fe2064da937f6dcbf2a6534e6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-11-26 02:43:21 +00:00
Friedemann Kleint
eaf160c586 Add a manual test for cursors in multi-screen/High DPI setups.
Change-Id: I4c0baeaf01f0b3d6162a16ef7fda822f5a4cb1db
Task-number: QTBUG-49511
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-25 20:50:30 +00:00
Friedemann Kleint
3c56e33a27 tst_QProcess: Remove macro QPROCESS_VERIFY().
It was used to verify waitForFinished() and printed QProcess::errorString()
on failure, which is misleading, since the process is not
in an error state - it is still running. Example:

QWARN  : tst_QProcess::setStandardOutputFileAndWaitForBytesWritten() QProcess error: 5: Unknown error
FAIL!  : tst_QProcess::setStandardOutputFileAndWaitForBytesWritten() 'ret' returned FALSE. ()

Use a plain QVERIFY instead.

Task-number: QTBUG-47370
Change-Id: Iacfa6e1a5ffd2be4e1257a27a400ccc59671e8c8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-25 20:50:18 +00:00
Friedemann Kleint
2182d6ae40 tst_QItemModel: Register QAbstractItemModel::LayoutChangeHint.
Silence warning:
Don't know how to handle 'hint', use qRegisterMetaType to register it.

Task-number: QTBUG-49623
Change-Id: Iec0a823c7af87eddd9a3f126a1b970da1ff2f03f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-25 20:49:51 +00:00
Friedemann Kleint
9c430bc4c9 QSignalSpy: Improve warning about unregistered parameter types.
Don't know how to handle 'hint', use qRegisterMetaType to register it.

becomes:

QSignalSpy: Unable to handle parameter 'hint' of type 'QAbstractItemModel::LayoutChangeHint' of method 'layoutChanged', use qRegisterMetaType to register it.

Task-number: QTBUG-49623
Change-Id: I5020bb5b6f4ba87438d0f862279bed1ceb203d12
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-25 20:49:42 +00:00
J-P Nurmi
d06d7413d5 Fix QTextLine::cursorToX()
0e99f3c broke tst_qquicktextinput::horizontalAlignment_RightToLeft()
and tst_qquicktextedit::hAlign_RightToLeft(). This fix was proposed
by Konstantin.

Change-Id: I602b7301d415f266224ae2c1ffd81244e9565862
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-25 20:41:12 +00:00
Edward Welbourne
00db6dbc27 Ignore stuff created during testing
Change-Id: I05c93c9739ff8397606088d0b23e58d145f124a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-25 13:17:01 +00:00
Edward Welbourne
2277e3b873 Proof-reading fixes to QCoreApplication documentation.
Things I noticed while reading - so I fixed them.

Change-Id: I48f6f2eef7ac3cf901e2f1305c503fb18f5ab2ae
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-11-25 13:14:14 +00:00
Samuel Gaist
68d100692b Doc: added sample to QFileOpenEvent class details
This sample will help user needing to react on QFileOpenEvent get
started faster.

Change-Id: I7def292894fc39d803f70cbf0453f6791b7aea15
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-11-24 23:46:12 +00:00
Laszlo Agocs
5c7f000cd4 Reduce the number of paint events for QOpenGLWidget
Changes to other widgets in the window, especially special cases like
moving dock widgets around, trigger an unfortunately high number of
paint events and calls to paintGL(). Let's try to avoid this.

There is no need to send out a paint event to a texture-backed widget
when it was not explicitly dirtied. Overlaps won't matter since such
widgets are not part of the backingstore. Everything else has to work
like ordinary widgets, though, it is only the QPaintEvent sending we
can optimize away, nothing else.

Task-number: QTBUG-49466
Change-Id: I8ef294ba0a6c305d0002a80e85c06db2c2501cf8
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-11-24 19:28:32 +00:00
Friedemann Kleint
a69c0bb38e tst_QNetworkReply: Fix repetitive invocation of cleanup().
Move the code from cleanup() into a separate cleanupTestData()
and call this from initTestData() and cleanup(). Remove slot init().

Change-Id: I4e7b5b89197ed0aa50f46f730e9c1d9c59749614
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-24 15:38:18 +00:00
Friedemann Kleint
1e8863e39d tst_QImageReader: Fix file handling.
Use a QTemporaryFile in readFromFileAfterJunk() instead writing
to the current directory which might not have write permission.
Enclose each call to QFile::open() in QVERIFY2() with error message.

Change-Id: I3c5da31c6681a2396cee473cafe7d92c5c220de3
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-24 15:30:04 +00:00
Leena Miettinen
09b64aa9d3 Doc: add links to new topics in Qt Creator Manual 3.6
Change-Id: I4e317c8dad847c4b4be5e9a9d7c904abc2fa95c7
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2015-11-24 15:17:54 +00:00
Oliver Wolff
c7251e7dcd Revert "Fix deadlock when setting environment variables."
This reverts commit 5b62a5e7aa.

This commit is reverted due to two reasons:
1) It was written incorrectly and does not work as is. The
   ifdefs should be ifndefs. In its current state, it does
   the exact opposite of what it is supposed to be doing.
2) There is another environment access inside qsimd.cpp
   (which checks QT_NO_CPU_FEATURE). This access causes the
   app to hang.

All in all that approach is not sustainable as we might get
bitten by environment access again and again. Instead we should
use another environment container or use a recursive mutex for
WinRT and Windows CE.

Task-number: QTBUG-49529
Change-Id: Iaca76404dc1023551a7c25489a609681135765fd
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
2015-11-24 15:12:00 +00:00
Friedemann Kleint
bb5570082e tst_QImageWriter: Use QTemporaryDir.
Create a temporary directory instead of writing to the
test data  directory or home path (Android).

Change-Id: I6af583e5da91eefb603eaae179e7d789487dc626
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-24 15:02:28 +00:00
Tor Arne Vestbø
f30b75e569 xcb: Don't assume creating a window will result in ConfigureNotify event
We assumed that creating a window would always result in a configure
notify event, so we delayed sending the initial expose event until
receiving the configure notify.

That strategy fails in cases where the window does not need a reconfigure
after being created, such as when not running a window manager, or when
creating child windows. In those cases the window is just mapped, and
we ended up never sending an expose event.

The problem was masked by sometimes receiving an explicit expose event
from X, just after the mapped notification, which we then sent without
waiting for configure. Unfortunately we can't rely on this behavior
and need to remove the deferred expose event logic, so that we always
ensure that at least one expose event is sent to Qt.

Change-Id: I702be7f24de2a1e89c085fb6bd95bb8ff7792a27
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-24 14:49:15 +00:00
Edward Welbourne
0ae8ef7acb Simplify a search for terminator.
We need to remember where the included file's name starts anyway; if
we move this to before the search for the end, we don't need a
separate variable to keep track of its length.

Change-Id: Ia8d72839ac3fa32f2e748a21ee70dcab614562f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-24 14:48:37 +00:00
Maurice Kalinowski
4fd1e5f40c winrt: Fix text rendering
This is a partial revert of aecf3006bd.

The DPI needs to be set inside the constructor to have the text
rendering initialize properly. Landscape orientation fix is still valid
and the dpi change was unrelated to resolve QTBUG-49470.

Task-number: QTBUG-49610
Task-number: QTBUG-49470
Change-Id: I928b8d291b65cd744731c009917804b96253c276
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-24 14:46:44 +00:00
Joni Poikelin
e4d1bf9829 Fix crash in QFileDialog::iconProvider() with native dialogs
Task-number: QTBUG-49600
Change-Id: Ied28c0e7efa6b4dce25705dab98377848db5a6d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-24 08:35:42 +00:00
Tilo Nitzsche
837b5d4589 Fix undefined behavior in qRgba().
Shifting a signed integer that overflows is undefined behavior. All
masks were changed to unsigned in qRgb and qRgba. While the alpha value
is enough to fix the undefined behavior, Visual C++ generates slow
code if not all of those constants are unsigned.

Change-Id: Ia0ec3e9464088495173b4ad9c2e37a49e6f8e987
Task-number: QTBUG-49595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-24 05:28:21 +00:00
Friedemann Kleint
045abe631c Remove arch/qatomic_mips.h from src/corelib/arch/arch.pri.
Amend change 110a8c339f, fixing:
WARNING: Failure to find: arch/qatomic_mips.h

Task-number: QTBUG-49168
Change-Id: I7009037d3f4c51c9ed9713b6e94ee43022fe2645
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-24 05:24:39 +00:00
Samuel Nevala
5b62a5e7aa Fix deadlock when setting environment variables.
Qt uses QHash as the container for faking environment variables on
Windows Runtime and CE. Environment variable manipulation functions are
protected by mutex. Accessing the QT_HASH_SEED environment variable
inside QHash can lead to situation where qputenv() call leads to
qgetenv() call and that leads to a deadlock. Since the application
environment is faked anyway, drop support for QT_HASH_SEED and ifdef
that functionality out on those platforms. Documentation is updated
to reflect changes.

Task-number: QTBUG-49529
Change-Id: I1b1c28cb0b041fe2a63ca3dce57068fcb46505a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-23 19:58:16 +00:00
Konstantin Ritt
fa00afe7d7 Optimize QTextEngine::findItem() usage cases
Since the item positions are guaranteed to grow, we could safely re-use
the obtained first item while looking for the last item in the chain.

Change-Id: I5e42f5de820c62a51a109a4b227b031c697aa898
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-23 18:52:46 +00:00
Konstantin Ritt
073a16e50e QTextLine::cursorToX: Optimize by re-using the cached values
(and move some code around)

Change-Id: I2e26dcc7b769fdbcc750332845da11ec88e332dd
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-23 18:52:43 +00:00
Konstantin Ritt
0e99f3c853 QTextLine::cursorToX: Always return the nearest valid cursor position
The documentation already states we're doing this, so stop lying
and implement it properly :)

Change-Id: Ic78980d76f61e8aa64e59ea058a8105d9c507774
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-23 18:52:40 +00:00
Konstantin Ritt
1ab7880d73 Get rid of QT_USE_BUNDLED_LIBPNG
In fact, this is an extra info no one ever cares about.
We already have properly configured INCLUDEPATH to look for png.h.

Change-Id: I27fec4d474570683c6c371dff34472a7c650fe65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-23 18:52:35 +00:00
Friedemann Kleint
3811307bf1 ANGLE/D3D11: Suppress keyboard handling of DXGI.
Set the DXGI_MWA_NO_ALT_ENTER to suppress the Alt-Enter shortcut
causing the window to become full screen.

Task-number: QTBUG-44904
Change-Id: Ia4156ddee37a8a3da6e9e3130022c63a674f4429
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-23 15:05:03 +00:00
Topi Reinio
7c22e14300 Doc: Online style: Decrease font size of enum tables' Value column
A table in enum doc may have long literal strings defined
as enum values - they take up space from the Description column,
and often force a scrollbar to appear, making the entire
table difficult to read.

Alleviate this by reducing the font size for the text in Value
column.

Change-Id: I18495a4f506851f9eff2cd94f5cdfcb03096c698
Task-number: QTWEBSITE-658
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-11-23 14:15:24 +00:00
Allan Sandfeld Jensen
5dbef0b7d2 Fix QT_CPU_FEATURES
The part of qmodule.pri that is supposed to set QT_CPU_FEATURES ends up
missing in the output.

Change-Id: I30f3dbad5ac22d32e25d63037980dac370adc4ea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-23 13:52:41 +00:00
Tim Blechmann
084df84bd0 QPI/Cocoa: QNSView - guard removeFromSuperview by autorelease pool
removeFromSuperview could be called from outside the Qt domain (e.g from
a native cocoa gui). we need to guard it by an autorelease pool to make
sure that potential release/dealloc methods are not postponed to a point
when we do not have a qapplication anymore

Change-Id: If65cce4c524a16ffee125694c534f900c7d08fa8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-23 13:38:18 +00:00
Friedemann Kleint
07efdb78f0 Windows: Fix the size of drag cursors in multi-screen setups.
Move QWindowsDrag::defaultCursor() to the per-screen instance
of QWindowsCursor so that the cached default drag cursor pixmaps
are created with the correct size per screen.

Task-number: QTBUG-49511
Change-Id: I02f75ac3b1e5e064325b066ee03e1d5c8a7c7ee8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-23 13:15:33 +00:00
Friedemann Kleint
05c8e51d88 Windows: Scale cursors from resource pixmaps according to screen.
QWindowsCursor::customCursor() uses a best match algorithm to
find the most suitable pixmap for the cursor size obtained
from GetSystemMetrics(). This size is correct for the primary
screen only; in High DPI + normal monitor multiscreen-environments,
the cursors will be too large on the secondary monitor.
Pass the platform screen to apply a correction factor based on
logical DPI to obtain the correct size.

Task-number: QTBUG-49511
Change-Id: I8a64a969e3ade7ab5029e3ae904a0bcbb4704f90
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-23 13:15:30 +00:00
Friedemann Kleint
36bb6d266e Windows: Scale pixmap/bitmap cursors when High DPI scaling is active.
Apply a per screen scale factor, also taking the device pixel
ratios of the pixmaps into account.

Task-number: QTBUG-49511
Change-Id: If46b6eeb37635c2c4046992c1ba06711ccf54eae
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-23 13:15:25 +00:00