Commit Graph

218 Commits

Author SHA1 Message Date
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
Stephen Kelly
4ebceaba39 Forward the contents of the parents argument through this proxy.
Change-Id: Ifabc2a7deec8ea045bf9a9f46fb3a97410dd33f2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
Stephen Kelly
50ef3ae2f3 Notify about moves in the source model more efficiently.
Change-Id: I5ea2a2dddc1b39a3d2b405bda815f42df7c07c75
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
Friedemann Kleint
ebfdb73b75 qtbase: Remove QSound.
Which currently causes tests not to compile on Windows
due to missing symbols in QtWidgets (QSound::QSound() ,etc).

Change-Id: I87f0a403e61c3a67f9a758f114e33db1012e33e8
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-07 14:37:41 +01:00
Jason McDonald
b989444f35 Use QTRY_VERIFY to test asynchronous behaviour.
QTRY_VERIFY waits for a condition to become true while regularly
processing events.  There is no need for a custom solution to this
problem.

Change-Id: Ia65c90cbdb165b543f5c78f9bac3cfadd77dfb3f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-07 07:53:30 +01:00
Jason McDonald
7fcc55034c Use QTRY_VERIFY to test asynchronous behaviour.
QTRY_VERIFY waits for a condition to become true while regularly
processing events.  There is no need for a custom solution to this
problem.

Change-Id: Ia23e2fb61cdc5c3a3a8a729cd4356ba930fe7cb7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-07 07:53:26 +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
Friedemann Kleint
0fc713b436 Tests: Temporarily remove qsound.
As the test does not link Windows.

Change-Id: I07ce2381146e43aef4353ddb2625ac472e6a0555
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-12-01 15:16:28 +01:00
Jo Asplin
9acec431c3 Moved integrationtests/* into other/
Currently there seems to be no precise definition of what
an integrationtest is in the context of Qt testing.

To avoid confusion, the tests under integrationtests/ are
moved into other/ (which is effectively where we keep
tests that don't clearly fit into any other category).

Tests can be moved back into an integrationtests/ directory
at a later point, should an unambiguous definition be established.

Change-Id: I3bb289be2dc2aca11b51a8ce8fcc5942f06d6c5c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-30 09:30:22 +01:00
Jason McDonald
cbcdb5f4cf Correct usage of network-settings.h.
Four of the modified files only use functions from network-settings.h
on Windows, and the other three files don't use anything from that
header.

Change-Id: Ifa4b0319d14367735b859e538921fa0eeeccce1a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-28 08:13:41 +01:00
Stephen Kelly
c1007112c8 Be specific about what part of the model is being re-layouted.
Change-Id: I6b6fe98929543447f945a335c33960823c0d1a4a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-25 14:37:02 +01:00
Rohan McGovern
9ffd7a339f Added build system support for installing tests.
Tests will install under $$[QT_INSTALL_TESTS].

TESTDATA may be used to install additional testdata required by the
test.

The default install rule may be disabled by
CONFIG+=no_testcase_installs.

Change-Id: I204de60c8e844775906ffd016ca50bffbb414142
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-23 00:13:46 +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
Jiang Jiang
3d063ecc5f Provide defaultFont with fontconfig db
So that it won't just return "Helvetica" that may not exist in
target system. Providing it seems to fix QTBUG-21833 as well,
thus we can remove the QEXPECT_FAIL statement in qlistview test.
'_' appears to reach the minimum right bearing in some fonts.

Task-number: QTBUG-21833
Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-15 18:33:58 +01:00
Jason McDonald
c1c51dd4f7 Avoid crash in QColumnView autotest.
When combined with http://codereview.qt-project.org/8644, the test
crashes.  This appears to be due to a column of the view being deleted
in response to calling setCurrentIndex(), as documented in QTBUG-22707.

This commit must be merged at the same time as
http://codereview.qt-project.org/8644.

Task-number: QTBUG-22707
Change-Id: I075be7df5d9196e37e2286e61d317086a76a167d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-15 04:31:55 +01:00
Mikko Knuutila
ddb512fb37 Fix for QMessageBox's autotest.
Mnemonic shortcut caused string comparison to fail.

Task-number: QTBUG-22119

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 11a6d868b5613dd7fdbef02198aaf9566fcd1f17)
Change-Id: I11a6d868b5613dd7fdbef02198aaf9566fcd1f17
2011-11-14 23:42:17 +01:00
Bradley T. Hughes
a2ece6e626 Disable qmacstyle test on Mac OS X
The QMacStyle is not built as part of QtWidgets at the moment (see the
TODO in src/widgets/styles/styles.pri), so disable the test for now.

I've included a comment in styles.pri to re-enable the test once the
style is done.

Change-Id: Ia6ea130135586f107ba257bf2c6c2c7187a830b6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-11-14 23:42:17 +01:00
Mikko Knuutila
2b8c3ff0f0 Added base 10 to be used with QIntValidator.
Fixes an error in QIntValidator, which occurred because
locale.toInt() was missing a parameter for base value and this
led it to presume wrongly that a base 8 is in use.

Task-number: QTBUG-21602

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit ee3f763f3642d1a098e6293fbc586b34a3e6e8be)
Change-Id: Iee3f763f3642d1a098e6293fbc586b34a3e6e8be
2011-11-14 10:34:41 +01:00
Markku Heikkila
d7695e82ac Fixed wrong QGroupBox check state
Handle mouserelease only if mouse is pressed in QGroupBox.

Task-number: QTBUG-19170

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit df819cfe17f6dfd089096063524932fc4975804f)
Change-Id: Idf819cfe17f6dfd089096063524932fc4975804f
2011-11-14 10:34:24 +01:00
Stephen Kelly
999196e336 Add API to clear the current index. Symmetric with clearing selection.
Change-Id: I08070f4fdf26898d5b6edd5259f011f9b3c75512
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-11 12:24:48 +01:00
Stephen Kelly
0b293e4afc Make this API virtual to make selection proxying possible.
Change-Id: Ie93c8b38c59d347026a68eae03687d9017b3d048
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-11 12:24:48 +01:00
Tero Ahola
1505508742 Repaint QProgressBar when minimum or maximum changed
The implementation of QProgressBar::setMinimum and setMaximum did not
repaint the widget. This caused the widget to be shown incorrectly in
case you call setMinimum or setMaximum but not setValue.

Task-number: QTBUG-22121
(cherry picked from commit b1998f4f59c3b10700963b2d13a17a0cc77ef665)

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>

Change-Id: I331d37ab4451d9e096cdf91a9e0a0286bc3cdffb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-11 10:58:10 +01:00
Pekka Vuorela
dc2a1aff9b QWidget text editors to commit text on their own on losing focus
Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:38 +01:00
Pekka Vuorela
1dbfbf4c66 Implement partial tentativeCommit support in QTextEdit
Available on plain text for now, html support still pending.

Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:20 +01:00
Jo Asplin
582bb9e467 Re-enabled passing tests in tst_qabstractprintdialog
To increase the effective test coverage, this patch
re-enables the tst_qabstractprintdialog test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ic09a03ed405bf6f85917410a7a86e17f2fe22cba
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-10 09:32:30 +01:00
Jo Asplin
dad925a1ce Re-enabled tst_qdialog
Commit 0fd8514a57 ensured that
the showAsTool test function is now properly QSKIP'ed for
platforms where it is always known to fail.

This change re-enables the test case as a whole so that
the passing test function may actually catch real Qt bugs again
(without being ignored by CI).

Task-number: QTBUG-22453
Change-Id: Icfe56558f8c0f4b50dbbc21d9748df6d81fea4fe
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-08 09:22:00 +01:00
Jo Asplin
e0dfa4547e Re-enabled passing tests in tst_qmenu
To increase the effective test coverage, this patch
re-enables the tst_qmenu test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I62cc1a2a9b0206595808deafb5fc137888ec97b3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-07 13:26:41 +01:00
Jo Asplin
50890c0da8 Re-enabled passing tests in tst_qinputcontext
To increase the effective test coverage, this patch
re-enables the tst_qinputcontext test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ib1d4946ab29e67e0e72f4f9c6a7bf39b65d0f6be
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-07 09:28:33 +01:00
Pekka Vuorela
8bd40fef07 Support tentative commit string with input method.
Tentative commit string allows input method to notify editor
what is expected to be committed in the place of preedit.
This commit adds such support in QLineEdit.

Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-05 23:47:02 +01:00
Laszlo Agocs
0008428f90 Prevent timestamps in widgets' touch events from disappearing
Change-Id: I096914eb2b02ad9c4a5c0462a1f4b76ef17c3957
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-04 20:48:19 +01:00
Sergio Ahumada
780a03191f test: Use QWidget::grab() instead of QPixmap::grabWidget()
Removing warnings from the test function as QPixmap::grabWidget()
is being deprecated.

Change-Id: I26ad1e9def0bebe8e4ee997068ba593245d0cd05
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-04 12:37:27 +01:00
Jo Asplin
24971fbef0 Re-enabled passing tests in tst_qlistview
To increase the effective test coverage, this patch
re-enables the tst_qlistview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I029be60c16cdff5ee3e38889d2780f1ee7d01b51
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-04 01:53:55 +01:00
Sergio Ahumada
d2f1c6cd75 test: Skipping tst_qmdisubwindow::setFont() as it's unstable
This unstable test is preventing some good changes from being
merged. Further investigation needs to follow, so people can
refer to QTBUG-22544 for a real fix.

Change-Id: I038e5f340ccd2562d0e67428af595a2bcfc8c11d
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-11-03 20:07:04 +01:00
Jason McDonald
f79dc01304 Remove empty functions from QDirModel test.
Change-Id: Ieb8af41425739f9175df26224b171cd9f8b3c4f3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:54 +01:00
Jason McDonald
edc77f5aa8 Improve QDirModel autotest
The unreadable() test function has been disabled since before the tests
were imported into the Qt repository.  The idea of the test seems valid
(though the original implementation failed to correctly create an
unreadable file), so it should be re-enabled.

Change-Id: I94634bc5785dfbfbb42ca975badaead7fe812b29
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:43 +01:00
Jo Asplin
938ce35cec Re-enabled passing tests in tst_qgraphicsitem
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsitem test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: If311bc61801d2a279c274928ae7f0faeb595eeb3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:42 +01:00
Jo Asplin
718f58487d Re-enabled passing tests in tst_qgraphicsview
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I6b8eb09000ece789b990a2dd697cdb8b47cc8e1c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:38 +01:00
Jo Asplin
b92fed185e Re-enabled passing tests in tst_qgraphicsscene
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsscene test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Idd229532787ce8138d8e1c86daf1f91b90e87e38
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:34 +01:00
Jason McDonald
e9b5cd0266 Reinstate disabled part of qsortfilterproxymodel test
This test function has been disabled since before the tests were
imported into the Qt repository in 2006, but seems to pass today, at
least on Linux.

Change-Id: I8ff90a11a0fbb260d66b20ae735b5f21c450a5af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:34 +01:00
Jason McDonald
5eb0a7be74 Remove stale test data from qsortfilterproxymodel test
The removed test data has been disabled since before the tests were
added to the Qt repository in June 2006, and was incomplete (the
"pattern" field was missing).

Change-Id: I974d03a4dcca76ba1a20f740372702612c8ce02b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:27 +01:00
Jason McDonald
82a4516c5d Remove disabled code from QWidget autotest.
The removed code was already disabled when first committed in January
2009.

Change-Id: I00a82f2e673fee76869cc76d756c36d081da2d2a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:20 +01:00
Jason McDonald
647e59fdb1 Remove disabled code from qgridlayout autotest
The removed code was already disabled when it was first added in June
2006, and is based on assumptions that no longer hold true.

Change-Id: Id7941d46e2a993aac422554dcc5540eb64eac492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:55 +01:00
Jason McDonald
98992786f3 Remove redundant code from qsortfilterproxymodel test
Remove a couple of "#if 1" directives (but not their contents), which
have been present since before the tests were imported into the Qt
repository in 2006.

Change-Id: Id43aff37843e7a44ed96973f809de3838ba0e5b9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:50 +01:00
Jason McDonald
238bdc2e91 Improve QWidget autotest.
Remove some "#if 1" directives and a line of debug code.

Change-Id: Ib34f5b65470a24ee499799525ffe0645ccc117fe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:16 +01:00
Jason McDonald
6fce33dd4c Remove debugging code from qgraphicsitem autotest.
Change-Id: Ia2ff65b5e980b42c5c64b957143860e94395d54f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:21:00 +01:00
Jason McDonald
2c665596ae Remove disabled code in QItemView test.
The removed code was disabled in January 2007.  The commit history does
not make clear what the code was supposed to achieve and the code
doesn't do what the comment at the top says (that looks like a TODO).
Best to delete it and start again.

Change-Id: I42b6b1d865c96518d74dc189a4a41d0d2776e5bc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Friedemann Kleint
735457a40b Remove remains of qpa in tests.
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>

Change-Id: I41aed5290df5aebeb30ebf5d2796aca6c65980d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-01 16:15:08 +01:00
Jo Asplin
6264bf242a Re-enabled passing tests in tst_qgraphicswidget
To increase the effective test coverage, this patch
re-enables the tst_qgraphicswidget test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ic484fde3492f077453f47a959dd6dc862288dcaf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-01 13:15:44 +01:00
Jason McDonald
d304b3a5bb Remove debug code from qsortfilterproxymodel test
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: I80691b274d9d2abda72bca894ace9de545410ed8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:57 +01:00
Jason McDonald
ceb4dd4b54 Improve QWidget autotest
There are two cases where a QCOMPARE may fail on some platforms. Rather
than disabling the QCOMPAREs with "#if 0", use QEXPECT_FAIL so that we
can look in the CI logs to see which platforms fail.

Change-Id: Ife93c8032e01a04e8068bf213e2040778c12f711
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:51 +01:00
Jason McDonald
3e05a987b1 Remove debug code from QLayout autotest.
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Id4efb74a2d3646f3554b643762beefba113c3602
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:44 +01:00
Jason McDonald
b2ed01891d Remove debug code from QGridLayout autotest
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Ifd2bbd17677e16ddb0f1846287d722cdae76d984
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:36 +01:00
Jason McDonald
3e035a5edb Remove obsolete test.
The commit that disabled this test a few days after it was originally
comitted (bda80c4b in the grafted history) makes it clear that this
test was never valid.

Change-Id: Ib0090fc35d0b9251d7b7367de2c71a66a332c567
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:28 +01:00
Jason McDonald
390e20fc71 Improve QMenu autotest.
Originally this commit was just going to reinstate the disabled line of
test data (after correcting it to use keyboard modifiers instead of
invalid bitwise-or of key-codes, which would trigger an assert in
qtestlib).  Unfortunately, this revealed a minor bug in QMenu, as
reported in QTBUG-22449, so a QEXPECT_FAIL has also been added.

Change-Id: I29699fcbfa353c037a83379a6140f0e3da5be027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 03:17:57 +01:00
Jason McDonald
9a9d2e8ba2 Improve QMenu autotest
The test for keyboard navigation was only checking correct highlighting
when a menu item was not activated by the latest key-click.  It should
also check that no item is highlighted after an item is activated.

Change-Id: I443e154be5cdc2def4f12d3f0abab2cc1bc6e4a8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 00:25:34 +01:00
Lars Knoll
5761d8546f Correctly handle null windows or widgets in keyClick()
Allow passing of null windows or widgets to keyClick().
In that case route the event through the normal Qt event
processing. This allows e.g. shortcuts to catch the
key event.

Change-Id: Ic9455ea9be5164918b1c0bccbd58dd32eae74ff1
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-31 09:55:07 +01:00
Jason McDonald
79fb588030 Remove disabled code from QMainWindow autotest.
The removed code has been disabled since it was first added in October
2006.

Change-Id: I10243aa2979fd1615c919ec522d10d77d6527b3b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 08:31:30 +01:00
Jason McDonald
fd672569e4 Remove unstable test from qgraphicsscene test.
The removed test was disabled in February 2007 because it did not work
cross-platform.  The comment that was added at the time claims that the
functionality is covered thoroughly by other tests, but even if that
isn't true we're not losing anything by removing this test as it is not
even useful as a starting-point for a new test due to its reliance on
random test data.

Change-Id: Ica74262082184908d02595702486803d1efff4d2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 08:31:24 +01:00
Jason McDonald
35d75fac0a Remove obsolete test data from qgraphicsitem test
The removed test data was disabled by commit 83747a82 and should have
been removed at that time.

Change-Id: Ia2cef0bf4394a5b95fdf37db26369e733c7e86ec
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:47 +01:00
Jason McDonald
a1c3bd7547 Remove disabled code from qgraphicssceneindex test
The removed code used to test API that was removed in the graphicsview
refactor that was done for Qt 4.5.1.

Change-Id: I3b312b9e51114e24c6ef1191353c35688b229d99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:42 +01:00
Jason McDonald
0b77a19394 Improve QTextBrowser unit test.
The relativeLinks() test function was not performing sufficient
verification steps and thus hid a regression.

Task-number: QTBUG-22416
Change-Id: I2db4d4035e7a32f3c84630c7a15408d31d85ac9e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:54 +02:00
Jason McDonald
0a75be21b3 Move test data to the right place.
This file seems to have been forgotten when the test it belongs to got
moved -- probably because the test was poorly written and still passed
when the file couldn't be opened.  The file is supposed to live one
directory up from the qtextbrowser test so that it can be used to test
opening url's with relative paths.

Change-Id: Id80965b1c73b37de75691ae3a18f909f9c6d799a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:47 +02:00
Jason McDonald
1bc8f124b8 Prefer compile-time checks to QSKIP.
Qt has compile-time defines for determining the presence of each style
in the build.  Use these to exclude inapplicable test data instead of
including all test data and then being unable to distinguish the absence
of a style from regressions in QStyleFactory.

Change-Id: Iab1756aec80892a8b587bb635779537c64b1d4dd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:21 +02:00
Friedemann Kleint
0c3d898a03 Tests: Remove Q_WS_QPA, qpa-sections from .profiles.
Compile without -qpa.

- Make Q_WS_QPA-#ifdefed sections the default in the code
- Replace some Q_WS_ by Q_OS_
- Add ### fixme for places that need checking
- Remove qpa conditionals from .pro files.

Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-27 09:50:30 +02:00
Sergio Ahumada
c3313fdd1c Doc: Fixing typo
Fix typos I was able to find in `tests/auto' directory.

Change-Id: Id0bfcc18301381ac8b1ca8d5af17bd926e5913d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-10-26 13:50:12 +02:00
Jo Asplin
1b345e8655 Re-enabled tests
This commit re-enables tests that are assumed to be ok by now, since they:
- Have been passing in CI for a long time recently (more precisely, not failed once in pulse run range 730-829).
- Did not have any known issues associated with them.

Note that not all of these tests were disabled as a result of QTBUG-21402.

Task-number: QTBUG-21402
Change-Id: I80bbf8b351bd9165aa968e98f4dc17e8be6bc7c3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 02:58:36 +02:00
Frederik Gladhorn
0fd8514a57 Fix QDialog test: Q_WS_X11 is no more.
Change-Id: Ia4182b22f4a4999a80d7792378e1b9dfa03e7f9c
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
2011-10-25 15:17:00 +02:00
Frederik Gladhorn
3ff8e94925 Bring back QDoubleSpinBox test.
Returning text "1.00" instead of "1" sounds right to me.
Checking the test before the widget is shown/validated sounds pointless.

Change-Id: Ifc9e51dc9448a5bb3afbd566fe10524fbabc654f
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
2011-10-25 15:16:56 +02:00
Frederik Gladhorn
692b49abf8 Fix autotest tst_qtextbrowser.cpp
The qrc tests need further investigation.
Bring at least back the basic test.

Change-Id: I302a37b6c989af76db67716ffcf10a0960234156
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
2011-10-25 15:16:46 +02:00
Rohan McGovern
6b29e881cd widgets: eliminated usage of qttest_p4.prf
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I3c1d993d5682db913aadc267d98a638061f393d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-25 08:42:23 +02:00
Jason McDonald
f6b05d5075 Remove QSKIPs from qgraphicslinearlayout test
If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 08:42:23 +02:00
Jason McDonald
54318131a5 Remove QSKIPs from qgraphicsgridlayout test
If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Id4cf7e8dc48f836d2c6dcde57dde87797a2fe036
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 08:42:23 +02:00
Jason McDonald
39560b85d5 Don't call QSKIP/QVERIFY outside of test functions.
These macros should only be called inside a test function, otherwise
they cannot abort the test function correctly.  Solve this by making the
helper function return a boolean result (and output a warning on
failure to help with debugging) and verify the return value in each test
function that calls the helper.

Change-Id: I599673fda49051baf80a8c94b5d85a4d8c2cb406
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 03:39:23 +02:00
Jason McDonald
87514cb291 Update bug number in autotests.
Change-Id: I4b17736d86f8dc571090820a545107bb89cb493d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 03:39:15 +02:00
Jason McDonald
47fc4e0f8c Fix qcolumnview test for shadow builds.
Change-Id: I4a81d7c8504400d7fb4bb42fb93508ac28cfb990
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Jason McDonald
9d40e953d3 Fix qsidebar test for shadow builds.
Change-Id: I3b58a1c81881401edb2a768b2a9995b1e833e90c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Jason McDonald
89c415d686 Fix qfilesystemmodel test for shadow builds.
Change-Id: Ic9d174670f7411561bdfc0881b426a7ff1ab546d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Jason McDonald
4fbaf84b6d Fix QFileDialog test for shadow builds.
Using relative paths in #include is best avoided.

Change-Id: Iacaab7b4c402dfc96f944f21c634afa6e4a2a32a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Pekka Vuorela
29aa93387b Multiline editors not to limit anchor position inputMethodQuery
The queries were limited to current block, because that is the
available surrounding text. Input method side, however, cannot then
distinguish between anchor being really at start or end of the
surrounding text, or beyond it. Without the limitation there at least
is a way to know anchor is at unknown territory.

Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-10-24 03:31:10 +02:00
Jason McDonald
27f9f136f7 Remove SkipMode parameter from QSKIP calls.
The previous commit removed SkipMode from the testlib APi.  This commit
removes the parameter from all calls to QSKIP.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 01:20:29 +02:00
Jo Asplin
9f1aa866bd Moved tests into integrationtests/ and widgets/
Task-number: QTBUG-19013

Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-10-20 19:45:41 +02:00