Commit Graph

37396 Commits

Author SHA1 Message Date
Laszlo Agocs
76c4a70499 QOpenGLShader: report geom. and tess. on GLES 3.2+
Also fix up the docs.

To make everything more complicated, OpenGL ES 3.2 does not support
default tessellation levels. Therefore the related functions remain
OpenGL 4.0+ only.

[ChangeLog][QtGui] QOpenGLShader has been fixed to expose geometry and
tessellation evaluation/control shaders with OpenGL ES 3.2.

Task-number: QTBUG-66074
Change-Id: I2e4277912800d8302824e3fb74f61ec16f4b341d
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-09-28 13:59:42 +00:00
Liang Qi
1fa5d83ad2 Revert "Android: Compile with NDK r18 + clang"
This broke the build for qtlocation.

This reverts commit 176a216f4f.

Task-number: QTBUG-70779
Change-Id: Ifd8419ffb88c1a9009319f39b11b4529b143477e
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2018-09-28 13:46:11 +00:00
Friedemann Kleint
05e2690009 Windows QPA: Don't test for Desktop GL if Qt::AA_UseDesktopOpenGL is set
Pass the requested render to detectSupportedRenderers(), replacing
the bool glesOnly parameters. This allows for simplifying the code.

Fixes: QTBUG-70733
Change-Id: Iab65f62d24bf750019180e3b00e2d23c105e5997
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-09-28 13:32:51 +00:00
Jussi Witick
47bbc6d6f6 Fix disabled IME when QPlainTextEdit read only property is toggled
Mirror the behavior of working QTextEdit in QPlainTextEdit. The
WA_InputMethodEnabled flag was overridden by the following call
to setTextInteractionFlags().

Task-number: QTBUG-55699
Change-Id: I46402f5d94204acd304d56f488bb0fb342d1a846
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-09-28 13:31:59 +00:00
hjk
f286027e6b Fix QXmlStreamWriter xmlns attribute placement
Done-by: Eugenio Rustico
Change-Id: Ibd6aa6cc8be9090a4fad4f96628086d8a498b8e0
Fixes: QTBUG-63434
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-09-28 13:19:48 +00:00
Friedemann Kleint
1d09b0d1b2 QGraphicsScene::update(): Keep the list of updatedRects() unique
Otherwise, the rects will pile up when the item is not part of a view.

Task-number: QTBUG-54275
Change-Id: I29c989e25ce0ca1ac0b87d0388a476ef1acd9cfd
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-09-28 13:17:22 +00:00
Maurice Kalinowski
e2d79b4963 Do not fall back after resizing a dock
This is a follow up to 60be2fb6a1.

Above change only covers resizes via QMainWindowLayout::hover. Doing a
resize via the separator was not covered.

Task-number: QTBUG-70571
Change-Id: Ic1d1cc6d672b97e8c130864f8708268fd6003204
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2018-09-28 13:16:25 +00:00
Friedemann Kleint
3c5ad626d4 Export modules' enabled/disabled features to cmake
Add properties enabled_features and disabled_features the respective
library targets.

This makes it possible to query the enabled classes in dependent libraries
(for example, Qt for Python).

Add a test verifying whether the Open GL configuration is reflected
correctly in the feature properties to the existing test_opengl_lib
autotest.

Change-Id: I645c947073dbb36da3be81de6bc62ee0ba1e73d6
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-09-28 13:10:28 +00:00
Friedemann Kleint
34af9fa0dc Windows QPA: Fix programmable keyboard shortcuts being triggered twice
Suppress keyboard events following a WM_APPCOMMAND except for
APPCOMMAND_BROWSER_HOME, which does not trigger two events.

Task-number: QTBUG-62838
Change-Id: If04206c9ef9409224b4cbc96190792b9be4f656d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-09-28 05:24:26 +00:00
Lorn Potter
9f5b63a337 wasm: enable filesystemmodel for nothread
Task-number: QTBUG-70005
Change-Id: I10b09c1681716b4610147b57db14bce7b0f91b47
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-09-28 02:22:24 +00:00
Lorn Potter
cd60b78765 wasm: enable Network for nothread
Task-number: QTBUG-70208
Change-Id: Ib73ca0d3c0736336bf517ffb968cbdbab4610319
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-09-28 02:22:21 +00:00
Lorn Potter
9c72ae61aa wasm: make maximized and fullscreen windows not draggable
Also make fullscreen windows not have a titlebar

Task-number: QTBUG-69318
Change-Id: I017fc40fecb9f46d6540ffb72a71c9b62097a368
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-09-28 02:22:19 +00:00
Liang Qi
353a58ceb9 Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-09-27 18:34:12 +00:00
Timur Pocheptsov
586650f81d SecureTransport - require the latest SDK 10.13.4
Testing barely 10.13 seems to be insuficcient: we have developers working
on macOS 10.12 with SDK 10.13, but apparently they cannot update to the
latest SDK 10.13. We can try to be more specific and use __MAC_10_13_4.

Task-number: QTBUG-70757
Change-Id: I083d51f1a945f63f0413792387475341ecb96118
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andy Maloney <asmaloney@gmail.com>
2018-09-27 14:45:34 +00:00
Paul Wicking
d24a705039 Doc: Add link target to fix QDoc warning in Qt Declarative
Change-Id: Iddaef1ce3f739c3dfb98eb87430fe85e3b2bd01c
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-09-27 14:32:50 +00:00
Paul Olav Tvete
d429146431 Keep tiled subwindow order on resize
QMdiArea::tileSubWindows() will move the active window to the first
position, in order to be consistent with other MDI applications on
Windows (according to the original commit message). However, the same
function is also used for re-tiling on resize, so we must make sure
to not reorder in that case.

Fixes: QTBUG-51761
Change-Id: Ibf93a0bf7e663f983b9160364f812c84b5539171
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-09-27 14:31:34 +00:00
Liang Qi
d0fcaa7eaa Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/global/qconfig-bootstrapped.h
	src/widgets/util/qcompleter.cpp

Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
2018-09-27 11:08:55 +02:00
Eskil Abrahamsen Blomfeldt
720e243d88 Fix crash when detaching dangling QTextCursor
When a QTextCursor survives its QTextDocument, the internal
QTextDocumentPrivate pointer is set to null. There are checks for
this in all the QTextCursor functions to skip out early if such
a QTextCursor is used.

However, when executing the "if (d->priv)" condition in setters,
this will access the non-const operator->() of QSharedDataPointer
and detach the QTextCursorPrivate, and in the copy constructor of
this class, there was an unprotected call into priv->addCursor().

In theory, we could cast all the checks for d->priv to avoid
detaching, but in practice this doesn't matter, since the setters
will typically detach anyway later on.

[ChangeLog][QtGui][Text] Fixed a crash that can happen when calling
a setter on a QTextCursor after its QTextDocument has been deleted.

Task-number: QTBUG-70293
Change-Id: I8f6dc5bb344d1d824f673c0c220b68b7fee237a8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-27 06:51:37 +00:00
Eskil Abrahamsen Blomfeldt
9601ad4e27 Fix font weights on macOS 10.14
On later versions of macOS, the font weight trait of fonts is a 64 bit
double, not a 32 bit float, and on macOS 10.14, CFNumberGetValue()
started returning false for values when the type conversion is lossy,
like it is documented to. Therefore, we would end up without weight
information in 10.14.

The fix is to ask for a double instead, which works regardless of
whether the CFNumber represents a 32-bit or 64-bit value.

[ChangeLog][macOS][Text] Fixed font weights on macOS 10.14

Task-number: QTBUG-69955
Change-Id: Ia0577236ddc6b96f9231e6de7b1c49f7f8a837a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jason Haslam <jason@scitools.com>
2018-09-27 06:50:46 +00:00
Paul Wicking
f6ce2d42b3 Doc: Improve HarfBuzz configure options documentation
Task-number: QTBUG-63632
Change-Id: Iedaf34d016d13eeae3dc2e9030a3cea28e602ccc
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-09-27 03:32:02 +00:00
Alexandru Croitor
5e64957ee4 Fix QCompleter popups preventing the application from exiting
Due to an implementation detail regarding setParent() and
setWindowFlags(), if a QCompleter popup ends up being the last open
window after closing the main window, the application would be
prevented from exiting even after selecting an item in the popup.

This is due to adjustQuitOnCloseAttribute() not being called when
passing a Qt::Popup flag to setParent(parent, windowFlags).

Use setWindowFlags() directly, which adjusts the quit on close
attribute, and allows an application to exit properly.

Change-Id: Ic4cff9504df268556d851e40d5ae08b7ed4dc3bf
Fixes: QTBUG-69924
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-09-26 08:35:30 +00:00
Friedemann Kleint
f4169a633b Revert "qmake: Work around MSVC compiler bug."
The fix was for MSVC2010 which is now no longer supported
and causes a warning:

msvc_vcproj.cpp(217,12):  warning: unknown pragma ignored [-Wunknown-pragmas]
 #pragma optimize( "g", off )

by clang-cl.

This reverts commit 9f54846d95.

Task-number: QTBUG-63512
Change-Id: I395b964d09ac04a7dc852e43d7d95669948eea52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-09-26 05:41:08 +00:00
Oliver Wolff
7b00eab593 qwinrtcursor: Use QPointF as much as possible in pos/setPos
Using QPoint for calculations can lead to rounding errors which can
result in a situation where
"QCursor::setPos(somePos); QCOMPARE(pos, somePos)" fails.

Change-Id: Iaba499f67abcf5ec66adfe93bfbd79ef0102e6d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-26 05:41:07 +00:00
Friedemann Kleint
fdcbf0b2a2 Windows UI automation: Add missing override
Fix warning by clang-cl:
qwindowsuiamainprovider.h(89,31):  warning: 'SetFocus' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    HRESULT STDMETHODCALLTYPE SetFocus();

Task-number: QTBUG-63512
Change-Id: Iac3cbf8577423ed799796034953be39ed1663116
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
2018-09-26 05:41:06 +00:00
Oliver Wolff
7421a0e882 winrt platform plugin: Fix clang warnings
Fixed warnings:
  - missing override specifier
  - 0 as nullptr constant
  - implicit change of signedness
  - non portable path to header file

Change-Id: I6977bc561176ac7804ac01325b84c15ba849bbf2
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-26 05:41:05 +00:00
Oliver Wolff
e5b4e7a9ed QWinRTInputContext::hideInputPanel: return early if panel is not visible
If the input panel is not visible TryHide will result in
"Failed to hide input panel. (The operation completed successfully.)".
That happens a lot in Qt's auto tests for example.

Change-Id: Ieae17e07c3646dce8f348e21f537a2455fe03461
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-09-26 05:41:03 +00:00
Aleix Pol
50b995d114 Fix typos in the documentation
Returnes -> returns

Change-Id: I52372488a16d7c13e85fca0e11eaab738db9355d
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-09-25 23:39:06 +00:00
Allan Sandfeld Jensen
c33faac32b More fixups for GL_CONTEXT_LOST
Fixes the rest of the places we use the pattern of emptying the OpenGL
error stack to be able to handle GL_CONTEXT_LOST, and adds a note about
it in the documentation.

Change-Id: I7eb97dbca45f39295b832d44937023b538b19947
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-09-25 22:35:58 +00:00
Allan Sandfeld Jensen
e61a40bff1 Re-enable thread autotests
Replacing the qmake test with the one corelib/thread/thread.pri uses
for those classes.

Change-Id: Ie803190b821736c89b056ae51b7dfe92046189eb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-25 22:35:40 +00:00
Thiago Macieira
e3e28915c3 Fix erroneous use of errno with qErrnoWarning
On Windows, the error code to be used with qErrnoWarning is not errno,
but Windows's GetLastError(). Obviously, right?

So don't pass errno to it, just let it get the error message straight
from qt_error_string(), which will use GetLastError().

Change-Id: I44e7d800c68141bdaae0fffd155619c93e3f3dab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-25 22:14:10 +00:00
Thiago Macieira
7e1a0c0739 Add tests for decoding too-short UTF-8 sequences
We were handling this properly, but not testing them. I guess we weren't
testing because the condition is a valid intermediate state, so
hasFailure() is correct it returning false.

Testing inspired by the bug reported in
https://github.com/intel/tinycbor/issues/137

Change-Id: Ib47c56818178458a88b4fffd1554ecfdd0af637e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-09-25 22:14:07 +00:00
Thomas Miller
4d40f09a45 Upgrade double-conversion to v3.1.1
Utils.h now includes defines for _M_ARM and _M_ARM64 to enable
compilation on Windows arm and arm64.

The locally added __ghs and __EMSCRIPTEN__ clauses are preserved.

[ChangeLog][Third-Party Code] double-conversion got updated to upstream
version 3.1.1.

Task-number: QTBUG-70008
Change-Id: Ie5411ee8d9cb32c39d7dca5a2262e6b3854732a5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-25 22:13:59 +00:00
Giuseppe D'Angelo
42c545faf7 Tracepoints: trace signal activation
Change-Id: I1ef8074178386166157d9b3416fd432014585857
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2018-09-25 21:22:47 +00:00
Andy Shaw
80406d2c25 Correct documentation about the datastream versions
This amends f5fe9fc5a4

Change-Id: I1d21f5b5f4896a11376f37ed0e39f00f2214c67b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-09-25 19:57:07 +00:00
Eskil Abrahamsen Blomfeldt
176a216f4f Android: Compile with NDK r18 + clang
In NDK version r18, the libc++.so file we used for clang has been
removed. However, in r17 this was actually just redirecting to
libc++_shared.so, which is still available in r18, so we can
link directly to that instead.

[ChangeLog][Android] Fix build issue with Android NDK r18 and clang.

Task-number: QTBUG-70631
Change-Id: I658c0cabf49f27a47f38305de3c86067c8b18b25
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-09-25 19:29:54 +00:00
Anton Kudryavtsev
9941719a8d QWindowsCursor: fix typo and change enum CursorState into enum class
Change-Id: I55b539da99254d3f7318193669c409552e429a6a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-25 19:29:37 +00:00
Topi Reinio
c8178fd52e Doc: Add a macro that expands to the Qt version (Major.Minor)
Versioning of some QML modules follows the Qt major and minor
version exactly. Add a documentation macro that expands to the short
version string to help automate the QML plugin documentation.

Task-number: QTBUG-67818
Change-Id: I45e7a2a1adfd6a82b828222e49b1d02b7c05897e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-09-25 16:39:23 +00:00
Topi Reinio
1a9b8715ce Doc: Fix QEasingCurve code snippets
Commit ff2a71e3 accidentally removed a code snippet used in documenting
EasingCurve::EasingFunction. This commit restores it and fixes other
minor issues in QEasingCurve code snippets.

Change-Id: Ib19f602a4abbca3511d3d26c5f6da4910f7104a3
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-09-25 16:39:01 +00:00
Topi Reinio
edeeba639e Doc: Add a macro that returns the minor version
Add a global QDoc macro \QtMinorVersion that
expands into the minor version of Qt, or more
specifically, the minor version contained in
the QT_VER environment variable.

The main use case for the new macro is to
document the QML modules whose minor versions
track the minor version of Qt:

\qmlmodule QtQuick 2.\QtMinorVersion

Task-number: QTBUG-67818
Change-Id: I2b4fcbb18de0f8f95718099309090017c237622f
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-09-25 16:38:44 +00:00
Edward Welbourne
35020c2394 Fix some infelicities in the Q(Date|Time)+ docs
Some of the claims made were not strictly acurate.

Change-Id: Ia7c83ce44257acce32814c0bbb3b787bb6b8596b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-09-25 14:35:36 +00:00
Edward Welbourne
56c5829384 tst_QCborValue: eliminate unused lambda
Change-Id: Icb8bd9bd170c8c22978c7d730a8c8b671705adfc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-25 14:35:17 +00:00
Shawn Rutledge
4c631c0bf9 Android: add support for custom buttons in native MessageDialog helper
New API in QMessageDialogOptions and implementation on Android.

Task-number: QTBUG-35545
Change-Id: I59567251199f220862d01ba76979266379eecd86
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-25 14:15:40 +00:00
Tony Sarajärvi
2d587a03eb Remove insignificant flag from qtouchevent.pro
Task-number: QTBUG-46266
Change-Id: I38eb3a1da2688157e40f915b86d9a8e4c0e58f64
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-09-25 12:50:17 +00:00
Eirik Aavitsland
7a6a9dbb7d QImageWriter: Fix default compressionratio
Before asking a image format handler to save an image, QImageWriter
sets the value of all supported options. For options like quality and
gamma, the default value is an illegal value (-1 and 0.0 resp.),
effectively telling the handler that the application has not requested
any particular value. But in the case of compressionratio, the default
was 0, a legal value. Fix by changing it to -1.

Change-Id: Iad6d4c2dbe269b25863e7d4967aa9ed2a7d1247f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-09-25 12:32:34 +00:00
Eirik Aavitsland
b233ce66d3 QPainter cosmetic stroker: Fix painting error for FlatCap lines
Initialize the lastDir properly, to avoid the stroking algorithm doing
direction-change handling for a single line. That could cause a cap to
be painted for a single FlatCap line.

Also fixes a bug in tst_qpainter, revealed by the above fix. The
result drawPolyline was erroneously compared to the result of drawing
the lines individually, for a case where the former correctly paints
the pixel of the join point in the corner, while the latter by
coincidence used to paint the same pixel as a cap because of the bug
above.

Task-number: QTBUG-70101
Change-Id: Ie20eda33214cfe9e7627f17ef4c7a5b3835c9c24
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-09-25 12:32:24 +00:00
Morten Johan Sørvig
213cfc3fae Make the textedit example use dark text on light background on macOS
Many text documents will be designed for a white-paper
look, and in these cases it is desirable that the editor
colors matches.

Change-Id: I66d721f8c2e27b78a2b885c6cfd74f897fe42389
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-09-25 12:15:36 +00:00
Morten Johan Sørvig
d0528d558e macOS: Use light color for tooltip text in dark mode
Tool tip text is drawn by QLabel using ToolTipText
text role. Give it a system palette entry.

Change-Id: I2e1b4f0b130783efd8d03f53a42c3e64aec32425
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-09-25 12:15:28 +00:00
Morten Johan Sørvig
02f7444c85 No-thread: prevent double delete of QThreadPrivate
Change-Id: Ie34c06ad798be6bd91f5c356051daaa72800c20a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-25 12:15:19 +00:00
Timur Pocheptsov
f99e956d65 Add QT_REQUIRE_CONFIG(ssl) to pre-shared key authenticator
As it's done (albeit in old-style there) in other public QSsl-classes.

Task-number: QTBUG-70604
Change-Id: If3cd9da0e8f8378fd29a80215cd889e459aa7bce
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-09-25 05:51:19 +00:00
Shawn Rutledge
b4b706d454 Ensure that QTabletEvent is not pre-accepted before sending
In QWidget-world it's normal for input events to have the accepted
flag false by default, so that it's obvious after visiting a widget
subclass that does not override a particular handler function that it
did not handle that event type at all.  For tablet events in
particular, the contract (to which we've been paying more attention to
ensure that QTBUG-47007 remains properly fixed) is that if a
QTabletEvent is not accepted, a mouse event will follow.
Tablet-unaware applications need to get the same mouse events from a
Wacom stylus as they would receive from an actual mouse.

In this case the issue was missing hover events (mouse movements
in which no mouse button is pressed).  Without those, the enterEvent
and exitEvent virtuals are also not invoked properly.

Task-number: QTBUG-47007
Task-number: QTBUG-65199
Change-Id: I957005aad9d2bf85a3a41bbdebe3e046e34dee4d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-09-25 03:57:35 +00:00