Commit Graph

18606 Commits

Author SHA1 Message Date
Thiago Macieira
9a747cb5b7 Fix an off-by-4 error in qHash with CRC32
I tested only the 64-bit build. The 32-bit build was reading garbage
past the end of the strings in some cases.

Change-Id: If6d239754e16a17cc4e8bb71e2b7778429dfa7ba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:47:30 +02:00
Allan Sandfeld Jensen
a8877f529d Scrolling devices should not override touch or tablet devices
XISelectEvents override any earlier set event mask for the same device
ids. This may cause touch devices to stop reporting touch events if they
export scroll buttons or axis.

The patch checks for each scrolling device if they are also a touch
devices and includes the necessary bitmask if they are, and skips
any devices also recognized as tablet devices as they already capture
all relevant events.

In addition tablet event handling will no longer block handling of wheel
button events for scroll devices with the same device id.

Task-number: QTBUG-38935
Change-Id: Ifd4657beb0a0cebffe89d3470ef2bd605eb3552e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-13 12:47:16 +02:00
Allan Sandfeld Jensen
7cc175c9d6 Assume unlabelled mouse buttons are default buttons
This patch fixes legacy wheel scrolling for XInput2 drivers that fail to
label mouse buttons correctly.

Task-number: QTBUG-38937
Change-Id: I659890517e749dc0039489e0b7a8c38be1065d33
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-05-13 12:47:12 +02:00
Thiago Macieira
b23e72a772 Fix stateful handling of invalid UTF-8 straddling buffer borders
When a UTF-8 sequences is too short, QUtf8Functions::fromUtf8 returns
EndOfString. If the decoder is stateful, we must save the state and then
restart it when more data is supplied.

The new stateful decoder (8dd47e34b9)
mishandled the Error case by advancing the src pointer by a negative
number, thus causing a buffer overflow (the issue of the task).

And it also did not handle the len == 0 case properly, though neither
did the older decoder.

Task-number: QTBUG-38939
Change-Id: Ie03d7c55a04e51ee838ccdb3a01e5b989d8e67aa
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:37:19 +02:00
Bernd Weimer
8094bb537a QNX: Silence startup warnings
Missing PPS objects for navigator, virtual keyboard and buttons can be
expected on QNX and should not lead to warnings.
Virtual keyboard info message does not contain locale object any more.

Change-Id: I447d439ffbf4ea6e03f6a8bca4422a9a121d85f4
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-05-13 08:42:46 +02:00
Nedim Hadzic
d075df993c QPpsObject compile added for QNX platform
QPpsObject was only compiled for BlackBerry and not for QNX. Now, QNX
platform is included together with lpps lib.

Change-Id: Ib521664b430b202c0e67987d0bfda8373d2be70e
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-05-13 08:42:30 +02:00
Oswald Buddenhagen
f2619db300 fix doc references to webkit
we can't derive the doc index paths from QMAKEMODULES, as the mkspecs dir
may not live at the repo's top level.
instead, explicitly announce the repo's top level build dirs in QTREPOS,
and use that accordingly.

Task-number: QTBUG-38862
Change-Id: I643ad2bf63c8fca0ffc44ce3457dbe8a16dcab07
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-05-13 07:12:43 +02:00
Richard J. Moore
650e214d3d Fix the documentation on how to use -openssl-linked.
You set the environment /before/ you run configure.

Change-Id: I6954656f892214f41b5f2ec4e3f4926eb5a9e247
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-05-13 07:12:37 +02:00
Eskil Abrahamsen Blomfeldt
c1af2ced2d Mac OS X: Fix crash in Harfbuzz-NG
CoreText does not support multithreading, so we would get a
crash in tst_qglthreads. So we disable multithreading for
HB-NG.

Task-number: QTBUG-38762
Change-Id: I0473037c16017ff77cbba9b11fc0b396775ef789
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-05-12 19:24:51 +02:00
Bernd Weimer
da6dc40f75 QNX: Don't build QNX-only parts on BlackBerry
Only really required source files will be included when building for
BlackBerry.

Change-Id: Ic66b09221c48672358bba7601bc18663ad7fa07a
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-05-12 18:15:20 +02:00
Andreas Holzammer
5883b6a22c [QNX]Clear transparent regions
If a region gets painted the buffer beneath needs
to be cleared, as it could be that there are
leftovers from the last blit.

Change-Id: I51f19aa010015059e9a6d9d5e5e4f25fb9532d4e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-05-12 17:30:57 +02:00
Frederik Gladhorn
73bc91c9df Merge remote-tracking branch 'origin/release' into stable
Change-Id: I9300572e2b74f0564b2589cbd0fbdf24850f68df
2014-05-12 14:01:46 +02:00
Tor Arne Vestbø
5a060a5ad3 CoreText: Prevent creation of CGContext for glyphs with empty bounding box
If the alphaMapBoundingBox of a glyph is empty we don't want to create
a CGBitmapContext on it, as that will fail, and any further operations
on the invalid context will result in possibly fatal errors from CG.

This issue can be observed when drawing some glyphs of the Apple Color
Emoji font.

Change-Id: Ia45ba858b5fb6afa91e6d686a9c55e350d4095f3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-05-12 13:44:59 +02:00
Tor Arne Vestbø
a669564597 Allow QFont lookups using localized family names by adding family alias
After fbaa6d3ca6 QFont family names are non-localized on iOS/OS X,
which means applications that try to initialize QFont with a localized
family name (explicitly, or from user input), will fail, and get the
fallback font instead.

We now add font family aliases for the localized family names, so that
font matching will work even for localized family names. Note that
QFontDatabase::families() still returns a non-localized list.

Task-number: QTBUG-38628
Change-Id: Id351befa69916ce162c939733bbfcc774f075120
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-12 13:44:51 +02:00
Louai Al-Khanji
6c42ddf31f Direct2D QPA: Choose linear interpolation for smooth pixmap transform
Let's do the same thing the raster engine does. Much faster too.

Change-Id: I88ea9d2c2ac78feee1193b75a9e96c62a7bd5979
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-12 13:44:42 +02:00
Louai Al-Khanji
17dda3917d Direct2D QPA: Never queue more than one frame
Microsoft recommends setting the maximum frame latency to 1:

http://blogs.windows.com/windows/b/appbuilder/archive/2013/12/18/optimizing-directx-apps-for-low-latency-input-and-longer-battery-life.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx

Apparently it slightly reduces power consumption and it also slightly
increases performance. So let's set it.

Change-Id: I8a540f1e54e83d6dc13f25564e10b751e202ce66
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-12 13:44:38 +02:00
Andrey Volykhin
793b7e8008 QTextLayout: Fix cursor position calculation for BiDi text
Due excess 'break' in loop, function xToCursor() with "CursorOnCharacter" option
for BiDI text returns wrong cursor position (start glyph position) all time.

Task-number: QTBUG-38846
Change-Id: Iba6671905e0785da6f343db19d6c3bb3e2cf5e8a
Reviewed-by: Andrey Volykhin <andrey.volykhin@lge.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-12 10:26:14 +02:00
Eskil Abrahamsen Blomfeldt
3cf9621fa0 Respect fixed pitch request when font family is not available
In particular, if you have a <pre> tag in your HTML, this will
become a QFont with family "Courier New" and fixedPitch==true.
On Android, there's no "Courier New" font, and since the
style hint is AnyStyle, we will just return Roboto, which is
a proportional font.

Note that this exactly matches the condition when fetching the
fallback families for the font in the loadEngine() function,
which was introduced by 06568ff89c48dee8aab278b8b0538c331aa84595
in Qt 4.

[ChangeLog][Text] Respect QFont::fixedPitch() for fallbacks
when font family cannot be matched.

Task-number: QTBUG-36083
Change-Id: I64787c547dc492b9dd3c49f1edf0d9626d198260
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-05-12 09:31:46 +02:00
Thiago Macieira
9bde391da4 Update changelog for Qt 5.3.0
Change-Id: I575938a761f1328c22777a7c5f00716d2856db58
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-12 06:39:55 +02:00
Daniel Molkentin
0065b55da4 Ignore expired certificate during certificate validation
OpenSSL has a bug when validating a chain with two certificates.
If a certificate exists twice (which is a valid use case for renewed
CAs), and the first one it hits is expired (which depends on the order
on data structure internal to OpenSSL), it will fail to validate the
chain.

This is only a bandaid fix, which trades improved chain validation
for error reporting accuracy. However given that reissuing of CA certs
is a real problem that is only getting worse, this fix is needed.

See also: https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html#WARNINGS

[ChangeLog][QtNetwork][QSslSocket] Added a workaround to an OpenSSL problem
that may cause errors when the trust store contains two certificates of the
issuing CA, one of which is expired.

Task-number: QTBUG-38896
Change-Id: I8f17972ac94555648098624e470fff0eff2e7940
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-11 11:34:21 +02:00
Thiago Macieira
0a0cc6afc8 Doc: change the name of the QTemporaryDir parameter name
Make it very clear that this is a path, so it's relative to the working
dir, not relative to tempPath().

Task-number: QTBUG-38266
Change-Id: Ib7ca8df76b5a03c1631fe00d6b329d86538d4b5a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-05-11 05:13:58 +02:00
Thiago Macieira
f2a40fa071 Don't assume QLocale::codecForLocale always returns non-null
It may return null during program exit, due to QCoreGlobalData global
static already having been destroyed. If that's the case, QTextStream
needs to fall back to Latin 1, like QString::toLocal8Bit and
fromLocal8Bit already do.

Task-number: QTBUG-38316
Change-Id: I5949c8dec15b60f4a13b5d9307ed6abfc799fe20
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-05-11 05:13:49 +02:00
Sean Harmer
ec81021664 Enable support for OpenGL 4 on OS X 10.9
Change-Id: Ifc3aeea8bf4bada821d09cc329748cad16923d6a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-05-10 08:59:45 +02:00
Thiago Macieira
df70d5ad80 Limit the QString pretty outputs to 256 characters
Change-Id: I88e71e517827af7d82e3a47d88d40787051ed827
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-05-09 23:57:33 +02:00
Thiago Macieira
918f20ee47 Document the X11 DISPLAY variable in the -display option docs
Change-Id: I20412616c91d187e2befc39134a480369347b8cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-05-09 23:55:47 +02:00
Thiago Macieira
7a89ee08ce Doc: fix -qwindowgeometry and -qwindowtitle option docs
The former was documented twice and the latter was missing the qdoc
formatting.

Change-Id: Id8dfb21a0c2fd26134b5738448971fe2627a12d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-05-09 23:55:44 +02:00
Thiago Macieira
cd9c59b5d6 Document that the -reverse option is only for debugging and its default
You should never force that option. Just let Qt automatically detect
from the environment.

Change-Id: I43ae4951969d2067cc111eff6302921a0af82658
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-05-09 23:55:40 +02:00
Thiago Macieira
78e57834ac Document that env variables are preferable to cmdline options
Environment variables are passed along to child processes, command-line
options aren't.

Change-Id: Ia52c1d8cfeeb2f7490e73ac50b58ba07c2eebfa8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-05-09 23:55:36 +02:00
Friedemann Kleint
f528fff973 tst_QWidget::windowMoveResize(): Fix QEXPECT_FAIL / QTRY_COMPARE .
QEXPECT_FAIL followed by QTRY_COMPARE considerably slows down
tests due to the check timing out.

Task-number: QTBUG-38890
Change-Id: I7f90f2627fc6ce149d159a6d13355ca1a8181d54
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-09 18:49:41 +02:00
Topi Reinio
2d1e109578 Doc: Update the list of highlighted examples
Remove highlighting for examples with known problems, and
examples that don't work on all platforms. Add highlighting
for improved ones and prominent examples that demonstrate
new features.

Task-number: QTBUG-37203
Change-Id: Ida7fd28573dfebe6e4e3320ef83782654632219e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-05-09 17:25:46 +02:00
Laszlo Agocs
b6de758ec6 Avoid using repeat on widget textures in eglfs
Otherwise widgets will not be shown on some embedded systems.

Task-number: QTBUG-38866
Change-Id: Id16408dc7eb657c052bbe3bdb86e35ab2f062632
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-09 17:25:33 +02:00
Frederik Gladhorn
667f2449a3 Fix crash on startup when running screenreader
For exaple Qt Creator would crash when started and a screen reader (eg
NVDA) is running. This is due to updateAccessibility being called during
the ctor of the TextEdit and on Windows the AT can access properties in
the same call resulting in accessing the text control before it's fully
constructed.

Also make sure to not send accessibility updates for non-widget type edits
since we don't support any accessibility in Qt Quick 1.

Backported from Qt 5.3.1 since it also crashes Qt Creator on startup on
Mac (as soon as accessibility is enabled which may be for various
reasons, and basically any app that uses a QTextEdit).

Task-number: QTBUG-38659
Task-number: QTBUG-38738
Change-Id: I6e5c0dc47bd75e63fe013a9edadbabccd52c20ee
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-09 17:25:19 +02:00
Andrew Knight
fe0348e103 ANGLE D3D11: Don't use mipmaps in level 9 textures
As the mipmaps levels aren't being generated on level 9, they shouldn't
be used. Fall back to multisampled textures instead (which is the
behavior for non-power-of-two textures anyway). This fixes an issue in
which textured polygons (e.g. QML Images) turn black when scaled down.

Change-Id: I648b8be473dc38f4e1b26724cbaff610e586fdbd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-05-09 12:31:36 +02:00
Laszlo Agocs
295786d946 Avoid corruption in Q(Open)GLFunctions when used on multiple threads
Using Q(Open)GLFunctions concurrently on multiple threads had some issues
due to incorrect synchronization: The m_groups list in the
QOpenGLMultiGroupSharedResource, in which the Q(Open)GLFunctions instance
is stored, became corrupted under certain scenarios, for example in the
tst_qglthreads autotest and any two threads that happen to enter an
initializeOpenGLFunctions() or QOpenGLContext::functions() call concurrently.

Locking in value() has been introduced in 666c25c089
to fix such issues, however using the context group's mutex is not enough: that still
allows two threads using two contexts with a different context group to concurrently
enter insert(). Instead, the MultiGroupSharedResource has to have its own mutex
to protect its own member variables.

Task-number: QTBUG-38771
Change-Id: If01c44c2084b95e487bc9146576ca180ed8044da
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-09 12:25:06 +02:00
Louai Al-Khanji
f85ab84414 Direct2D QPA: Bump copyright year to match reality
Change-Id: I443b74e3d464285febc28345f35d1445e8102015
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-09 12:17:44 +02:00
Martin Gräßlin
df3720527d Ensure the QMenu is polished before creating the native window
Call ::ensurePolished from QMenu::exec before the native window gets
created. This ensures that the style handles the menu before its too
late. E.g. a style which wants to create RGBA menus needs to add the
appropriate flag before the native window gets created. Without this
change the style cannot change to RGBA as the native window has already
been created and changing the format used by QWindow is not possible
after QWindow::create was called.

Change-Id: Ic861037a438b4cb74c59a00be0ef2d633db538ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-09 12:16:05 +02:00
Thiago Macieira
e0e86d5651 Fix dangling pointer dereferencing
That long call chain is screaming "here, I'm dereferencing dangling
pointers! Valgrind me!" but 2006 Thiago didn't see them...

Change-Id: I44de5aea113d05edec2227e9db6be8cec9303be9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-09 03:39:34 +02:00
Thiago Macieira
a982243b97 Autotest: make sure the helper programs in QtDBus aren't bundles
The main test won't find them if they are.

Change-Id: Iae3ffe4c0289a0c88d46c1bd2e414c20def89ab4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-09 03:39:33 +02:00
Daniel Seither
ac109e1316 QDateTime: Fix sign handling in the timezone offset writer
Previously, this produced wrong results, for example -3:30
became -3:-30.

Change-Id: I10efdfb48e5542b917c86b29cf8a99bfc26f7fe0
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-08 21:28:45 +02:00
Daniel Seither
baf5eed1ef QDateTime: Fix sign handling in the timezone offset parser
Previously, parsing negative timezone offsets with minutes != 00
produced wrong results.

Examples (in -> out)
-00:15 -> +00:15
-01:15 -> -00:45

Change-Id: I6fa30810a08bdf2996365661720b2e362e8aeb93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-05-08 21:28:45 +02:00
Daniel Seither
d69c6bc81f QDateTime: Add more tests for parsing/writing timezone offsets
The tests for toString/fromString previously didn't run tests
for timezones with hh:mm where mm != 00.

Change-Id: I74da99c5b6890f46ce06446084a8129b4cbc7a02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-05-08 21:28:45 +02:00
Joerg Bornemann
f5f4f501a4 move qlocale_mac.mm to OBJECTIVE_SOURCES
This fixes a warning when loading qmake.pro in Qt Creator on OS X.

Change-Id: Iabd70f2b5b9615d0fb1563081f485e6a4c828823
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-05-08 21:28:45 +02:00
Alessandro Portale
01ce104a3e qmake: Use QDir::toNativeSeparators on paths printed as info
Change-Id: I8c587164bcff742f7ac8ad3f3f28e0b16645cb2a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-05-08 16:37:59 +02:00
Rolf Eike Beer
6f6cfda8c4 kms plugin: use first returned mode if no preferred one is present
The list of returned modes is scanned for the first one marked as
preferred, and that is used. If no preferred mode was found then the
builtin default mode of 1024x768 is used. Use that builtin mode only if
no modes were returned at all, pick the first one if any were returned.

Change-Id: Ib355cc92219ced093c605f49dae4e34ff244b639
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-08 16:33:31 +02:00
Rolf Eike Beer
9c4996b709 kms plugin: do not needlessly query drm information twice
QKmsDevice already requested the drmModeRes and drmModeConnector
information. Simply pass them to the QKmsScreen constructor instead of
requesting and freeing them there again.

Change-Id: I4897d76d7b13d83297c928b6e10e17ccdfdbd242
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-08 16:33:21 +02:00
Friedemann Kleint
c82668d39d Speed up tst_QXmlSimpleReader.
Increase the chunk size of the server and remove hard-coded
interval when waiting for the server to listen.
Unmodified, the test takes 170s on Windows.

Change-Id: I65bdc93ff78e1b4fb429fcafd0fdc5e80bb281f9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-08 16:06:11 +02:00
Frederik Gladhorn
730697d1b9 Accessibility Android: Make debug tags consistent
Change-Id: I712e64002234d546365b44ca15ae93e8decac882
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-08 13:50:22 +02:00
Jocelyn Turcotte
9deafdad5b Avoid drawing when the QOpenGLWidget isn't mapped
Do as QGLWidget::updateGL does and avoid calling paintGL in updateGL
when we we don't have a valid QSurface to draw on.

We currently end up calling makeCurrent on the context with a null
QSurface in that case, which is the equivalend of doneCurrent, and
causes QOpenGLContext::currentContext to return null later when paintGL
is called on the subclass.

Change-Id: I712ee59274855457b0e4de3757754f56b3528955
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-08 13:50:22 +02:00
Paul Olav Tvete
eed30131e1 Android: text cursor position fixes
The Android input method protocol specifies that finishComposingText()
should not move the cursor. Since Qt likes to move the cursor to the
end of the newly committed text, we have to explicitly move the cursor
to where the preedit cursor used to be. Fortunately we already keep
track of that.

Also implement support for the newCursorPosition argument to commitText()
since the function needed to be rewritten anyway. (It was calling
finishComposingText().)

Task-number: QTBUG-38794
Change-Id: Iff2c43bdbd3dda812ccdc71da63f3fa730474eef
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-08 13:50:22 +02:00
Tor Arne Vestbø
36caeadb4d iOS: Gracefully handle cancelling of subset of active touches
When applying the five-finger pinch gesture, we get a touchesCancelled
callback with all five touch points, but the pinch gesture ends when
the second to last finger is released from the screen. The last finger
will not emit any more touch events, _but_, will contribute to starting
another pinch gesture. That second pinch gesture will _not_ trigger a
touchesCancelled event when starting, but as each finger is released,
and we may get touchesMoved events for the remaining fingers.

The event property 'allTouches' contains one less touch point than it
should, so this behavior is likely a bug in the iOS system gesture
recognizer, but have to take it into account when maintaining the Qt
touch state.

We do this by assuming that there are no cases where a sub-set of the
active touch events are intentionally cancelled, and always clear the
list of active touches.

Task-number: QTBUG-37304
Change-Id: Icee79978508ecbc6854c0fb55d2da48b99d92f96
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-05-08 13:50:22 +02:00