Commit Graph

14717 Commits

Author SHA1 Message Date
Andrew Knight
b858e7af4f windows: Enable ANGLE D3D11 renderer by default
Also, remove the -angle-d3d11 configure option, as it no longer is
necessary to select the renderer at build time.

The D3D11 renderer is the default renderer in upstream ANGLE, and has
been shown to be a more reliable solution for developers running over
remote desktop and inside virtual machines. It also provides more features
to the OpenGL ES implementation.

This configuration switch does not disable the D3D9 render; if the GPU
does not support D3D11, D3D9 is used instead.

[ChangeLog][QtGui][Windows] The ANGLE D3D11 renderer was enabled by
default. Systems which cannot use the new renderer will automatically fall
back to the D3D9 renderer at runtime.

Task-number: QTBUG-41031
Change-Id: If894309c07d9309c236b63c36f37679f74375133
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-09-05 07:39:53 +02:00
David Faure
2eb61feb9b Doc: QRect::isEmpty's documentation didn't match the code.
The code says
bool QRect::isValid() const { return x1 <= x2 && y1 <= y2; }
so the documentation should say <= as well, rather than <.

Change-Id: If52005879d2a758b5d1d64b552e6cd96341fae76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-05 01:28:32 +02:00
Thomas Fischer
983dde1f2f Avoid adding widget to its own layout
Widgets and layouts added or inserted to a layout are checked for:
- Not being NULL
- Not being the parent widget of a layout or the layout itself,
  respectively

Without this commit, adding a widget to its own layout would result in a
CPU-hogging infinite loop. Now, a warning is written to stderr and the
add or insert function call is ignored.

The checks are implemented as public functions of QLayoutPrivate and
thus accessible in QLayout's descendants to be used in various
"addWidget", "insertWidget", etc functions.

Unlike 'classical' layouts like QGridLayout, QFormLayout does indeed
accept widgets that are NULL. To not break this behavior, any call for
the check functions first tests if the widget or layout, respectively,
to test is NULL or not and calls the check only in the latter case.

Automated tests for QBoxLayout, QGridLayout, and QFormLayout were added.
For an unpatched Qt 5.3, each of those automated tests will freeze as
explained in QTBUG-40609. For a fixed version, warning messages about
invalid parameters to addWidget/addLayout/... calls will be read by
QTest::ignoreMessage, resulting in a passed test.

Change-Id: I1522d5727e643da3f7c025755975aca9f482676d
Task-number: QTBUG-40609
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-05 00:05:45 +02:00
Samuel Gaist
8206a263ab Add missing private headers warning
Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-04 22:58:57 +02:00
Marc Mutz
e4fb59c0af QCommonStyle: replace a QPolygon with a QPoint[] (IV)
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

This one is a bit more complicated, as the QPolygon was returned
from a helper function, so I wrapped the array in a minimal
std::array-like StaticPolygonF.

Together, these four QPolygon -> QPoint[] changes result in
ca. 4.5K text size reduction for libQtWidgets.

Change-Id: I082f199d5edb7a7782173fe3748220f373edac8a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-09-04 21:27:56 +02:00
Marc Mutz
8478fc4e59 QCommonStyle: replace a QPolygon with a QPoint[] (III)
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

Change-Id: Ie1eecd376a52b73572998ba253a032deaa0daaf9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-04 21:27:50 +02:00
Marc Mutz
e192643c2d QCommonStyle: replace a QPolygon with a QPoint[] (II)
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

Change-Id: Ifdf8224ddffe06ef7848562023e372e2c32b9ad6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-04 21:27:43 +02:00
Marc Mutz
32a0e0cc61 QCommonStyle: replace a QPolygon with a QPoint[] (I)
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

Change-Id: I50c69103bba47e9f6de4f5616e8f40fee522ddc2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-04 21:27:37 +02:00
J-P Nurmi
a544ef5906 QCoreTextFontDatabase: reduce memory consumption
ATSFontNotify() allocates over 30MB for no apparent reason for
applications that don't register fonts.

Change-Id: I7bbc97f53b76be1e638de8ca0d1be3a08586cf00
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-09-04 19:50:19 +02:00
Alex Trotsenko
e35841e374 Fix endianness part of QSysInfo::buildAbi() string
Both Q_LITTLE_ENDIAN and Q_BIG_ENDIAN macros are always defined
on all architectures. So, byte order detection results in
"little_endian" value for big endian systems. Test the system
endianness in a right way, according to Q_BYTE_ORDER macro
documentation.

Change-Id: I5523f90567e78d679a3ff2902a8f5377ed39ceb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-04 18:31:50 +02:00
Tor Arne Vestbø
59385ff2ca iOS: Update QIOSScreen::nativeOrientation() for iOS8
For iOS8 and up [UIScreen bounds] changes based on the interface orientation,
so we need to use [UIScreen nativeBounds] instead.

Change-Id: I3fc12cfa417df26ca94c803e970bc2dc18a94378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-04 18:15:51 +02:00
Jake Petroules
20cf2debfb Revert "iOS: Update QIOSScreen::nativeOrientation() for iOS8"
This reverts commit f6c36917f1.

Depends on 203ce7c5ce
which can't go into 5.3 because it introduces new enum values.

Change-Id: I13040a7268fae4baeace244a3e75dc982d3a50b8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-04 18:13:10 +02:00
Louai Al-Khanji
2f0fa59d59 Add KMS hooks for EGLFS plugin
Change-Id: Ic703334e52726cdd815cccf152d9d01aa63c803c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-04 15:23:30 +02:00
Andrew Knight
8f88cc2c0f ANGLE: Fix compilation with MinGW + D3D11
Provide workarounds for things GCC doesn't like, and define a number
of macros not found in the MinGW headers.

Change-Id: I254c208209c0071fae5efb6727f2b3cfd5542da6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-04 15:09:34 +02:00
Frederik Gladhorn
68206db907 Improve accelerator stripping in accessible widgets
When we strip the & we should also report the hotkey.
In addition only strip labels when they are buddys and try not to remove
ampersands from all kinds of random text.

This fixes https://bugs.kde.org/show_bug.cgi?id=338282

Change-Id: I401281cd9ff43b23a3923ad9909ca9c469b59506
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-09-04 14:50:36 +02:00
Frederik Gladhorn
52f859604d Accessibility: Improve line boundary helper functions
These functions are supposed to make it easy for third parties (and
QLineEdit) to implement the textAt/Before/AfterOffset functions.
Before the functions were ignoring newlines completely and thus only somewhat
useful.
Change-Id: I7136b9502a7fa6f8ad9ad7236761a34c1a7fd4da
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-09-04 14:50:32 +02:00
Samuel Nevala
105fa5b5d9 Respect android:windowSoftInputMode in manifest.
Read and store softInputMode set at AndroidManifest.xml on QtActivityDelegate.
When showSoftwareKeyboard is requested setSoftInputMode for main window if
softInputMode is not defined fall back to old behavior.

Change-Id: I71cb27d4bdb4ae4e3c2a0706560173703a2f5a50
Task-number: QTBUG-34401
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-04 14:04:44 +02:00
Friedemann Kleint
b9e3f59551 QMdiSubWindow: Keep event filter on system menu over its lifetime.
QMdiSubWindow::eventFilter() is supposed to close the sub window on a
double click on the menu icon. However, it did not receive the double
click event since it removed itself when the menu was hidden, which
happened before the double click was delivered.

Task-number: QTBUG-25179
Change-Id: I5e7fb02dda26ceab12e8b7554fc604066a0a3136
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-04 08:58:06 +02:00
Laszlo Agocs
0bb2b62135 windows: Fix dynamic opengl build
Cannot call WGL or EGL functions directly anymore.

Change-Id: I0d5c6217679d87a2092c945a9b841dfd7b6c299a
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-03 18:13:51 +02:00
Laszlo Agocs
38ea5428c4 Enable QT_ANGLE_PLATFORM selection in dynamic builds
Change-Id: I8ebe62ec1e024e8a0a0f9e8aeac6fb81b1095e72
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-03 18:13:47 +02:00
Andrew Knight
20ea0cbaba direct2d: Work around ClearType rendering bug in translucent mode
This switches the font rendering to use gray scale antialiasing when in
translucent rendering mode. It does so by adding a flags argument to the
paint engine, allowing for future expansion in communicating render hints
from the device to the engine.

Task-number: QTBUG-41002
Change-Id: I0265154716a12060e851b603a109e9c693f5e843
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-03 17:50:11 +02:00
Jeremy Lainé
bdb30abcd2 ssl: add support for ASN.1 boolean values
This adds support for reading and writing ASN.1 boolean
values. It also adds an operator to test two ASN.1 elements
for equality.

Change-Id: I4a22cbf9808533d593fc59d27b63caaf650b1f57
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-03 17:28:02 +02:00
Andy Nichols
c68ef6d2c0 DirectFB: Add QT_DIRECTFB_BLITTER_DEBUGPAINT environment variable
This environment variable will paint an overlay on each paint command
that is using the accelerated blitter path for DirectFB.  This is useful
when you want to assure that you are taking advantage of the DirectFB
blitter.

Change-Id: I6e374754825794daf9c1bf40bee2b963e752a8e9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-03 17:07:52 +02:00
Dimitar Asenov
633647334c Speed up the removal of items from a QGraphicsScene
When using a linear index, all items in a scene are stored in a QList.
While adding new items is a constant operation, removal requires a
traversal through the entire list. This is especially problematic
when the scene contains millions of items and many of them are removed,
which requires a linear search for each item, resulting in a very slow
operation. Moreover, this behavior is actually inconsistent with the
current documentation which states for the linear index:
"Adding, moving and removing items, however, is done in constant time."

With this change, the list is sorted once an item needs to be removed.
The item to be removed is then found using binary search. To reduce
the overhead of sorting the list is not sorted from scratch. First the
newly inserted items are sorted and then the two parts of the list
are merged.

[ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items
when using the linear index.

Change-Id: I28708622605d7fb0fac656df1f9b2f2fa3136759
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2014-09-03 16:52:17 +02:00
Laszlo Agocs
5b2f77c598 eglfs: Fix regression in config selection
During the introduction of context adoption support the config choosing got
broken for context creation, at least for hooks that return a customized
format in surfaceFormatFor(). The returned format is the one that needs
to be passed to chooseConfig(), not the original.

Change-Id: Iae203cbbf7b39c462386611dd3744f048116df13
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-09-03 16:27:52 +02:00
Dimitar Asenov
ed418f91d5 Revert "Speed up the removal of items from a QGraphicsScene"
This reverts commit bf2ec0183c.

That patch changed the way the linear index works in QGraphicsScene
in order to speed up item removal. That patch occasionally rebuilt
the index by recursively exploring all items in the scene, starting
with the top level. Further testing revealved that in some
circumstances, rebuilding the index in this way can be slow, thereby
significantly slowing down the index compared to the unpatched
version.

The original patch only exists in the qt 5.4 branch and has not been
released.

Change-Id: I081dbcdcc86196ef382466c3e800a33eab9a5b79
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2014-09-03 16:11:41 +02:00
Paul Olav Tvete
7e1e42cbf2 Android: Avoid deadlocks on suspend
Get rid of the rendezvous at shutdown: the android thread does not
need to wait for the GUI thread. Since the GUI thread frequently does
blocking calls to the android thread, this fixes several known and
potential deadlocks.

Task-number: QTBUG-41072
Change-Id: Ia6fa8da026b1727e7352b22f4df4d72b63b8c847
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-03 15:18:49 +02:00
Lars Knoll
5cb21215c9 Change a qFatal to a qWarning
There are valid uses cases how to use Qt without installing
any fonts (e.g. by using an application font), so let's
make the warning non fatal.

Task-number: QTBUG-29192
Change-Id: I5684331b687bef4b8a54be1f68303c80aa8d4372
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-09-03 14:38:18 +02:00
Maks Naumov
7af329fdf2 Widgets: remove pointless assignments
Assignment of a value was two times successively for same variable while
the variable itself is not used between these assignments.

Change-Id: I3c457e3af0505d32a64f6c8576b458cd15a951e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-03 13:30:12 +02:00
Albert Astals Cid
4dae1a685c Use QPlatformTheme::SystemIconFallbackThemeName in static QString fallbackTheme()
Instead of QPlatformTheme::SystemIconThemeName

Change-Id: Id318944730cd1b8014380a972eb28fd8aab1f382
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-03 13:24:25 +02:00
Friedemann Kleint
74303ad497 QSwipeGestureRecognizer: Use qAbs() to check distances.
Task-number: QTBUG-15768
Change-Id: Idc6c6687430365a015fb2c15f4e4dcae6a687f9f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-09-03 13:23:42 +02:00
Robin Burchell
3006bd2d44 Make QElapsedTimer default to invalid (and now non-POD).
The practical uses of a POD QElapsedTimer are not really that clear, and the
number of misuses of this API are quite high. Default the state to invalid to
prevent against mistakes.

[ChangeLog][QtCore][QElapsedTimer] Is no longer a POD.

Change-Id: I267292acf2bfca7404e3e449dd04410441d7ce26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-03 13:19:35 +02:00
Oliver Wolff
8d0e6000cb WinRT: Fixed initialization of udp socket
udpSocket() can only be called after the socket descriptor is set.

Change-Id: If651ff58507cd66c98de4b699a80149913d9ffcf
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-03 13:17:00 +02:00
Yoann Lopes
05670f586f Android: use FBO readback workaround by default.
Maintaining a black list of devices can't be reasonably done.
The workaround is now enabled by default. It can be disabled with the
QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND environment variable, in
which case the current list of blacklisted drivers will still be taken
into account.

Task-number: QTBUG-40483
Change-Id: I9b90ab45e86569e8e4679333ddb9b835189892c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-03 12:29:23 +02:00
Oliver Wolff
365c6e81be WinRT: Fixed construction of QNativeSocketEngine without parent
Change-Id: If55a8049224a7dceca33a3cf3089d541a3a97b8e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-03 09:33:23 +02:00
Jeremy Lainé
cd3dece750 ssl: common key parser support for encrypted keys
This adds the infrastructure for reading and writing encrypted private keys
when using non-OpenSSL backends. Each platform must provide its cryptographic
encrypt / decrypt functions.

As WinRT already uses the common parser, this commit includes an
implementation for that platform.

Done-with: Andrew Knight <andrew.knight@digia.com>
Task-number: QTBUG-40688
Change-Id: I0d153425ce63601ff03b784a111e13962061025f
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-02 23:16:25 +02:00
Friedemann Kleint
b17365cda9 Fix drawing of QLineEdit's actions when Qt::AA_UseHighDpiPixmaps is set.
Task-number: QTBUG-40525
Change-Id: Iff3c1e16d9c44e1d36b8f83ca96b48bff05ab1f0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-09-02 22:57:24 +02:00
Paul Olav Tvete
d450eb5e6d Android: Guard against invalid surfaceID
Do not try to resize or destroy invalid surfaces.

This caused update problems with all GL apps after suspend,
since we would forget the dummy view that we always keep
around so we get proper transitions on shutdown.

Also make sure that we don't mess this up even if we try to destroy a
non-existing surface. This would have fixed the bug by itself, but
then we would still be stuck with the annoying warning message.

Task-number: QTBUG-41093
Change-Id: I83299e93eb9ac5357b98ca47014789b56c91b35a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-02 22:00:02 +02:00
Andrew Knight
a8b243b42e windows: Allow selection of ANGLE's renderer
The default behavior of ANGLE is to use D3D11 before falling back to D3D9.
This change improves flexibility the platform plugin to explicitly create
a D3D11, D3D9, or D3D11 software (WARP) context by setting the
QT_ANGLE_PLATFORM to "d3d11", "d3d9", or "warp", respectively.

Task-number: QTBUG-41031
Change-Id: Ie1d399c1cb0e360e5b3a6d9f2a4b28745d86cc71
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-02 21:55:48 +02:00
Andrew Knight
efdabc4b0e Remove vestiges of d3dcompiler_qt
Change-Id: I2a233cb0bfec27a7535a31818568955f8bf85c15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-02 21:55:41 +02:00
Marc Mutz
5b9e566b4d QImage: add a qMove()
The color table is passed by value (good for C++11), so when
the argument is assigned to the member variable, that's a good
spot for a move assignment.

However, the argument is also declared const.

The standard says that top-level const is ignored, but some
compilers (I know about SunCC) think differently, so we cannot
remove it.

Instead, we do a const_cast. It is well-defined: Even though
apparently the argument was declared as const, the standard
says the const is not there, and no sane compiler would put
the argument copy into read-only memory.

Add a reminder to remove the top-level const from the
signature come Qt 6.

Change-Id: Iac18846ba669de0a30da620685ad1438c267e193
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-09-02 20:43:07 +02:00
Marc Mutz
b04c144297 QOpenGL2GradientCache::getBuffer: calculate hash value outside critical section
The code doesn't touch any member variables, so it doesn't need mutex
protection. Reducing the time spent under the mutex allows a higher
speedup (Amdahl's Law), so do it.

Also made the mutex locker const to indicate it is never unlock()ed
again.

Change-Id: Ic50b827c0e34d39cbddc7ec83675b568a9c33f6d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-09-02 20:42:51 +02:00
Tor Arne Vestbø
8a7fcf0a7d iOS: Don't store UIViewAnimationOptions value as UIViewAnimationCurve
We pull out the magic UIViewAnimationCurve of the keyboard animation
when the keyboard is about to show, but we need to defer the shifting
of the value 16 bits, as that turns it into a UIViewAnimationOptions,
which we can't store in a UIViewAnimationCurve member.

Change-Id: Id35dae1ec487951df749dfffb6118b572c28b103
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 16:13:18 +02:00
Tor Arne Vestbø
942c6910d1 iOS: Get rid of markedTextFormat global static variable in IME
Preperation for IME refactor.

Change-Id: I0832c174d05d019d69ef7c01c45aaedc6e4d9468
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 16:13:12 +02:00
Tor Arne Vestbø
fea21655a8 iOS: Add support for QWindow::setOpacity()
Change-Id: I027154aef35d219f08915e195f2baf8595ef7343
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 16:13:06 +02:00
Kevin Funk
eb44767945 Fix crash in QTextLayout::cursorToX
When 'cursorPos' is out of bounds ([0, lineEnd]), this method crashed.

Change-Id: Ia0540ab3afbffb5c598f7b8515263cce3b3928e4
Task-number: QTBUG-40753
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-09-02 14:18:08 +02:00
Paul Olav Tvete
b9a7cedb6e Android: Avoid deadlock in Qt.inputMethod.visible
A blocking isSoftwareKeyboardVisible() is a deadlock
waiting to happen: when the android input method performs
blocking metacalls from the android thread to the GUI
thread all the time, we cannot block the GUI thread
waiting for the android thread.

Task-number: QTBUG-40750
Change-Id: I2490897b0f65e0d92214907e239b10b372d949dd
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-02 14:13:14 +02:00
Tor Arne Vestbø
f6c36917f1 iOS: Update QIOSScreen::nativeOrientation() for iOS8
For iOS8 and up [UIScreen bounds] changes based on the interface orientation,
so we need to use [UIScreen nativeBounds] instead.

Change-Id: I3fc12cfa417df26ca94c803e970bc2dc18a94378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-02 14:02:30 +02:00
Friedemann Kleint
552639c359 Windows XP, Vista styles: Share dynamically resolved theme functions.
Extract a struct containing the function pointers and derive
QWindowsXPStylePrivate from it, so that both styles can use them.
Remove duplicated variables.

Task-number: QTBUG-38858
Change-Id: I7c2c665b5930c56ffdf33c5185720f71517d146c
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-09-02 10:26:13 +02:00
Jeremy Lainé
31938846ae qasn1element: add QAsn1Element::toInteger
This change adds the ability to decode ASN.1 INTEGER fields,
provided they represent a positive number of less than 64-bit.

This is needed for PKCS#12 decoding.

Change-Id: Iafb76f22383278d6773b9e879a8f3ef43c8d2c8f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-09-02 09:52:08 +02:00
Laszlo Agocs
b366d0d016 Make the EGL platform cursor reset the array buffer
Otherwise bad things happen if the application leaves a buffer bound.

[ChangeLog] The eglfs mouse cursor properly resets the array buffer
to prevent rendering issues. This, just like with vertex attributes and
textures, requires applications to be aware of such state changes in
swapBuffers().

Change-Id: I8b383cc867d8d0d0572773eacfa650e7b33b9680
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-02 09:47:55 +02:00
Maks Naumov
09754d218a QTextEngine: remove unnecessary assignment in LayoutData::reallocate()
Change-Id: I82e34d5525354fc20ca9aba6df3767e3fee51bf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-02 08:05:10 +02:00
Marc Mutz
de068472f1 QIconLoader: enable an easy case of transactional processing
It's easy to do the work on the side and then commit. This is strongly
exception safe, but in Qt, we don't care. But transactional code, when
this easy to achieve, is also clearer.

Change-Id: I30f1badec7745d62a09af4eede234cb312b373aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-02 00:43:50 +02:00
Maks Naumov
97a32c8440 Fix radioButton height for Windows style
Change-Id: I755ed32f7458fec0fcbc5243d25fb1f6ecf46492
Task-number: QTBUG-32420
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-09-02 00:27:03 +02:00
Gabriel de Dietrich
0c9ae66082 QMacStyle: Fix inactive combo box appearance in 10.10
As usual, HITheme is not helping, and renders inactive controls
as disabled. Also, given the design changes in Yosemite, we can't
just desaturate the active pixmap and render it. In this case, we
render the inactive control and enhance it, making very close to
the expected result. The pixel-exact version would be to render
a plain push button, and then add the combo box arrows. However,
these arrows would need to be created (and updated) since there
seems to be no more API to render them.

Task-number: QTBUG-40833
Change-Id: If1bc366c0bc83123972fabebbc8beeb9f071e7a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-01 18:55:06 +02:00
Andrew Knight
1cdcf64ad5 direct2d: Fix translucent/frameless window rendering
When using WA_TranslucentBackground/FramelessWindowHint, the backing
store must paint to an offscreen texture instead of the swap chain in
order to achieve the desired results. This texture is then presented to
the screen using UpdateLayeredWindowIndirect().

As the swap chain is not needed in this mode, its construction is skipped
if indirect rendering is active.

Furthermore, the layering options were updated to fix an issue with
transparent layers overpainting the background. The layer options were
switched to D2D1_LAYER_OPTIONS1_NONE, which appears to work for both
translucent and non-translucent rendering modes.

Task-number: QTBUG-40601
Change-Id: I656f7cdfb424d1eda6f82c2c69500e78d8c1726a
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 18:08:43 +02:00
Andrew Knight
fc3acdd9d2 winrt: Fix mouse coordinates on high-DPI displays
The scale factor was only being applied to touch coordinates.

Change-Id: I7fc2793b1514c73986a574a95478306c1eb54c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-09-01 18:08:27 +02:00
Laszlo Agocs
6ae01c72e1 Fix no-opengl build
Change-Id: I577bd5d10e52571c95c9e646327264cf95ac6eb1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 14:29:36 +02:00
Andrew Knight
ffceaf6213 ANGLE: Fix -angle-d3d11 on MSVC2010
Allow the D3D11 renderer to build with the June 2010 DirectX SDK.

Change-Id: I2343acedab16845d6a0d4a53cf3145f583efc4a7
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 14:28:07 +02:00
Andrew Knight
552ac4bcb6 ANGLE: Don't directly link to DirectX 11
These libraries are dynamically loaded on desktop Windows.

Change-Id: I3a0d17a48a3bd4930690d20d387df0d92906662d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 14:28:06 +02:00
Laszlo Agocs
da2b3c4479 Prevent current context from becoming inconsistent upon create()
Platform plugins have a tendency to make the newly created native
context current with a temporary surface. This is usually needed to
query some information related to the new context. Afterwards most of
them just reset to having nothing current.

This has two issues:

It unexpectedly changes the current context/surface. A call into
QOpenGLContext::create() does not imply that the current context will
get changed. This is the minor issue and we could probably live with
it (at least if it had been documented).

However, the real issue is that QOpenGLContext::currentContext() will
become inconsistent: it will still report whatever was current before
the create() even though on the EGL/WGL/GLX level that's not the case
anymore.

To prevent all this confusion the platform plugins can easily be
changed to restore whatever context/surface was current before they
altered it.

Change-Id: I6a5b4597c86571327524ddb13e0d02538593cc7b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-01 14:10:12 +02:00
Tor Arne Vestbø
d06fb5609c iOS: Initialize QScreen properties before setting up root viewcontroller
Change-Id: I5fd899030b0557e9b0d96f2c065c8be5cfadd5de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-01 13:19:07 +02:00
Friedemann Kleint
78ee759748 Windows QPA plugin: Streamline code to find window at a position.
Task-number: QTBUG-40815
Change-Id: I0efcc2cfcafdee04bda20afa88a7f6aaabd57210
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-01 13:08:41 +02:00
Shawn Rutledge
2113bdee5d QFileDialog: save and restore all settings even if widgets not used
Some applications may use native file dialogs and some may use the
widget implementation, but QFileDialog always saves all settings to
the same place each time it destroyed.  So it is important to remember
all settings read in restoreState and put them back in saveState.
This bug was introduced by 37ca2224ec

Task-number: QTBUG-36888
Change-Id: Ied1db83817480312e963a042784d7bdd16f0a2b1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-09-01 12:54:48 +02:00
Allan Sandfeld Jensen
367680679a Fix advance of zero-width spaces in fonts that omits the glyph
Some fonts appear to include zero-width space in the CMAP table, but
not include an actual definitions of the glyph they point to. The
missing glyph causes a warning, but isn't handled making the character
end up being giving the same metrics as whatever character it came after.

This patch adds explicit handling of missing glyphs, and also caches
their missing state when caching is enabled.

Task-number: QTBUG-40912
Change-Id: I06fba9c01df59548e750e36babfdd5a6bafd6bd0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-09-01 12:25:56 +02:00
Maks Naumov
1812bb968c Remove superfluous "break" in QWindowsNativeFileDialogBase::setLabelText()
Change-Id: I889dfa00daf60e393e3d95ee2d0ecb73f7871e4c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-09-01 05:51:14 +02:00
Maks Naumov
8785cf3a01 Fix memset() for "alphaValues" in supportsSubPixelPositions()
Fix reversed memset arguments.

Change-Id: I1601fecb24068fa601e919a9fd8bb1e991ef70ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-31 23:05:16 +02:00
Maks Naumov
1c55481215 QDoc: fix Node::setPageType() when type name is "faq"
"HowToPage" has been verified above.

Change-Id: If8ca9b375029d5b018936b04a2a313cf5b8788b6
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-31 14:17:11 +02:00
Maks Naumov
8d9957c671 Avoid trying convert to RGB32(ARGB32) when image already RGB32 while writing XPM image
"sourceImage.format() != QImage::Format_RGB32 ||
sourceImage.format() != QImage::Format_ARGB32 ||
sourceImage.format() != QImage::Format_ARGB32_Premultiplied)"
This condition always "true".

Change-Id: I67b3dfac135985a75bcd697b4c1a84ec3c0b66f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-08-31 14:16:40 +02:00
Daniel Teske
e5f3a25253 IBus Input Method: Check in commit whether we need to commit
Task-number: QTBUG-40755
Change-Id: I283d48cc6d4390a02d0df63ac6e38fa5f73a0ec0
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
2014-08-31 11:48:51 +02:00
Thiago Macieira
bdcd636dcb Fix headercheck failure introduced by 67c83f329e
That commit exposed part of qfunctions_winrt.h for non-WinRT use
(Windows 8) without wrapping with Q_OS_WIN. That meant the headercheck
pass failed to compile when outside of Windows.

Change-Id: Ie731cce21e5102f5e5879b147b7738a7d0a91ecd
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-30 22:20:35 +02:00
Jerome Pasion
694aae7923 Doc: Fixed typo "lamda".
Change-Id: I17a3b324927407b64cabc39a0b90f0ab2e0676be
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2014-08-30 17:47:12 +02:00
Jeremy Lainé
5c3a499c9f ssl: disable (broken) i/o on DER encoded keys
QSslKey currently has methods which supposedly allow decoding and
encoding private keys as DER protected by a passphrase. This is
broken by design as explained in QTBUG-41038, as storing the encrypted
DER data alone makes no sense: such a file lacks the necessary
information about the encryption algorithm and initialization vector.

This change:

- explicitly stops using the passphrase when decoding DER in the
  constructor. The behavior is unchanged, it is not possible to
  read the encrypted DER alone.

- refuses to honor the passphrase to DER encode a private key. The toDer
  method now outputs an empty QByteArray instead of garbage.

Task-number: QTBUG-41038
Change-Id: I4281050cf1104f12d154db201a173633bfe22bd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-30 17:36:23 +02:00
Andrew Knight
74a7f13ac1 winrt: Implement missing SSL socket methods
Move from a stub to a functional SSL socket implementation.

This implementation has some limitations. Due to the way the native
SSL upgrade works, it is not possible to ignore SSL errors after the
handshake has begun. The user must set the ignore flags before
connecting to the host.

Due to missing implementation in the underlying native socket, the
synchronous methods (waitForConnected(), waitForDisconnected()) are not
functional either. Users must rely on the asynchronous methods instead.
This is not a problem in the general case, as HTTP(S) is not affected.

SSL server sockets are not supported by the native API, so it is not
possible to bind an SSL server socket.

Change-Id: Id0b323f273892580b294aa5a6ff601a8241470df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-08-30 08:21:10 +02:00
Oliver Wolff
5328ec7e10 winrt: complete QSslCertificate implementation
The native handle and import functions are now available for use in other
parts of the winrt backend.

Change-Id: I07e6f95b3411c3dc7c1a7a164544b18e5e435d01
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-30 08:20:51 +02:00
Jeremy Lainé
6a4cb8d62b ssl: Add common key parser for backends
This internal implementation of QSslKey can be used when OpenSSL is not
available. Encrypted keys are not supported, as the cryptography must
be supplied by a separate library.

With this commit, WinRT is migrated to the new implementation,
but qsslkey_winrt.cpp is left in place so that the missing crypto
implementation can be added later. This also means most of the expected
failures for that platform can be removed from the autotest.

Change-Id: I24a3ad1053bb72311613b28b3ae845aa1645a321
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-29 23:18:22 +02:00
Friedemann Kleint
def5a56b03 Add Q_ENUMS to QStyle's enumerations.
This makes it significantly easier to obtain debug output
for style functionality.

Task-number: QTBUG-38858
Change-Id: I19edc834a55fa369b6830abeb4697ae5e5ded995
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-29 16:34:06 +02:00
Bernd Weimer
032ab648c4 QNX: Fix widgets scrolling
Qt expects scroll operations to be executed immediately. They cannot be
postponed since Qt may paint on the scrolled area afterwards.
The new code will only use an accelerated scroll operation (screen_blit)
once before the window is posted, because the blit is from the previous
buffer to the current one. Hence an additional scroll operation could
copy outdated pixel data. Additional scroll operations will be handled
by Qt. Performance issues were not perceived with this approach so far.

Task-number: QTBUG-39958
Change-Id: I6d7c3274c5db6a831a169615518fcdb4d926db70
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-08-29 11:55:13 +02:00
Frederik Gladhorn
e5a332ae54 Bump version
Change-Id: I3aa94110b11e181dea1b8551982ce16dab57f893
2014-08-29 11:33:21 +02:00
Friedemann Kleint
83dab766fc Windows: Fix QPlatformCursor::pos()/setPos() for DPR scaling.
Task-number: QTBUG-38858
Change-Id: Ibb0355ae19a382e4eb3805fe6d6afab2a2a603e6
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-08-29 09:51:48 +02:00
Lars Knoll
1d66c9eba8 Fix nativeRead() for maxlen greater than UINT_MAX
Don't truncate the maxlen to a DWORD. Instead read all
data incrementally up t maxlen.

Task-number: QTBUG-27796

Change-Id: I21c34d11046f1106244dcd77420cc472e7240e68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-29 09:32:30 +02:00
Christoph Schleifenbaum
fc4993be1f QListView: Catch stack overflow on mutual scrollbar calculation.
Task-number: QTBUG-39902
Change-Id: Ie850371098070e8ce485d5cb122aa89c18d97359
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-29 07:26:29 +02:00
Topi Reinio
e4a778d9c2 qdoc: Use qdoc error logging for warnings related to index files
Make the warnings that are displayed during the reading of index
files and dependencies more consistent by using QDoc's error
logging functions.

This means that warnings are not generated in prepare phase,
but they are generated for projects that call qdoc directly,
running prepare and generate phases in one go.

Change-Id: I645c3feb1cbf471fd3ca6034f94e7dc1ea35b875
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-29 00:22:03 +02:00
Dyami Caliri
9c3a58a913 Recreate child windows when changing screens
When setting a new screen, the code calls QWindow::destroy(), which
recursively destroys all child windows. It then calls create() on the
top-level window, leaving child windows destroyed. This causes crashes
if you have embedded native widgets.

Task-number: QTBUG-40817
Change-Id: Iaace2589f48bbfd5faaf5ff95357ff43b310504a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-28 23:48:56 +02:00
Friedemann Kleint
1b32e8d7d4 Windows: Detect Surface Pro 2 tablets.
Task-number: QTBUG-39571
Change-Id: I9cb7fe2dee9a0701912ea639cdcc66a198e5b65c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-28 16:43:30 +02:00
Friedemann Kleint
0aa84a619e QLineEdit: Disable standard key 'cut' when there is no selection.
Task-number: QTBUG-40477
Change-Id: I0741a1a769c9e7e0d19e8aec231acc29461d44ea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-28 16:19:36 +02:00
Morten Johan Sørvig
3da75b0584 QCoreTextFontDatabase: Remove number type asserts.
On iOS 8, the value 0 is returned as a kCFNumberIntType.
The code still works - CFNumberGetValue converts it
to a 0.0 double.

Change-Id: Ic50900b22e4fa19ad1481e8e0e293559bbfd8cd2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-08-28 15:17:53 +02:00
Samuel Gaist
6f52256dc2 Doc: properties, add missing parenthesis
Change-Id: I97b5a96b29416ca7af145edb1a6a96595c9524da
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-08-28 13:55:28 +02:00
Sérgio Martins
5a278dd42a Android: Fix crash at shutdown when keyboard is visible
This is a follow-up to 4c6ebe5f9e.
Crash was still 100% reproducible for me with the previous fix.

Task-number: QTBUG-40957
Change-Id: Ie59cfe4f1fc746251fe06ba96369738098b2a35f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-28 13:48:39 +02:00
Shawn Rutledge
41826cfbae QGLXContext survives screen removal
The screen pointer is usually only used to get the Display, which normally
doesn't change anyway.

Task-number: QTBUG-39996
Change-Id: Ie35f02fc9330647897a9f081afb8c9ce550eed2a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-28 13:36:13 +02:00
Eskil Abrahamsen Blomfeldt
75cf14e413 Revert "Make unicode ranges in font take precedence over codepage"
This reverts commit 3a84d92f57
because it caused a regression with certain fonts on Windows that
have divided information about writing system support in unicode
ranges and codepage ranges.

The original commit fixed a problem on Android where one
of the fonts had an entry for Arabic in its codepage range but
no glyphs for this script. This issue has been fixed in a different
way now, by 0b87f4f6c9 which makes
fallback fonts work properly, so the commit is no longer needed
to fix said bug.

[ChangeLog][Fonts] Fixed regression in font families returned by
QFontDatabase::families() for certain writing systems.

Task-number: QTBUG-39846
Change-Id: I3077b1e618b21680549abc1734cb6df6e264387e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-28 13:34:03 +02:00
Friedemann Kleint
4354fef3d4 Windows: Prevent hidden transient children from being re-shown by Windows.
Bring back code from Qt 4 to handle WM_SHOWWINDOW / SW_PARENTOPENING
correctly.

Task-number: QTBUG-40696
Change-Id: If018bf90573f495dbe32d0c46f522ccde0691ebb
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-28 13:26:06 +02:00
Friedemann Kleint
2d12ef0be0 Adapt the Vista-style wizard for device pixel ratio scaling.
Task-number: QTBUG-38993
Task-number: QTBUG-388583
Change-Id: I1e3f1b5c82b9751e7f2aa6aed3d89d4388ecf1ce
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-08-28 11:35:07 +02:00
Friedemann Kleint
ce94cdbe50 QWidget::save/restoreGeometry(): Check screen size.
Bump minor version of the saved geometry and append
the screen width in version 1.1. Use that to check and bail out should
large differences occur due to scaling or different levels of DPI
awareness.

Task-number: QTBUG-38858
Change-Id: Iad8ae0705297118b4237c9a41469cb97d7eab549
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-08-28 11:35:01 +02:00
Allan Sandfeld Jensen
f2e26d7dbb Code cleaning in qt_gl_resolve_extensions
Moves feature checks so OpenGL vs OpenGLES is only tested one way
and extensions so they are not tested if already required by their
version.

Change-Id: Ia77f6ea924559fa7a428beb6316ae392063dfc4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-28 11:32:57 +02:00
Michael Brüning
6b52e6ead9 Let ANGLE use multithreaded devices if necessary.
This is needed to prevent lock-ups in application that use ANGLE from
multiple threads, as e.g. QtWebEngine based applications do.

The environment variable QT_D3DCREATE_MULTITHREADED is used to
communicate this from the QtWebEngine module.

Change-Id: Ibd5a5c75eb68af567d420d9a35efb3490c93b27c
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
2014-08-28 11:09:55 +02:00
Jędrzej Nowacki
918038ad57 Mark QByteArrayList as metatype built-in type.
As a side effects it also adds core templates types to the tests

Change-Id: I0e3338e0bffdf21982aa83d404c83288e54411f4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-28 10:13:04 +02:00
Marc Mutz
e311f7ac8b QWindowsNativeInterface: don't allocate memory just to compare strings
Change-Id: I691d2629a78aaaee3d1741b9ab4c55b16c95bde9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-28 09:53:23 +02:00
Marc Mutz
2e3facf419 Micro-optimize QVector::count()
...by instantiating std::count() not with QVector::const_iterator, which is a
class, but with const T*, thus increasing the chance that the instantiation
can be shared with other instantiations in the executable. It might also enable
STL implementations to choose a hand-optimized version of the algorithm for C++
builtin types.

Change-Id: I93df4e58f76838d98b565f229c19e317774b7b4c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-28 09:53:03 +02:00
Marc Mutz
f563124eee QList: check d for equality before d->size for inequality
Same change as was already applied to QVector::operator==().

Change-Id: Ic2e140a52ee95f2e215668077951de0b4450d194
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-28 09:52:43 +02:00
Marc Mutz
f90308c0c3 QVector: check d for equality before d->size for inequality
Assuming the CPU has already loaded 'this', the value of 'd' is just
an indirect load away. The value of d->size, however, is two indirect
loads away, one of which is the load of 'd'.

So it makes more sense to check for d-pointer equality first, as that
can proceed in parallel with the fetch for d->size, which the CPU
may speculatively trigger.

In addition, at least GCC in release mode after this change doesn't
set up the stack frame if the d-pointer check succeeds.

Change-Id: I61f9b245070dd1742fca6ccb8d4936a0b1aa7c07
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-08-28 09:52:36 +02:00
Andrew Knight
da72e1b0e8 winrt: Refactor internal socket buffer
Simplify the temporary buffer usage by using the built-in WinRT Buffer
class. This also allows one use of the local event loop to be removed.

Change-Id: Ice552910227ffbe31c6e8716ff7896af7c4532ef
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-08-28 05:59:15 +02:00
Andrew Knight
dd305aee78 winrt: Fix socket descriptor storage in native socket engine
This stores the socket pointer in the descriptor, rather than an
abitrary handle, so that it is easier to access from e.g. SSL socket.

To further support SSL sockets, a special case for SSL sockets is
made so that the the socket reader installation can be delayed until
after the socket is encrypted (as this is the only supported mode of
operation with StreamSocket).

Change-Id: I693229189722dc43b221b167e8256f5497a50346
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-08-28 05:58:43 +02:00
Andrew Knight
6d57f3f27e network: Add pending close on disconnect for non-empty write buffer
Similarly to 1b19f660 (which added socket flushing before close), the
socket should have a chance to disconnect if the write buffer is not
empty. Instead of flushing, the pendingClose is added so that the
backend may disconnect the socket once these bytes have been written.

Change-Id: I2d85b6356c3e158bade3d5d86161d3e33649cad6
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-28 05:58:22 +02:00
Dyami Caliri
1d7408cc8b CoreWLan: terminate scan thread in QCoreWlanEngine destructor
The scan thread can take an indeterminate amount of time, often longer
than the 5 seconds we had previously waited. Since this destructor is
only called when the application quits, it's ok that some resources may
be lost.

Task-number: QTBUG-36000
Change-Id: Ib184156b5a23c39ea4f7937a26ecb099554bd4de
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-08-27 17:14:25 +02:00
Yoann Lopes
4dc751360a Android: added more devices to the FBO readback workaround check.
Task-number: QTBUG-40483
Change-Id: I7f3d375934a57fe3ac58ae35cb00d394349cb33f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-27 15:15:55 +02:00
Andrew Knight
ecbf6dfbf5 ssl: Share the host name matching utilities
This moves the socket backend's host name matching functions up to
QSslSocketPrivate so that they can be shared between backends. This
works, as there is no OpenSSL-specific code here.

Change-Id: I73c2081fdc2e60a44c90e90800d1e1877391a626
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-27 15:03:58 +02:00
Nico Vertriest
be4db73231 Doc: language corrections QStorageInfo class
Task-number: QTBUG-40984
Change-Id: Idf8c6ecedb25f6c55b3fe8db69e6de9d9f2eaf74
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-27 14:45:18 +02:00
Risto Avila
e5b36bb54e Enables remap of NumpadKeys when Numlock is on and using evkeyboard.
Task-number: QTBUG-32823
Change-Id: I80841a965c61a117e8b50a2775431bb723ca8eca
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-27 14:38:11 +02:00
Paul Olav Tvete
4c6ebe5f9e Android quickfix: Avoid crash at shutdown
Qt Quick does a processEvents() at shutdown. On some versions of
Android, this can trigger a getTextAfterCursor() after
QGuiApplication shutdown. This patch still has a theoretical
race condition, but should reduce the crash probablity to
practically zero.

[ChangeLog][Android] Fixed bug on some devices where the application
would crash at shutdown if the virtual keyboard was open.

Task-number: QTBUG-40957
Change-Id: Iefcc10a77e3d506c32ea151c27a3e87a7be40e68
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-08-27 12:22:07 +02:00
Erik Verbruggen
f2e4ff4fd4 Also print the class name in the QObject::killTimer error msg.
When no objectName is set, this will give at least some information,
other than the memory address of the current instance.

Change-Id: Iae452c0e9fe38f0aab35094ddf0edc0fd6b28c20
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-27 12:18:13 +02:00
Gabriel de Dietrich
e94642a9b0 QMacStyle: Fix push buttons focus ring on Yosemite
HITheme renders the focus ring in a way that diminishes contrast
on the focused button edges. The same issue seems to affect
combo boxes, check boxes, and radio buttons.

We refactor the code that was used to draw CE_FocusFrame into
qt_drawFocusRingOnPath(). We use it to render our own path for
the push button contour. This should also allow us to implement
the focus ring animation in the future.

As a side note, notice how the square button part (kThemeBevelButton)
is a complete joke. Not only we impose the wrong button kind and
let HITheme do what it can with it, but we also prevent ourselves
from using it by never adding padding for the focus ring.
Hopefully, we can fix this whole button sizing and padding mess
in 5.5 or 6.0, whatever breaks less apps around.

Task-number: QTBUG-40833
Change-Id: Ib9e7829d99b38dc926c55b31c3d6d5d32b691867
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-08-27 12:13:01 +02:00
Laszlo Agocs
63f48d00aa Initialize textureId in platform backing store
Setting it initially to 0 is very important, otherwise we will
do a glDeleteTextures with the undefined value.

The result sometimes goes unnoticed and sometimes causes bizarre
issues: For example in the 'textures' example one face of one cube
out of the six did go blank from time to time since the corresponding
texture was deleted by the backingstore.

Change-Id: Iebf68e20b2af426c979980d8bc4449db2b98f2f0
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-27 10:40:07 +02:00
Nico Vertriest
8e96e73ebc Doc: corrected autolink errors corelib io
Task-number: QTBUG-40362
Change-Id: If11700d57db75ad7605bd8d53681002639c2e785
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-27 10:26:38 +02:00
Marc Mutz
53eeddf855 Use ctor-init-list in QRegionPrivate(QRect) ctor
Change-Id: I531b862db7bdec0a504c6022c1a15635aaf3fc8d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-26 20:47:47 +02:00
Marc Mutz
2b153ad6cb QRegionPrivate: remove copy ctor and assignment operator
They're identical to the compiler-generated ones, and probably inhibit
move operators here and there.

Change-Id: I918f2946f6b6aa49aa883420dc87df44013938a5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-26 20:47:41 +02:00
Topi Reinio
15c32361d9 qdoc: Enable listing of example files with .html extension
If a (non-external) link string ends in '.html', qdoc assumed it is
a direct link to a generated html page. However, it could also refer
to an example file with .html extension.

This commit fixes a corner case where links to an example file page
were broken for such files.

Task-number: QTBUG-40831
Change-Id: I31acc141970b6768f0a93964723be82611d37a3d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-26 20:08:58 +02:00
Topi Reinio
d28e2e225c qdoc: Restore navigation bar title for module pages and groups
Adapt the code that generates the navigation bar to the recent
changes in node hierarchy - Module pages, QML module pages and
groups are no longer DocNodes.

This change will ensure that if a page has a title, it will be
visible in the navigation bar regardless of the the page (node)
type.

Change-Id: I697a12d5904d88f91771764ab7ed607b79e4eab1
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-26 20:08:40 +02:00
Topi Reinio
4cc3a41819 qdoc: Write all generated files to .qhp
When writing the Qt Help Project XML file, QDoc traverses the
documentation nodes recursively, adding html filenames for each node
to the XML.

The logic that QDoc uses for this process is not perfect, and needs
to be kept up to date whenever the internal structure of the node
tree changes. This often leads to problems where some pages are
generated but not added to the .qhp, resulting in missing pages in
the offline documentation.

This change fixes this problem by having the generator keep track
of the created filenames, and passing that to the help project
writer.

Task-number: QTBUG-40572
Change-Id: Ife60a30724183a2b6dcd2397ea79bfbdc2addd04
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-26 20:08:05 +02:00
Topi Reinio
4f2d1e2e04 qdoc: Fix output of \br command
Since the \br was promoted from a macro to a QDoc command, its output
has been enclosed in extra paragraph end/start tags, adding to the
visible vertical space.

This change fixes the issue by not closing the paragraph when QDoc
encounters a \br command.

Also removes the now-obsolete \br and \hr macros, as they are both
proper commands. \BR and \HR substitute macros are kept.

Task-number: QTBUG-37361
Change-Id: Iabbefb6e79268419792ccba42386f6342ccd175d
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-26 20:07:40 +02:00
Friedemann Kleint
92c7cb8155 Close popup widgets when wheel events are received
Task-number: QTBUG-40656
Change-Id: I134b07705744c23af9718dee486ab5e9ad4352cf
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-26 19:58:56 +02:00
Oliver Wolff
0475822d01 Added qsslcertificate_qt.cpp
Having QAsn1Element in place, we can have a common foundation
for the ssl certificate class for upcoming ports like WinRT
and SecureTransport. The only thing that has to be added to
the existing class is the handle() functionality.

Change-Id: I560a8e412b26f350855c7bc456fcdb8e9b750939
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-26 18:48:36 +02:00
Tor Arne Vestbø
852dbe7658 iOS: Use dispatch_async instead of performSelectorOnMainThread for IME
Gets rid of awkward wrapping of Qt::InputMethodQueries as integer in a
NSObject.

Change-Id: Ia7e368fc12ec7957ca8ab602d8cec1e0a071af1d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-08-26 18:13:04 +02:00
Tor Arne Vestbø
ad120dbf13 iOS: Add UIResponder helper to get current first responder
Change-Id: I422d45860a52861893d963fabbecd4ac30477272
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-08-26 18:12:50 +02:00
Morten Johan Sørvig
7a413fa40c QCoreTextFontDatabase: Remove number type asserts.
On iOS 8, the value 0 is returned as a kCFNumberIntType.
The code still works - CFNumberGetValue converts it
to a 0.0 double.

Change-Id: Ic50900b22e4fa19ad1481e8e0e293559bbfd8cd2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-08-26 18:12:44 +02:00
Tor Arne Vestbø
9aff2fbd86 Send QWindow::focusObjectChanged when clearing widget focus
We do this for QWidget::setFocus(), but were missing a call on clearing
the focus widget. Since QWidgetWindow::focusObject() will fall back to
returning itself if there is no focus widget, we need to pass the
result of window->focusObject() to the change signal instead of 0.

Change-Id: I52a5519a19bb20e74b4a7c2a1abc9d47e2ea1315
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-26 18:12:37 +02:00
Allan Sandfeld Jensen
f1bce3bc17 Avoid crash if querying device that has gone away
A device removed very fast after being inserted might disappear while
we are still seting it up. We must therefore check if we indeed still
get a matching device

Task-number: QTBUG-40820
Change-Id: I4372fb1932264e5799f37cea0d016795e28ebed6
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-26 17:16:13 +02:00
Friedemann Kleint
f85f3acd78 Document loading of high resolution versions of images.
Task-number: QTBUG-38858
Change-Id: I87ee18b66e137f5f5c01d77910f1a7f256b85e18
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-08-26 16:59:36 +02:00
Friedemann Kleint
4017605d56 Mention supportedMimeTypes() in QImageReader documentation.
Change-Id: Iaa07a463e07982352fe2c7dd77d691a390a65f35
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-26 16:59:28 +02:00
Frederik Gladhorn
910c639db6 Accessibility iOS: Fix crash after deleting a view
Change-Id: I64e8357fcbf7f312308490351b7c692d31db5a43
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-08-26 16:40:46 +02:00
Frederik Gladhorn
de95953c75 Clean up QAccessibleTabBar
Change-Id: Ic0949e4d76a7332ef1a42c93a06a0e4515c1192d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-26 16:40:43 +02:00
Frederik Gladhorn
e944b93bf1 Remove QAccessibleToolButton::text
This function actually is worse than just calling
QAccessibleButton::text which it already does. It would mess up the
shortcut handling in addition to that.

Change-Id: I56cb95a44624da4c5fccb43e6835f6012a083337
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-26 16:40:40 +02:00
Frederik Gladhorn
0c3967f92c Remove unused variable
Change-Id: I0414d7bab89371f330d5b0cfa88758e3f1668f32
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2014-08-26 16:40:37 +02:00
Gabriel de Dietrich
e9e66079b1 QMacStyle: Fix QTabBar appearance on Yosemite
The selected tab text color should be white except when the
window is not active. Also, no text shadow should be rendered
in any case. Finally, there's no need to move the tab shape up
anymore.

Task-number: QTBUG-40833
Change-Id: Ibb35f0bb7a12fb005202fd8c082eb9bb19645b2b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-08-26 16:06:38 +02:00
Gabriel de Dietrich
f8da177c0f QMacStyle: Fix default button look on Yosemite
The default button has different text color on OS X 10.10, and
doesn't pulsate anymore.

We first make sure we don't start any animation for default buttons.
Then, we set the right text color in the attached palette, which
implies making a copy of the style option object. This increases the
size of this patch but keeps things sane. (It's also more concise than
the QGtkStyle approach that consists on duplicating QCommonstyle's
code for rendering CE_PushButtonLabel).

Task-number: QTBUG-40833
Change-Id: Ifac118bb607eec17400c6ae42342a223a40843b4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-08-26 16:06:30 +02:00
Christian Strømme
2529a8aaa2 Android: Avoid caching the same class twice.
The class name scheme can be separated by '/' or '.', if both formats
where used we would end-up caching those classes twice.

Change-Id: I3ae69694d6a8616bbaadfb3c2d0717fbf9ccb9fc
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-26 10:59:08 +02:00
Marc Mutz
2d4954810b QDataWidgetMapper: micro-optimize clearMapping()
QList<WidgetMapper>::takeLast() is a needlessly expensive operation
(involves copying a QPersistentModelIndex and a QPointer).

Instead of looping over takeLast() until empty, reverse-iterate
over the list and call removeEventFilter(), then clear the whole
list.

We reverse-iterate to preserve existing behavior. Also, since the
original code popped the WidgetMapper instance before calling
removeEventFilter(), we move the whole list into a local copy
before iterating. There's little chance that a removeEventFilter()
call will cause reentrancy into QDataWidgetMapper, but better safe
than sorry.

This and the previous change together save 448 bytes of text size in
libQt5Widgets.

Change-Id: I1bfe907751659f31e618aa05bbb7b840f0aa61f4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-08-26 09:07:25 +02:00
Marc Mutz
1c73a237ce QDataWidgetMapper: micro-optimize handling of the widget map
Don't use index-based iteration, but use iterators.

Change-Id: I57c9582aed644fc58ced1a1af940dcd20d11d970
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-08-26 09:07:12 +02:00
Tasuku Suzuki
44b9e31a0a fix a camel case include guard macro
Change-Id: I502ecf6c862f101e426536e11f5c466ed3419946
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-26 03:43:20 +02:00
Sérgio Martins
1498c99e9d BlackBerry PlayBook build fixes
Change-Id: I32b232883bb29ca7305bca1da1df263f106ddd93
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-08-26 00:12:05 +02:00
Friedemann Kleint
c47b04696a Add devicePixelRatio support to the Windows QPA plugin.
This adds support for the environment variable
QT_DEVICE_PIXEL_RATIO for the Windows platform plugin.

Task-number: QTBUG-38993
Task-number: QTBUG-38858
Change-Id: I6831eb6d3a09a80be7bbef46395e91531b61cc50
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-25 21:21:27 +02:00
Dyami Caliri
d8168f10a1 QEvent check for QT_NO_GESTURES in new debug code.
Latest changes to QEvent break compiling with -no-feature-gestures.

Change-Id: Ibbddd73a4f567051c3793a7aaf438240add6583a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-25 20:49:47 +02:00
Allan Sandfeld Jensen
8f547c4252 Avoid crash if querying device that has gone away
A device removed very fast after being inserted might disappear while
we are still seting it up. We must therefore check if we indeed still
get a matching device

Task-number: QTBUG-40820
Change-Id: I4372fb1932264e5799f37cea0d016795e28ebed6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-25 20:42:52 +02:00
Laszlo Agocs
f9de7efe60 QOpenGLTextureBlitter: Do not call vao functions if it failed to create
Follow the good practice of checking for isCreated() before calling
VAO functions like bind(). Use also the vao binder where applicable.

Change-Id: Ib827f3bce838396bf2e08f9480fa63801d4d3a50
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-25 17:40:28 +02:00
Laszlo Agocs
a4f50269f8 Support QOpenGLWidget and QQuickWidget on Android
It gets somewhat complicated due to the fact that a RasterGLSurface window
(i.e. any widget window since 5.3) may behave either like an OpenGLSurface
or a RasterSurface, and the expected behavior may change on each backingstore
sync.

This does not fit designs where the platform window implementation is separated
and there is different behavior for raster and GL windows.

Therefore QAndroidPlatformOpenGLWindow is now made capable of behaving like the
raster one, based on a flag communicated from the widget stack via QWindowPrivate
(since the plugin knows nothing about widgets).

This means that widget windows that do not have renderToTexture children (QOpenGLWidget,
QQuickWidget) will go through the raster path, while the ones that have will behave
like an OpenGL window with the actual rendering happening in
QPlatformBackingStore::composeAndFlush().
The surface type is RasterGLSurface in both cases nonetheless.

Task-number: QTBUG-37907
Change-Id: I6f9261fc0fd993afcda7f30d379c5410069033d3
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-25 17:40:23 +02:00
Shawn Rutledge
9d9ef74a6c OS X QColorDialog: emit reject() when closed by the titlebar button
but only if there is a Cancel button.  A color dialog without a cancel
button might be kept open and apply to various selections, so it
doesn't make sense to reject such a dialog, only to close it.

Task-number: QTBUG-40855
Change-Id: Ifffb4ae81307c72259ed388a4776ba09543603e7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-08-25 17:04:37 +02:00
Laszlo Agocs
4ca7b23dc0 Initialize textureId in platform backing store
Setting it initially to 0 is very important, otherwise we will
do a glDeleteTextures with the undefined value.

The result sometimes goes unnoticed and sometimes causes bizarre
issues: For example in the 'textures' example one face of one cube
out of the six did go blank from time to time since the corresponding
texture was deleted by the backingstore.

Change-Id: Id19eb2164471b542b08a277a65edfcb5d0f8248d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-25 16:57:58 +02:00
Andy Nichols
5afebb05b4 DirectFB Fix issue with showing dialogs
If the window was not visible when the geometry was set, then the
DirectFB window would not be resized.

Change-Id: I7790c90ed0fb755aebee0e32c877ebd9e48417cd
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-25 16:47:25 +02:00
Andy Nichols
6e7e73c014 DirectFB Unbreak mouse input for child windows
The local and global coordinates for mouse events were being translated
incorrectly from the native DirectFB events.

Change-Id: Id904a4335459b87c92f4b8b46d535c78fb7dad8c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-25 16:47:18 +02:00
Andy Nichols
3fcebba79c DirectFB Make usable again with QWidget
Previously when we created any QWidget based application a
QDesktopWidget would be created as a physical window like any other, but
this window would steal input from the application.  We now create a
DirectFB window for the Qt::Desktop type of widget now, but it does not
receive input events and can not be painted to or displayed.

Change-Id: I6a090c5384b1f83383e40680dbede5d0edc41983
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-25 16:47:14 +02:00
Andy Nichols
8917d0be00 DirectFB Provide a native interface
Using the same multiple inheiritance that is used in the EGLFS platform
plugin.

Change-Id: I016f904bfc365bec6266c3f5d638ab15ecefe63b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-25 16:47:08 +02:00
Andy Nichols
e3ef095469 DirectFB Add QGenericUnixServices and inputContext
The DirectFB platform plugin was missing support for services and
inputContext.

Change-Id: I010fdcbed5e172b019b4dce79f3beea0f9c5025d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-25 16:47:02 +02:00
Morten Johan Sørvig
30bb830fc1 OS X: Fix pan gestures.
The QPanGesture recognizer requires single-point touch events. The touch
implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents
and forward single touch events if set.

Making this work in Qt 5 is a little bit more involved since the platform
plugins don't know about widgets.

Change the Cocoa touch implementation to send single-point touch events
to QWidgetWindow windows only. Make QApplication forward single-point
touch events only if the target widget has the
Qt::WA_TouchPadAcceptSingleTouchEvents attribute set.

Task-number: QTBUG-35893
Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-08-25 16:07:36 +02:00
Allan Sandfeld Jensen
7dce962200 Add operator-> to QJson iterators
The iterators for QJsonArray and QJsonObject are currently lacking an
operator-> definition. Unfortunately it is not possible to do in clean
way without redefining either the iterators or QJsonValueRef class.

This patch instead adds two fake pointer classes that are only used
to handle the operator-> return value.

Task-number: QTBUG-29573
Change-Id: Ief785a6afbbedc9e89cf3b6f3958c2c755997a66
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-08-25 16:03:42 +02:00
Nico Vertriest
9286fdf4a0 Doc: corrected autolink errors Qjsonvalue
Task-number: QTBUG-40362
Change-Id: I2ae782ea606e8ee55ee0fcfbbb29db3216b0574b
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-25 14:43:36 +02:00
Laszlo Agocs
f16de5c1fd Fix composition for translucent AlwaysStackOnTop widgets
Writing out the alpha is re-enabled too early. When blitting the
AlwaysStackOnTop widgets as the last step of the composition, they
need the exact same settings as the backingstore content, meaning
blending but without writing out alpha.

Move the glColorMask call to fix this. This will avoid issues with
semi-transparent AlwaysStackOnTop widgets when the top-level has
alpha enabled too.

Task-number: QTBUG-40910
Change-Id: Id6d0d684cfa78bf79b65a097efd92de575e73b2c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-24 23:01:58 +02:00
Morten Johan Sørvig
7f1051ed62 Cocoa: Work around faulty screen list on startup
The NSScreen API has been observed to a return a
screen list with one mirrored, non-primary screen
when Qt is running as a startup item. Always use
the screen if there's only one screen in the list.

Change-Id: I721e25bb7595599287b97f6528e04060ce5da6c1
Task-id: QTBUG-37878
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-24 22:19:57 +02:00
Marc Mutz
e3e4fe7910 Use std::vector range ctor in QVector::toStdVector()
There are three reasons to do so:

1. This could be more efficient, depending on the STL implementation.

2. By using QTypedArrayData iterators (T*) instead of QVector ones,
   we actually invoke the non-templated range ctor of std::vector,
   at least in the common case that std::vector<T>::const_iterator
   is also const T*.

3. The change turns a former NRVO return into a RVO one, potentially
   allowing more compilers to perform the copy elision.

Change-Id: I70b35aaeae70ba06a971a36b8b1b1da997e8094f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-24 13:42:42 +02:00
Shawn Rutledge
b983818219 standardize QPA input event logging category hierarchy
If qtlogging.ini contains a rule
qt.qpa.input*=true
then all available input event logging will be enabled on any platform.
There are more specific categories for touch, tablet, gestures,
input methods etc. on some platforms.

Change-Id: I8754ce23df8f0b750a4b7dfcf3afe5bab800ead8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-24 10:27:25 +02:00
Jeremy Lainé
4040bc21ab Added QAsn1Element
This element can be used for backends that do not offer all the
information that is needed when implementing a ssl certificate backend.
WinRT and the SecureTransport lack functionality in this area for
example.

The sources and tests are added for ssl and openssl configurations in order
to be tested. The condition for adding these can be changed as soon
as they are used by an actual implementation

Change-Id: I2b836133105afdc178bf3b1ee7d732bea069effa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-24 06:01:05 +02:00
Laszlo Agocs
2d0072b0b3 Do not resolve core functions on GLES in texture helper
As the spec for eglGetProcAddress says, some implementations may not return
function pointers for core functions. Similarly to how we cannot get
OpenGL 1.0/1.1 functions with WGL for example.

To make sure QOpenGLTexture does not just crash with such implementations,
we simply use the statically exported functions in -opengl es2 builds.

Change-Id: I213bfcc21e58888b17e0ebcd0a26f26f77517e40
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-08-23 19:13:46 +02:00
Markus Goetz
3e68148a4d Network: Fix NTLM (SSPI) with HTTP and HTTPS proxies
This commit should fix proxy authentication when NTLM is used.
NTLM differs from normal HTTP(S) authentication by having 2 roundtrips
instead of 1, some parts of our code however were not prepared for that.

I've tested this patch with Microsoft Forefront, both with normal
NTLM and with NTLM SSPI (in Windows domain).

I removed an optimization added in 3c3ea9a8, I could not see that behavior
anymore. That commit was the wrong fix in my opinion.

[ChangeLog][QtNetwork] Fix NTLM (SSPI) Proxy Authentication (HTTP/HTTPS)

Task-number: QTBUG-30829
Task-number: QTBUG-35101
Change-Id: Idcc9c0dbf388b011d49f2806e9a6dd55ebc35cec
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-08-23 17:35:51 +02:00
Lorn Potter
3862171315 remove always ask option.
Jolla removed the always ask option in the UI, which is the reason
for all this code.
Now, if mobile data is autoconnectable, whether roaming or home, it will
be connected.

Change-Id: I6a86315262e8c4c5551b2b2097389559096f14d5
Reviewed-by: Pasi Sjöholm <pasi.sjoholm@jolla.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2014-08-23 16:35:12 +02:00
Pekka Vuorela
4a6772a587 Fix handling QT_IM_MODULE=none
Was added with 19a39a4 to allow no input context to be created.
Broken by commit 24c10b0. Especially if compose input context didn't
get compiled, the first input context found was loaded.

Also made Xcb integration use compose plugin by default.

Change-Id: I992eaa8b383320e4ab725bb7b79f561f4f841458
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-08-23 15:27:16 +02:00
Marc Mutz
7c6a4276f0 QIconLoader: don't inherit QObject
QIconLoader did not use the services from QObject and the
Q_OBJECT macro was missing, too, so external code couldn't
have used it in a qobject_cast or inherits(), either.

Change-Id: I1f33dd540fa2ded48d871d848a77eee743a4e3c0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:20:07 +02:00
Marc Mutz
87ccab8bd6 QIconLoader: replace an inefficient QList with a QVector
QIconDirInfo is larger than a pointer, so holding it in a
QList is horribly inefficient.

Fix by holding it in a QVector instead.

Change-Id: I6551d2d2941447e600a33c3d68edf46db002d96c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:19:58 +02:00
Marc Mutz
0611f8d995 QIconLoader: mark virtual overrides
Change-Id: I72f20b5935d56d7c090fdd685e2bedc0778db505
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:19:49 +02:00
Marc Mutz
91f1b0b4e4 QIconLoader: mark a helper type as movable
QIconDirInfo is held in Qt containers, so reap the performance
benefit of a movable type.

Change-Id: I317c69ec46d324623b21a33043856e22f60e21b1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:18:53 +02:00
Marc Mutz
28f7404256 QIconLoader: replace while(!empty()) delete takeLast() with qDeleteAll()
There's no calling back into QIconLoaderEngine from the QIconLoaderEngineEntry
dtors, so don't bother slicing off one element by one from the container as
they are deleted, the more so as m_entires is either move-assigned or deleted
right after these loops.

Change-Id: Ic9ffa442ef0b0c59e19eb91d164183ea5c3bab67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:18:33 +02:00
Marc Mutz
6244665faa QIconLoader: don't re-evaluate container.size() all the time (II)
Experience shows that the compiler does not recognize the
size() call as a constant expression, so help it along.

Change-Id: I688244f37c555365566cd1a59dc601974316a2e6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:18:23 +02:00
Marc Mutz
5335a71535 QIconLoader: don't re-evaluate container.size() all the time
Experience shows that the compiler does not recognize the
size() call as a constant expression, so help it along.

Change-Id: I60cd1754f8be123c62e3b47f6f721f42a69fe3c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:18:15 +02:00
Marc Mutz
8f0f7acb67 QIconLoader: remove another unused variable
Change-Id: I2b11944d1964878ff5f6f666f33a97ea842ffea7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:18:07 +02:00
Marc Mutz
c07a9d6c63 QIconLoader: remove an unused variable
Change-Id: I4f1fee2da9358f63c4d3c9e46b8d69b4a1b280c7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-23 13:17:45 +02:00
Maurice Kalinowski
1b7969f94d WinRT: apply text color to WindowText as well
Otherwise some text gets rendered black, which is the default background
color on Windows Phone.

Change-Id: I963875879655207e881ab0199bdac98a1e4f4ea5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-23 13:10:57 +02:00
Simon Hausmann
fe70d005d5 Fix valgrind support in QTestLib's benchmarking
Valgrind has reached double-digit versions, so the regexp for detecting
the version from the string needs to be widened accordingly.

Change-Id: Ib95994f96d6b1e94a34bedd1b98525076851984b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-08-22 22:17:45 +02:00
Michael Brasser
970390e114 Incorporate fixes from QQmlAnimationTimer into QAnimationTimer.
Incorporates animation timer fixes in:
  * 7da483bfbefcaabb1dbbf3e2f1d5b5f7aadc3b06
  * b02eeeee586abe343b8866385c1327ac009b3ef0
  * 59d5c5cf555a51cd7559cea197a198ef3a792614
from qtdeclarative.

With these changes, we no longer need to call updateAnimationTimers
in QUnifiedTimer::startTimers.

Change-Id: Ic24501cfdc3cb572bd891d84f684f11c3bef1b50
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-22 18:59:09 +02:00
Martin Smith
2a56a3bad7 qdoc: Fix a few cases for '[ ... ]' linking
This update fixes a few cases that didn't work
correctly. The problem was caused by calling
findNodeForTarget() with a pointer to a relative
node, but the relative node pointer should always
be 0, when the domain tree to be searched is not
the same as the tree containing the relative node.
This fix sets the relative node pointer to 0 in
that case.

Change-Id: I2fe4a7a4a3b6392199666c7d49b473a56697e7b5
Task-number: QTBUG-39221
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-22 18:24:08 +02:00
Martin Smith
f752a7ab6c qdoc: Report error in square bracket parameter
This update makes qdoc report an error, when it can't
recognize a parameter in square brackets.

Change-Id: I45d31ec875ac533736ee4a565ff3f217353068dd
Task-number: QTBUG-39221
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-22 18:24:02 +02:00
Martin Smith
af7f944dc5 qdoc: Add new checkForCollision()
But don't use it yet. qdoc will check for name
collisions within a module, once we decide what
collisions to look for and what to do about them.
This change puts a rewritten checkForCollision()
function back in, but doesn't use it yet.

Change-Id: I41f9275c3ca29f228268ccf7cb2d99bbe0ce557c
Task-number: QTBUG-40506
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-22 18:23:50 +02:00
Martin Smith
a5570bbf9a qdoc: Remove all collision node stuff from qdoc
Now that the qdoc link command has ability to tell qdoc which module
contains a link target or whether to link to a QML or CPP entity,
collision pages should no longer be necessary. In fact, qdoc hasn't
been generating any collisions for some time. This task removes all
the collision node code from qdoc.

Task-number: QTBUG-40506
Change-Id: I34d1980ca1c0fe4bb5ad27dd4b00e61fa7e6e335
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-22 18:23:39 +02:00
Laszlo Agocs
701b72c261 Rework platformheaders qdoc conf
In an attempt to make the classes show up in the generated documentation.

Change-Id: I198f788a42f6007802db2384e3cd79e988f573e7
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-22 09:26:27 +02:00
Andrew Knight
67c83f329e Tighten Q_OS_WINRT ifdefs in qfunctions_winrt.h
This allows the convenience macros to be used on desktop Windows 8 when
interacting with Windows Runtime types.

Change-Id: I09c6b18a6ee9711371ef7dc23fb1d3354198db1c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-08-21 18:21:52 +02:00
Pelle Johnsen
4a2e297b4f Replacement for QWS_DBLCLICK_DISTANCE
Add QT_DBL_CLICK_DIST to replace QWS_DBLCLICK_DISTANCE for controlling
the distance for detecting double clicks, which can be very useful on
embedded devices

[ChangeLog][QtGui] environment variable QT_DBL_CLICK_DIST 
customizes the amount of movement allowed when detecting a double click.

Task-number: QTBUG-40841
Change-Id: I0a7534ad6cd6387d127eb49021a92d414d45670e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-21 17:53:52 +02:00
Shawn Rutledge
f45efafacf QTextCodec::codecForHtml looks at the first 1024 bytes
The HTML 5 spec requires it, instead of only looking at the first 512.

Task-number: QTBUG-40383
Change-Id: Ie10cf8c745ed1a3402914e126a02bc43d5035fff
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-08-21 17:50:39 +02:00
Shawn Rutledge
dd6080ceac Debug logging support for QNativeGestureEvent
The most useful information is what kind of gesture the event
represents, but it was missing until now.

Also added a line of documentation about the NativeGesture event type.

Change-Id: I1ba3c951dcc5751e937d762d9b647ab0bf8d93b8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-08-21 17:49:44 +02:00
Shawn Rutledge
d88de0452a xcb: set up touch devices even if debug is not turned on
59ba84d31c introduced a mistake.
It's necessary to populate the device data structure
even if we are not going to log anything.  Now the accessor
is renamed to touchDeviceForId and the struct is renamed to
XInput2TouchDeviceData to make it more clear that it is only
for touch devices.

Change-Id: Iaa3cce2d6cae250318f5a200becb9de9626b6437
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-08-21 17:31:40 +02:00
Allan Sandfeld Jensen
b78e81f7c2 Outline drawing should not override the default freetype loadflags
We set FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH as the default load flags
for freetype fonts, but due to using = instead of =| the default flags
gets overridden when outline drawing sets FT_LOAD_NO_BITMAP.

Change-Id: I26b45aa2bbf613689d278eb07ae028ef9757023c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-08-21 17:31:33 +02:00
Martin Smith
6b12d781fa qdoc: Generate obsolete members page for QML types
Generation of the obsolete members page, for QML types
that have obsolete members, had not been implemented.
This update implements that missing feature. The link
to the page appears right below the link to the "All
Members" page.

Change-Id: I3e4bb2a68d5c8ef2bbe2e0c431eccf94ecb1fd3c
Task-number: QTBUG-40214
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-20 21:59:53 +02:00
Martin Smith
a2c432e978 qdoc: Allow choice of linking to QML or CPP
This update enables using QML or CPP as the parameter
in square brackets for the \l command. You will use this
when, for example, there exist both a C++ class named
QWidget and a QML type named QWidget and your \l {QWidget}
links to the wrong one.

Suppose you write \l {QWidget} expecting it to link
to the QML type named QWidget, but it links to the C++
class named QWidget. Then write this instead:

\l [QML] {QWidget}

Or if you wrote \l {QWidget} expecting it to link to
the C++ class, but it links to the QML type, write this
instead:

\l [CPP] {QWidget}

A qdoc warning is printed if qdoc can not recognize the
parameter in square brackets.

There will be a further update to complete this task for
implementing the other type of parameter that can be in
the square brackets.

Task-number: QTBUG-39221
Change-Id: I5dd85478f968025ecbe337a8aabcc31d8b12a86d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-20 21:59:23 +02:00
Dyami Caliri
07c34fcc8a xcb: use keyboard event source window to determine auto-repeat value
The xcb auto-repeat checking code checks for queued events on the target
(focused) window. This breaks down if you have a native child widget,
and QKeyEvent::autoRepeat is never true.

Task-number: QTBUG-21500
Change-Id: Ia979edfa8a3afce07a3e1cbaa778541ffb9ce5dc
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-08-20 19:43:02 +02:00
Gunnar Sletta
dfc8f8b5d4 Rework how animationsystem interoperate with an animation driver.
We need to keep track of both wall time which are used for pauses
and actual animation driver time which is used for actual animations.
When switching between these, we need to also maintain the temporal
drift potentially introduced by the driver and also the time
that has passed in wall-time from when a pause has started until
an action animation takes over.

This change introduces a well defined elapsed() function in
QUnifiedTimer which will return the right value based on which
mode we are currently in. It also introduces start/stopAnimationDriver
functions which helps us maintain the temporal drift and pause-delta.

Change-Id: I5b5100432a6db444a413d1bca4f2d5f800e8cf3e
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2014-08-20 18:53:09 +02:00
Paul Olav Tvete
8688dfcd7c Android: use correct size when leaving fullscreen
On Android, fullscreen means enabling "immersive mode", which
results in the screen available geometry changing. When restoring
normal mode, oldAvailableGeometry == oldGeometry, which means that
the fullscreen branch would be chosen even though the state is not
fullscreen. By doing the maximized test first, we will default to
non-fullscreen geometry for non-fullscreen windows.

Task-number: QTBUG-39977
Change-Id: Ifc7e8b4de7e96d8c00603ce0cd136b95f58012bb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-20 18:38:18 +02:00
Allan Sandfeld Jensen
9b11f0bac8 Fix invalid memcpy(dst, src) calls where dst == src
The convert_generic_inline method was not correctly handling the case
where both the conversion methods were passthrough and the last store
is therefore not needed and may trigger an invalid memcpy call.

Change-Id: Ic88780f50e1ff9dedc04b8ff1ab3527dd0c8150c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-20 15:54:41 +02:00
Eskil Abrahamsen Blomfeldt
198009db79 Fix several regressions in font selection
In Qt 5.3.0 a change was added which automatically adapts Common
script to surrounding scripts in accordance with the Unicode tr#24.

This broke *a lot* of cases of font selection because the font
selection algorithm is not prepared for handling characters with
adapted scripts. We need to disable this change for now and redo it
later with patches to font selection to avoid the regressions.

[ChangeLog][Text] Fixed several regressions in font selection when
combining different writing systems in the same text.

Task-number: QTBUG-39930
Task-number: QTBUG-39860
Change-Id: Id02b5ae2403c06542ed5d81e7c4deb2e0c7d816e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-20 13:10:55 +02:00
Allan Sandfeld Jensen
29787ec29c Detect wrongly labelled wheel buttons
A mouse device with both missing labels and a wrongly placed label
on the mouse wheel buttons have been spotted.

This patch makes the XInput2 code even more lenient to better match
legacy systems that always assumed button 4 and 5 are mapped that way.

Task-number: QTBUG-40806
Change-Id: I7cc52f3d9c54e15e6f3ddcc2bdeb1bb8e0ac9eca
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-20 10:21:13 +02:00
Allan Sandfeld Jensen
1bae226076 Make QWindowContainer handle drag'n'drop
Drag'n'drop events were not propagated by a the QWindowContainer to the
embedded QWindow. This patch makes the widget accept the events and
pass them on

Task-number: QTBUG-40603
Change-Id: I97320fbcad27f7c6aa48c95c90bb42dda634764e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-20 10:11:37 +02:00
Paul Olav Tvete
97384030ef Resize correctly on orientation change.
Make sure that the screen geometry is updated before the available
geometry, since Qt uses available geometry change as the trigger
for updating the application.

Task-number: QTBUG-39965
Change-Id: Icb660f2de739367cf1fa99ddfe600f37eb6174eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-20 10:07:45 +02:00
Paul Olav Tvete
90ed77c044 Use correct size in fullscreen mode
Android does not report the full screen size in display metrics.
However, it does report the correct size for layouts, which we use
to get the available geometry. Since by definition, the available
geometry should always be inside the screen geometry, it is safe to
use the maximum of the two sizes.

Task-number: QTBUG-39977
Change-Id: I78d974f12274ca67eada43f5e1d80e70149efe3f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-20 10:07:34 +02:00
Marc Mutz
b8989f937a Properly null-terminate ifreq::irf_name
It's unclear whether it has to be, but there are a lot of patches floating around
on the net that indicate that Coverty requires this, and the SIOCGIFADDR micro-howto
also NUL-terminates the string.

So who is Qt to differ?

Change-Id: I1aa5a2de47a58b1d9b73556d5a6ddc48b2c40ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-19 18:14:01 +02:00
Timur Pocheptsov
6b6e51e5ab OS X - QCollator::compare() returns wrong results.
kUCCollateDigitsAsNumberMask works only if kUCCollateDigitsOverrideMask
is also set.
Update 0: - test added.
Task-number: QTBUG-40777
Change-Id: I48bfec78f5f8439a51f8d749f0fc4397a72b29f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-08-19 17:53:36 +02:00