forked from qt-creator/qt-creator
Nim: Standardize Project classes setup
Change-Id: If95e98e406c1a9bacd75ccf3b58416185e6152a2 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -61,9 +61,6 @@ public:
|
||||
NimCodeStyleSettingsPage codeStyleSettingsPage;
|
||||
NimCodeStylePreferencesFactory codeStylePreferencesPage;
|
||||
NimToolchainFactory toolChainFactory;
|
||||
|
||||
NimProjectFactory nimProjectFactory;
|
||||
NimbleProjectFactory nimbleProjectFactory;
|
||||
};
|
||||
|
||||
class NimPlugin final : public ExtensionSystem::IPlugin
|
||||
@@ -80,6 +77,9 @@ class NimPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
d = new NimPluginPrivate;
|
||||
|
||||
setupNimProject();
|
||||
setupNimbleProject();
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
addTest<NimParserTest>();
|
||||
#endif
|
||||
|
||||
@@ -17,8 +17,8 @@ using namespace Utils;
|
||||
|
||||
namespace Nim {
|
||||
|
||||
NimbleProject::NimbleProject(const Utils::FilePath &fileName)
|
||||
: ProjectExplorer::Project(Constants::C_NIMBLE_MIMETYPE, fileName)
|
||||
NimbleProject::NimbleProject(const FilePath &fileName)
|
||||
: Project(Constants::C_NIMBLE_MIMETYPE, fileName)
|
||||
{
|
||||
setId(Constants::C_NIMBLEPROJECT_ID);
|
||||
setDisplayName(fileName.completeBaseName());
|
||||
@@ -50,9 +50,9 @@ void NimbleProject::setExcludedFiles(const QStringList &excludedFiles)
|
||||
m_excludedFiles = excludedFiles;
|
||||
}
|
||||
|
||||
// Factory
|
||||
// Setup
|
||||
|
||||
NimbleProjectFactory::NimbleProjectFactory()
|
||||
void setupNimbleProject()
|
||||
{
|
||||
ProjectManager::registerProjectType<NimbleProject>(Constants::C_NIMBLE_MIMETYPE);
|
||||
}
|
||||
|
||||
@@ -3,15 +3,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/project.h>
|
||||
|
||||
namespace Nim {
|
||||
|
||||
class NimbleProject : public ProjectExplorer::Project
|
||||
class NimbleProject final : public ProjectExplorer::Project
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NimbleProject(const Utils::FilePath &filename);
|
||||
|
||||
@@ -28,10 +25,6 @@ protected:
|
||||
QStringList m_excludedFiles;
|
||||
};
|
||||
|
||||
class NimbleProjectFactory
|
||||
{
|
||||
public:
|
||||
NimbleProjectFactory();
|
||||
};
|
||||
void setupNimbleProject();
|
||||
|
||||
} // Nim
|
||||
|
||||
@@ -19,7 +19,7 @@ using namespace Utils;
|
||||
|
||||
namespace Nim {
|
||||
|
||||
class NimProject : public Project
|
||||
class NimProject final : public Project
|
||||
{
|
||||
public:
|
||||
explicit NimProject(const FilePath &filePath);
|
||||
@@ -86,9 +86,9 @@ void NimProject::setExcludedFiles(const QStringList &excludedFiles)
|
||||
m_excludedFiles = excludedFiles;
|
||||
}
|
||||
|
||||
// Factory
|
||||
// Setup
|
||||
|
||||
NimProjectFactory::NimProjectFactory()
|
||||
void setupNimProject()
|
||||
{
|
||||
ProjectManager::registerProjectType<NimProject>(Constants::C_NIM_PROJECT_MIMETYPE);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
|
||||
namespace Nim {
|
||||
|
||||
class NimProjectFactory
|
||||
{
|
||||
public:
|
||||
NimProjectFactory();
|
||||
};
|
||||
void setupNimProject();
|
||||
|
||||
} // Nim
|
||||
|
||||
Reference in New Issue
Block a user