[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/gwenview/tests
From:       Aurélien Gâteau <aurelien.gateau () free ! fr>
Date:       2008-05-01 8:24:14
Message-ID: 1209630254.672685.29937.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 802908 by gateau:

New method: waitForSignal.


 M  +10 -0     testutils.h  


--- trunk/KDE/kdegraphics/gwenview/tests/testutils.h #802907:802908
@@ -51,4 +51,14 @@
 	return url;
 }
 
+bool waitForSignal(const QSignalSpy& spy, int timeout = 5) {
+	for (int x = 0; x < timeout; ++x) {
+		if (spy.count() > 0) {
+			return true;
+		}
+		QTest::qWait(1000);
+	}
+	return false;
+}
+
 #endif /* TESTUTILS_H */
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic