Commit Graph

66 Commits

Author SHA1 Message Date
Pekka Vuorela
194899df24 Reverted part of "Refactor input context tests"
This commit reverts partly 7401832a7d

There is something wrong with DummyWindow/XCB/Metacity, Metacity
crashes quite often when QWindow is activated.

Change-Id: I611af2678814f41c941cb697054135f561a77878
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-24 02:38:04 +01:00
Andrew den Exter
ef9a86db56 Fix rounding error in QInputMethod::cursorRectangle().
Use QRectF consistently to avoid the rounding done in the conversion
to QRect.

Task-number: QTBUG-24463
Change-Id: If9ea858ebabf8c449ea058b9d379d4a57cb6c82d
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-23 09:33:27 +01:00
Friedemann Kleint
541949aed2 Add further theme hints to QPlatformTheme.
- Add hints for QDialog/QDialogButtonBox.
- Add hint for available popup-menu area.
- Add keyboard scheme hint replacing
  QGuiApplicationPrivate::currentKeyPlatform()

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>

Task-number: QTBUG-24204
Task-number: QTBUG-24315

Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-22 17:28:51 +01:00
Pekka Vuorela
7401832a7d Refactor input context tests
Combined test input context instances and adapted changed
interfaces a bit.

Change-Id: Id5422cac5967d45dcaf2eb71b941d9c45e3b4dee
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-22 13:54:13 +01:00
Jason McDonald
7d44f45fb7 Fix warning about unregistered metatype in QWindow autotest.
Change-Id: If9d8d7e1cd52815ef7231294e4890dfafcd28ec8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:34 +01:00
Toby Tomkins
a30f42ddb3 Flag two tests (Win+A, Simon+G) in parseString as expect fail on OSX.
Remove previously defined insignificant test flag as the number of
tests failing has been reduced.

Task-number: QTBUG-24406
Task-number: QTBUG-23058

Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 04:17:51 +01:00
Friedemann Kleint
e0d9fade03 Fix qclipboard autotest on Windows.
Emit changed signal only if the clipboard is not owned,
in which case QClipboard does it.

Task-number: QTBUG-24184
Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-18 00:00:21 +01:00
Friedemann Kleint
400c865f29 Windows: Fix QWindow-test.
- Save & Restore style and geometry when switching to
  full screen and back since it is not a real state on
  Windows.
- Obey the positioning policy in setGeometry.

Task-number: QTBUG-24185

Change-Id: I18dea4fd372e0b2e46273a7a27e0c6f4f4bde771
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-17 20:09:58 +01:00
Bradley T. Hughes
ee7c81b9c4 Skip tst_QGuiApplication::focusObject() on Mac OS X
This test fails intermittently, and at random locations.

Task-number: QTBUG-24322
Change-Id: Ied6dd4d1593066debc0fb48c6ca2a17a1f4d51b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 11:44:29 +01:00
Friedemann Kleint
3b5f6f7647 QWindow-test: Fix QSignalSpy warning about Qt::ScreenOrientation.
Change-Id: I5954445057c1a597b5062ee8e472d684832812e5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-17 05:26:55 +01:00
Stephen Kelly
394315d902 Move the removal of the Quit event to QWindow.
Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-15 20:47:32 +01:00
Miikka Heikkinen
38dbb45e79 Make "nmake check" pass for gui tests in Windows.
Marked the following tests insignificant due to failures, these need
to be fixed later and then re-enabled:

  tst_QPixmap
  tst_QClipboard
  tst_QWindow
  tst_QGuiApplication
  tst_QPainter
  tst_QPrinterInfo
  tst_QPrinter
  tst_QOpenGL
  tst_QFontDatabse
  tst_QFontMetrics
  tst_QGlyphRun
  tst_QRawFont

Task-number: QTBUG-24128
Change-Id: I39ade8a693c4580b5cd618624e892cdcac21d78c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-02-10 15:40:22 +01:00
Bradley T. Hughes
358c14821b Run tst_QEventDispatcher with the GUI event dispatchers as well
Since some GUI event dispatchers are complete reimplementations and do
not build on the corelib ones, we want to run the same tests with the
other dispatcher.

Since this is a GUI test now, we need to make sure to drain system
events queued during application startup to make sure we can reliably
run the test functions.

Change-Id: I4905db70bc8f8584c4ef1f4d767824040281452c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-02-10 15:22:03 +01:00
Laszlo Agocs
09e2e77be2 Handle TouchCancel in gui and widgets
Change-Id: I31739840348d88ae408ac1aae2399f6328ccdd43
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-10 11:41:04 +01:00
Pekka Vuorela
71726ccf67 Renamed QInputPanel as QInputMethod
QInputMethod better describes what the class is about, input methods
in general, be they panels or just composing input from key events.

Compatability headers added for old name. Not bulletproof but should be
enough to get transition done.

Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-02 11:10:04 +01:00
Anselmo L. S. Melo
8839a0a001 Fix QGuiApplication::topLevelWindows(), introducing allWindows()
As discussed on the development mailing list, the window list returned
by QGuiApplication::topLevellWindows() included all QWindows, even the
non top-level ones.
This commit introduces the new method allWindows(), which returns the list
of all QWindows, fixes the list returned by topLevelWindows() and also
introduces tests for both methods.

Change-Id: I761f0fcdec79f83949012c628655ed12cd18572c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-31 07:05:09 +01:00
Jason McDonald
e03386945f Update contact address in license headers.
Change-Id: I35bf916087511f26bfeb49ceb3256d9a20fbc1c0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-31 04:54:56 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
Pekka Vuorela
dd565d2d4c QGuiApplication::focusObject() to replace QInputPanel::inputItem()
* Deprecated QInputPanel::inputWindow() which is already
  just returning QGuiApplication::activeWindow()
* Deprecated QInputPanel::inputItem() and introduced
  QGuiApplication::focusObject(). Input methods can check
  input method support by Qt::ImEnabled query.

Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-27 13:27:54 +01:00
Anselmo L. S. Melo
76a5ce8acb Implement QWindow::close()
Implement the public slot QWindow::close() and add the correspondent test.

Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-27 08:57:58 +01:00
Samuel Rødal
71db6d654e Made QWindow::currentOrientation() a property.
To match the previous QWindow::orientation() property which can be
useful to access from QML. Also, removed the automatic translation of
Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow
level, as it leads to a lot of complexity regarding the
QWindow::contentOrientationChanged() signal, and makes it hard to
distinguish between the case where the window's orientation follows
that of the screen, and the case where the orientation just happens to
be set to that of the screen.

Change-Id: I6950d1337b7f929815eff1328181855090d8066b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-26 08:32:28 +01:00
David Faure
9096334d14 QKeySequence: fix copy/paste error in autotest
Change-Id: If03a99c9aa7210d3f166c2674831c645f67b1794
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-25 00:07:59 +01:00
Samuel Rødal
b39df8bf92 Made window orientation API more flexible.
Previously we only had QWindow::setOrientation() which was a hint about
the orientation the window's contents were rendered in.

However, it's necessary to separate between the orientation
corresponding to the window buffer layout and orientation of the
contents. A game for example might typically want to use a landscape
buffer even on a portrait device. Thus, we replace
QWindow::orientation() with QWindow::reportContentOrientationChange() and
QWindow::requestWindowOrientation().

Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 15:38:48 +01:00
David Faure
6efefb3fe5 QKeySequence: add tests, fix handling of '+' as key or separator.
Change-Id: I3c471dff9b46025aab762d36bb3a3adc64ced561
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 15:27:17 +01:00
Laszlo Agocs
7ed6a247bf Fix synthesizing mouse events when touches change ordering
There is no guarantee the touches will be listed in the same order in
an update: the platform/generic plug-in, the drivers, etc. are all
free to shuffle the list of touch points in each report (even though
the order is fairly stable with most systems).

Therefore, to be safe, move and release events should be generated not
from the first point in the list but from the one with the matching
id.

Change-Id: I6615224cbf2cfdc440143eb3191482a23d85c6a4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 13:10:00 +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
Bradley T. Hughes
44cf5592ac Replace Q_WS_MAC with Q_OS_MAC in tests/auto/gui
Change-Id: I6d69ac96597f27575dd40e4c80c982f06fa88f51
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-18 12:51:18 +01:00
Kurt Korbatits
5027368077 Changed qclipboard unittest to work from installation directory.
- made test depend on copier and paster to make sure they are built first.
- Changed to use installTestHelperApp() to deploy helper apps.

Change-Id: I39e4f2ddcc3c735e17256db5638bf8a3495362f6
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-17 04:54:12 +01:00
Samuel Rødal
e50416066c Added application flags to translate between touch and mouse events.
The current way we do it of having the platform or touch plugin send
both mouse and touch events is not ideal. There's no good way to write
an application that works sanely both on a touch-only device and on a
desktop except by restricting yourself to only handling mouse events. If
you try to handle touch events you don't get any events at all on
desktop, and if you try to handle both, you end up getting duplicate
events on touch devices.

Instead, we should get rid of the code in the plugins that automatically
sends mouse events translated from touch events. This change enables
that by making the behaviour fully configurable in QtGui.

Two new application attributes are added to explicitly say whether
unhandled touch events should be sent as synthesized mouse events and
vice versa, and no duplicates are automatically sent as the current
situation. Synthesized mouse events are enabled by default.

We also get rid of the QTouchEvent::TouchPoint::Primary flag, which
was only used to signal that the windowing system automatically
generated mouse events for that touch point. Now we only generate mouse
events from the first touch point in the list.

Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-13 09:38:05 +01:00
Samuel Rødal
16c2622fe7 Made it possible to report screen changes through QWindowSystemInterface.
This makes it possible for platform plugin independent code (such as
generic plugins) to report changes to screen properties. An example
would be an accelerometer plugin that reports orientation changes
without knowing anything about the windowing system.

Change-Id: I984984b6d064327772c264bc942269422451da37
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-12 12:08:19 +01:00
Pekka Vuorela
8ae55a3484 Input direction/locale to come from platform input context
Change-Id: Ib049693211a08dcffc9dbe49add54e7feab38978
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-11 11:18:51 +01:00
Jason McDonald
5313c28b30 Update year in Nokia copyright headers.
The previous change missed some headers from years prior to 2011, and a
few new files were merged after the previous change.

Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-10 07:12:41 +01:00
David Faure
3e2f32547d If decodestring can't translate the string return Qt::Key_unknown.
Change-Id: Ie082b326e944a28b4e29984a527e3841a05b32f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-10 02:02:29 +01:00
Stephen Kelly
4fe9ff1001 Avoid using check as an identifier.
Avoids conflict with Mac OS.

Change-Id: I72a1218d101fdf2fa40f80934a6157ed26e699a1
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-10 01:44:31 +01:00
Stephen Kelly
510eb8da78 Make the meta type shortcut in this test more robust.
Change-Id: Ie9f5ea3a62c80b2a4255eda0995133d0471c7538
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-09 20:01:16 +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
David Faure
05ca21411e Handle -1 (Invalid Key) and Qt::Key_unknown gracefully in encodeString.
Previously they would fall into the unicode handling and return very
strange values.

Change-Id: I62a53894c0983bf53fd79f924b40a6fd3ba02993
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-02 09:04:12 +01:00
Jędrzej Nowacki
56f154c747 Allow QMetaType to register information about movability
We need that information to perform some optimizations in QVariant.

Change-Id: Id9a1716e49e4cedd17cd09a32fea4ff003ef61f2
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-22 13:20:40 +01:00
David Faure
c02ca6752a Fix handling of invalid modifiers in QKeySequence.
When decoding a string don't assume valid modifier strings. If a
modifier string is unknown return Qt::Key_unknown instead of skipping
the modifier.
Currently 'Win+a' is decoded to 'A' but should be Qt::Key_unknown.

Change-Id: I1c82031159a8b3c19924a7c9e991bc6b1f90d617
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-22 13:20:40 +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
Friedemann Kleint
1a5f5d0056 QClipboard-test: Fix test
- Use QFINDTESTDATA to locate sub-executables
- Remove dependency on QtWidgets, use QGuiApplication everywhere.
- Improve error handling when running sub-executables, prevent
  hangs (Windows)

Change-Id: If8e3be82f855c8be6bdbfc9f9728e8490ed181f3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-13 09:33:49 +01:00
Laszlo Agocs
91b48208f5 Add touchEvent() virtual to QWindow.
Unlike keyPressEvent(), mousePressEvent(), etc. the touch events had
no equivalent so one had to fall back to reimplementing event() or
using an event filter. This is now corrected by introducing
touchEvent(). Touch events are finally becoming a first-class citizen
in Qt 5.

Change-Id: Ia2044030154fd5b1b5384f08a3cb1749b798435f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 17:27:19 +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
Bradley T. Hughes
60e93449d2 Re-enable 'check' target for tests/auto/gui on Mac OS X
Failing tests are marked with CONFIG+=insignificant_test.
tst_QTextLayout currently asserts, so it has been disabled to prevent
destabilization of the CI system.

Change-Id: I7bd836ee14085689c8a0f0ce8e3c80d81a55eb94
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-09 02:39:06 +01:00
Jason McDonald
e3640d1bdd Remove TESTED_CLASS/TESTED_FILES comments from tests.
These comments were mostly empty or inaccurate.  Appropriate naming of
tests and appropriate placement of tests within the directory tree
provide more reliable indicators of what is being tested.

Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 02:19:25 +01:00
Samuel Rødal
5116a25a55 Fixed regression in tst_qscreen.
The ScreenOrientation enum was changed so that the values are power of
twos, angleBetween() needed to be fixed in order to reflect this.

Task-number: QTBUG-22554
Change-Id: Ia45dd6643b40b14204abf967b00c0d04834736a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-23 22:23:55 +01:00
Joona Petrell
0c8f471c96 Remove handlesInputPanelVisibility() deprecation mechanism
Task-number: QTBUG-21964
Change-Id: I508ba690c90369d31ca33390d3001064857fb62e
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 22:46:11 +01:00
Friedemann Kleint
e8b4c49efd qtbase tests: Fix some warnings
- Fix warnings about QAtomicPointer/Int usage
- Fix some gcc 4.6 warnings about assigned/unused variables

Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-21 09:58:23 +01:00
Jason McDonald
a8fd0c3654 Don't depend on moc to disable test functions.
The moc tool is not aware of all defines (particularly those that are
compiler builtins) and does not correctly evaluate others that depend
on compiler builtins, such as Q_OS_FOO.

This commit reverts parts of the following commits, but is not a
complete fix as there were many instances of this problem in the tests
prior to those commits:
    924d810dbd
    8aaff67510
    338d3f1197
    a55034062b
    253497b744
    7cfad460c5
    9d2ff58f36
    0cf6baa2d6

Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-18 01:51:57 +01:00