summaryrefslogtreecommitdiff
path: root/src/plugins/designer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/designer')
-rw-r--r--src/plugins/designer/codemodelhelpers.cpp4
-rw-r--r--src/plugins/designer/designer.qbs4
-rw-r--r--src/plugins/designer/qtcreatorintegration.cpp16
-rw-r--r--src/plugins/designer/resourcehandler.cpp13
4 files changed, 21 insertions, 16 deletions
diff --git a/src/plugins/designer/codemodelhelpers.cpp b/src/plugins/designer/codemodelhelpers.cpp
index beddb3714e..8428fd9817 100644
--- a/src/plugins/designer/codemodelhelpers.cpp
+++ b/src/plugins/designer/codemodelhelpers.cpp
@@ -9,7 +9,7 @@
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/session.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/target.h>
#include <QCoreApplication>
@@ -30,7 +30,7 @@ static const char setupUiC[] = "setupUi";
// Find the generated "ui_form.h" header of the form via project.
static FilePath generatedHeaderOf(const FilePath &uiFileName)
{
- if (const Project *uiProject = SessionManager::projectForFile(uiFileName)) {
+ if (const Project *uiProject = ProjectManager::projectForFile(uiFileName)) {
if (Target *t = uiProject->activeTarget()) {
if (BuildSystem *bs = t->buildSystem()) {
FilePaths files = bs->filesGeneratedFrom(uiFileName);
diff --git a/src/plugins/designer/designer.qbs b/src/plugins/designer/designer.qbs
index 411be43283..b730485329 100644
--- a/src/plugins/designer/designer.qbs
+++ b/src/plugins/designer/designer.qbs
@@ -77,9 +77,7 @@ QtcPlugin {
]
}
- Group {
- name: "Tests"
- condition: qtc.testsEnabled
+ QtcTestFiles {
files: [ "gotoslot_test.cpp" ]
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index db96523c36..02f01a5d09 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -16,20 +16,24 @@
#include <cppeditor/cppworkingcopy.h>
#include <cppeditor/insertionpointlocator.h>
#include <cppeditor/symbolfinder.h>
+
#include <cplusplus/LookupContext.h>
#include <cplusplus/Overview.h>
+
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/messagemanager.h>
-#include <texteditor/texteditor.h>
-#include <texteditor/textdocument.h>
+
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/extracompiler.h>
#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/projecttree.h>
-#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
+#include <texteditor/texteditor.h>
+#include <texteditor/textdocument.h>
+
#include <utils/algorithm.h>
#include <utils/mimeutils.h>
#include <utils/qtcassert.h>
@@ -493,10 +497,10 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
// Retrieve code model snapshot restricted to project of ui file or the working copy.
Snapshot docTable = CppEditor::CppModelManager::instance()->snapshot();
Snapshot newDocTable;
- const Project *uiProject = SessionManager::projectForFile(currentUiFile);
+ const Project *uiProject = ProjectManager::projectForFile(currentUiFile);
if (uiProject) {
for (Snapshot::const_iterator i = docTable.begin(), ei = docTable.end(); i != ei; ++i) {
- const Project *project = SessionManager::projectForFile(i.key());
+ const Project *project = ProjectManager::projectForFile(i.key());
if (project == uiProject)
newDocTable.insert(i.value());
}
@@ -639,7 +643,7 @@ void QtCreatorIntegration::handleSymbolRenameStage1(
return;
// Get ExtraCompiler.
- const Project * const project = SessionManager::projectForFile(uiFile);
+ const Project * const project = ProjectManager::projectForFile(uiFile);
if (!project) {
return reportRenamingError(oldName, Designer::Tr::tr("File \"%1\" not found in project.")
.arg(uiFile.toUserOutput()));
diff --git a/src/plugins/designer/resourcehandler.cpp b/src/plugins/designer/resourcehandler.cpp
index 29838283d5..fe2cdd28c6 100644
--- a/src/plugins/designer/resourcehandler.cpp
+++ b/src/plugins/designer/resourcehandler.cpp
@@ -2,13 +2,16 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "resourcehandler.h"
+
#include "designerconstants.h"
+#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/projectnodes.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/session.h>
+
#include <resourceeditor/resourcenode.h>
+
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
@@ -42,10 +45,10 @@ void ResourceHandler::ensureInitialized()
Qt::QueuedConnection);
};
- for (Project *p : SessionManager::projects())
+ for (Project *p : ProjectManager::projects())
connector(p);
- connect(SessionManager::instance(), &SessionManager::projectAdded, this, connector);
+ connect(ProjectManager::instance(), &ProjectManager::projectAdded, this, connector);
m_originalUiQrcPaths = m_form->activeResourceFilePaths();
if (Designer::Constants::Internal::debug)
@@ -68,7 +71,7 @@ void ResourceHandler::updateResourcesHelper(bool updateProjectResources)
qDebug() << "ResourceHandler::updateResources()" << fileName;
// Filename could change in the meantime.
- Project *project = SessionManager::projectForFile(Utils::FilePath::fromUserInput(fileName));
+ Project *project = ProjectManager::projectForFile(Utils::FilePath::fromUserInput(fileName));
const bool dirty = m_form->property("_q_resourcepathchanged").toBool();
if (dirty)
m_form->setDirty(true);