summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-09-20 15:35:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-13 05:51:19 +0200
commit6b04ee10e6a17999679de86e80ce66886ceab963 (patch)
treea939a0c9466e90d19ffeffc76bbd592ae2d3489a /tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
parentdc0d5bf387a0b440c74b9e822c46b09e20e00720 (diff)
Auto tests: revise cursor dependant tests
Cursor dependant auto tests are currently skipped in various ways. Some are checking PlatformQuirks::haveMouseCursor() that tries to detect if the desktop environment is MeeGo, using obsolete Q_WS_X11. Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and some are actually missing the approriate guards. => unify by defining QTEST_NO_CURSOR in qtest-config.h when appropriate ie. for platforms that have no regular mouse cursor support or when QT_NO_CURSOR is defined. Task-number: QTBUG-22551 Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp')
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index cc718ea51f..ec656d35d7 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -68,6 +68,7 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
+#include "../../../qtest-config.h"
//Used in copyAvailable
typedef QPair<Qt::Key, Qt::KeyboardModifier> keyPairType;
@@ -141,7 +142,9 @@ private slots:
void shiftDownInLineLastShouldSelectToEnd();
void undoRedoShouldRepositionTextEditCursor();
void lineWrapModes();
+#ifndef QTEST_NO_CURSOR
void mouseCursorShape();
+#endif
void implicitClear();
void undoRedoAfterSetContent();
void numPadKeyNavigation();
@@ -1235,9 +1238,9 @@ void tst_QTextEdit::lineWrapModes()
QCOMPARE(ed->document()->pageSize().width(), qreal(1000));
}
+#ifndef QTEST_NO_CURSOR
void tst_QTextEdit::mouseCursorShape()
{
-#ifndef QT_NO_CURSOR
// always show an IBeamCursor, see change 170146
QVERIFY(!ed->isReadOnly());
QVERIFY(ed->viewport()->cursor().shape() == Qt::IBeamCursor);
@@ -1247,8 +1250,8 @@ void tst_QTextEdit::mouseCursorShape()
ed->setPlainText("Foo");
QVERIFY(ed->viewport()->cursor().shape() == Qt::IBeamCursor);
-#endif
}
+#endif
void tst_QTextEdit::implicitClear()
{