#include <KLocale>
#include <KPropertiesDialog>
#include <KStandardAction>
-#include <KStandardDirs>
#include <KToolBar>
#include <panels/places/placesitem.h>
#include <KProtocolInfo>
#include <KRun>
#include <KShell>
-#include <KStandardDirs>
#include <kstatusbar.h>
#include <KStandardAction>
#include <KToggleAction>
#include <QToolButton>
#include <QSplitter>
#include <QTimer>
+#include <QStandardPaths>
#include <QPushButton>
namespace {
if (!initialized) {
// TODO: maybe replace this approach later by using a menu
// plugin like kdiff3plugin.cpp
- installed = !KGlobal::dirs()->findExe("kompare").isEmpty();
+ installed = !QStandardPaths::findExecutable(QStringLiteral("kompare")).isEmpty();
initialized = true;
}
return installed;
#include <QIcon>
#include <kprotocolinfo.h>
#include <KLocale>
-#include <KStandardDirs>
+#include <QStandardPaths>
#include <KUser>
#include <KGlobal>
#include "placesitem.h"
Baloo::IndexerConfig config;
m_fileIndexingEnabled = config.fileIndexingEnabled();
#endif
- const QString file = KStandardDirs::locateLocal("data", "kfileplaces/bookmarks.xml");
+ const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kfileplaces/bookmarks.xml");
m_bookmarkManager = KBookmarkManager::managerForFile(file, "kfilePlaces");
createSystemBookmarks();
#include <KNS3/Button>
#include <KService>
#include <KServiceTypeTrader>
-#include <KStandardDirs>
+#include <QStandardPaths>
#include <settings/serviceitemdelegate.h>
#include <settings/servicemodel.h>
// Load generic services
const KService::List entries = KServiceTypeTrader::self()->query("KonqPopupMenu/Plugin");
foreach (const KService::Ptr& service, entries) {
- const QString file = KStandardDirs::locate("services", service->entryPath());
+ const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kservices5/" % service->entryPath());
const QList<KServiceAction> serviceActions =
KDesktopFileActions::userDefinedServices(file, true);
#include <KIconLoader>
#include <KIO/NetAccess>
#include <KMessageBox>
-#include <KStandardDirs>
#include <KUrl>
#include <KComboBox>
#include <KComponentData>
#include <KLocale>
-#include <KStandardDirs>
#include <KUrl>
#include <KDebug>
#include <KGlobal>
#include <QDate>
#include <QFile>
#include <QFileInfo>
+#include <QStandardPaths>
namespace {
const int AdditionalInfoViewPropertiesVersion = 1;
void ViewProperties::save()
{
kDebug() << "Saving view-properties to" << m_filePath;
- KStandardDirs::makeDir(m_filePath);
+ QDir dir;
+ dir.mkpath(m_filePath);
m_node->setVersion(CurrentViewPropertiesVersion);
m_node->writeConfig();
m_changedProps = false;
QString ViewProperties::destinationDir(const QString& subDir) const
{
- QString basePath = KGlobal::mainComponent().componentName();
- basePath.append("/view_properties/").append(subDir);
- return KStandardDirs::locateLocal("data", basePath);
+ QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+ path.append(KGlobal::mainComponent().componentName());
+ path.append("/view_properties/").append(subDir);
+ return path;
}
QString ViewProperties::viewModePrefix() const
hashString.replace('/', '-');
return hashString;
}
-
-KUrl ViewProperties::mirroredDirectory()
-{
- QString basePath = KGlobal::mainComponent().componentName();
- basePath.append("/view_properties/");
- return KUrl(KStandardDirs::locateLocal("data", basePath));
-}
*/
static QString directoryHashForUrl(const KUrl& url);
- /**
- * Returns the URL of the directory, where the mirrored view properties
- * are stored into. Mirrored view properties are used if:
- * - there is no write access for storing the view properties into
- * the original directory
- * - for non local directories
- */
- static KUrl mirroredDirectory();
-
Q_DISABLE_COPY(ViewProperties)
private: