summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/session.cpp
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@nokia.com>2012-02-06 15:10:05 +0100
committerDaniel Teske <daniel.teske@nokia.com>2012-02-07 14:59:24 +0100
commita92830e37a53aaff57ec78e2d442106deb71d45f (patch)
tree3f660ed288b19e33ae5b78673e90d0cea96bad01 /src/plugins/projectexplorer/session.cpp
parentc59bf4b402226cf3dcfec242951954111470e1c5 (diff)
downloadqt-creator-a92830e37a53aaff57ec78e2d442106deb71d45f.tar.gz
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>
Diffstat (limited to 'src/plugins/projectexplorer/session.cpp')
-rw-r--r--src/plugins/projectexplorer/session.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 8e5b21cfdf..c3effcd353 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -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;
}