Commit 93bff697 authored by Morten Volden's avatar Morten Volden

Make ProjectsGenerator functions static again. Remove member var in tests.

parent c085215c
......@@ -41,7 +41,7 @@ public:
*
* Files are located in the OS temporary folder, subfolder 'simpleproject'
*/
KDevelop::IProject* GenerateSimpleProject();
static KDevelop::IProject* GenerateSimpleProject();
/**
* This actually does create the same directory structure as genereate simple project.
......@@ -54,7 +54,7 @@ public:
*
* Files are located in the OS temporary folder, subfolder 'simpleproject'
*/
KDevelop::IProject* GenerateSimpleProjectWithOutOfProjectFiles();
static KDevelop::IProject* GenerateSimpleProjectWithOutOfProjectFiles();
/**
* Generates a pointer to a project with the following directory structure:
......@@ -65,7 +65,7 @@ public:
*
* Files are located in the OS temporary folder, subfolder 'multipathproject'
*/
KDevelop::IProject* GenerateMultiPathProject();
static KDevelop::IProject* GenerateMultiPathProject();
/**
* Generates a pointer to a project with the following directory structure:
......@@ -74,7 +74,7 @@ public:
*
* Files are located in the OS temporary folder, subfolder 'emptyproject'
*/
KDevelop::IProject* GenerateEmptyProject();
static KDevelop::IProject* GenerateEmptyProject();
};
}
......
......@@ -203,7 +203,7 @@ void TestCompilerProvider::testStorageNewSystem()
void TestCompilerProvider::testCompilerIncludesAndDefinesForProject()
{
auto project = m_projectGenerator->GenerateMultiPathProject();
auto project = ProjectsGenerator::GenerateMultiPathProject();
Q_ASSERT(project);
auto settings = SettingsManager::globalInstance();
......
......@@ -35,7 +35,6 @@ using namespace KDevelop;
void TestDefinesAndIncludes::init()
{
m_projectGenerator = new ProjectsGenerator;
}
void TestDefinesAndIncludes::cleanupTestCase()
......@@ -52,12 +51,11 @@ void TestDefinesAndIncludes::initTestCase()
void TestDefinesAndIncludes::cleanup()
{
ICore::self()->projectController()->closeProject( m_currentProject );
delete m_projectGenerator;
}
void TestDefinesAndIncludes::loadSimpleProject()
{
m_currentProject = m_projectGenerator->GenerateSimpleProject();
m_currentProject = ProjectsGenerator::GenerateSimpleProject();
QVERIFY( m_currentProject );
auto manager = IDefinesAndIncludesManager::manager();
......@@ -79,7 +77,7 @@ void TestDefinesAndIncludes::loadSimpleProject()
void TestDefinesAndIncludes::loadMultiPathProject()
{
m_currentProject = m_projectGenerator->GenerateMultiPathProject();
m_currentProject = ProjectsGenerator::GenerateMultiPathProject();
QVERIFY( m_currentProject );
auto manager = IDefinesAndIncludesManager::manager();
......@@ -117,7 +115,7 @@ void TestDefinesAndIncludes::loadMultiPathProject()
void TestDefinesAndIncludes::testNoProjectIncludeDirectories()
{
m_currentProject = m_projectGenerator->GenerateSimpleProjectWithOutOfProjectFiles();
m_currentProject = ProjectsGenerator::GenerateSimpleProjectWithOutOfProjectFiles();
QVERIFY(m_currentProject);
auto manager = KDevelop::IDefinesAndIncludesManager::manager();
......@@ -138,7 +136,7 @@ void TestDefinesAndIncludes::testNoProjectIncludeDirectories()
void TestDefinesAndIncludes::testEmptyProject()
{
m_currentProject = m_projectGenerator->GenerateEmptyProject();
m_currentProject = ProjectsGenerator::GenerateEmptyProject();
QVERIFY(m_currentProject);
auto manager = KDevelop::IDefinesAndIncludesManager::manager();
......
......@@ -42,7 +42,6 @@ private Q_SLOTS:
void testEmptyProject();
private:
KDevelop::IProject* m_currentProject = nullptr;
KDevelop::ProjectsGenerator* m_projectGenerator = nullptr;
};
#endif
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