forked from qt-creator/qt-creator
SessionManager: Apply 'static' pattern
Change-Id: I370f72fcf7a24216ee189979ce6b5c8bfc5f4140 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -185,8 +186,7 @@ static QString makeFrameName(const Frame &frame, const QString &relativeTo,
|
||||
static QString relativeToPath()
|
||||
{
|
||||
// The project for which we insert the snippet.
|
||||
const ProjectExplorer::Project *project =
|
||||
ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject();
|
||||
const ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject();
|
||||
|
||||
QString relativeTo(project ? project->projectDirectory() : QDir::homePath());
|
||||
if (!relativeTo.endsWith(QDir::separator()))
|
||||
|
||||
Reference in New Issue
Block a user