Commit Graph

28113 Commits

Author SHA1 Message Date
Ulf Hermann
9366a8be1e Add an early-out to QVector::operator+= and QHash::unite for empty LHS
If the container being added to is default constructed and has never
been modified, we don't have to do all the checking and iterating.
Instead we can just assign with operator=.

If the LHS is merely empty, we could lose reserve()d capacity, so only
do this for a shared-null LHS.

Change-Id: If1e3342662d10833babc7ab847ada0285073723b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2016-04-28 07:26:52 +00:00
Weng Xuetian
9be4ee5202 QtDBus: finish all pending call with error if disconnected
libdbus will send a local signal if connection gets disconnected. When
this happens, end all pending calls with QDBusError::Disconnected.

Task-number: QTBUG-51649
Change-Id: I5c7d2a468bb5da746d0c0e53e458c1e376f186a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-28 05:38:10 +00:00
Marc Mutz
b393641888 xcb: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().

Saves more than 2KiB in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: I9610e711edc01d2a1ba19fef65d6b000ffc77255
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-28 05:09:36 +00:00
Maurice Kalinowski
8a7311532b winrt: Refactor pointer device handling to support pen
In addition to pen events being handled as tablet events, we create
touch events. Same principle is used on other platforms as well. This
allows devices as Surfaces to use the pen with Qt applications.

Furthermore, the first update event does not have to be a press event,
as in a pen has proximity values describing a move without touch, but
also the HoloLens uses touch points as permanent pointer devices. They
all send an exit event once released or out of range. Hence, clean up
the internal touchpoint hash when the touch device is gone, not on
release.

Task-number: QTBUG-38681
Change-Id: I38acaa034a3cfe224098bfa36bfead5428f4db16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-04-28 03:41:17 +00:00
Maurice Kalinowski
52e68d4e10 winrt: Fix memory leak for file reading
IInputStream::ReadAsync might create a separate buffer to fill in data.
Passing a buffer with GetAddressOf() can cause a memory leak of the size
of data to be read.

Instead, pass a separate buffer pointer and continue to use this one
after the async operation. This way, the OS can decide whether to switch
buffers or not, keeping ref counting in sync.

Task-number: QTBUG-52961
Change-Id: I9dfb627287142355ebcf74ca52427b4e8108e8d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-04-28 03:40:07 +00:00
Thiago Macieira
adac71c044 tst_compiler: Expand the attribute test
This is not exhaustive, but was enough to discover ICEs.

Change-Id: Ib60be1d298a66b72e3eb9b75ad538f0bf15b5f62
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-28 02:45:49 +00:00
Thiago Macieira
b94aa943f5 Disable DirectFB automatic detection and mark it deprecated
[ChangeLog][Important Behavior Changes] Support for DirectFB is no
longer enabled by default, due to lack of development in upstream. To
re-enable the platform plugin, pass the -directfb option to configure. If
there is no interest in this platform, the support will be deprecated in
Qt 5.7 and will be removed in Qt 5.8.

See: http://lists.qt-project.org/pipermail/development/2016-March/025273.html
Change-Id: Icaa7fb2a490246bda156ffff143c62515a5f575b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-28 02:45:46 +00:00
Sérgio Martins
9e52234da1 Fix clang developer build due to -Winconsistent-missing-override
The existing code keeps the overrides from each base class together,
so also move them to the correct group after adding Q_DECL_OVERRIDE.

Change-Id: I5d89fb4e7f9454ab0c9c6383f8245e64b95e84e9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-28 02:45:42 +00:00
Thiago Macieira
3430552881 Use C++11 alignas() for Q_DECL_ALIGN, if possible
Change-Id: Ifea6e497f11a461db432ffff144863d4ed69a212
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-28 02:45:40 +00:00
Thiago Macieira
ef7b0df419 Fix QArrayData::allocate() to guard against integer overflows
The proper solution with qCalculateBlockSize will come for Qt 5.7.

Change-Id: Ifea6e497f11a461db432ffff14490788fc522eb7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-28 02:45:37 +00:00
Allan Sandfeld Jensen
e91abaa48e Optimize convert_Indexed8_to_X32
Basic optimization of conversion from indexed8.

Task-number: QTBUG-35747
Change-Id: Ic9d32789769eadb05fbecfebf2d2f2c87d66610b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-04-27 22:01:32 +00:00
Oswald Buddenhagen
f1958dbbea make use of COPIES
Change-Id: I34965cada901fce3cf300a99fa65d4d3f9bd4578
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-27 21:08:47 +00:00
Oswald Buddenhagen
a060d25ef2 add support for copying arbitrary files
this adds file_copies.prf, which understands the variable COPIES, which
works analogously to INSTALLS.

i've been holding this off for a long time, as it is not without
caveats. however, similar hacks are proliferating all over the code
base, so it's time we formalized it.

in fact, it's the easiest way to fix some nasty shadow build problems,
which is why i'm adding this on the stable branch.

Task-number: QTBUG-52256
Change-Id: Icbe3b9fbb79c952546aad2d467a438d3a69d749f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-27 21:08:40 +00:00
Allan Sandfeld Jensen
ab06266e15 Fix clipping of wave underline decoration on certain fonts
Limit the height of the the wave-pixmap so that fillRect doesn't clip
it.

At the same time the precision of the generated wave-pixmap is improved
so it better fits the requested radius.

Task-number: QTCREATORBUG-15851
Change-Id: If754387b20ab7b015857ecb0a0e8fe16de1d728a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 20:20:32 +00:00
Konstantin Ritt
4c6324b5a7 Micro optimization to QFontconfigDatabase
Do not set WritingSystem supported just to unset it afterwards;
test in-place and fallback gracefully.

Change-Id: I6910019c08fcf3909b924c27271547aae2ea0ff1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 20:20:21 +00:00
Konstantin Ritt
db2764db34 Get rid of requiresOpenType() helper
There is already an array of writing systems for which
GSUB|GPOS table is required
(also rename it from "openType" to "capabilityForWritingSystem",
to reflect its meaning).

Change-Id: I7cfd4a80d5ca13f9312b3644b2bd738d6015c71c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 20:20:18 +00:00
Konstantin Ritt
75bd795c9f Query FC_CAPABILITY once per pattern
Change-Id: I5f1219d5a476f1bd09e8c01847fe886f342b28a0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 20:20:14 +00:00
Konstantin Ritt
6493bcaf3c Check for required capability only when FC_CAPABILITY is available
If, by some reason, querying FC_CAPABILITY has failed,
believe FC_LANG unconditionally.

Change-Id: Idf94150359dff555f2a50ccaf146722407f43477
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 20:20:10 +00:00
Lars Knoll
2dacdc33cf Remove unused -license option to configure
Change-Id: Icb2aabb5093ddcaef867f6fbc646cc9bf28f7f65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-27 20:13:18 +00:00
Lars Knoll
fc087e6706 Remove support for some compatibility platform names
Change-Id: I96c4d4bc3053686a3aaf48cd0e62cbe04c175eec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-27 20:13:12 +00:00
Lars Knoll
fa93c7c7b0 Fix a small logic error in qmake bootstrap compiler flags
There was a small logic error in the code selecting the debug/release
C(XX)_FLAGS used when compiling qmake, that could lead to us not
specifying any flags at all.

Change-Id: I5d3c44367d535a17570e3602029b84a02706d624
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-27 20:12:46 +00:00
Lars Knoll
087fcd0bb7 Remove unused -fpu command line argument
Change-Id: I7aad73e51e6da3c39ae86ba6612f8bef2a7cbd1e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-27 20:12:19 +00:00
Lars Knoll
b85bc84dcc Always use the macx-clang mkspec when compiling Qt on OS X
macx-g++ is not supported anymore.

Change-Id: Ibae25768e240d6e8e27c09a345ea02a9b0477fc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-27 20:12:14 +00:00
Konstantin Ritt
3df159ba17 Improve the script itemization algorithm to match Unicode 8.0
Override preceding Common-s with a subsequent non-Inherited,
non-Common script.
This produces longer script runs, which automagically improves
the shaping quality (as we don't lose the context anymore),
the shaping performance (as we're typically shape a fewer runs),
and the fallback font selection (when the font supports more
than just a single language/script).

Task-number: QTBUG-29930
Change-Id: I1c55af30bd397871d7f1f6e062605517f5a7e5a1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 16:52:27 +00:00
Steve Mokris
2a995c77d4 Keep QColorDialog::ShowAlphaChannel from expanding the dialog on OS X.
Workaround for Apple rdar://25792119: If you invoke -setShowsAlpha:
multiple times before showing the color picker, its height grows
irrevocably.  Instead, only invoke it once, when we show the dialog.

Task-number: QTBUG-44620
Change-Id: I8ffc803b4216cdb466a651951f9f987a7b6c1f2e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-27 16:13:18 +00:00
Thiago Macieira
6dfc3541e6 Add QLibraryInfo::version() returning the Qt version as QVersionNumber
[ChangeLog][QtCore][QLibraryInfo] Added QLibraryInfo::version(), which
returns the current version of the Qt library as a QVersionNumber
object.

Change-Id: Ifea6e497f11a461db432ffff1448d4dc84ef57b1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-27 16:12:55 +00:00
Marc Mutz
e81f52ecc7 xcb: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops.

The function QObject::children() returns by const-reference,
so its result can be passed to range-for without further changes.

Saves ~300B in text size on optimized GCC 6.0 Linux AMD64 builds.

Change-Id: I8360e946774b0d30233c0fa68f318872da61e867
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-27 15:29:34 +00:00
Marc Mutz
a79c599df1 xcb: eradicate Q_FOREACH loops [already const]
... (or trivially marked const) local variables,
parameters, or data members, by replacing them with
C++11 range-for loops.

Saves ~1.5KiB in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: Ief6c0cbf08bcdcda28cb8ce6d72a13b7b6ac59c2
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-27 15:29:30 +00:00
Marc Mutz
654a5fe529 Optimize QXcbScreen::visualForFormat()
... by stopping the work when finding the first RGB candidate,
and otherwise only remembering the first candidate as a fall-back.

This way, we don't need to allocate memory as we did when collecting
the candidates in a QVector.

Saves more than 800b in text size on optimized GCC 6.0 Linux AMD64
builds.

Change-Id: I7d0cae69fa421fed881dd5a0f1aa45035d8f7461
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-27 15:29:27 +00:00
Marc Mutz
369572f892 xcb: don't iterate over .keys()
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).

Saves more than 1KiB in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: If4b2fb7eada0e9cde72ab101a5f6e5cb1ba64054
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-27 15:29:24 +00:00
Allan Sandfeld Jensen
4077e28daa Avoid processing bezier curves that will be clipped anyway
Simplify curves ourside the clipped area with a straight line that
closes the path, but saves us a lot of time and memory when zooming in
on a path.

Change-Id: I437f7eab564b805ebbefccd6755060156227c88d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-04-27 14:48:28 +00:00
Liang Qi
b159a1c3e0 Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-04-27 09:46:33 +00:00
Anton Kudryavtsev
01d526d18b QtNetwork: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.

Mark predictNextRequest() as const, because this method
does not modify the object.

Change-Id: Ic94e2b31445ece46ab1423bf5b5f4e66d9a5b6ca
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-27 08:36:05 +00:00
Liang Qi
23a36fd2bf Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qprocess_win.cpp
	src/widgets/itemviews/qheaderview.cpp

Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
2016-04-27 09:18:05 +02:00
Palo Kisa
5795c86e8b QFileDialog: Fix single-click activation
In QFileDialogPrivate::_q_enterDirectory() the QStyle::styleHint() for
QStyle::SH_ItemView_ActivateItemOnSingleClick was called w/o the
widget. By such usage the possible StyleSheet setting was ignored, e.g.
"QAbstractItemView { activate-on-singleclick: 1; }".

Task-number: QTBUG-50871
Change-Id: I7a32c4841db7113f32c3823581c2becc1677e3cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-04-27 07:15:39 +00:00
Gabriel de Dietrich
6844f60dae QCocoaMenu: Have the menu delegate return the right amount of items
In some cases we move menu items around, therefore we should
not rely on QCocoaMenu::items() being the actual items inside
the menu. But, since the NSMenu is updated before hand, we can
rely on NSMenu.numberOfItems instead.

Change-Id: Icd4497beca4f52a6d38408eeaa2e6ec71b579685
Task-number: QTBUG-52931
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-27 06:07:59 +00:00
Liang Qi
2e9fc0d3f0 testlib: added env QTEST_FUNCTION_TIMEOUT for single test function timeout
This is a regression with 5.5, it causes some customer test functions
crash. d3d10cf2 introduced the 5 minutes timeout. The timeout could be
changed after this.

Task-number: QTBUG-52402
Change-Id: I8940bbde5004b4d888732b551274f079ddf20563
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-04-27 06:07:16 +00:00
Mike Krus
f05d5dfa85 Rename iOS device and simulator targets
Use non-os specific target names in Makefiles (device as opposed to
iphoneos, simulator as opposed to iphonesimulator)

Change-Id: Ic8441c09a0e9a254e43f31b678025f16e9a1c440
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-27 05:37:52 +00:00
Konstantin Ritt
c003a18ee3 Fix font fallback for an overridden Common script cases
Always prefer the requested font, even if it doesn't support the
script of interest, and fallback to a font that *does* support that
script, so that the best-matching font always takes a precedence.
The result looks much closer to what CT and GDI/DW does.

Task-number: QTBUG-35836
Task-number: QTBUG-39377
Task-number: QTBUG-43408
Change-Id: I6a89593565683f318f7292ec5ecf271dadc4142a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-04-27 00:40:02 +00:00
Thiago Macieira
6e306e8d94 Disallow non-character Unicode codepoints in QUrl/QUrlQuery
Since they are non-characters and should not be used for text
interchange, it stands to reason that they should not appear in
unencoded for in a URL. To change the behavior, we just need to toggle
a simple flag for QUtf8Functions.

This behavior also matches the recommendation from RFC 3987. We do not
usually follow recommendations from that RFC (as it is generally
believed to be a bad RFC), but this one seems like a good idea.

Change-Id: Ifea6e497f11a461db432ffff1447486c623c12bd
Reviewed-by: David Faure <david.faure@kdab.com>
2016-04-26 23:08:11 +00:00
Marc Mutz
7565b4ec95 QSslSocket: remove unused variable in q_X509Callback()
It's been unused ever since it was added in
bba86a01c9.

Change-Id: I6d5bc27a0744d37f873245c92a4e6ba8fc90c062
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 16:48:10 +00:00
Marc Mutz
a1e3a0daed QString: Fix UBs (signed overflow) in hashed string search
Similar change to 390ea21873, but more
extensive because the hash variables were not, yet, of unsigned type.

This brings the three hashed string search algorithms in QtBase (in
QString, QByteArray and QByteArrayMatcher) in line again.

Found by UBSan, fixing the following bunch of errors:

  tools/qstring.cpp:3080:38: runtime error: left shift of negative value -1291179264
  tools/qstring.cpp:3081:42: runtime error: left shift of negative value -1291179264
  tools/qstring.cpp:3091:13: runtime error: left shift of 73 by 26 places cannot be represented in type 'int'
  tools/qstring.cpp:3091:13: runtime error: left shift of negative value -1255957171
  tools/qstring.cpp:3091:13: runtime error: signed integer overflow: 1783052986 - -1207959552 cannot be represented in type 'int'
  tools/qstring.cpp:3097:37: runtime error: left shift of negative value -1298753576
  tools/qstring.cpp:3098:41: runtime error: left shift of negative value -1298753576
  tools/qstring.cpp:3107:13: runtime error: left shift of negative value -1508912760
  tools/qstring.cpp:3158:38: runtime error: left shift of negative value -677037574
  tools/qstring.cpp:3159:42: runtime error: left shift of negative value -677037574
  tools/qstring.cpp:3169:13: runtime error: left shift of negative value -1657715810
  tools/qstring.cpp:3173:38: runtime error: left shift of negative value -677037574
  tools/qstring.cpp:3174:42: runtime error: left shift of negative value -677037574
  tools/qstring.cpp:3183:13: runtime error: left shift of negative value -1657715810

Change-Id: I1436eb61369919df9fe34251f863dd54fb58af98
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-26 16:37:10 +00:00
Marc Mutz
31c7b24aa5 Silence MSVC warnings when using certain std algorithms
The MSVC STL warns when passing naked pointers as non-bounded
iterators to algorithms such as std::equal and std::copy, in
an attempt to inform users that the range specified by that
iterator has an implicit minimum size that the caller of the
algorithm must ensure is met:

  warning C4996: 'std::_Equal1': Function call with parameters that may be unsafe - \
  this call relies on the caller to check that the passed values are correct. To \
  disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to \
  use Visual C++ 'Checked Iterators'

When building Qt, as well as when building user projects with
qmake (cf. 0a76b6bc7f), we
globally disable this warning (with -D_SCL_SECURE_NO_WARNINGS),
but since we started using STL algorithms in public headers (e.g.
in qvector.h), users get this warning in their own projects now,
unless they, too, define said macro. But such a requirement is
against the Qt policy to have headers that are warning-free as
much as possible.

The suggested way of fixing this warning is to wrap the naked
pointer in a stdext::unchecked_array_iterator before passing it
to the algorithm, cf. examples in

  https://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.120%29.aspx

or, together with the capacity-made-explicit, in a
stdext::checked_array_iterator.

To avoid ifdefs for platforms that don't have these extensions
(which, incidentally, for the unchecked case, includes MSVC 2012),
wrap the calls in macros.

The end game here is to drop -D_SCL_SECURE_NO_WARNINGS, at least
for public headers, even though this commit also adds the wrapper
to implementation and private header files.

An alternative to the wrapper would have been the version of
std::equal that takes four iterators. However, that is a C++14
library feature, while this version of Qt still needs to compile
with a C++98 compiler, and, more importantly, there isn't, and
never will be, a corresponding 4-iterator version of std::copy.

Task-number: QTBUG-47948
Done-with: Stephen Kelly <steveire@gmail.com>
Change-Id: I1bbab257fb5f1c5042939c382a412b596112ff26
Reviewed-by: Stephen Kelly <ske@ableton.com>
2016-04-26 16:36:40 +00:00
Marc Mutz
40e4f75786 xcb: eradicate Q_FOREACH loops [rvalues]
... by replacing them with C++11 range-for loops.

This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.

Change-Id: I982851f15868e62b7a191676ddf4ba6b92c0a42d
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:28 +00:00
Marc Mutz
ee2e441018 QXcbConnection: add some qAsConst()
... to prevent hidden detach(es| attempts).

Saves ~160b in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: I74e1f1304c522b9a4349918e99f562853ec8684e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:19 +00:00
Marc Mutz
80fd691340 QXcbIntegration: simplify a switch
... by aggregating similar blocks under multiple case
labels, and caching functions's return values.

Even saves a few bytes in text size on optimized GCC 6.0
Linux AMD64 builds.

Change-Id: I5784567a09732b4e55b64163b69e7a946f0783ae
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:16 +00:00
Marc Mutz
1a7e5cdeab QXcbConnection: mark some more methods const
... because we can.

Change-Id: Ib5fd281a63ced9dce0de1f74fc849da6c6fc162a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-26 13:28:11 +00:00
Friedemann Kleint
3a8f895d35 tst_QWidget/XCB: Use bottom/right corner of screen as safe cursor position.
Pushing the mouse rapidly to the top left corner causes KDE / KWin to
switch to "Present all Windows" (Ctrl+F9) mode, showing all windows.
This has been observed to be triggered programmatically by
QCursor::setPos(0, 0) if there is no other window beneath and apparently
depending on the perceived mouse "speed".
Suppress this by using the bottom right corner for XCB.

Change-Id: Id18d2f45a095ed4d4f365f010cf45a20b0d9435e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-04-26 13:12:16 +00:00
Friedemann Kleint
d7a3b61459 Windows QPA/High DPI: Scale accessibility coordinates.
Use High DPI when interfacing with the Accessibility API.

Task-number: QTBUG-52943
Task-number: QTBUG-50991
Change-Id: Ica4489222dca5d58864172470e634f709deb69f8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-26 13:12:07 +00:00
Shawn Rutledge
3d5e9a0ba1 Tablet device_information manual test: show wheel events received
We have a bug that proximity events are generating them spuriously;
this is a way of testing it.

Task-number: QTBUG-52921
Change-Id: I490dfcf8d5b325f612b733e29fd49de9418bb19e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-26 13:10:52 +00:00