From 374d35d5ba7ceb4a95bcbe83d538a27a0283662b Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 28 Oct 2015 12:48:00 +0100 Subject: [PATCH] Make use of preprocessor easier to understand. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #if had a condition that was needlessly hard to understand; and was widely separated from its #else clause. Change-Id: I43f4282993f4f2e8c4b5ad07dc2c2e06a6b95aa9 Reviewed-by: Jędrzej Nowacki --- .../util/qundogroup/tst_qundogroup.cpp | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp index 781adeedad..9f03e9b3a0 100644 --- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp +++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp @@ -36,7 +36,22 @@ #include // Temporarily disabling IRIX due to build issuues with GCC -#if !defined(__sgi) || defined(__sgi) && !defined(__GNUC__) +#if defined(__sgi) && defined(__GNUC__) + +class tst_QUndoGroup : public QObject +{ + Q_OBJECT +public: + tst_QUndoGroup() {} + +private slots: + void setActive() { QSKIP( "Not tested on irix-g++"); } + void addRemoveStack() { QSKIP( "Not tested on irix-g++"); } + void deleteStack() { QSKIP( "Not tested on irix-g++"); } + void checkSignals() { QSKIP( "Not tested on irix-g++"); } + void addStackAndDie() { QSKIP( "Not tested on irix-g++"); } +}; +#else /****************************************************************************** ** Commands @@ -645,22 +660,7 @@ void tst_QUndoGroup::commandTextFormat() qApp->removeTranslator(&translator); #endif } - -#else -class tst_QUndoGroup : public QObject -{ - Q_OBJECT -public: - tst_QUndoGroup() {} - -private slots: - void setActive() { QSKIP( "Not tested on irix-g++"); } - void addRemoveStack() { QSKIP( "Not tested on irix-g++"); } - void deleteStack() { QSKIP( "Not tested on irix-g++"); } - void checkSignals() { QSKIP( "Not tested on irix-g++"); } - void addStackAndDie() { QSKIP( "Not tested on irix-g++"); } -}; -#endif +#endif // !(SGI && GCC) QTEST_MAIN(tst_QUndoGroup)