Clear the autosave folder at startup case there is some cruft in there

This commit is contained in:
Albert Astals Cid 2013-03-08 00:09:11 +01:00
parent c9a896543a
commit 2c0c4aaf2d
3 changed files with 12 additions and 0 deletions

View file

@ -475,6 +475,11 @@ void KonqSessionManager::saveCurrentSessionToFile(const QString& sessionConfigPa
configGroup.writeEntry("Number of Windows", counter);
}
QString KonqSessionManager::autosaveDirectory() const
{
return m_autosaveDir;
}
QStringList KonqSessionManager::takeSessionsOwnership()
{
// Tell to other konqueror instances that we are the one dealing with

View file

@ -155,6 +155,11 @@ public:
*/
void saveCurrentSessionToFile(const QString& sessionConfig);
/**
* Returns the autosave directory
*/
QString autosaveDirectory() const;
public Q_SLOTS:
/**
* Ask the user with a KPassivePopup ballon if session should be restored

View file

@ -32,6 +32,7 @@
#include <konqsessionmanager.h>
#include <kstandarddirs.h>
#include <kconfiggroup.h>
#include <ktempdir.h>
#include <kio/job.h>
#include <QLayout>
@ -116,6 +117,7 @@ private:
void ViewMgrTest::initTestCase()
{
KTempDir::removeDir(KonqSessionManager::self()->autosaveDirectory());
KonqSessionManager::self()->disableAutosave();
QCOMPARE(KGlobal::mainComponent().componentName(), QString("konqueror"));
QCOMPARE(KonqSettings::mmbOpensTab(), true);