[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kdecore/tests=3A_kservicetest?=
From: Nicolás_Alvarez <nicolas.alvarez () gmail ! com>
Date: 2011-06-08 23:49:02
Message-ID: 20110608234902.2E9F1A60A4 () git ! kde ! org
[Download RAW message or body]
Git commit 3b9cdfcfa566d999b022f2607051fa3097fd1e6b by Nicolás Alvarez.
Committed on 09/06/2011 at 01:23.
Pushed by nalvarez into branch 'KDE/4.6'.
kservicetest: Wait for the KSycoca databaseChanged DBus signal.
The test was adding a service file and running kbuildsycoca4 with KDEHOME
set, but the process doesn't re-read sycoca until the databaseChanged
signal is received, and it won't be received if the event loop doesn't
spin a bit. So the new sycoca with the new service file wasn't being
loaded.
In addition, it's a nice addition to the test to check whether the signal
actually gets sent :)
(cherry picked from commit 8407f0fc845fe724d53c17a2d5b2c09743411a9e)
M +3 -0 kdecore/tests/kservicetest.cpp
http://commits.kde.org/kdelibs/3b9cdfcfa566d999b022f2607051fa3097fd1e6b
diff --git a/kdecore/tests/kservicetest.cpp b/kdecore/tests/kservicetest.cpp
index f015f25..5ff64e5 100644
--- a/kdecore/tests/kservicetest.cpp
+++ b/kdecore/tests/kservicetest.cpp
@@ -61,6 +61,9 @@ void KServiceTest::initTestCase()
if ( mustUpdateKSycoca ) {
// Update ksycoca in ~/.kde-unit-test after creating the above
QProcess::execute( KGlobal::dirs()->findExe(KBUILDSYCOCA_EXENAME), QStringList() << "--noincremental" );
+ kDebug() << "waiting for signal";
+ QVERIFY(QTest::kWaitForSignal(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), 10000));
+ kDebug() << "got signal";
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic