mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +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()
|
||||
{
|
||||
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(!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()) {
|
||||
QVERIFY(KDesktopFile::isAuthorizedDesktopFile(installedFile));
|
||||
} 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");
|
||||
|
|
|
@ -130,9 +130,12 @@ void KServiceTest::testByName()
|
|||
QVERIFY( s0 );
|
||||
QCOMPARE( s0->name(), QString::fromLatin1("KParts/ReadOnlyPart") );
|
||||
|
||||
KService::Ptr kfilemodule = KService::serviceByDesktopPath("kfilemodule.desktop");
|
||||
QVERIFY(kfilemodule);
|
||||
QCOMPARE( kfilemodule->name(), QString::fromLatin1("KFileModule"));
|
||||
KService::Ptr kfilemetadataplugin = KService::serviceByDesktopPath("kfilemetadata_epub.desktop");
|
||||
if (kfilemetadataplugin) {
|
||||
QCOMPARE( kfilemetadataplugin->name(), QString::fromLatin1("KFileMetaDataEPubPlugin"));
|
||||
} else {
|
||||
qWarning("Skipping test for kfilemetadata_epub.desktop, not found. kdelibs not installed?");
|
||||
}
|
||||
}
|
||||
|
||||
void KServiceTest::testProperty()
|
||||
|
|
Loading…
Add table
Reference in a new issue