1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01: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); return path(CurrentProfile);
} }
// static
void DataPaths::clearTempData()
{
QzTools::removeDir(path(Temp));
}
void DataPaths::init() void DataPaths::init()
{ {
#if defined(NO_SYSTEM_DATAPATH) #if defined(NO_SYSTEM_DATAPATH)
@ -107,7 +101,7 @@ void DataPaths::init()
// We also allow to load data from Config path // We also allow to load data from Config path
initAssetsIn(m_paths[Config].at(0)); 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()); m_paths[Temp].append(m_tmpdir->path());
if (!m_tmpdir->isValid()) { if (!m_tmpdir->isValid()) {
qWarning() << "Failed to create temporary directory" << m_tmpdir->path(); qWarning() << "Failed to create temporary directory" << m_tmpdir->path();

View File

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

View File

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