Commit 96520655 authored by David Faure's avatar David Faure

KStandardDirs -> QStandardPaths, using convert-kstandarddirs.pl

parent 896a1709
......@@ -25,7 +25,7 @@
#include <kcmdlineargs.h>
#include <KLocalizedString>
#include <kprocess.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kmimetypetrader.h>
#include <kmimetype.h>
......@@ -45,10 +45,11 @@
#include <konq_mainwindow_interface.h>
#include <konq_main_interface.h>
#include <QtCore/QDir>
#include <QtCore/QMimeDatabase>
#include <QtCore/QRegExp>
#include <QtCore/QUrl>
#include <QDir>
#include <QMimeDatabase>
#include <QRegExp>
#include <QUrl>
#include <QStandardPaths>
#include <stdlib.h>
#include <stdio.h>
......@@ -201,7 +202,7 @@ static bool startNewKonqueror(QString url, QString mimetype, const QString &prof
if (profile.isEmpty()) {
return true;
}
QString profilepath = KStandardDirs::locate("data", QLatin1String("konqueror/profiles/") + profile);
QString profilepath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("konqueror/profiles/") + profile);
if (profilepath.isEmpty()) {
return true;
}
......@@ -490,7 +491,7 @@ bool ClientApp::openProfile(const QString &profileName, const QString &url, cons
// so when we arrive here, konq is up and running already, and appId contains the identification
}
QString profile = KStandardDirs::locate("data", QLatin1String("konqueror/profiles/") + profileName);
QString profile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("konqueror/profiles/") + profileName);
if (profile.isEmpty()) {
fprintf(stderr, "%s: %s", programName, i18n("Profile '%1' not found\n", profileName).toLocal8Bit().data());
::exit(0);
......
......@@ -34,6 +34,7 @@
#include <kurlrequester.h>
#include <kconfiggroup.h>
#include <QStandardPaths>
#include <KSharedConfig>
// Local
#include "konqkcmfactory.h"
......
......@@ -12,7 +12,7 @@
#include <kdialog.h>
#include <kfontdialog.h>
#include <kglobalsettings.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
......@@ -22,6 +22,7 @@
#include <kparts/openurlarguments.h>
#include <kurl.h>
#include <QStandardPaths>
// Local
#include "template.h"
......@@ -329,7 +330,7 @@ static QUrl toDataUri(const QString &content, const QByteArray &contentType)
void CSSCustomDialog::slotPreview()
{
const QString templ(KStandardDirs::locate("data", "kcmcss/template.css"));
const QString templ(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kcmcss/template.css"));
if (templ.isEmpty()) {
return;
......
......@@ -32,6 +32,7 @@
#include <kconfig.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <KSharedConfig>
// Local
#include "policies.h"
......
......@@ -47,6 +47,7 @@
#include <KConfigGroup>
#include <kurl.h>
#include <KSharedConfig>
KCMFilter::KCMFilter(QWidget *parent, const QVariantList &)
: KCModule(parent),
......
......@@ -27,7 +27,7 @@
#include <kmimetype.h>
#include <kmimetypetrader.h>
#include <kservice.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include <KConfigGroup>
#include <KGlobal>
......@@ -36,6 +36,8 @@
#include "ui_advancedTabOptions.h"
#include <KPluginFactory>
#include <KPluginLoader>
#include <QStandardPaths>
#include <KSharedConfig>
// Keep in sync with konqueror.kcfg
static const char DEFAULT_HOMEPAGE[] = "http://www.kde.org";
......@@ -129,7 +131,7 @@ KKonqGeneralOptions::~KKonqGeneralOptions()
static QString readStartUrlFromProfile()
{
const QString blank = "about:blank";
const QString profile = KStandardDirs::locate("data", QLatin1String("konqueror/profiles/webbrowsing"));
const QString profile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("konqueror/profiles/webbrowsing"));
if (profile.isEmpty()) {
return blank;
}
......@@ -259,10 +261,10 @@ static void updateWebbrowsingProfile(const QString &homeUrl, StartPage startPage
const QString profileFileName = "webbrowsing";
// Create local copy of the profile if needed -- copied from KonqViewManager::setCurrentProfile
const QString localPath = KStandardDirs::locateLocal("data", QString::fromLatin1("konqueror/profiles/%1").arg(profileFileName)/*, KGlobal::mainComponent()*/);
const QString localPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + QString::fromLatin1("konqueror/profiles/%1").arg(profileFileName)/*, KGlobal::mainComponent()*/;
KSharedConfigPtr cfg = KSharedConfig::openConfig(localPath, KConfig::SimpleConfig);
if (!QFile::exists(localPath)) {
const QString globalFile = KStandardDirs::locate("data", QString::fromLatin1("konqueror/profiles/%1").arg(profileFileName)/*, KGlobal::mainComponent()*/);
const QString globalFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString::fromLatin1("konqueror/profiles/%1").arg(profileFileName)/*, KGlobal::mainComponent()*/);
if (!globalFile.isEmpty()) {
KSharedConfigPtr globalCfg = KSharedConfig::openConfig(globalFile, KConfig::SimpleConfig);
globalCfg->copyTo(localPath, cfg.data());
......@@ -307,7 +309,7 @@ void KKonqGeneralOptions::save()
#if 0 //PORT QT5
if (m_webEngineCombo->currentIndex() > 0) {
// The user changed the preferred web engine, save into mimeapps.list.
KSharedConfig::Ptr profile = KSharedConfig::openConfig("mimeapps.list", KConfig::NoGlobals, "xdgdata-apps");
KSharedConfig::Ptr profile = KSharedConfig::openConfig("mimeapps.list", KConfig::NoGlobals, QStandardPaths::ApplicationsLocation);
KConfigGroup addedServices(profile, "Added KDE Service Associations");
KConfigGroup removedServices(profile, "Added KDE Service Associations");
Q_FOREACH (const QString &mimeType, QStringList() << "text/html" << "application/xhtml+xml" << "application/xml") {
......
......@@ -29,6 +29,7 @@
// Local
#include <KPluginFactory>
#include <KPluginLoader>
#include <KSharedConfig>
//-----------------------------------------------------------------------------
......
......@@ -37,6 +37,7 @@
#include <khbox.h>
#include <kparts/htmlextension.h>
#include <kparts/htmlsettingsinterface.h>
#include <KSharedConfig>
// Local
#include "htmlopts.h"
......
......@@ -16,6 +16,7 @@
#include "domainlistview.h"
#include "policies.h"
#include <KComponentData>
#include <KSharedConfig>
class KUrlRequester;
class KIntNumInput;
......
......@@ -28,7 +28,7 @@
#include <QVBoxLayout>
// KDE
#include <kconfig.h>
#include <kdebug.h>
#include <KSharedConfig>
#include <kurlrequester.h>
#include <KLocalizedString>
#include <kparts/htmlextension.h>
......@@ -42,7 +42,6 @@
#endif
// == class KJavaScriptOptions =====
#include <KDebug>
KJavaScriptOptions::KJavaScriptOptions(KSharedConfig::Ptr config, const QString &group, QWidget *parent) :
KCModule(/*componentData,*/ parent),
_removeJavaScriptDomainAdvice(false),
......
......@@ -12,6 +12,7 @@
#include <kcmodule.h>
#include <KComponentData>
#include <KSharedConfig>
#include "domainlistview.h"
#include "jspolicies.h"
......
......@@ -33,6 +33,7 @@
#include <kconfiggroup.h>
#include <kdebug.h>
#include <KLocalizedString>
#include <KSharedConfig>
// == class JSPolicies ==
......
......@@ -26,6 +26,7 @@
#include <kparts/htmlextension.h>
#include <kparts/htmlsettingsinterface.h>
#include <KSharedConfig>
#include "policies.h"
class QButtonGroup;
......
......@@ -17,6 +17,7 @@
#include <kglobal.h>
#include <kconfiggroup.h>
#include <KAboutData>
#include <KSharedConfig>
KHTTPOptions::KHTTPOptions(KSharedConfig::Ptr config, const QString &group, const KAboutData *aboutData, QWidget *parent)
: KCModule(aboutData, parent), m_pConfig(config), m_groupname(group)
......
......@@ -37,6 +37,7 @@
#include <kaboutdata.h>
#include <KPluginFactory>
#include <KPluginLoader>
#include <KSharedConfig>
// Local
#include "jsopts.h"
......
......@@ -43,6 +43,8 @@
#include <KStandardGuiItem>
#include <KGlobal>
#include <KUrl>
#include <QStandardPaths>
#include <KSharedConfig>
// Local
#include "htmlopts.h"
#include "ui_nsconfigwidget.h"
......@@ -333,7 +335,7 @@ void KPluginOptions::scan()
nspluginscan = new KProcess(this);
nspluginscan->setOutputChannelMode(KProcess::SeparateChannels);
QString scanExe = KGlobal::dirs()->findExe("nspluginscan");
QString scanExe = KStandardDirs::findExe("nspluginscan");
if (scanExe.isEmpty()) {
kDebug() << "can't find nspluginviewer";
......@@ -543,7 +545,7 @@ void KPluginOptions::pluginLoad(KSharedConfig::Ptr /*config*/)
QRegExp version(";version=[^:]*:");
// open the cache file
QFile cachef(KStandardDirs::locate("data", "nsplugins/cache"));
QFile cachef(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "nsplugins/cache"));
if (!cachef.exists() || !cachef.open(QIODevice::ReadOnly)) {
kDebug() << "Could not load plugin cache file!";
return;
......
......@@ -20,6 +20,7 @@ class QCheckBox;
#include <kcmodule.h>
#include <kconfig.h>
#include <KSharedConfig>
#include "ui_nsconfigwidget.h"
class QBoxLayout;
......
......@@ -28,6 +28,8 @@
#include <kstandarddirs.h>
#include <QDir>
#include <QUrl>
#include <QStandardPaths>
#include <KSharedConfig>
// Input data:
// Global dir: list of desktop files.
......@@ -47,7 +49,7 @@
ModuleManager::ModuleManager(KConfigGroup *config)
: m_config(config)
{
m_localPath = KGlobal::dirs()->saveLocation("data", relativeDataPath(), true);
m_localPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + relativeDataPath();
}
QStringList ModuleManager::modules() const
......@@ -56,7 +58,7 @@ QStringList ModuleManager::modules() const
const QStringList addedModules = m_config->readEntry("AddedModules", QStringList());
const QStringList deletedModules = m_config->readEntry("DeletedModules", QStringList());
const QStringList entries_dirs = KGlobal::dirs()->findDirs("data", relativeDataPath());
const QStringList entries_dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, relativeDataPath());
if (entries_dirs.isEmpty()) { // Ooops
kWarning() << "No global directory found for apps/konqsidebartng/entries. Installation problem!";
return QStringList();
......@@ -86,7 +88,7 @@ KService::List ModuleManager::availablePlugins() const
{
// For the "add" menu, we need all available plugins.
// We could use KServiceTypeTrader for that; not sure 2 files make a big performance difference though.
const QStringList files = KGlobal::dirs()->findAllResources("data", "konqsidebartng/plugins/*.desktop");
const QStringList files = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "konqsidebartng/plugins/*.desktop");
KService::List services;
Q_FOREACH (const QString &path, files) {
KDesktopFile df(path); // no merging. KService warns, and we don't need it.
......@@ -102,12 +104,12 @@ QString ModuleManager::moduleDataPath(const QString &fileName) const
QString ModuleManager::moduleFullPath(const QString &fileName) const
{
return KGlobal::dirs()->locate("data", moduleDataPath(fileName));
return QStandardPaths::locate(QStandardPaths::GenericDataLocation, moduleDataPath(fileName));
}
void ModuleManager::rollbackToDefault()
{
const QString loc = KGlobal::dirs()->saveLocation("data", "konqsidebartng/");
const QString loc = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/konqsidebartng/";
QDir dir(loc);
const QStringList dirEntries = dir.entryList(QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot);
Q_FOREACH (const QString &subdir, dirEntries) {
......@@ -184,12 +186,12 @@ QString ModuleManager::addModuleFromTemplate(QString &templ)
}
QString filename = templ.arg(QString());
QString myFile = KStandardDirs::locateLocal("data", moduleDataPath(filename));
QString myFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + moduleDataPath(filename);
if (QFile::exists(myFile)) {
for (ulong l = 1; l < ULONG_MAX; l++) {
filename = templ.arg(l);
myFile = KStandardDirs::locateLocal("data", moduleDataPath(filename));
myFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + moduleDataPath(filename);
if (!QFile::exists(myFile)) {
break;
} else {
......@@ -212,7 +214,7 @@ void ModuleManager::sortGlobalEntries(QStringList &fileNames) const
QMap<int, QString> sorter;
Q_FOREACH (const QString &fileName, fileNames) {
const QString path = moduleDataPath(fileName);
if (KStandardDirs::locate("data", path).isEmpty()) {
if (QStandardPaths::locate(QStandardPaths::GenericDataLocation, path).isEmpty()) {
// doesn't exist anymore, skip it
kDebug() << "Skipping" << path;
} else {
......@@ -226,7 +228,7 @@ void ModuleManager::sortGlobalEntries(QStringList &fileNames) const
// While we have the config file open, fix migration issue between old and new history sidebar
if (configGroup.readEntry("X-KDE-TreeModule") == "History") {
// Old local file still there; remove it
const QString localFile = KStandardDirs::locateLocal("data", path);
const QString localFile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + path;
QFile::rename(localFile, localFile + ".orig");
kDebug() << "Migration: moving" << localFile << "out of the way";
}
......
......@@ -34,7 +34,7 @@
// KDE
#include <KLocalizedString>
#include <kconfig.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <kdesktopfile.h>
#include <kiconloader.h>
......@@ -51,6 +51,8 @@
#include <KUrlRequester>
#include <KJobUiDelegate>
#include <KJobWidgets>
#include <QStandardPaths>
#include <KSharedConfig>
void Sidebar_Widget::aboutToShowAddMenu()
{
......@@ -485,7 +487,7 @@ bool Sidebar_Widget::addButton(const QString &desktopFileName, int pos)
const QString moduleDataPath = m_moduleManager.moduleDataPath(desktopFileName);
// Check the desktop file still exists
if (KStandardDirs::locate("data", moduleDataPath).isEmpty()) {
if (QStandardPaths::locate(QStandardPaths::GenericDataLocation, moduleDataPath).isEmpty()) {
return false;
}
......
......@@ -25,6 +25,7 @@
#include <QUrl>
#include <kparts/part.h>
#include <KSharedConfig>
#include "konqsidebarplugin.h"
#include "module_manager.h"
......@@ -54,8 +55,6 @@ public:
{
}
~ButtonInfo() {}
KonqSidebarPlugin *plugin(QObject *parent);
KSharedConfig::Ptr configFile;
......
......@@ -24,6 +24,8 @@
#include <kconfiggroup.h>
#include <module_manager.h>
#include <qtest_kde.h>
#include <QStandardPaths>
#include <KSharedConfig>
class ModuleManagerTest : public QObject
{
......@@ -57,7 +59,7 @@ QTEST_KDEMAIN(ModuleManagerTest, NoGUI)
void ModuleManagerTest::initTestCase()
{
const QString configFile = KStandardDirs::locateLocal("config", "konqsidebartngrc");
const QString configFile = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QLatin1Char('/') + "konqsidebartngrc";
QFile::remove(configFile);
KSharedConfig::Ptr config = KSharedConfig::openConfig("konqsidebartngrc");
......@@ -74,11 +76,11 @@ void ModuleManagerTest::initTestCase()
// Create a "global" dir for the (fake) pre-installed modules,
// which isn't really global of course, but we can register it as such...
m_globalDir = KStandardDirs::locateLocal("data", "sidebartest_global/konqsidebartng/entries/");
m_globalDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "sidebartest_global/konqsidebartng/entries/";
QVERIFY(QDir(m_globalDir).exists());
QFile::remove(m_globalDir + "testModule.desktop");
KGlobal::dirs()->addResourceDir("data", KStandardDirs::locateLocal("data", "sidebartest_global/"), true);
KGlobal::dirs()->addResourceDir("data", QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "sidebartest_global/"), true;
// Create a fake pre-installed plugin there.
KDesktopFile testModule(m_globalDir + "testModule.desktop");
......@@ -99,7 +101,7 @@ void ModuleManagerTest::cleanupTestCase()
delete m_configGroup;
delete m_configGroup2;
QFile::remove(m_globalDir + "testModule.desktop");
QFile::remove(KStandardDirs::locateLocal("data", "konqsidebartng/entries/testModule.desktop"));
QFile::remove(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "konqsidebartng/entries/testModule.desktop");
}
// This test checks the initial state of things.
......@@ -164,7 +166,7 @@ void ModuleManagerTest::testRenameGlobalModule()
QCOMPARE(modules.count(), m_realModules + 2);
QVERIFY(modules.contains("testModule.desktop"));
// A local copy was made
const QString localCopy = KStandardDirs::locateLocal("data", "konqsidebartng/entries/testModule.desktop");
const QString localCopy = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "konqsidebartng/entries/testModule.desktop";
kDebug() << localCopy;
QVERIFY(QFile(localCopy).exists());
// We didn't lose the icon (e.g. due to lack of merging)
......
......@@ -39,6 +39,7 @@
#include <QApplication>
#include <QClipboard>
#include <QCursor>
#include <KSharedConfig>
#define MYMODULE static_cast<KonqSidebarDirTreeModule*>(module())
......
......@@ -54,6 +54,7 @@
#include <stdlib.h>
#include <assert.h>
#include <QStandardPaths>
static const int autoOpenTimeout = 750;
......@@ -164,7 +165,7 @@ KonqSidebarTree::KonqSidebarTree(KonqSidebarOldTreeModule *parent, QWidget *pare
this, SLOT(slotItemRenamed(Q3ListViewItem*,QString,int)));
if (moduleType == VIRT_Folder) {
m_dirtreeDir.dir.setPath(KGlobal::dirs()->saveLocation("data", "konqsidebartng/virtual_folders/" + path + '/'));
m_dirtreeDir.dir.setPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "konqsidebartng/virtual_folders/" + path + '/');
m_dirtreeDir.relDir = path;
} else {
m_dirtreeDir.dir.setPath(path);
......@@ -654,9 +655,9 @@ void KonqSidebarTree::scanDir(KonqSidebarTreeItem *parent, const QString &path,
}
if (copyConfig) {
// We will copy over the configuration for the dirtree, from the global directory
const QStringList dirtree_dirs = KGlobal::dirs()->findDirs("data", "konqsidebartng/virtual_folders/" + m_dirtreeDir.relDir + '/');
const QStringList dirtree_dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "konqsidebartng/virtual_folders/" + m_dirtreeDir.relDir + '/');
// QString dirtree_dir = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/").last(); // most global
// QString dirtree_dir = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/").last(); // most global
// kDebug(1201) << "dirtree_dir=" << dirtree_dir;
/*
......
......@@ -15,6 +15,7 @@
#include <QAction>
#include <QClipboard>
#include <QApplication>
#include <QStandardPaths>
KonqSidebarOldTreeModule::KonqSidebarOldTreeModule(const KComponentData &componentData, QWidget *parent,
const QString &desktopName_, const KConfigGroup &configGroup)
......@@ -29,7 +30,7 @@ KonqSidebarOldTreeModule::KonqSidebarOldTreeModule(const KComponentData &compone
// and for the toplevel item is broken. When renaming the toplevel item,
// the module isn't renamed until the next konqueror restart (!).
// We probably want to get rid of toplevel items when there's only one?
path = KStandardDirs::locate("data", "konqsidebartng/entries/" + desktopName_); // ### this breaks global/local merging!
path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "konqsidebartng/entries/" + desktopName_); // ### this breaks global/local merging!
}
widget = new KVBox(parent);
......
......@@ -31,7 +31,7 @@
#include <kpluginfactory.h>
#include <kparts/browserextension.h>
#include <knameandurlinputdialog.h>
#include <kstandarddirs.h>
#include <khbox.h>
#include <knuminput.h>
......
......@@ -24,6 +24,7 @@
#include "KonquerorAdaptor.h"
#include "konqviewmanager.h"
#include <kglobal.h>
#include <KSharedConfig>
KonquerorApplication::KonquerorApplication()
: KApplication()
......
......@@ -31,7 +31,7 @@
#include <kiconeffect.h>
#include <konqpixmapprovider.h>
#include <kcolorscheme.h>
#include <kstandarddirs.h>
#include <unistd.h>
#include <QFontDatabase>
......
......@@ -30,9 +30,11 @@
#include <QtDBus/QtDBus>
#include <kglobal.h>
#include <KLocalizedString>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <unistd.h> // getpid
#include <QStandardPaths>
#include <KSharedConfig>
Q_DECLARE_METATYPE(QList<QVariant>)
......@@ -58,7 +60,7 @@ KonqClosedWindowsManager::KonqClosedWindowsManager()
dbus.connect(QString(), dbusPath, dbusInterface, "notifyRemove", this, SLOT(slotNotifyRemove(QString,QString,QDBusMessage)));
QString filename = "closeditems/" + KonqMisc::encodeFilename(dbus.baseService());
QString file = KStandardDirs::locateLocal("tmp", filename);
QString file = QDir::tempPath() + QLatin1Char('/') + filename;
QFile::remove(file);
KConfigGroup configGroup(KSharedConfig::openConfig(), "Undo");
......@@ -331,7 +333,7 @@ void KonqClosedWindowsManager::removeClosedItemsConfigFiles()
// We are the only instance of konqueror left and thus we can safely remove
// all those temporary files.
QString dir = KStandardDirs::locateLocal("tmp", "closeditems/");
QString dir = QDir::tempPath() + QLatin1Char('/') + "closeditems/";
QDBusConnectionInterface *idbus = QDBusConnection::sessionBus().interface();
QDirIterator it(dir, QDir::Writable | QDir::Files);
while (it.hasNext()) {
......@@ -349,7 +351,7 @@ void KonqClosedWindowsManager::saveConfig()
// Create / overwrite the saved closed windows list
QString filename = "closeditems_saved";
QString file = KStandardDirs::locateLocal("appdata", filename);
QString file = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + filename;
QFile::remove(file);
KConfig *config = new KConfig(file, KConfig::SimpleConfig);
......@@ -384,7 +386,7 @@ void KonqClosedWindowsManager ::readConfig()
}
QString filename = "closeditems_saved";
QString file = KStandardDirs::locateLocal("appdata", filename);
QString file = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + filename;
m_konqClosedItemsConfig = new KConfig(file, KConfig::SimpleConfig);
......
......@@ -32,6 +32,7 @@
#include <ksettings/dispatcher.h>
#include <kstandardguiitem.h>
#include <kglobal.h>
#include <KSharedConfig>
// Local
#include "konqview.h"
......
......@@ -40,6 +40,7 @@
#include <KLocalizedString>
#include <klineedit.h>
#include <ktoggleaction.h>
#include <KSharedConfig>
KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent)
: KDialog(parent), m_mainWindow(parent)
......
......@@ -39,6 +39,7 @@
#include <QtDBus/QtDBus>
#include <QDir>