diff --git a/src/plasma/autotests/packagestructuretest.cpp b/src/plasma/autotests/packagestructuretest.cpp index 5d2226fd7..4a4586bc5 100644 --- a/src/plasma/autotests/packagestructuretest.cpp +++ b/src/plasma/autotests/packagestructuretest.cpp @@ -83,7 +83,7 @@ void PackageStructureTest::multiplePaths() void PackageStructureTest::directories() { QList dirs; - dirs << "config" << "data" << "images" << "scripts" << "translations" << "ui"; + dirs << "config" << "data" << "images" << "theme" << "scripts" << "translations" << "ui"; QList psDirs = ps.directories(); @@ -156,6 +156,7 @@ void PackageStructureTest::requiredFiles() void PackageStructureTest::path() { QCOMPARE(ps.filePath("images"), QDir(m_packagePath + QString("/contents/images")).canonicalPath()); + QCOMPARE(ps.filePath("theme"), QDir(m_packagePath + QString("/contents/theme")).canonicalPath()); QCOMPARE(ps.filePath("mainscript"), QFileInfo(m_packagePath + QString("/contents/ui/main.qml")).canonicalFilePath()); } @@ -175,6 +176,7 @@ void PackageStructureTest::mimeTypes() QStringList mimeTypes; mimeTypes << "image/svg+xml" << "image/png" << "image/jpeg"; QCOMPARE(ps.mimeTypes("images"), mimeTypes); + QCOMPARE(ps.mimeTypes("theme"), mimeTypes); } QTEST_MAIN(PackageStructureTest) diff --git a/src/plasma/private/packages.cpp b/src/plasma/private/packages.cpp index 082a0e73b..2829c0594 100644 --- a/src/plasma/private/packages.cpp +++ b/src/plasma/private/packages.cpp @@ -82,9 +82,11 @@ void GenericPackage::initPackage(Package *package) package->setDefaultPackageRoot("plasma/packages/"); package->addDirectoryDefinition("images", "images", i18n("Images")); + package->addDirectoryDefinition("theme", "theme", i18n("Themed Images")); QStringList mimetypes; mimetypes << "image/svg+xml" << "image/png" << "image/jpeg"; package->setMimeTypes("images", mimetypes); + package->setMimeTypes("theme", mimetypes); package->addDirectoryDefinition("config", "config", i18n("Configuration Definitions")); mimetypes.clear();