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

Remove SessionFile



Finally one unecessary layer is gone

Change-Id: I34ec37ab898884def075a86e7dfd978e3244d2e3
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent c200a926
......@@ -75,31 +75,9 @@ using namespace Core;
using Utils::PersistentSettingsReader;
using Utils::PersistentSettingsWriter;
/* SessionFile definitions */
namespace ProjectExplorer {
namespace Internal {
class SessionFile : QObject
{
Q_OBJECT
public:
SessionFile();
private:
friend class ProjectExplorer::SessionManager;
};
} // namespace Internal
} // namespace ProjectExplorer
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
SessionFile::SessionFile()
{
}
/*!
\class ProjectExplorer::SessionManager
......@@ -113,7 +91,6 @@ SessionFile::SessionFile()
SessionManager::SessionManager(QObject *parent)
: QObject(parent),
m_file(new SessionFile),
m_sessionNode(new SessionNode(this)),
m_sessionName(QLatin1String("default")),
m_virginSession(true),
......@@ -143,7 +120,6 @@ SessionManager::SessionManager(QObject *parent)
SessionManager::~SessionManager()
{
emit aboutToUnloadSession();
delete m_file;
}
......@@ -343,8 +319,6 @@ bool SessionManager::createImpl(const QString &fileName)
if (success) {
emit aboutToUnloadSession();
delete m_file;
m_file = new SessionFile;
m_startupProject = 0;
m_failedProjects.clear();
m_depMap.clear();
......@@ -390,8 +364,6 @@ bool SessionManager::loadImpl(const QString &fileName)
m_virginSession = false;
emit aboutToUnloadSession();
delete m_file;
m_file = new SessionFile;
m_startupProject = 0;
m_failedProjects.clear();
m_depMap.clear();
......@@ -484,8 +456,7 @@ bool SessionManager::loadImpl(const QString &fileName)
m_future.reportFinished();
m_future = QFutureInterface<void>();
// m_file->load() sets the m_file->startupProject
// but doesn't emit this signal, so we do it here
// we emit this signal here
emit startupProjectChanged(m_startupProject);
QStringList failedProjects = m_failedProjects;
......@@ -999,5 +970,3 @@ void SessionManager::sessionLoadingProgress()
m_future.setProgressValue(m_future.progressValue() + 1);
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#include "session.moc"
......@@ -60,7 +60,6 @@ class SessionNode;
class SessionManager;
namespace Internal {
class SessionFile;
class SessionNodeImpl;
} // namespace Internal
......@@ -160,7 +159,6 @@ private:
QStringList dependencies(const QString &proName) const;
QStringList dependenciesOrder() const;
Internal::SessionFile *m_file;
SessionNode *m_sessionNode;
QString m_sessionName;
bool m_virginSession;
......@@ -175,7 +173,7 @@ private:
QStringList m_failedProjects;
QMap<QString, QStringList> m_depMap;
QMap<QString, QVariant> m_values;
QFutureInterface<void> future;
QFutureInterface<void> m_future;
};
} // namespace ProjectExplorer
......
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