Commit 3df1d524 authored by hjk's avatar hjk

genericproject: cosmetics

parent e86b16cf
......@@ -45,6 +45,7 @@
#include <cplusplus/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
#include <QtCore/QDir>
......@@ -100,13 +101,19 @@ GenericTarget *GenericProject::activeTarget() const
}
QString GenericProject::filesFileName() const
{ return m_filesFileName; }
{
return m_filesFileName;
}
QString GenericProject::includesFileName() const
{ return m_includesFileName; }
{
return m_includesFileName;
}
QString GenericProject::configFileName() const
{ return m_configFileName; }
{
return m_configFileName;
}
static QStringList readLines(const QString &absoluteFileName)
{
......@@ -307,22 +314,34 @@ QStringList GenericProject::allIncludePaths() const
}
QStringList GenericProject::projectIncludePaths() const
{ return m_projectIncludePaths; }
{
return m_projectIncludePaths;
}
QStringList GenericProject::files() const
{ return m_files; }
{
return m_files;
}
QStringList GenericProject::generated() const
{ return m_generated; }
{
return m_generated;
}
QStringList GenericProject::includePaths() const
{ return m_includePaths; }
{
return m_includePaths;
}
void GenericProject::setIncludePaths(const QStringList &includePaths)
{ m_includePaths = includePaths; }
{
m_includePaths = includePaths;
}
QByteArray GenericProject::defines() const
{ return m_defines; }
{
return m_defines;
}
void GenericProject::setToolChain(ToolChain *tc)
{
......@@ -584,7 +603,7 @@ void GenericProjectFile::rename(const QString &newName)
{
// Can't happen
Q_UNUSED(newName);
Q_ASSERT(false);
QTC_ASSERT(false, /**/);
}
Core::IFile::ReloadBehavior GenericProjectFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
......
......@@ -51,17 +51,20 @@ Manager::Manager()
m_projectLanguage = Core::Context(ProjectExplorer::Constants::LANG_CXX);
}
Manager::~Manager()
{ }
Core::Context Manager::projectContext() const
{ return m_projectContext; }
{
return m_projectContext;
}
Core::Context Manager::projectLanguage() const
{ return m_projectLanguage; }
{
return m_projectLanguage;
}
QString Manager::mimeType() const
{ return QLatin1String(Constants::GENERICMIMETYPE); }
{
return QLatin1String(Constants::GENERICMIMETYPE);
}
ProjectExplorer::Project *Manager::openProject(const QString &fileName)
{
......@@ -83,19 +86,22 @@ ProjectExplorer::Project *Manager::openProject(const QString &fileName)
}
void Manager::registerProject(GenericProject *project)
{ m_projects.append(project); }
{
m_projects.append(project);
}
void Manager::unregisterProject(GenericProject *project)
{ m_projects.removeAll(project); }
{
m_projects.removeAll(project);
}
void Manager::notifyChanged(const QString &fileName)
{
foreach (GenericProject *project, m_projects) {
if (fileName == project->filesFileName()) {
project->refresh(GenericProject::Files);
}
else if (fileName == project->includesFileName() ||
fileName == project->configFileName()) {
} else if (fileName == project->includesFileName()
|| fileName == project->configFileName()) {
project->refresh(GenericProject::Configuration);
}
}
......
......@@ -48,7 +48,6 @@ class Manager : public ProjectExplorer::IProjectManager
public:
Manager();
virtual ~Manager();
virtual Core::Context projectContext() const;
virtual Core::Context projectLanguage() const;
......
......@@ -50,14 +50,15 @@ GenericProjectNode::GenericProjectNode(GenericProject *project, Core::IFile *pro
setDisplayName(QFileInfo(projectFile->fileName()).completeBaseName());
}
GenericProjectNode::~GenericProjectNode()
{ }
Core::IFile *GenericProjectNode::projectFile() const
{ return m_projectFile; }
{
return m_projectFile;
}
QString GenericProjectNode::projectFilePath() const
{ return m_projectFile->fileName(); }
{
return m_projectFile->fileName();
}
void GenericProjectNode::refresh()
{
......
......@@ -52,7 +52,6 @@ class GenericProjectNode : public ProjectExplorer::ProjectNode
{
public:
GenericProjectNode(GenericProject *project, Core::IFile *projectFile);
virtual ~GenericProjectNode();
Core::IFile *projectFile() const;
QString projectFilePath() const;
......
......@@ -65,10 +65,6 @@ GenericTarget::GenericTarget(GenericProject *parent) :
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
}
GenericTarget::~GenericTarget()
{
}
ProjectExplorer::BuildConfigWidget *GenericTarget::createConfigWidget()
{
return new GenericBuildSettingsWidget(this);
......@@ -106,10 +102,6 @@ GenericTargetFactory::GenericTargetFactory(QObject *parent) :
{
}
GenericTargetFactory::~GenericTargetFactory()
{
}
bool GenericTargetFactory::supportsTargetId(const QString &id) const
{
return id == QLatin1String(GENERIC_DESKTOP_TARGET_ID);
......
......@@ -63,7 +63,6 @@ class GenericTarget : public ProjectExplorer::Target
public:
explicit GenericTarget(GenericProject *parent);
~GenericTarget();
ProjectExplorer::BuildConfigWidget *createConfigWidget();
......@@ -85,7 +84,6 @@ class GenericTargetFactory : public ProjectExplorer::ITargetFactory
public:
explicit GenericTargetFactory(QObject *parent = 0);
~GenericTargetFactory();
bool supportsTargetId(const QString &id) const;
......
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