Adapt to changes in KDEInstallDirs

kde5/services is kservices5
kde5/servicetypes is kservicestypes5
wilder
Aleix Pol 12 years ago
parent b7887433d5
commit fc05d19a80
  1. 4
      autotests/kdesktopfiletest.cpp
  2. 2
      src/core/kdesktopfile.cpp

@ -122,14 +122,14 @@ void KDesktopFileTest::testIsAuthorizedDesktopFile()
QVERIFY(QFile::exists(fileName));
QVERIFY(!KDesktopFile::isAuthorizedDesktopFile(fileName));
const QString installedFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("/kde5/services/") + "http_cache_cleaner.desktop");
const QString installedFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("/kservices5/http_cache_cleaner.desktop"));
if (!installedFile.isEmpty()) {
QVERIFY(KDesktopFile::isAuthorizedDesktopFile(installedFile));
} else {
qWarning("Skipping test for http_cache_cleaner.desktop, not found. kio not installed?");
}
const QString autostartFile = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QLatin1String("autostart/") + "plasma-desktop.desktop");
const QString autostartFile = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("autostart/plasma-desktop.desktop"));
if (!autostartFile.isEmpty()) {
QVERIFY(KDesktopFile::isAuthorizedDesktopFile(autostartFile));
} else {

@ -133,7 +133,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString &path)
return true;
}
}
const QString servicesDir = QLatin1String("kde5/services/"); // KGlobal::dirs()->xdgDataRelativePath("services")
const QString servicesDir = QLatin1String("kservices5/"); // KGlobal::dirs()->xdgDataRelativePath("services")
Q_FOREACH (const QString &xdgDataPrefix, QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation)) {
if (QDir(xdgDataPrefix).exists()) {
const QString prefix = QFileInfo(xdgDataPrefix).canonicalFilePath();

Loading…
Cancel
Save