mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Ported Dolphin away from KStandardDirs
removed unused mirroredDirectory method REVIEW: 120194
This commit is contained in:
parent
1d590aa7d5
commit
6a09781a3b
|
@ -50,7 +50,6 @@
|
|||
#include <KLocale>
|
||||
#include <KPropertiesDialog>
|
||||
#include <KStandardAction>
|
||||
#include <KStandardDirs>
|
||||
#include <KToolBar>
|
||||
|
||||
#include <panels/places/placesitem.h>
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
#include <KProtocolInfo>
|
||||
#include <KRun>
|
||||
#include <KShell>
|
||||
#include <KStandardDirs>
|
||||
#include <kstatusbar.h>
|
||||
#include <KStandardAction>
|
||||
#include <KToggleAction>
|
||||
|
@ -87,6 +86,7 @@
|
|||
#include <QToolButton>
|
||||
#include <QSplitter>
|
||||
#include <QTimer>
|
||||
#include <QStandardPaths>
|
||||
#include <QPushButton>
|
||||
|
||||
namespace {
|
||||
|
@ -1481,7 +1481,7 @@ bool DolphinMainWindow::isKompareInstalled() const
|
|||
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;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <QIcon>
|
||||
#include <kprotocolinfo.h>
|
||||
#include <KLocale>
|
||||
#include <KStandardDirs>
|
||||
#include <QStandardPaths>
|
||||
#include <KUser>
|
||||
#include <KGlobal>
|
||||
#include "placesitem.h"
|
||||
|
@ -87,7 +87,7 @@ PlacesItemModel::PlacesItemModel(QObject* parent) :
|
|||
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();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <KNS3/Button>
|
||||
#include <KService>
|
||||
#include <KServiceTypeTrader>
|
||||
#include <KStandardDirs>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <settings/serviceitemdelegate.h>
|
||||
#include <settings/servicemodel.h>
|
||||
|
@ -195,7 +195,7 @@ void ServicesSettingsPage::loadServices()
|
|||
// 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);
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <KIconLoader>
|
||||
#include <KIO/NetAccess>
|
||||
#include <KMessageBox>
|
||||
#include <KStandardDirs>
|
||||
#include <KUrl>
|
||||
#include <KComboBox>
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <KComponentData>
|
||||
#include <KLocale>
|
||||
#include <KStandardDirs>
|
||||
#include <KUrl>
|
||||
#include <KDebug>
|
||||
#include <KGlobal>
|
||||
|
@ -34,6 +33,7 @@
|
|||
#include <QDate>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace {
|
||||
const int AdditionalInfoViewPropertiesVersion = 1;
|
||||
|
@ -364,7 +364,8 @@ void ViewProperties::update()
|
|||
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;
|
||||
|
@ -378,9 +379,10 @@ bool ViewProperties::exist() const
|
|||
|
||||
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
|
||||
|
@ -471,10 +473,3 @@ QString ViewProperties::directoryHashForUrl(const KUrl& url)
|
|||
hashString.replace('/', '-');
|
||||
return hashString;
|
||||
}
|
||||
|
||||
KUrl ViewProperties::mirroredDirectory()
|
||||
{
|
||||
QString basePath = KGlobal::mainComponent().componentName();
|
||||
basePath.append("/view_properties/");
|
||||
return KUrl(KStandardDirs::locateLocal("data", basePath));
|
||||
}
|
||||
|
|
|
@ -164,15 +164,6 @@ private:
|
|||
*/
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue