From 416e73a0fcaf31f7c32ba7dcd214b62e6060123c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Wed, 16 Jan 2013 14:34:35 +0200 Subject: Check existence of QProcess feature before using it on Qt autotests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VxWorks does not have QProcess support. Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98 Reviewed-by: Samuel Rødal --- tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp | 4 ++++ tests/auto/widgets/util/qundostack/tst_qundostack.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'tests/auto/widgets/util') diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp index 1293f93d67..c835f58747 100644 --- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp +++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp @@ -201,7 +201,9 @@ private slots: void deleteStack(); void checkSignals(); void addStackAndDie(); +#ifndef QT_NO_PROCESS void commandTextFormat(); +#endif }; tst_QUndoGroup::tst_QUndoGroup() @@ -605,6 +607,7 @@ void tst_QUndoGroup::addStackAndDie() delete stack; } +#ifndef QT_NO_PROCESS void tst_QUndoGroup::commandTextFormat() { QString binDir = QLibraryInfo::location(QLibraryInfo::BinariesPath); @@ -644,6 +647,7 @@ void tst_QUndoGroup::commandTextFormat() qApp->removeTranslator(&translator); } +#endif #else class tst_QUndoGroup : public QObject diff --git a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp index c6837e7cb0..7a80518800 100644 --- a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp +++ b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp @@ -247,7 +247,9 @@ private slots: void macroBeginEnd(); void compression(); void undoLimit(); +#ifndef QT_NO_PROCESS void commandTextFormat(); +#endif void separateUndoText(); }; @@ -2964,6 +2966,7 @@ void tst_QUndoStack::undoLimit() true); // redoChanged } +#ifndef QT_NO_PROCESS void tst_QUndoStack::commandTextFormat() { QString binDir = QLibraryInfo::location(QLibraryInfo::BinariesPath); @@ -3001,6 +3004,7 @@ void tst_QUndoStack::commandTextFormat() qApp->removeTranslator(&translator); } +#endif void tst_QUndoStack::separateUndoText() { -- cgit v1.2.3 From 0768920dbdabef25eb7d41e8dbba891704b24f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 16 Feb 2013 14:56:50 +0100 Subject: Remove ifdefs for supporting Mac OS <= 10.5 Qt5 requires Mac OS 10.6, so we can remove checks such as if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f Reviewed-by: Thiago Macieira --- tests/auto/widgets/util/qscroller/tst_qscroller.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tests/auto/widgets/util') diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp index fa0db59311..39ad180d1f 100644 --- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp +++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp @@ -391,11 +391,6 @@ 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; -#endif - #ifndef QT_NO_GESTURES // -- good case. normal scroll tst_QScrollerWidget *sw = new tst_QScrollerWidget(); @@ -438,11 +433,6 @@ 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; -#endif - #ifndef QT_NO_GESTURES tst_QScrollerWidget *sw = new tst_QScrollerWidget(); sw->scrollArea = QRectF(0, 0, 1000, 1000); -- cgit v1.2.3 From 77f7a8ef4c492f8e21a04c7b2afa3d15e372d3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 11 Mar 2013 14:02:08 +0100 Subject: Skip tst_QScroller::scroll(), it's flakey and blocking CI Task-number: QTBUG-30133 Change-Id: I2d91d92e49480b904dec9807d4763c461e809bd2 Reviewed-by: Simon Hausmann Reviewed-by: Eskil Abrahamsen Blomfeldt --- tests/auto/widgets/util/qscroller/tst_qscroller.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/widgets/util') diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp index 39ad180d1f..0acda27f17 100644 --- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp +++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp @@ -391,6 +391,7 @@ void tst_QScroller::scrollTo() void tst_QScroller::scroll() { + QSKIP("Flakey test - https://bugreports.qt-project.org/browse/QTBUG-30133"); #ifndef QT_NO_GESTURES // -- good case. normal scroll tst_QScrollerWidget *sw = new tst_QScrollerWidget(); -- cgit v1.2.3 From bb2d95ce4321d119621961aa1c383e614ececa0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 12 Mar 2013 13:07:35 +0100 Subject: Skip more QScroller tests on Mac, they are all flakey Task-number: QTBUG-29950 Change-Id: Ieda94dbcab3d75678597544a029c5ca6d2dc8226 Reviewed-by: Friedemann Kleint --- tests/auto/widgets/util/qscroller/tst_qscroller.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/auto/widgets/util') diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp index 0acda27f17..beb1d27620 100644 --- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp +++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp @@ -365,6 +365,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,7 +394,9 @@ void tst_QScroller::scrollTo() void tst_QScroller::scroll() { +#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(); @@ -434,6 +439,9 @@ void tst_QScroller::scroll() void tst_QScroller::overshoot() { +#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); -- cgit v1.2.3 From b11317a64339f5a4bcffc8234ecaf15c7fb416f2 Mon Sep 17 00:00:00 2001 From: Axel Waggershauser Date: Fri, 15 Mar 2013 00:42:15 +0100 Subject: Whitespace cleanup: remove trailing whitespace Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen --- .../widgets/util/qundogroup/tst_qundogroup.cpp | 2 +- .../widgets/util/qundostack/tst_qundostack.cpp | 92 +++++++++++----------- 2 files changed, 47 insertions(+), 47 deletions(-) (limited to 'tests/auto/widgets/util') 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/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); } } -- cgit v1.2.3