Commit a92830e3 authored by Daniel Teske's avatar Daniel Teske
Browse files

SessionFile::fileName can't return a empty filename



So remove code that checks for that

Change-Id: I6e717f27713fae0b7487e18a45790b82e4e1e8cd
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent c59bf4b4
......@@ -226,8 +226,6 @@ bool SessionFile::load(const QString &fileName)
bool SessionFile::save()
{
Q_ASSERT(!m_fileName.isEmpty());
if (debug)
qDebug() << "SessionFile - saving " << m_fileName;
......@@ -545,12 +543,10 @@ bool SessionManager::createImpl(const QString &fileName)
qDebug() << "SessionManager - creating new session " << fileName << " ...";
bool success = true;
if (!m_file->fileName().isEmpty()) {
if (isDefaultVirgin()) {
// do not save initial and virgin default session
} else if (!save() || !clear())
success = false;
if (isDefaultVirgin()) {
// do not save initial and virgin default session
} else if (!save() || !clear()) {
success = false;
}
if (success) {
......@@ -588,13 +584,10 @@ bool SessionManager::loadImpl(const QString &fileName)
qDebug() << "SessionManager - restoring session " << fileName << " ...";
bool success = true;
if (!m_file->fileName().isEmpty()) {
if (isDefaultVirgin()) {
// do not save initial and virgin default session
} else if (!save() || !clear()) {
success = false;
}
if (isDefaultVirgin()) {
// do not save initial and virgin default session
} else if (!save() || !clear()) {
success = false;
}
m_virginSession = false;
......@@ -1075,8 +1068,7 @@ void SessionManager::reportProjectLoadingProgress()
void SessionManager::markSessionFileDirty(bool makeDefaultVirginDirty)
{
if (m_file && !m_file->fileName().isEmpty())
m_autoSaveSessionTimer->start();
m_autoSaveSessionTimer->start();
if (makeDefaultVirginDirty)
m_virginSession = false;
}
......
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