Commit c60ac6f4 authored by David Faure's avatar David Faure
Browse files

Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation

They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
parent f91a1e57
......@@ -155,7 +155,7 @@ void DocMetaInfo::scanMetaInfo( bool force )
if ( metaInfos.isEmpty() )
{
metaInfos = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("plugins"), QStandardPaths::LocateDirectory);
metaInfos = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("plugins"), QStandardPaths::LocateDirectory);
}
for( it = metaInfos.constBegin(); it != metaInfos.constEnd(); ++it)
{
......
......@@ -80,7 +80,7 @@ GrantleeFormatter::GrantleeFormatter()
: d( new Private )
{
QSharedPointer< Grantlee::FileSystemTemplateLoader > loader( new Grantlee::FileSystemTemplateLoader );
loader->setTemplateDirs( QStandardPaths::locateAll( QStandardPaths::DataLocation, QStringLiteral("templates"), QStandardPaths::LocateDirectory ) );
loader->setTemplateDirs( QStandardPaths::locateAll( QStandardPaths::AppDataLocation, QStringLiteral("templates"), QStandardPaths::LocateDirectory ) );
d->engine.addTemplateLoader( loader );
}
......
......@@ -278,7 +278,7 @@ void MainWindow::setupActions()
void MainWindow::setupBookmarks()
{
const QString location = QStandardPaths::writableLocation( QStandardPaths::DataLocation );
const QString location = QStandardPaths::writableLocation( QStandardPaths::AppDataLocation );
QDir().mkpath( location );
const QString file = location + QStringLiteral( "/bookmarks.xml" );
......
......@@ -208,7 +208,7 @@ SearchEngine::~SearchEngine()
bool SearchEngine::initSearchHandlers()
{
const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("searchhandlers/"), QStandardPaths::LocateDirectory );
const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("searchhandlers/"), QStandardPaths::LocateDirectory );
QStringList resources;
for(const QString& dir : resourceDirs) {
QDir d(dir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment