diff options
Diffstat (limited to 'src/plugins/squish/squishfilehandler.cpp')
-rw-r--r-- | src/plugins/squish/squishfilehandler.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/plugins/squish/squishfilehandler.cpp b/src/plugins/squish/squishfilehandler.cpp index 956f9488227..8a726cb9baa 100644 --- a/src/plugins/squish/squishfilehandler.cpp +++ b/src/plugins/squish/squishfilehandler.cpp @@ -15,8 +15,10 @@ #include <coreplugin/documentmanager.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/icore.h> +#include <coreplugin/session.h> + #include <projectexplorer/projectexplorer.h> -#include <projectexplorer/session.h> + #include <utils/algorithm.h> #include <utils/aspects.h> #include <utils/layoutbuilder.h> @@ -31,6 +33,8 @@ #include <QTimer> #include <QVBoxLayout> +using namespace Core; + namespace Squish { namespace Internal { @@ -51,7 +55,7 @@ public: QWidget *widget = new QWidget(this); auto buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); - using namespace Utils::Layouting; + using namespace Layouting; Form { label, &aut, br, arguments, @@ -93,8 +97,7 @@ SquishFileHandler::SquishFileHandler(QObject *parent) : QObject(parent) { m_instance = this; - auto sessionManager = ProjectExplorer::SessionManager::instance(); - connect(sessionManager, &ProjectExplorer::SessionManager::sessionLoaded, + connect(SessionManager::instance(), &SessionManager::sessionLoaded, this, &SquishFileHandler::onSessionLoaded); } @@ -258,7 +261,7 @@ void SquishFileHandler::openTestSuites() } } emit suitesOpened(); - ProjectExplorer::SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); + SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); } void SquishFileHandler::openTestSuite(const Utils::FilePath &suiteConfPath, bool isReopen) @@ -288,7 +291,7 @@ void SquishFileHandler::openTestSuite(const Utils::FilePath &suiteConfPath, bool m_suites.insert(suiteName, suiteConfPath); emit testTreeItemCreated(item); } - ProjectExplorer::SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); + SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); } static void closeOpenedEditorsFor(const Utils::FilePath &filePath, bool askAboutModifiedEditors) @@ -310,13 +313,13 @@ void SquishFileHandler::closeTestSuite(const QString &suiteName) // TODO remove file watcher m_suites.remove(suiteName); emit suiteTreeItemRemoved(suiteName); - ProjectExplorer::SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); + SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); } void SquishFileHandler::closeAllTestSuites() { closeAllInternal(); - ProjectExplorer::SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); + SessionManager::setValue(SK_OpenSuites, suitePathsAsStringList()); } void SquishFileHandler::deleteTestCase(const QString &suiteName, const QString &testCaseName) @@ -538,7 +541,7 @@ void SquishFileHandler::onSessionLoaded() // remove currently opened "silently" (without storing into session) closeAllInternal(); - const QVariant variant = ProjectExplorer::SessionManager::value(SK_OpenSuites); + const QVariant variant = SessionManager::value(SK_OpenSuites); const Utils::FilePaths suitePaths = Utils::transform(variant.toStringList(), &Utils::FilePath::fromString); |