summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/util
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/util')
-rw-r--r--tests/auto/widgets/util/qcompleter/qcompleter.pro1
-rw-r--r--tests/auto/widgets/util/qscroller/qscroller.pro1
-rw-r--r--tests/auto/widgets/util/qscroller/tst_qscroller.cpp21
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro1
-rw-r--r--tests/auto/widgets/util/qundogroup/qundogroup.pro1
-rw-r--r--tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp2
-rw-r--r--tests/auto/widgets/util/qundostack/qundostack.pro1
-rw-r--r--tests/auto/widgets/util/qundostack/tst_qundostack.cpp92
8 files changed, 56 insertions, 64 deletions
diff --git a/tests/auto/widgets/util/qcompleter/qcompleter.pro b/tests/auto/widgets/util/qcompleter/qcompleter.pro
index d28e44232c..19d8d500b8 100644
--- a/tests/auto/widgets/util/qcompleter/qcompleter.pro
+++ b/tests/auto/widgets/util/qcompleter/qcompleter.pro
@@ -4,4 +4,3 @@ TARGET = tst_qcompleter
QT += widgets testlib
SOURCES += tst_qcompleter.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/util/qscroller/qscroller.pro b/tests/auto/widgets/util/qscroller/qscroller.pro
index 6f999f62c6..55f57f5ed1 100644
--- a/tests/auto/widgets/util/qscroller/qscroller.pro
+++ b/tests/auto/widgets/util/qscroller/qscroller.pro
@@ -4,4 +4,3 @@ TARGET = tst_qscroller
QT += widgets testlib gui-private
SOURCES += tst_qscroller.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
index fa0db59311..bbd71a9284 100644
--- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
+++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
@@ -153,7 +153,6 @@ void tst_QScroller::kineticScroll( tst_QScrollerWidget *sw, QPointF from, QPoint
QCOMPARE( s1->state(), QScroller::Inactive );
QScrollerProperties sp1 = QScroller::scroller(sw)->scrollerProperties();
- int fps = 60;
QTouchEvent::TouchPoint rawTouchPoint;
rawTouchPoint.setId(0);
@@ -192,8 +191,7 @@ void tst_QScroller::kineticScroll( tst_QScrollerWidget *sw, QPointF from, QPoint
QCOMPARE( sw->receivedPrepare, true );
- QTest::qWait(1000 / fps * 2); // wait until the first scroll move
- QCOMPARE( sw->receivedFirst, true );
+ QTRY_COMPARE( sw->receivedFirst, true );
QCOMPARE( sw->receivedScroll, true );
QCOMPARE( sw->receivedOvershoot, false );
@@ -365,6 +363,9 @@ void tst_QScroller::scrollerProperties()
void tst_QScroller::scrollTo()
{
+#ifdef Q_OS_MAC
+ QSKIP("Flakey test - https://bugreports.qt-project.org/browse/QTBUG-29950");
+#endif
{
tst_QScrollerWidget *sw = new tst_QScrollerWidget();
sw->scrollArea = QRectF( 0, 0, 1000, 1000 );
@@ -391,11 +392,9 @@ void tst_QScroller::scrollTo()
void tst_QScroller::scroll()
{
-#if defined(Q_OS_MACX) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6)
- QSKIP("Mac OS X < 10.6 does not support QTouchEvents");
- return;
+#ifdef Q_OS_MAC
+ QSKIP("Flakey test - https://bugreports.qt-project.org/browse/QTBUG-30133");
#endif
-
#ifndef QT_NO_GESTURES
// -- good case. normal scroll
tst_QScrollerWidget *sw = new tst_QScrollerWidget();
@@ -406,7 +405,7 @@ void tst_QScroller::scroll()
QScroller *s1 = QScroller::scroller(sw);
kineticScroll(sw, QPointF(500, 500), QPoint(0, 0), QPoint(100, 100), QPoint(200, 200));
// now we should be scrolling
- QCOMPARE( s1->state(), QScroller::Scrolling );
+ QTRY_COMPARE( s1->state(), QScroller::Scrolling );
// wait until finished, check that no further first scroll is send
sw->receivedFirst = false;
@@ -438,11 +437,9 @@ void tst_QScroller::scroll()
void tst_QScroller::overshoot()
{
-#if defined(Q_OS_MACX) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6)
- QSKIP("Mac OS X < 10.6 does not support QTouchEvents");
- return;
+#ifdef Q_OS_MAC
+ QSKIP("Flakey test - https://bugreports.qt-project.org/browse/QTBUG-29950");
#endif
-
#ifndef QT_NO_GESTURES
tst_QScrollerWidget *sw = new tst_QScrollerWidget();
sw->scrollArea = QRectF(0, 0, 1000, 1000);
diff --git a/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro b/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro
index 68b2d85a64..d409d23650 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro
+++ b/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro
@@ -9,4 +9,3 @@ QT += widgets testlib
SOURCES += tst_qsystemtrayicon.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/util/qundogroup/qundogroup.pro b/tests/auto/widgets/util/qundogroup/qundogroup.pro
index a74ef2b511..bd8dac197b 100644
--- a/tests/auto/widgets/util/qundogroup/qundogroup.pro
+++ b/tests/auto/widgets/util/qundogroup/qundogroup.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
QT += widgets testlib
SOURCES += tst_qundogroup.cpp
TARGET = tst_qundogroup
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
index c8a12a9866..ddab98ebc6 100644
--- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
+++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
@@ -599,7 +599,7 @@ void tst_QUndoGroup::addStackAndDie()
{
// Test that QUndoStack doesn't keep a reference to QUndoGroup after the
// group is deleted.
- QUndoStack *stack = new QUndoStack;
+ QUndoStack *stack = new QUndoStack;
QUndoGroup *group = new QUndoGroup;
group->addStack(stack);
delete group;
diff --git a/tests/auto/widgets/util/qundostack/qundostack.pro b/tests/auto/widgets/util/qundostack/qundostack.pro
index e473e1a275..294debb51c 100644
--- a/tests/auto/widgets/util/qundostack/qundostack.pro
+++ b/tests/auto/widgets/util/qundostack/qundostack.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
QT += widgets testlib
SOURCES += tst_qundostack.cpp
TARGET = tst_qundostack
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
index 9b48dc7798..4556816655 100644
--- a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
+++ b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
@@ -290,52 +290,52 @@ static void checkState(QSignalSpy &redoTextChangedSpy,
const bool _undoChanged,
const bool _redoChanged)
{
- QCOMPARE(stack.count(), _count);
- QCOMPARE(stack.isClean(), _clean);
- QCOMPARE(stack.index(), _index);
- QCOMPARE(stack.canUndo(), _canUndo);
- QCOMPARE(stack.undoText(), QString(_undoText));
- QCOMPARE(stack.canRedo(), _canRedo);
- QCOMPARE(stack.redoText(), QString(_redoText));
- if (_indexChanged) {
- QCOMPARE(indexChangedSpy.count(), 1);
- QCOMPARE(indexChangedSpy.at(0).at(0).toInt(), _index);
- indexChangedSpy.clear();
- } else {
- QCOMPARE(indexChangedSpy.count(), 0);
- }
- if (_cleanChanged) {
- QCOMPARE(cleanChangedSpy.count(), 1);
- QCOMPARE(cleanChangedSpy.at(0).at(0).toBool(), _clean);
- cleanChangedSpy.clear();
- } else {
- QCOMPARE(cleanChangedSpy.count(), 0);
- }
- if (_undoChanged) {
- QCOMPARE(canUndoChangedSpy.count(), 1);
- QCOMPARE(canUndoChangedSpy.at(0).at(0).toBool(), _canUndo);
- QCOMPARE(undoAction->isEnabled(), _canUndo);
- QCOMPARE(undoTextChangedSpy.count(), 1);
- QCOMPARE(undoTextChangedSpy.at(0).at(0).toString(), QString(_undoText));
- QCOMPARE(undoAction->text(), glue("foo", _undoText));
- canUndoChangedSpy.clear();
- undoTextChangedSpy.clear();
- } else {
- QCOMPARE(canUndoChangedSpy.count(), 0);
- QCOMPARE(undoTextChangedSpy.count(), 0);
- }
- if (_redoChanged) {
- QCOMPARE(canRedoChangedSpy.count(), 1);
- QCOMPARE(canRedoChangedSpy.at(0).at(0).toBool(), _canRedo);
- QCOMPARE(redoAction->isEnabled(), _canRedo);
- QCOMPARE(redoTextChangedSpy.count(), 1);
- QCOMPARE(redoTextChangedSpy.at(0).at(0).toString(), QString(_redoText));
- QCOMPARE(redoAction->text(), glue("bar", _redoText));
- canRedoChangedSpy.clear();
- redoTextChangedSpy.clear();
- } else {
- QCOMPARE(canRedoChangedSpy.count(), 0);
- QCOMPARE(redoTextChangedSpy.count(), 0);
+ QCOMPARE(stack.count(), _count);
+ QCOMPARE(stack.isClean(), _clean);
+ QCOMPARE(stack.index(), _index);
+ QCOMPARE(stack.canUndo(), _canUndo);
+ QCOMPARE(stack.undoText(), QString(_undoText));
+ QCOMPARE(stack.canRedo(), _canRedo);
+ QCOMPARE(stack.redoText(), QString(_redoText));
+ if (_indexChanged) {
+ QCOMPARE(indexChangedSpy.count(), 1);
+ QCOMPARE(indexChangedSpy.at(0).at(0).toInt(), _index);
+ indexChangedSpy.clear();
+ } else {
+ QCOMPARE(indexChangedSpy.count(), 0);
+ }
+ if (_cleanChanged) {
+ QCOMPARE(cleanChangedSpy.count(), 1);
+ QCOMPARE(cleanChangedSpy.at(0).at(0).toBool(), _clean);
+ cleanChangedSpy.clear();
+ } else {
+ QCOMPARE(cleanChangedSpy.count(), 0);
+ }
+ if (_undoChanged) {
+ QCOMPARE(canUndoChangedSpy.count(), 1);
+ QCOMPARE(canUndoChangedSpy.at(0).at(0).toBool(), _canUndo);
+ QCOMPARE(undoAction->isEnabled(), _canUndo);
+ QCOMPARE(undoTextChangedSpy.count(), 1);
+ QCOMPARE(undoTextChangedSpy.at(0).at(0).toString(), QString(_undoText));
+ QCOMPARE(undoAction->text(), glue("foo", _undoText));
+ canUndoChangedSpy.clear();
+ undoTextChangedSpy.clear();
+ } else {
+ QCOMPARE(canUndoChangedSpy.count(), 0);
+ QCOMPARE(undoTextChangedSpy.count(), 0);
+ }
+ if (_redoChanged) {
+ QCOMPARE(canRedoChangedSpy.count(), 1);
+ QCOMPARE(canRedoChangedSpy.at(0).at(0).toBool(), _canRedo);
+ QCOMPARE(redoAction->isEnabled(), _canRedo);
+ QCOMPARE(redoTextChangedSpy.count(), 1);
+ QCOMPARE(redoTextChangedSpy.at(0).at(0).toString(), QString(_redoText));
+ QCOMPARE(redoAction->text(), glue("bar", _redoText));
+ canRedoChangedSpy.clear();
+ redoTextChangedSpy.clear();
+ } else {
+ QCOMPARE(canRedoChangedSpy.count(), 0);
+ QCOMPARE(redoTextChangedSpy.count(), 0);
}
}