Commit 93b3dda6 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed member variable prefix to be in line with coding standards

parent 1a775dd8
...@@ -114,7 +114,7 @@ private: ...@@ -114,7 +114,7 @@ private:
QString m_projectName; QString m_projectName;
// TODO probably need a CMake specific node structure // TODO probably need a CMake specific node structure
CMakeProjectNode* m_rootNode; CMakeProjectNode *m_rootNode;
QStringList m_files; QStringList m_files;
QList<CMakeTarget> m_targets; QList<CMakeTarget> m_targets;
ProjectExplorer::ToolChain *m_toolChain; ProjectExplorer::ToolChain *m_toolChain;
......
...@@ -105,40 +105,40 @@ public: ...@@ -105,40 +105,40 @@ public:
} // end of anonymous namespace } // end of anonymous namespace
GenericProject::GenericProject(Manager *manager, const QString &fileName) GenericProject::GenericProject(Manager *manager, const QString &fileName)
: _manager(manager), : m_manager(manager),
_fileName(fileName), m_fileName(fileName),
_toolChain(0) m_toolChain(0)
{ {
QFileInfo fileInfo(_fileName); QFileInfo fileInfo(m_fileName);
const QString projectBaseName = fileInfo.baseName(); const QString projectBaseName = fileInfo.baseName();
QDir dir = fileInfo.dir(); QDir dir = fileInfo.dir();
_filesFileName = QFileInfo(dir, projectBaseName + QLatin1String(".files")).absoluteFilePath(); m_filesFileName = QFileInfo(dir, projectBaseName + QLatin1String(".files")).absoluteFilePath();
_includesFileName = QFileInfo(dir, projectBaseName + QLatin1String(".includes")).absoluteFilePath(); m_includesFileName = QFileInfo(dir, projectBaseName + QLatin1String(".includes")).absoluteFilePath();
_configFileName = QFileInfo(dir, projectBaseName + QLatin1String(".config")).absoluteFilePath(); m_configFileName = QFileInfo(dir, projectBaseName + QLatin1String(".config")).absoluteFilePath();
_file = new GenericProjectFile(this, fileName); m_file = new GenericProjectFile(this, fileName);
_rootNode = new GenericProjectNode(this, _file); m_rootNode = new GenericProjectNode(this, m_file);
_manager->registerProject(this); m_manager->registerProject(this);
} }
GenericProject::~GenericProject() GenericProject::~GenericProject()
{ {
_manager->unregisterProject(this); m_manager->unregisterProject(this);
delete _rootNode; delete m_rootNode;
delete _toolChain; delete m_toolChain;
} }
QString GenericProject::filesFileName() const QString GenericProject::filesFileName() const
{ return _filesFileName; } { return m_filesFileName; }
QString GenericProject::includesFileName() const QString GenericProject::includesFileName() const
{ return _includesFileName; } { return m_includesFileName; }
QString GenericProject::configFileName() const QString GenericProject::configFileName() const
{ return _configFileName; } { return m_configFileName; }
QStringList GenericProject::readLines(const QString &absoluteFileName) const QStringList GenericProject::readLines(const QString &absoluteFileName) const
{ {
...@@ -167,23 +167,23 @@ QStringList GenericProject::readLines(const QString &absoluteFileName) const ...@@ -167,23 +167,23 @@ QStringList GenericProject::readLines(const QString &absoluteFileName) const
void GenericProject::parseProject() void GenericProject::parseProject()
{ {
const QFileInfo projectFileInfo(_fileName); const QFileInfo projectFileInfo(m_fileName);
QSettings projectInfo(_fileName, QSettings::IniFormat); QSettings projectInfo(m_fileName, QSettings::IniFormat);
_files = convertToAbsoluteFiles(readLines(filesFileName())); m_files = convertToAbsoluteFiles(readLines(filesFileName()));
_files.removeDuplicates(); m_files.removeDuplicates();
_projectIncludePaths = readLines(includesFileName()); m_projectIncludePaths = readLines(includesFileName());
_projectIncludePaths.removeDuplicates(); m_projectIncludePaths.removeDuplicates();
_generated = convertToAbsoluteFiles(projectInfo.value(QLatin1String("generated")).toStringList()); m_generated = convertToAbsoluteFiles(projectInfo.value(QLatin1String("generated")).toStringList());
_defines.clear(); m_defines.clear();
QFile configFile(configFileName()); QFile configFile(configFileName());
if (configFile.open(QFile::ReadOnly)) if (configFile.open(QFile::ReadOnly))
_defines = configFile.readAll(); m_defines = configFile.readAll();
emit fileListChanged(); emit fileListChanged();
} }
...@@ -192,23 +192,23 @@ void GenericProject::refresh() ...@@ -192,23 +192,23 @@ void GenericProject::refresh()
{ {
parseProject(); parseProject();
_rootNode->refresh(); m_rootNode->refresh();
CppTools::CppModelManagerInterface *modelManager = CppTools::CppModelManagerInterface *modelManager =
ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>(); ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
if (_toolChain && modelManager) { if (m_toolChain && modelManager) {
const QByteArray predefinedMacros = _toolChain->predefinedMacros(); const QByteArray predefinedMacros = m_toolChain->predefinedMacros();
const QList<ProjectExplorer::HeaderPath> systemHeaderPaths = _toolChain->systemHeaderPaths(); const QList<ProjectExplorer::HeaderPath> systemHeaderPaths = m_toolChain->systemHeaderPaths();
CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this); CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
pinfo.defines = predefinedMacros; pinfo.defines = predefinedMacros;
pinfo.defines += '\n'; pinfo.defines += '\n';
pinfo.defines += _defines; pinfo.defines += m_defines;
QStringList allIncludePaths, allFrameworkPaths; QStringList allIncludePaths, allFrameworkPaths;
foreach (const ProjectExplorer::HeaderPath &headerPath, _toolChain->systemHeaderPaths()) { foreach (const ProjectExplorer::HeaderPath &headerPath, m_toolChain->systemHeaderPaths()) {
if (headerPath.kind() == ProjectExplorer::HeaderPath::FrameworkHeaderPath) if (headerPath.kind() == ProjectExplorer::HeaderPath::FrameworkHeaderPath)
allFrameworkPaths.append(headerPath.path()); allFrameworkPaths.append(headerPath.path());
...@@ -235,7 +235,7 @@ void GenericProject::refresh() ...@@ -235,7 +235,7 @@ void GenericProject::refresh()
QStringList GenericProject::convertToAbsoluteFiles(const QStringList &paths) const QStringList GenericProject::convertToAbsoluteFiles(const QStringList &paths) const
{ {
const QDir projectDir(QFileInfo(_fileName).dir()); const QDir projectDir(QFileInfo(m_fileName).dir());
QStringList absolutePaths; QStringList absolutePaths;
foreach (const QString &file, paths) { foreach (const QString &file, paths) {
QFileInfo fileInfo(projectDir, file); QFileInfo fileInfo(projectDir, file);
...@@ -248,63 +248,63 @@ QStringList GenericProject::convertToAbsoluteFiles(const QStringList &paths) con ...@@ -248,63 +248,63 @@ QStringList GenericProject::convertToAbsoluteFiles(const QStringList &paths) con
QStringList GenericProject::allIncludePaths() const QStringList GenericProject::allIncludePaths() const
{ {
QStringList paths; QStringList paths;
paths += _includePaths; paths += m_includePaths;
paths += _projectIncludePaths; paths += m_projectIncludePaths;
paths.removeDuplicates(); paths.removeDuplicates();
return paths; return paths;
} }
QStringList GenericProject::projectIncludePaths() const QStringList GenericProject::projectIncludePaths() const
{ return _projectIncludePaths; } { return m_projectIncludePaths; }
QStringList GenericProject::files() const QStringList GenericProject::files() const
{ return _files; } { return m_files; }
QStringList GenericProject::generated() const QStringList GenericProject::generated() const
{ return _generated; } { return m_generated; }
QStringList GenericProject::includePaths() const QStringList GenericProject::includePaths() const
{ return _includePaths; } { return m_includePaths; }
void GenericProject::setIncludePaths(const QStringList &includePaths) void GenericProject::setIncludePaths(const QStringList &includePaths)
{ _includePaths = includePaths; } { m_includePaths = includePaths; }
QByteArray GenericProject::defines() const QByteArray GenericProject::defines() const
{ return _defines; } { return m_defines; }
void GenericProject::setToolChainId(const QString &toolChainId) void GenericProject::setToolChainId(const QString &toolChainId)
{ {
using namespace ProjectExplorer; using namespace ProjectExplorer;
_toolChainId = toolChainId; m_toolChainId = toolChainId;
delete _toolChain; delete m_toolChain;
_toolChain = 0; m_toolChain = 0;
if (toolChainId == QLatin1String("mingw")) { if (toolChainId == QLatin1String("mingw")) {
const QLatin1String qmake_cxx("g++"); // ### FIXME const QLatin1String qmake_cxx("g++"); // ### FIXME
const QString mingwDirectory; // ### FIXME const QString mingwDirectory; // ### FIXME
_toolChain = ToolChain::createMinGWToolChain(qmake_cxx, mingwDirectory); m_toolChain = ToolChain::createMinGWToolChain(qmake_cxx, mingwDirectory);
} else if (toolChainId == QLatin1String("msvc")) { } else if (toolChainId == QLatin1String("msvc")) {
const QString msvcVersion; // ### FIXME const QString msvcVersion; // ### FIXME
_toolChain = ToolChain::createMSVCToolChain(msvcVersion); m_toolChain = ToolChain::createMSVCToolChain(msvcVersion);
} else if (toolChainId == QLatin1String("wince")) { } else if (toolChainId == QLatin1String("wince")) {
const QString msvcVersion, wincePlatform; // ### FIXME const QString msvcVersion, wincePlatform; // ### FIXME
_toolChain = ToolChain::createWinCEToolChain(msvcVersion, wincePlatform); m_toolChain = ToolChain::createWinCEToolChain(msvcVersion, wincePlatform);
} else if (toolChainId == QLatin1String("gcc") || toolChainId == QLatin1String("icc")) { } else if (toolChainId == QLatin1String("gcc") || toolChainId == QLatin1String("icc")) {
const QLatin1String qmake_cxx("g++"); // ### FIXME const QLatin1String qmake_cxx("g++"); // ### FIXME
_toolChain = ToolChain::createGccToolChain(qmake_cxx); m_toolChain = ToolChain::createGccToolChain(qmake_cxx);
} }
} }
QString GenericProject::buildParser(const QString &buildConfiguration) const QString GenericProject::buildParser(const QString &buildConfiguration) const
{ {
if (_toolChain) { if (m_toolChain) {
switch (_toolChain->type()) { switch (m_toolChain->type()) {
case ProjectExplorer::ToolChain::GCC: case ProjectExplorer::ToolChain::GCC:
case ProjectExplorer::ToolChain::LinuxICC: case ProjectExplorer::ToolChain::LinuxICC:
case ProjectExplorer::ToolChain::MinGW: case ProjectExplorer::ToolChain::MinGW:
...@@ -323,21 +323,21 @@ QString GenericProject::buildParser(const QString &buildConfiguration) const ...@@ -323,21 +323,21 @@ QString GenericProject::buildParser(const QString &buildConfiguration) const
} }
QString GenericProject::toolChainId() const QString GenericProject::toolChainId() const
{ return _toolChainId; } { return m_toolChainId; }
QString GenericProject::name() const QString GenericProject::name() const
{ {
return _projectName; return m_projectName;
} }
Core::IFile *GenericProject::file() const Core::IFile *GenericProject::file() const
{ {
return _file; return m_file;
} }
ProjectExplorer::IProjectManager *GenericProject::projectManager() const ProjectExplorer::IProjectManager *GenericProject::projectManager() const
{ {
return _manager; return m_manager;
} }
QList<ProjectExplorer::Project *> GenericProject::dependsOn() QList<ProjectExplorer::Project *> GenericProject::dependsOn()
...@@ -360,7 +360,7 @@ QString GenericProject::buildDirectory(const QString &buildConfiguration) const ...@@ -360,7 +360,7 @@ QString GenericProject::buildDirectory(const QString &buildConfiguration) const
QString buildDirectory = value(buildConfiguration, "buildDirectory").toString(); QString buildDirectory = value(buildConfiguration, "buildDirectory").toString();
if (buildDirectory.isEmpty()) { if (buildDirectory.isEmpty()) {
QFileInfo fileInfo(_fileName); QFileInfo fileInfo(m_fileName);
buildDirectory = fileInfo.absolutePath(); buildDirectory = fileInfo.absolutePath();
} }
...@@ -385,12 +385,12 @@ QList<ProjectExplorer::BuildStepConfigWidget*> GenericProject::subConfigWidgets( ...@@ -385,12 +385,12 @@ QList<ProjectExplorer::BuildStepConfigWidget*> GenericProject::subConfigWidgets(
GenericProjectNode *GenericProject::rootProjectNode() const GenericProjectNode *GenericProject::rootProjectNode() const
{ {
return _rootNode; return m_rootNode;
} }
QStringList GenericProject::files(FilesMode fileMode) const QStringList GenericProject::files(FilesMode fileMode) const
{ {
return _files; // ### TODO: handle generated files here. return m_files; // ### TODO: handle generated files here.
} }
QStringList GenericProject::targets() const QStringList GenericProject::targets() const
...@@ -450,30 +450,30 @@ void GenericProject::saveSettingsImpl(ProjectExplorer::PersistentSettingsWriter ...@@ -450,30 +450,30 @@ void GenericProject::saveSettingsImpl(ProjectExplorer::PersistentSettingsWriter
{ {
Project::saveSettingsImpl(writer); Project::saveSettingsImpl(writer);
writer.saveValue(QLatin1String("toolChain"), _toolChainId); writer.saveValue(QLatin1String("toolChain"), m_toolChainId);
writer.saveValue(QLatin1String("includePaths"), _includePaths); writer.saveValue(QLatin1String("includePaths"), m_includePaths);
} }
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
// GenericBuildSettingsWidget // GenericBuildSettingsWidget
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project) GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
: _project(project) : m_project(project)
{ {
QFormLayout *fl = new QFormLayout(this); QFormLayout *fl = new QFormLayout(this);
// build directory // build directory
_pathChooser = new Core::Utils::PathChooser(this); m_pathChooser = new Core::Utils::PathChooser(this);
_pathChooser->setEnabled(true); m_pathChooser->setEnabled(true);
fl->addRow(tr("Build directory:"), _pathChooser); fl->addRow(tr("Build directory:"), m_pathChooser);
connect(_pathChooser, SIGNAL(changed()), this, SLOT(buildDirectoryChanged())); connect(m_pathChooser, SIGNAL(changed()), this, SLOT(buildDirectoryChanged()));
// tool chain // tool chain
QComboBox *toolChainChooser = new QComboBox; QComboBox *toolChainChooser = new QComboBox;
toolChainChooser->addItems(ProjectExplorer::ToolChain::supportedToolChains()); toolChainChooser->addItems(ProjectExplorer::ToolChain::supportedToolChains());
toolChainChooser->setCurrentIndex(toolChainChooser->findText(_project->toolChainId())); toolChainChooser->setCurrentIndex(toolChainChooser->findText(m_project->toolChainId()));
fl->addRow(tr("Tool chain:"), toolChainChooser); fl->addRow(tr("Tool chain:"), toolChainChooser);
connect(toolChainChooser, SIGNAL(activated(QString)), _project, SLOT(setToolChainId(QString))); connect(toolChainChooser, SIGNAL(activated(QString)), m_project, SLOT(setToolChainId(QString)));
} }
GenericBuildSettingsWidget::~GenericBuildSettingsWidget() GenericBuildSettingsWidget::~GenericBuildSettingsWidget()
...@@ -484,13 +484,13 @@ QString GenericBuildSettingsWidget::displayName() const ...@@ -484,13 +484,13 @@ QString GenericBuildSettingsWidget::displayName() const
void GenericBuildSettingsWidget::init(const QString &buildConfiguration) void GenericBuildSettingsWidget::init(const QString &buildConfiguration)
{ {
_buildConfiguration = buildConfiguration; m_buildConfiguration = buildConfiguration;
_pathChooser->setPath(_project->buildDirectory(buildConfiguration)); m_pathChooser->setPath(m_project->buildDirectory(buildConfiguration));
} }
void GenericBuildSettingsWidget::buildDirectoryChanged() void GenericBuildSettingsWidget::buildDirectoryChanged()
{ {
_project->setValue(_buildConfiguration, "buildDirectory", _pathChooser->path()); m_project->setValue(m_buildConfiguration, "buildDirectory", m_pathChooser->path());
} }
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
...@@ -498,8 +498,8 @@ void GenericBuildSettingsWidget::buildDirectoryChanged() ...@@ -498,8 +498,8 @@ void GenericBuildSettingsWidget::buildDirectoryChanged()
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
GenericProjectFile::GenericProjectFile(GenericProject *parent, QString fileName) GenericProjectFile::GenericProjectFile(GenericProject *parent, QString fileName)
: Core::IFile(parent), : Core::IFile(parent),
_project(parent), m_project(parent),
_fileName(fileName) m_fileName(fileName)
{ } { }
GenericProjectFile::~GenericProjectFile() GenericProjectFile::~GenericProjectFile()
...@@ -512,7 +512,7 @@ bool GenericProjectFile::save(const QString &) ...@@ -512,7 +512,7 @@ bool GenericProjectFile::save(const QString &)
QString GenericProjectFile::fileName() const QString GenericProjectFile::fileName() const
{ {
return _fileName; return m_fileName;
} }
QString GenericProjectFile::defaultPath() const QString GenericProjectFile::defaultPath() const
......
...@@ -110,23 +110,23 @@ private: ...@@ -110,23 +110,23 @@ private:
QStringList readLines(const QString &absoluteFileName) const; QStringList readLines(const QString &absoluteFileName) const;
Manager *_manager; Manager *m_manager;
QString _fileName; QString m_fileName;
QString _filesFileName; QString m_filesFileName;
QString _includesFileName; QString m_includesFileName;
QString _configFileName; QString m_configFileName;
GenericProjectFile *_file; GenericProjectFile *m_file;
QString _projectName; QString m_projectName;
QStringList _files; QStringList m_files;
QStringList _generated; QStringList m_generated;
QStringList _includePaths; QStringList m_includePaths;
QStringList _projectIncludePaths; QStringList m_projectIncludePaths;
QByteArray _defines; QByteArray m_defines;
GenericProjectNode* _rootNode; GenericProjectNode *m_rootNode;
ProjectExplorer::ToolChain *_toolChain; ProjectExplorer::ToolChain *m_toolChain;
QString _toolChainId; QString m_toolChainId;
}; };
class GenericProjectFile : public Core::IFile class GenericProjectFile : public Core::IFile
...@@ -151,8 +151,8 @@ public: ...@@ -151,8 +151,8 @@ public:
virtual void modified(ReloadBehavior *behavior); virtual void modified(ReloadBehavior *behavior);
private: private:
GenericProject *_project; GenericProject *m_project;
QString _fileName; QString m_fileName;
}; };
class GenericBuildSettingsWidget : public ProjectExplorer::BuildStepConfigWidget class GenericBuildSettingsWidget : public ProjectExplorer::BuildStepConfigWidget
...@@ -171,9 +171,9 @@ private Q_SLOTS: ...@@ -171,9 +171,9 @@ private Q_SLOTS:
void buildDirectoryChanged(); void buildDirectoryChanged();
private: private:
GenericProject *_project; GenericProject *m_project;
Core::Utils::PathChooser *_pathChooser; Core::Utils::PathChooser *m_pathChooser;
QString _buildConfiguration; QString m_buildConfiguration;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -19,12 +19,12 @@ using namespace GenericProjectManager::Internal; ...@@ -19,12 +19,12 @@ using namespace GenericProjectManager::Internal;
ProjectFilesFactory::ProjectFilesFactory(Manager *manager, ProjectFilesFactory::ProjectFilesFactory(Manager *manager,
TextEditor::TextEditorActionHandler *handler) TextEditor::TextEditorActionHandler *handler)
: Core::IEditorFactory(manager), : Core::IEditorFactory(manager),
_manager(manager), m_manager(manager),
_actionHandler(handler) m_actionHandler(handler)
{ {
_mimeTypes.append(QLatin1String(Constants::FILES_MIMETYPE)); m_mimeTypes.append(QLatin1String(Constants::FILES_MIMETYPE));
_mimeTypes.append(QLatin1String(Constants::INCLUDES_MIMETYPE)); m_mimeTypes.append(QLatin1String(Constants::INCLUDES_MIMETYPE));
_mimeTypes.append(QLatin1String(Constants::CONFIG_MIMETYPE)); m_mimeTypes.append(QLatin1String(Constants::CONFIG_MIMETYPE));
} }
ProjectFilesFactory::~ProjectFilesFactory() ProjectFilesFactory::~ProjectFilesFactory()
...@@ -33,19 +33,19 @@ ProjectFilesFactory::~ProjectFilesFactory() ...@@ -33,19 +33,19 @@ ProjectFilesFactory::~ProjectFilesFactory()
Manager *ProjectFilesFactory::manager() const Manager *ProjectFilesFactory::manager() const
{ {
return _manager; return m_manager;