1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Don't create temporary dir in $HOME

BUG: 386235
This commit is contained in:
David Rosca 2017-10-27 14:22:39 +02:00
parent 9c3f38fa11
commit b6288358ef
3 changed files with 1 additions and 12 deletions

View File

@ -81,12 +81,6 @@ QString DataPaths::currentProfilePath()
return path(CurrentProfile);
}
// static
void DataPaths::clearTempData()
{
QzTools::removeDir(path(Temp));
}
void DataPaths::init()
{
#if defined(NO_SYSTEM_DATAPATH)
@ -107,7 +101,7 @@ void DataPaths::init()
// We also allow to load data from Config path
initAssetsIn(m_paths[Config].at(0));
m_tmpdir.reset(new QTemporaryDir(QCoreApplication::applicationName()));
m_tmpdir.reset(new QTemporaryDir());
m_paths[Temp].append(m_tmpdir->path());
if (!m_tmpdir->isValid()) {
qWarning() << "Failed to create temporary directory" << m_tmpdir->path();

View File

@ -56,9 +56,6 @@ public:
// Convenience function for getting CurrentProfile
static QString currentProfilePath();
// Remove Temp dir
static void clearTempData();
private:
void init();
void initCurrentProfile(const QString &profilePath);

View File

@ -786,8 +786,6 @@ void MainApplication::saveSettings()
m_plugins->shutdown();
m_networkManager->shutdown();
DataPaths::clearTempData();
qzSettings->saveSettings();
AdBlockManager::instance()->save();
QFile::remove(DataPaths::currentProfilePath() + QLatin1String("/WebpageIcons.db"));