The implementation follows a similar logic as in Qt 4
making sure we properly interface with the QPA backend.
We also make sure to delay moving the action widget to
the QPA menu until it's about to show. We still don't
support moving the action widget back from QPA world
into Qt, as explained in the QWidgetAction documentation.
Task-number: QTBUG-19840
Change-Id: I47f6359b0806f967d80c67fbb1f36c3d5ec8603e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Instead of collecting all files from the "fonts" directory to deploy
them to the phone, we only collect files which are mentioned in the
FONTS variable. Otherwise fonts that were copied to the fonts directory
earlier (due to FONTS being unset (default fonts) or set to another set
of fonts) will also be deployed as part of the project.
Change-Id: I24c77e154a9f2ec75e88d487c056b0be46e17e87
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Even on platforms that use the QPlatformIntegration::StyleHint
ShowIsFullScreen we do not want to show tool tips fullscreen which
would happen if we just call show().
This is also required to fix somewhat random crashes on QNX when
browsing a website and hovering links that would trigger a tooltip to
be shown. There, we could end up with nested calls to
QToolTip::showText when the tooltip was shown full-screen. Since
QToolTip is not reentrant that can lead to crashes since
QTipLabel::instance could be deleted/invalidated inbetween.
Change-Id: I335fcd10cb6d4cffeb622ed8e0caf17f6413d62d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This will let VoiceOver announce QLineEdit as editable text.
It also implements setting of values for value interfaces (eg sliders).
Task-number: QTBUG-38258
Change-Id: Ic30c10abc4dc0c4f3c5fe922ac5b0a4bbf4b1e5f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This would especially trigger when moving the focus between menus - after
the right menu got the focus we would send another event for the QMenuBar,
preventing the screen reader from reading the actually selected menu,
announcing the menu bar instead.
[ChangeLog][QtWidgets][QMenu] Accessibility: Menus are read by screen
readers with more reliability.
Task-number: QTBUG-38498
Change-Id: Ie4028120b234949380315296bf07ca53863d0ad8
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
startOffset is already one char past the newline.
By adding +1 we would skip one newline if the text was \n\n.
Task-number: QTBUG-38257
Change-Id: Ida49a4b690bfa71f134e9be46126f418783a3c97
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
If a painter is active on a QPixmap being uploaded, it will be copied
twice, first to create a QImage and then from QImage into a texture.
The first copy is unnecessary since the QImage is only temporary, so
we can force it to be created as a reference instead of a copy.
Change-Id: Iabcfb514a634446a01f1c4031349c185ec09290b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Backport of commit 8dfeb1c374 in QtGui
to the same class in the QtOpenGL module.
OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT,
so for OpenGL ES2 we use a custom program that emulates repeat by taking
the fractional part of the texture coordinates.
This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT
with a NPOT texture is an error in some implementations, so we have to
guard the call to updateTextureFilter() in updateBrushTexture() with
a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead.
Change-Id: Icbdd784c2c6d562849679f87da18b20d5441f389
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Regression caused by 0be1c4899c.
The calls to handleCloseEvent/flushWindowSystemEvents
may result in popup window deletion and a stale/null
pointer access.
Get the window type before closing it.
Task-number: QTBUG-38418
Change-Id: I212a56979e0248076e1eb5bf9ede1ff0d424e041
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Ensure we fall back to using wheel button events if xinput 2.1
scroll events are not available. Handles lack of xinput 2.1
support in the server or in the input devices drivers.
Task-number: QTBUG-38169
Change-Id: Ie4ad9069f648d0ab02d8f9540ed01ad58fd9e9d8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
... because they are too unstable. We can check whether they are more
stable once the new network tests server is in place.
Task-number: QTBUG-38385
Change-Id: I5ced7cc1f89290812aa88f174a41965fd2ef7252
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Change-Id: I2912dcca77270582f6e989b8b3fb72b82f6f70d6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
QWindowSystemInterface::handleGeometryChange has to be called with
proper geometry whenever it changes.
Change-Id: I691b85467a815ed21bce2bb64b33fa297c16f809
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
isES() becomes isOpenGLES(). The library type enums are changed
DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now
unnecessary version number, the confusing "desktop" term and provides
better readability.
The old function/values are kept until the related qtdeclarative
changes are integrated.
Task-number: QTBUG-38564
Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Improve the way we fall back to the raster engine by forwarding painting
state. Amongst other things this makes perspective transforms appear
correct.
Change-Id: I729de56ef3112bbc01516fc11c295f33a2aada0d
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Fix the paint handling to support QPaintEngineEx style state updates. This
fixes most of the outstanding issues, as QPainter save and restore were
essentially broken before
Change-Id: I477d8acfd71bba32dfac4c491bc5bbaad1804ec5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Use axis aligned clips when possible instead of layer-clipping. This can
be much faster when a lot of clipping operations take place.
Change-Id: I6865d69fc917a7da858033b4c362b307724d9006
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
We shouldn't block the whole gui thread for vsyncing. This can slow things
down a lot if a lot of drawing happens.
Change-Id: Ie459f9dee2271e7908e2b7f56873393c67f82836
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Introduce QTRY_COMPARE to let the sorting finish instead
of a hard-coded time-out.
Task-number: QTBUG-29403
Change-Id: I813bf6bcfe7110f49a5b95db589ed8a3f559db89
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Use QTRY_COMPARE for dirChangedSpy, remove all unneeded
remove()/setPermission() calls (originating from the time
the test did not use QTemporaryFile), add more QVERIFY()
and messages for the other operations.
Task-number: QTBUG-30943
Change-Id: Ib3b78b1c6922539fd5e9238aa017fcdb554aacc8
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
selectFile(): Ensure dialog is destroyed before the temporary file
to prevent leak.
selectFiles(): Introduce scopes to prevent co-existence of 2
instances of QFileDialog, which causes warnings from file watchers
and occasional crashes in accessibility.
Discovered while investigating:
Task-number: QTBUG-38414
Change-Id: I94d2bb3e05538416286641cb08a88d8b3837a8a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
f412f2b5 refactored the platform tool set retrieval, but made the
call too early to choose the right tool set on Windows Phone. This
fixes the call so that it does not depend on the WinPhone member variable,
and also makes it forward-compatible with Windows Phone 8.1.
Task-number: QTBUG-38516
Change-Id: Ide91563f5c7f909c4d1a258adc29af6c94595dc9
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Move the copy of the paint engine to after the engine state has been
synced, otherwise the transform is incorrectly applied after the new
page.
Task-number: QTBUG-38329
Change-Id: I2e134889b3ef10f6e3dce42edac2a58e78c66c30
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
And move the default argument from the deprecated constructor to
the new one
Also make sure that the error number is consistent across the
two constructor
Change-Id: I3721266b39ab493f0add35b2d1f892b2f6094992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This is a regression from 5.1.
Task-number: QTBUG-37706
Change-Id: Ib28eead869dde37ded37397a89a94b67fb150cca
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
On Android, there's a limitation set on the names of the libraries
you deploy that they must start with "lib" and end with ".so", so
Android apps will link against and deploy with the unversioned
libQt5FooBar.so libraries. When cross-compiling on Windows however,
due to the lack of symbolic links, the only installed library
used to be the main library target "libQt5FooBar.so.X.Y.Z" (for
version X.Y.Z.) This has been worked around in packaging, but
breaks building add-on modules on top of Qt, and is clearly
wrong.
This patch introduces a new "unversioned_libname" configuration
in qmake which is currently only supported for the Unix makefile
generator and only enabled for Android builds. When it is enabled,
only the unversioned library "libQt5FooBar.so" will be created.
Task-number: QTBUG-38347
Change-Id: Ia8897ca7a23a62e2a526d0e02854899b02eb19dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Try to conform to the input method protocol in the way that
SwiftKey expects (and the way that the stock android
components actually do).
* Refactor cursor position logic
* fix getExtractedText() so it includes preedit text
* ignore the hintMaxChars parameter to getExtractedText(), since
it looks like everybody else does
* fix setComposingRegion when preedit is active
* track the start of the preedit and the preedit cursor position,
since the Qt input method query does not give us this information
Change-Id: I2ed8797abacd97ca749ca152fab2a2d5446ef603
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This restores behavior for UDP sockets as it was in 5.2.1. Change
13c246ee11 introduced a behavioral
change / regression in that respect.
Task-number: QTBUG-37489
Change-Id: I8f0b26d763dd66ea6edcc343e91ff5c9c7bdc0f2
Reviewed-by: Richard J. Moore <rich@kde.org>
Broken GIF images could set invalid width and height
values inside the image, leading to Qt creating a null
QImage for it. In that case we need to abort decoding
the image and return an error.
Initial patch by Rich Moore.
Task-number: QTBUG-38367
Change-Id: Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e
Security-advisory: CVE-2014-0190
Reviewed-by: Richard J. Moore <rich@kde.org>
* add -help text for gtkstyle
* use capital GTK in warning message for consistency
Change-Id: Iff522cc49497dda406dd111594857930d82e4231
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The SSE2-based conversion only kicks in with strings with 8 characters
or more in length.
Change-Id: Ic1daad0845571be03547553cc001d83550f0c89c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Commit 125bb81bef wasn't enough. Let's
just make it simpler and use a regular function.
Change-Id: I9627dedaa87873b4b138224afd182e4fd9a55265
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The ability to set a container to be unsharable has very little use and
it costs us an extra conditional for every refcount up and possibly
down.
This change is a no-op for current Qt 5. It shuffles a few things around
just so Qt can compile if you define QT_NO_UNSHARABLE_CONTAINERS. That
is done to ease the fixing of the code in Qt 6 and to make my life
easier: I'll keep that defined in my local Qt build so I can catch any
misuses of this deprecated API.
The newly deprecated methods are not marked QT_DEPRECATED because the
bootstrapped tools wouldn't build -- they're built with QT_NO_DEPRECATED
defined, which causes build errors.
[ChangeLog][QtCore] The setSharable() and isSharable() functions in Qt
containers has been deprecated and will be removed in Qt 6. New
applications should not use this feature, while old applications that
may be using this (undocumented) feature should port away from it.
Discussed-on: http://lists.qt-project.org/pipermail/development/2014-February/015724.html
Change-Id: I789771743dcaed6a43eccd99382f8b3ffa61e479
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The 10.6 OpenGL headers have "GLenum" as the type
for the 3rd argument. The OpenGL standard has "Glint",
which is also what Qt expects.
Work around this by casting the pointer type.
Task-id: QTBUG-38406
Change-Id: I6d820f41e0d14cbc2d50d91997b6c40b626b159f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
We haven't handled the Unicode non-characters specially since Qt 5.2
(since commit 9327bc87c3), so this part of
the documentation was stale.
Since Qt 5.3 (since 8dd47e34b9), QString
will insert one replacement character for each byte that can't be decoded
properly.
[ChangeLog][Important Behavior Changes][UTF-8 decoding] The QString
UTF-8 decoder changed behavior slightly: when it encounters invalid
sequences, it will insert one replacement character per byte that is
invalid, instead of one replacement character for the whole invalid
length.
Change-Id: Ia4ec78afded9445bbe937311d6be80f71bd1a55f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8dd47e34b9 removed the handling of the
BOMs but did not document it. This brings the behavior back and adds a
unit test so we don't break it again.
Discussed-on: http://lists.qt-project.org/pipermail/development/2014-April/016532.html
Change-Id: Ifb7a9a6e5a494622f46b8ab435e1d168b862d952
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
they have been fully superseded by 4255ba40ab.
Change-Id: If7ac14c8b7d3cf00fb0cb916036b62eb86c9cee0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>