SessionFile::fileName can't return a empty filename

So remove code that checks for that

Change-Id: I6e717f27713fae0b7487e18a45790b82e4e1e8cd
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-02-06 15:10:05 +01:00
parent c59bf4b402
commit a92830e37a

View File

@@ -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,11 +543,9 @@ 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())
} else if (!save() || !clear()) {
success = false;
}
@@ -588,14 +584,11 @@ 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;
}
}
m_virginSession = false;
@@ -1075,7 +1068,6 @@ void SessionManager::reportProjectLoadingProgress()
void SessionManager::markSessionFileDirty(bool makeDefaultVirginDirty)
{
if (m_file && !m_file->fileName().isEmpty())
m_autoSaveSessionTimer->start();
if (makeDefaultVirginDirty)
m_virginSession = false;