Ran kdesdk/scripts/kf5/convert-kstandarddirs.pl

This commit is contained in:
David Faure 2012-06-12 12:59:34 +02:00
parent 330efc1fa3
commit ffdf930f8c
10 changed files with 17 additions and 15 deletions

View File

@ -33,6 +33,7 @@
#include <kstandarddirs.h>
#include <klocale.h>
#include <kiconloader.h>
#include <qstandardpaths.h>
#include "package.h"
#include "pluginloader.h"

View File

@ -58,7 +58,7 @@
#include <kiconloader.h>
#include <kkeysequencewidget.h>
#include <kplugininfo.h>
#include <kstandarddirs.h>
#include <kservice.h>
#include <kservicetypetrader.h>
#include <kshortcut.h>

View File

@ -42,7 +42,7 @@
#include <kmessagebox.h>
#include <kmimetype.h>
#include <kservicetypetrader.h>
#include <kstandarddirs.h>
#include <kurlmimedata.h>
#include <kwindowsystem.h>

View File

@ -35,7 +35,7 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kservicetypetrader.h>
#include <kstandarddirs.h>
#include <version.h>

View File

@ -25,8 +25,9 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kservicetypetrader.h>
#include <qstandardpaths.h>
#include "datacontainer.h"
#include "pluginloader.h"
@ -203,7 +204,7 @@ KPluginInfo::List DataEngineManager::listEngineInfoByCategory(const QString &cat
void DataEngineManager::timerEvent(QTimerEvent *)
{
#ifndef NDEBUG
QString path = KGlobal::dirs()->locateLocal("appdata", "plasma_dataenginemanager_log");
QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "plasma_dataenginemanager_log";
QFile f(path);
if (!f.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
kDebug() << "faild to open" << path;

View File

@ -35,7 +35,6 @@
#include <kdesktopfile.h>
#include <kmimetype.h>
#include <kservicetypetrader.h>
#include <kstandarddirs.h>
#include <ktar.h>
#include <kzip.h>
@ -46,6 +45,7 @@
#include <kio/deletejob.h>
#include <kio/jobclasses.h>
#include <kio/job.h>
#include <qstandardpaths.h>
#endif
#include "packagestructure.h"
@ -716,7 +716,7 @@ bool PackagePrivate::installPackage(const QString &package, const QString &packa
QDir root(packageRoot);
if (!root.exists()) {
KStandardDirs::makeDir(packageRoot);
QDir().mkpath(packageRoot);
if (!root.exists()) {
kWarning() << "Could not create package root directory:" << packageRoot;
return false;

View File

@ -559,9 +559,7 @@ KPluginInfo::List PluginLoader::internalContainmentActionsInfo() const
static KPluginInfo::List standardInternalInfo(const QString &type, const QString &category = QString())
{
QStringList files = KGlobal::dirs()->findAllResources("appdata",
"plasma/internal/" + type + "/*.desktop",
KStandardDirs::NoDuplicates);
QStringList files = KGlobal::dirs()->findAllResources("appdata", "plasma/internal/" + type + "/*.desktop", KStandardDirs::NoDuplicates);
KPluginInfo::List allInfo = KPluginInfo::fromFiles(files);

View File

@ -30,9 +30,10 @@
#include <kservice.h>
#include <kservicetypetrader.h>
#include <ksharedconfig.h>
#include <kstandarddirs.h>
#include <dnssd/publicservice.h>
#include <dnssd/servicebrowser.h>
#include <qstandardpaths.h>
#include "configloader.h"
#include "version.h"

View File

@ -44,6 +44,7 @@
#include <kstandarddirs.h>
#include <kwindoweffects.h>
#include <kwindowsystem.h>
#include <qstandardpaths.h>
#include "libplasma-theme-global.h"
@ -509,8 +510,7 @@ Theme::~Theme()
KPluginInfo::List Theme::listThemeInfo()
{
const QStringList themes = KGlobal::dirs()->findAllResources("data", "desktoptheme/*/metadata.desktop",
KStandardDirs::NoDuplicates);
const QStringList themes = KGlobal::dirs()->findAllResources("data", "desktoptheme/*/metadata.desktop", KStandardDirs::NoDuplicates);
return KPluginInfo::fromFiles(themes);
}
@ -752,14 +752,14 @@ QString Theme::wallpaperPath(const QSize &size) const
if (fullPath.isEmpty()) {
// we failed to find it in the theme, so look in the standard directories
//kDebug() << "looking for" << image;
fullPath = KStandardDirs::locate("wallpaper", image);
fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + image);
}
if (fullPath.isEmpty()) {
// we still failed to find it in the theme, so look for the default in
// the standard directories
//kDebug() << "looking for" << defaultImage;
fullPath = KStandardDirs::locate("wallpaper", defaultImage);
fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + defaultImage);
if (fullPath.isEmpty()) {
#ifndef NDEBUG

View File

@ -43,6 +43,7 @@
#endif
#include <version.h>
#include <qstandardpaths.h>
#include "package.h"
#include "pluginloader.h"