forked from qt-creator/qt-creator
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:
@@ -226,8 +226,6 @@ bool SessionFile::load(const QString &fileName)
|
|||||||
|
|
||||||
bool SessionFile::save()
|
bool SessionFile::save()
|
||||||
{
|
{
|
||||||
Q_ASSERT(!m_fileName.isEmpty());
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "SessionFile - saving " << m_fileName;
|
qDebug() << "SessionFile - saving " << m_fileName;
|
||||||
|
|
||||||
@@ -545,11 +543,9 @@ bool SessionManager::createImpl(const QString &fileName)
|
|||||||
qDebug() << "SessionManager - creating new session " << fileName << " ...";
|
qDebug() << "SessionManager - creating new session " << fileName << " ...";
|
||||||
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
if (!m_file->fileName().isEmpty()) {
|
|
||||||
if (isDefaultVirgin()) {
|
if (isDefaultVirgin()) {
|
||||||
// do not save initial and virgin default session
|
// do not save initial and virgin default session
|
||||||
} else if (!save() || !clear())
|
} else if (!save() || !clear()) {
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,14 +584,11 @@ bool SessionManager::loadImpl(const QString &fileName)
|
|||||||
qDebug() << "SessionManager - restoring session " << fileName << " ...";
|
qDebug() << "SessionManager - restoring session " << fileName << " ...";
|
||||||
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
if (!m_file->fileName().isEmpty()) {
|
|
||||||
if (isDefaultVirgin()) {
|
if (isDefaultVirgin()) {
|
||||||
// do not save initial and virgin default session
|
// do not save initial and virgin default session
|
||||||
} else if (!save() || !clear()) {
|
} else if (!save() || !clear()) {
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
m_virginSession = false;
|
m_virginSession = false;
|
||||||
|
|
||||||
@@ -1075,7 +1068,6 @@ void SessionManager::reportProjectLoadingProgress()
|
|||||||
|
|
||||||
void SessionManager::markSessionFileDirty(bool makeDefaultVirginDirty)
|
void SessionManager::markSessionFileDirty(bool makeDefaultVirginDirty)
|
||||||
{
|
{
|
||||||
if (m_file && !m_file->fileName().isEmpty())
|
|
||||||
m_autoSaveSessionTimer->start();
|
m_autoSaveSessionTimer->start();
|
||||||
if (makeDefaultVirginDirty)
|
if (makeDefaultVirginDirty)
|
||||||
m_virginSession = false;
|
m_virginSession = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user