1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

DataPaths: Coding style fixes

This commit is contained in:
David Rosca 2014-10-03 09:21:40 +02:00
parent 021b90f7b3
commit 6d06975ccb

View File

@ -52,7 +52,7 @@ void DataPaths::setPortableVersion()
d->m_paths[Temp] = d->m_paths[Config]; d->m_paths[Temp] = d->m_paths[Config];
d->m_paths[Temp].first().append(QLatin1String("/tmp")); d->m_paths[Temp].first().append(QLatin1String("/tmp"));
// Make sure the Config and Temp pathes exist // Make sure the Config and Temp paths exists
QDir dir; QDir dir;
dir.mkpath(d->m_paths[Config].first()); dir.mkpath(d->m_paths[Config].first());
dir.mkpath(d->m_paths[Temp].first()); dir.mkpath(d->m_paths[Temp].first());
@ -142,21 +142,20 @@ void DataPaths::init()
// Profiles // Profiles
m_paths[Profiles].append(m_paths[Config].first() + QLatin1String("/profiles")); m_paths[Profiles].append(m_paths[Config].first() + QLatin1String("/profiles"));
// Make sure the Config and Temp pathes exist
QDir dir;
dir.mkpath(m_paths[Config].first());
// Temp // Temp
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
const QByteArray &user = qgetenv("USER"); const QByteArray &user = qgetenv("USER");
const QString &tempPath = QString(QSL("%1/qupzilla-%2/tmp")).arg(QDir::tempPath(), user.constData()); const QString &tempPath = QString(QSL("%1/qupzilla-%2/tmp")).arg(QDir::tempPath(), user.constData());
dir.mkpath(tempPath);
m_paths[Temp].append(tempPath); m_paths[Temp].append(tempPath);
#else #else
m_paths[Temp].append(m_paths[Config].first() + QLatin1String("/tmp")); m_paths[Temp].append(m_paths[Config].first() + QLatin1String("/tmp"));
dir.mkpath(m_paths[Temp].first());
#endif #endif
// Make sure the Config and Temp paths exists
QDir dir;
dir.mkpath(m_paths[Config].first());
dir.mkpath(m_paths[Temp].first());
// We also allow to load data from Config path // We also allow to load data from Config path
m_paths[Translations].append(m_paths[Config].first() + QLatin1String("/locale")); m_paths[Translations].append(m_paths[Config].first() + QLatin1String("/locale"));
m_paths[Themes].append(m_paths[Config].first() + QLatin1String("/themes")); m_paths[Themes].append(m_paths[Config].first() + QLatin1String("/themes"));