Commit 2ffc2c3b authored by Daniel Teske's avatar Daniel Teske
Browse files

Move SessionFile::sessionLoadingProgress to SessionManager



Another step towards removing SessionFile.

Change-Id: I63ff5bd1c62d03e362e33c0ed65bf7bf3d7d0d6f
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent cd98f05f
......@@ -86,9 +86,6 @@ class SessionFile : QObject
public:
SessionFile();
public slots:
void sessionLoadingProgress();
private:
QList<Project *> m_projects;
Project *m_startupProject;
......@@ -107,12 +104,6 @@ private:
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
void SessionFile::sessionLoadingProgress()
{
future.setProgressValue(future.progressValue() + 1);
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
SessionFile::SessionFile()
: m_startupProject(0)
{
......@@ -448,7 +439,7 @@ bool SessionManager::loadImpl(const QString &fileName)
m_file->m_failedProjects.removeAll(p->file()->fileName());
}
m_file->sessionLoadingProgress();
sessionLoadingProgress();
// convert the relative paths in the dependency map to absolute paths
QMap<QString, QVariant> depMap = reader.restoreValue(QLatin1String("ProjectDependencies")).toMap();
......@@ -483,11 +474,11 @@ bool SessionManager::loadImpl(const QString &fileName)
const QVariant &editorsettings = reader.restoreValue(QLatin1String("EditorSettings"));
if (editorsettings.isValid()) {
connect(ICore::editorManager(), SIGNAL(editorOpened(Core::IEditor *)),
m_file, SLOT(sessionLoadingProgress()));
this, SLOT(sessionLoadingProgress()));
ICore::editorManager()->restoreState(
QByteArray::fromBase64(editorsettings.toByteArray()));
disconnect(ICore::editorManager(), SIGNAL(editorOpened(Core::IEditor *)),
m_file, SLOT(sessionLoadingProgress()));
this, SLOT(sessionLoadingProgress()));
}
m_file->future.reportFinished();
......@@ -997,7 +988,7 @@ SessionNode *SessionManager::sessionNode() const
void SessionManager::reportProjectLoadingProgress()
{
m_file->sessionLoadingProgress();
sessionLoadingProgress();
}
void SessionManager::markSessionFileDirty(bool makeDefaultVirginDirty)
......@@ -1007,4 +998,10 @@ void SessionManager::markSessionFileDirty(bool makeDefaultVirginDirty)
m_virginSession = false;
}
void SessionManager::sessionLoadingProgress()
{
m_file->future.setProgressValue(m_file->future.progressValue() + 1);
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#include "session.moc"
......@@ -148,6 +148,7 @@ private slots:
void updateWindowTitle();
void markSessionFileDirty(bool makeDefaultVirginDirty = true);
void sessionLoadingProgress();
private:
bool loadImpl(const QString &fileName);
......
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