forked from qt-creator/qt-creator
Move SessionFile::sessionLoadingProgress to SessionManager
Another step towards removing SessionFile. Change-Id: I63ff5bd1c62d03e362e33c0ed65bf7bf3d7d0d6f Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user