Commit Graph

131 Commits

Author SHA1 Message Date
Bradley T. Hughes
664528b7f3 Expect tst_QGraphicsWidget::updateFocusChain...() failure on Mac OS X
tst_QGraphicsWidget::updateFocusChainWhenChildDie() currently fails due
to what appears to be window activation.

Task-number: QTBUG-23699
Change-Id: I404f90d32dba64d558598d97cf805b6c025e6456
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:16 +01:00
Bradley T. Hughes
619fbc129d Fix XPASS in tst_QGraphicsWidget on Mac OS X
Don't expect failure from these 2 tests anymore:

XPASS  : tst_QGraphicsWidget::initStyleOption(all) COMPARE()
   Loc: [tst_qgraphicswidget.cpp(1162)]
XPASS  : tst_QGraphicsWidget::initialShow2() COMPARE()
   Loc: [tst_qgraphicswidget.cpp(3196)]

Change-Id: Ibd1178f8cab480fa9fad9c829083a4862749c60b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:12 +01:00
Bradley T. Hughes
37167e3420 Fix XPASS in tst_QGraphicsView on Mac OS X
These tests now fail with XPASS on Mac OS X, so remove/skip the
QEXPECTED_FAIL(). Unfortunately we don't know which commit fixed this.

Change-Id: Id919a2c9d56fd7c4dee8ccb8aa3293efdce603b2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:32:58 +01:00
Bradley T. Hughes
34b3336866 Expect tst_QGraphicsProxyWidget::updateAndDelete() failure on Mac OS X
Task-number: QTBUG-23700

Change-Id: Ic472cea966761afc1e6e17479588b8b53ec4786c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:32:52 +01:00
Bradley T. Hughes
ba21ca7b5b Replace Q_WS_MAC with Q_OS_MAC in tests/auto/widgets
tst_qwidget.cpp will not build/link without tst_qwidget_mac_helpers.mm,
so re-add it to the build as well.

Change-Id: I55130f62c215c4b82683d90456e31fdb09f833a8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 09:32:43 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Robin Burchell
7c247d3e70 Obsolete QInputDialog::getInteger() 'officially'.
It has long since been obsolete in code and removed from the documentation, but
was never marked QT_DEPRECATED. Do so, and inline the implementation.

Change-Id: Ic7bfdaf76269b7f9addeba83e64bc9525c581dda
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-22 22:10:02 +01:00
Bradley T. Hughes
f188d8a005 Expect tst_QTreeView::editTriggers() failure on Mac OS X
EditKeyPressed 4 test data fails, all other test data for the function
pass.

Task-number: QTBUG-23696
Change-Id: Ied56bd0b653ad4dcc2b6451b486aae7cad134211
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:27 +01:00
Bradley T. Hughes
cdfb3f29c2 Expect tst_QColumnView::moveCursor() failure on Mac OS X
Both test data fail.

Task-number: QTBUG-23697
Change-Id: Iee4b08a88db33c72c584e326e928863af61c8dd4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:22 +01:00
Bradley T. Hughes
e6a538a3ed Expect tooltip related test failures on Mac OS X
Mark test failures related to tool tips with QEXPECT_FAIL(). See
QTBUG-23707 for description of the failures.

Change-Id: I753256d1db748cef41cf1898620647c4cbacc472
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:09 +01:00
Bradley T. Hughes
0d12500240 Ignore failures from tst_QWidget_window on Mac OS X
The tst_windowFilePathAndwindowTitle test currently fails, so mark the
failures as expected failures for now.

Task-number: QTBUG-23682
Change-Id: If64a82c919b218b5c1c38ce5228081bb46fe70ac
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:49:43 +01:00
Bradley T. Hughes
a84d893bae Add "nswindow" resource to the Cocoa native interface implementation
This will return the NSWindow* for the given QWindow*. Port the QWidget
autotest helper to use the native interface and the "nswindow" resource.

Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
e87813bfa2 Remove the tst_QWidget::retainHIView() test
Qt is Cocoa only now, and does not use HIView anymore, making this test
is meaningless. The testAndRelease() and createAndRetain() helper
functions are also no longer needed.

Change-Id: I26180a4670c8e7445741d3aab510c4da7b65388c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
9d0a41b1ca Disable 'make check' for tst_QWidget on Mac OS X
This test crashes, which can destabilize the CI system, so don't run the
test for now. It is still compiled as part of the build process, though.

Task-number: QTBUG-23695
Change-Id: I841fab7c56b8dba33e8d1b074f118b65790f34ef
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-19 11:31:22 +01:00
Friedemann Kleint
57738689cd Fix hang in tst_qwidgetaction on Windows.
Increase timer interval.

Change-Id: I2cf40415d356c29ebd753a0e78f43aee474123ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-19 10:03:46 +01:00
Pekka Vuorela
711f367d8f Remove QInputContext usage from QWidget test
Change-Id: Ifcd600f5efd5bd079dd2f8d66803e34ffa6df37f
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-19 00:17:28 +01:00
Pekka Vuorela
a3a0b03735 QWidget editors to return correct value for Qt::ImEnabled
Qt::ImEnabled input method query was added for Qt5.
Enhancing source compatibility with Qt4 by setting query value
in QWidget if widget does not return any valid value.

Change-Id: I274c1f6c47a5cb08ecf550b25e5b358622e21d90
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-19 00:16:42 +01:00
Bradley T. Hughes
147bbda067 Make tst_QGraphicsAnchorLayout1 pass on Mac OS X
On Mac OS X, tests are build with QT_DEBUG defined, but run against
libraries built with QT_NO_DEBUG, so the expected warning output is not
seen. Use a run-time check instead to know whether or not to expect the
warning output.

Change-Id: Ifb772b764d4135cc8f896827727939fd8cff5388
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-17 10:29:56 +01:00
Bradley T. Hughes
42744812dc Mark tst_QFileDialog2 failure as expected on Mac OS X
Change-Id: I678e1c714ac9c376484b4a3a5d9bfd2bd100e685
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-17 10:29:56 +01:00
Toby Tomkins
169b9cac64 Flag tst_qmenubar tests as unstable.
Task-number: QTBUG-4965
Task-number: QTBUG-11823

Change-Id: Ie8b5093867cf177197e405fdcf3205d4436c110a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:05 +01:00
Toby Tomkins
6b99b97556 Flag tst_QDoubleSpinBox::task255471_decimalsValidation test as unstable.
Task-number: QTBUG-23641

Change-Id: Iaa44ab20d2e50cd6fb0a1327efef35c1036f9e4c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:02 +01:00
Toby Tomkins
a2e5f36552 Flag tst_QComboBox tests as unstable.
tst_QComboBox::keyBoardNavigationWithMouse and
task_QTBUG_1071_changingFocusEmitsActivated tests are unstable.

Task-number: QTBUG-23639

Change-Id: Ib8363505213117c581ea2921ebc58d4c2ec4cf8c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:00 +01:00
Toby Tomkins
db549f90fa Flag tst_QTreeView::styleOptionViewItem test as unstable.
Task-number: QTBUG-23638

Change-Id: I8c07976001aeec5ba796d4b3e9ee421e32ba1360
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Toby Tomkins
5341880105 Flag tst_QItemDelegate::task257859_finalizeEdit test as unstable.
Task-number: QTBUG-23637

Change-Id: Ib08431ab1752c354f62646b3c207d9c24ac5eae5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Toby Tomkins
2087db0b20 Flag tst_QGraphicsWidget::updateFocusChainWhenChildDie test as unstable.
Task-number: QTBUG-23616

Change-Id: I664c77b16ac6b2ecd89d362a2c3c3028bd3246c0
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:42:26 +01:00
Toby Tomkins
e575e2316a Flag tst_qcalendarwidget::buttonClickCheck test as unstable.
Task-number: QTBUG-23615

Change-Id: I4ce9e415c29167ef9fdc584ac3543aa5f109bcf2
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:42:22 +01:00
David Faure
1319bd48c8 QTreeView: fix crash when starting a drag with hidden columns.
Crash was introduced by d639105759491 (pre-Qt-4.8 only)

Task-number: QTBUG-15834
Merge-request: MR-2725

(cherry picked from qt4 commit fd25323de7b5d5f3e0ffb1bd81ea4d251e071566)

Change-Id: I59959d3ba4c9bcb0d39bdbe58432817bbbfdd9f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 08:31:17 +01:00
David Faure
22b7d21186 Set missing flags in the option when rendering QTreeView drag pixmap
QAbstractItemViewPrivate::renderToPixmap was not setting all the flags
that the normal QTreeView painting sets:
option.showDecorationSelected, option.viewItemPosition (so the drag pixmap
looked wrong on Windows 7, with rects around each cell), and then the
unittest also discovered that State_Children/State_Sibling wasn't set either.

Task-number: QTBUG-15834
Merge-request: 2517

(cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b)

Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 08:31:17 +01:00
Toby Tomkins
c2a663dac3 Flag tst_qgraphicsview as insignificant, test are unstable.
Some of these test have had unstable results for multiple runs.
QTBUG_4151_clipAndIgnore and QTBUG_16063_microFocusRect seem to be the
unstable tests.

Task-number: QTBUG-16063
Task-number: QTBUG-4151

Change-Id: Idd108197c327446080dbd69dfe5c5fba6b2944cd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-12 05:34:36 +01:00
Friedemann Kleint
00d4b15112 tst_qgraphicsivew: Run Motif scrollbar range tests only at 96DPI.
Preparing the introduction of a change that uses the actual
QScreen resolution in the style helper.

Change-Id: I3fbb36b0d6a34904c875a2e3684d73124f534bed
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-10 19:53:33 +01:00
Jason McDonald
226a7c77cb Improve QDateTimeEdit autotest.
Reinstate a check that was presumably disabled because it wasn't
checking for the right expected date.  At present pressing Enter in a
QDateTimeEdit without changing the date still emits the dataChanged()
signal.  By reinstating the test, we ensure that the behaviour can't
change by accident.

Change-Id: I1b766af6ced001a4191606247338dbc91049cb8d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-10 05:12:15 +01:00
Stephen Kelly
acdd5fecb7 Avoid using 'check' as an identifier.
Avoids conflict with macro on Mac OS.

Change-Id: I79d78283b45bc97032d6a94139ee750ec01e9c0a
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-10 01:44:35 +01:00
Robin Burchell
b08daaedd4 Remove all non-inline of qMalloc/qFree/qRealloc.
We're trying to deprecate these, so don't use them anymore.

The inline uses of these have been left intact, for the moment. Inline code will
need to create their own non-inline allocation methods (for future-proofing to
allow alterations in how e.g. individual containers allocate)

Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-06 14:11:14 +01:00
Pekka Vuorela
8ad583b7f9 Removed QApplication::setInputContext()
Obsoleted by platform input context. Setting a custom QInputContext
wouldn't work properly anymore.

Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-05 11:40:08 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Jason McDonald
fda36df6ba Use true and false in preference to TRUE and FALSE in tests.
Use the C++ boolean constants true and false instead of the C macros
TRUE and FALSE (which are actually integers), and use QVERIFY instead of
QCOMPARE for verifying simple boolean expressions.

Change-Id: Ie76dfcab6722df6b93b3fa62b0f3437901482932
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-03 02:57:12 +01:00
Pekka Vuorela
6576fda2ad Adapt QGraphicsView test to QPlatformInputContext
Change-Id: I9562a0b763fe7d77cd08451426bf2ceaec00acf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-30 13:20:37 +01:00
Pekka Vuorela
b83e98d22c Adapt QGraphicsScene test to use QPlatformInputContext
Change-Id: Iaf61798cc78e57563fee088711d39090b722a946
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-30 11:28:20 +01:00
Jason McDonald
9e0479496e Remove mention of Trolltech from QGraphicsScene autotest.
Task-number: QTBUG-19653

Change-Id: Iabebf17f5b09c17a767e81a0ccadd03513238a75
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 04:48:01 +01:00
Bradley T. Hughes
ae8c61db21 Finish removing Qt3 support
Remove the (-no)-qt3support options from configure, and remove the last
remaining references to Qt3Support, QT3_SUPPORT, and
QEvent::ChildInserted.

The compatibilityChildInsertEvents() tests in tst_QObject and
tst_QWidget have been renamed to childEvents(), which is a more
appropriate name.

Change-Id: Id0b45e9b177efcc8dceee8c9ed8afafedeeace2f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-23 11:59:11 +01:00
Morten Johan Sorvig
40cfdf30fa Enable Mac style on Mac OS X.
Add styles/qmacstyle_mac back to the build, modify
qstylefactory to load it on Q_OS_MAC.

Move helper functions from platforms/mac to
qmacstyle_mac.mm. QMacStyle should now be self-
contained and not rely on anything from platforms/mac.

Change-Id: I68fe40bb7f88c01269968bffd9579b7f3b932d4c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-22 13:20:40 +01:00
Bradley T. Hughes
f0710e1d95 Reimplement QGraphicsEffect::sourceChanged() properly
sourceChanged() takes one argument, not zero.

tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp:125:
warning: 'CustomEffect::sourceChanged' hides overloaded virtual function
[-Woverloaded-virtual]
    void sourceChanged()
         ^
src/widgets/effects/qgraphicseffect.h:104:
hidden overloaded virtual function 'QGraphicsEffect::sourceChanged'
declared here
    virtual void sourceChanged(ChangeFlags flags);
                 ^

Change-Id: If227b7b79c4a2fc3d21f93e371510ddccb408d7d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-21 20:32:36 +01:00
Pekka Vuorela
a32df45bec Remove QInputContext based test from QGraphicsItem tests
Was basically checking that a method call is a method call and
QApplication::setInputContext() sets the input context.

Change-Id: Ia8723fe245f2480d503f0140f61078dc074161fc
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
db55b6aee7 Removed test for obsolete QInputContext
Change-Id: Idb3b909934434f8f55eb6e94aa814840ab628856
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Jason McDonald
85a77cd5c8 Retire QTest::pixmapsAreEqual().
QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with
some old tests written for Qt3.  QCOMPARE() is the preferred way to
compare QPixmaps and provides superior diagnostic output when a
comparison fails.

This commit removes QTest::pixmapsAreEqual() from the testlib API and
replaces the last few remaining calls with QCOMPARE.

Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 06:17:42 +01:00
Stephen Kelly
211e434a05 Move proxy and selection models to QtCore.
Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-16 13:00:57 +01:00
Friedemann Kleint
2163f05942 Application-test: Fix location of sub-executables.
Use QFINDTESTDATA to set the working directory
and change the profiles accordingly (as in
the qprocess-test).

Change-Id: I332038728c64214f73ced448e1466ad96c11b3b3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 03:56:16 +01:00
Laszlo Agocs
3064c1bc8c Remove redundant touch processing in QtGui and widgets.
The duplicated hash tables in QGuiApplicationPrivate and
QApplicationPrivate are now unified into one single hash table in
QGuiApplicationPrivate. This also reduced the number of lookups.

The extra processing needed to keep the touch points' first/lastPos
values in sync is now done only once, in QGuiApplication. This
eliminates the performance penalty (for widget-based apps) that was
introduced during the QPA migration.

As an added bonus the patch adds support for touch events arriving
simultaenously from multiple devices. This was broken before: As there
is no guarantee that two devices/drivers will not send touch points
with the same ID, using structures with only the ID as key is
wrong. The proper key is composed of the device ID (that is, a
QTouchDevice pointer) and the touch point ID.

The exported internal function qt_translateRawTouchEvent() has been
removed. This function cannot work properly in the QPA world: It
injected touches into the widget subsystem (QApplication) only which
is wrong, and would result in half-filled touch events due to not
routing the injected data through QGuiApplication. Autotests using
this function are migrated to
QWindowSystemInterface::handleTouchEvent().

Change-Id: I7632781d77f9e0ac4626fd7c9933511c94492156
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-14 13:17:19 +01:00
Bradley T. Hughes
77f41a68b3 Silence -Woverloaded-virtual warnings in QFileDialog
The QPaintDevice::init() virtual, reimplemented in QWidget, is hidden by
these declarations, and clang (and gcc with -Woverloaded-virtual) warns
about this. There is no need to overload the init() name, use more
descriptive names instead.

dialogs/qsidebar_p.h:124:10: warning: 'QSidebar::init' hides overloaded
virtual
      function [-Woverloaded-virtual]
    void init(QFileSystemModel *model, const QList<QUrl> &newUrls);
         ^
dialogs/qfiledialog_p.h:303:10: warning: 'QFileDialogLineEdit::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
         ^
dialogs/qfiledialog_p.h:314:10: warning: 'QFileDialogComboBox::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:330:10: warning: 'QFileDialogListView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:342:10: warning: 'QFileDialogTreeView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
kernel/qwidget.h:682:10: note:
      hidden overloaded virtual function 'QWidget::init' declared here
    void init(QPainter *painter) const;
         ^

Change-Id: I7a317a551b92fde966e61958dcaf25dea94d69b4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-12 08:56:53 +01:00
Laszlo Agocs
4222603f8e Extend touch events.
The capability flags indicate which information is valid in the touch
points. Previously there was no way to tell if e.g. the value returned
by pressure() is actually the value provided by the driver/device or
it is just something bogus due to pressure not being supported.

The points' flags return information about the individual touch
points. One use case is to differentiate between touches made by
finger and pen.

Velocity, if available, is now also exposed.

Each touch point can now contain an additional list of "raw"
positions. These points are not reported individually but are taken
into account in some way by the underlying device and drivers to
generate the final, "accurate" touch point. In case the underlying
drivers expose these additional positions, they are made available in
the lists returned by the touch points' rawScreenPosition().

The raw positions are only available in screen coordinates to prevent
wasting time with mapping from global positions in applications that
do not use this data. Instead, apps can query the QWindow to which the
touch event was sent via QTouchEvent::window() and can call
mapFromGlobal() manually if they need local raw positions.

The capability and device type information is now held in a new
QTouchDevice class. Each touch event will contain only a pointer to
one of the global QTouchDevice instances. On top of type and
capability, the new class also contains a name which can be used to
differentiate between multiple touch input devices (i.e. to tell from
which one a given QTouchEvent originates from).

The introduction of QTouchDevice has three implications: The
QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent
need to be changed (to pass a QTouchDevice pointer instead of merely a
device type value), and each platform or generic plug-in is now
responsible for registering one or more devices using the new API
QWindowSystemInterface::registerTouchDevice.

Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 14:15:37 +01:00