mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdecore: adjust tests to recent changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1eaf3dab61
commit
318fa971d3
2 changed files with 9 additions and 6 deletions
|
@ -106,15 +106,15 @@ void KDesktopFileTest::testActionGroup()
|
||||||
|
|
||||||
void KDesktopFileTest::testIsAuthorizedDesktopFile()
|
void KDesktopFileTest::testIsAuthorizedDesktopFile()
|
||||||
{
|
{
|
||||||
const QString fileName = QFile::decodeName(KDESRCDIR "../../kfile/kfilemodule.desktop");
|
const QString fileName = QFile::decodeName(KDESRCDIR "../../kio/metadata/kfilemetadata_epub.desktop");
|
||||||
QVERIFY(QFile::exists(fileName));
|
QVERIFY(QFile::exists(fileName));
|
||||||
QVERIFY(!KDesktopFile::isAuthorizedDesktopFile(fileName));
|
QVERIFY(!KDesktopFile::isAuthorizedDesktopFile(fileName));
|
||||||
|
|
||||||
const QString installedFile = KGlobal::dirs()->locate("services", "kfilemodule.desktop");
|
const QString installedFile = KGlobal::dirs()->locate("services", "kfilemetadata_epub.desktop");
|
||||||
if (!installedFile.isEmpty()) {
|
if (!installedFile.isEmpty()) {
|
||||||
QVERIFY(KDesktopFile::isAuthorizedDesktopFile(installedFile));
|
QVERIFY(KDesktopFile::isAuthorizedDesktopFile(installedFile));
|
||||||
} else {
|
} else {
|
||||||
qWarning("Skipping test for kfilemodule.desktop, not found. kdelibs not installed?");
|
qWarning("Skipping test for kfilemetadata_epub.desktop, not found. kdelibs not installed?");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString autostartFile = KStandardDirs::locate("autostart", "plasma-desktop.desktop");
|
const QString autostartFile = KStandardDirs::locate("autostart", "plasma-desktop.desktop");
|
||||||
|
|
|
@ -130,9 +130,12 @@ void KServiceTest::testByName()
|
||||||
QVERIFY( s0 );
|
QVERIFY( s0 );
|
||||||
QCOMPARE( s0->name(), QString::fromLatin1("KParts/ReadOnlyPart") );
|
QCOMPARE( s0->name(), QString::fromLatin1("KParts/ReadOnlyPart") );
|
||||||
|
|
||||||
KService::Ptr kfilemodule = KService::serviceByDesktopPath("kfilemodule.desktop");
|
KService::Ptr kfilemetadataplugin = KService::serviceByDesktopPath("kfilemetadata_epub.desktop");
|
||||||
QVERIFY(kfilemodule);
|
if (kfilemetadataplugin) {
|
||||||
QCOMPARE( kfilemodule->name(), QString::fromLatin1("KFileModule"));
|
QCOMPARE( kfilemetadataplugin->name(), QString::fromLatin1("KFileMetaDataEPubPlugin"));
|
||||||
|
} else {
|
||||||
|
qWarning("Skipping test for kfilemetadata_epub.desktop, not found. kdelibs not installed?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KServiceTest::testProperty()
|
void KServiceTest::testProperty()
|
||||||
|
|
Loading…
Add table
Reference in a new issue