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

Fixed member variable prefix to be in line with coding standards

parent 1a775dd8
......@@ -114,7 +114,7 @@ private:
QString m_projectName;
// TODO probably need a CMake specific node structure
CMakeProjectNode* m_rootNode;
CMakeProjectNode *m_rootNode;
QStringList m_files;
QList<CMakeTarget> m_targets;
ProjectExplorer::ToolChain *m_toolChain;
......
......@@ -110,23 +110,23 @@ private:
QStringList readLines(const QString &absoluteFileName) const;
Manager *_manager;
QString _fileName;
QString _filesFileName;
QString _includesFileName;
QString _configFileName;
GenericProjectFile *_file;
QString _projectName;
QStringList _files;
QStringList _generated;
QStringList _includePaths;
QStringList _projectIncludePaths;
QByteArray _defines;
GenericProjectNode* _rootNode;
ProjectExplorer::ToolChain *_toolChain;
QString _toolChainId;
Manager *m_manager;
QString m_fileName;
QString m_filesFileName;
QString m_includesFileName;
QString m_configFileName;
GenericProjectFile *m_file;
QString m_projectName;
QStringList m_files;
QStringList m_generated;
QStringList m_includePaths;
QStringList m_projectIncludePaths;
QByteArray m_defines;
GenericProjectNode *m_rootNode;
ProjectExplorer::ToolChain *m_toolChain;
QString m_toolChainId;
};
class GenericProjectFile : public Core::IFile
......@@ -151,8 +151,8 @@ public:
virtual void modified(ReloadBehavior *behavior);
private:
GenericProject *_project;
QString _fileName;
GenericProject *m_project;
QString m_fileName;
};
class GenericBuildSettingsWidget : public ProjectExplorer::BuildStepConfigWidget
......@@ -171,9 +171,9 @@ private Q_SLOTS:
void buildDirectoryChanged();
private:
GenericProject *_project;
Core::Utils::PathChooser *_pathChooser;
QString _buildConfiguration;
GenericProject *m_project;
Core::Utils::PathChooser *m_pathChooser;
QString m_buildConfiguration;
};
} // namespace Internal
......
......@@ -19,12 +19,12 @@ using namespace GenericProjectManager::Internal;
ProjectFilesFactory::ProjectFilesFactory(Manager *manager,
TextEditor::TextEditorActionHandler *handler)
: Core::IEditorFactory(manager),
_manager(manager),
_actionHandler(handler)
m_manager(manager),
m_actionHandler(handler)
{
_mimeTypes.append(QLatin1String(Constants::FILES_MIMETYPE));
_mimeTypes.append(QLatin1String(Constants::INCLUDES_MIMETYPE));
_mimeTypes.append(QLatin1String(Constants::CONFIG_MIMETYPE));
m_mimeTypes.append(QLatin1String(Constants::FILES_MIMETYPE));
m_mimeTypes.append(QLatin1String(Constants::INCLUDES_MIMETYPE));
m_mimeTypes.append(QLatin1String(Constants::CONFIG_MIMETYPE));
}
ProjectFilesFactory::~ProjectFilesFactory()
......@@ -33,19 +33,19 @@ ProjectFilesFactory::~ProjectFilesFactory()
Manager *ProjectFilesFactory::manager() const
{
return _manager;
return m_manager;
}
Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
{
ProjectFilesEditor *ed = new ProjectFilesEditor(parent, this, _actionHandler);
ProjectFilesEditor *ed = new ProjectFilesEditor(parent, this, m_actionHandler);
TextEditor::TextEditorSettings::instance()->initializeEditor(ed);
return ed->editableInterface();
}
QStringList ProjectFilesFactory::mimeTypes() const
{
return _mimeTypes;
return m_mimeTypes;
}
QString ProjectFilesFactory::kind() const
......@@ -71,7 +71,7 @@ ProjectFilesEditable::ProjectFilesEditable(ProjectFilesEditor *editor)
: TextEditor::BaseTextEditorEditable(editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
_context << uidm->uniqueIdentifier(Constants::C_FILESEDITOR);
m_context << uidm->uniqueIdentifier(Constants::C_FILESEDITOR);
}
ProjectFilesEditable::~ProjectFilesEditable()
......@@ -79,7 +79,7 @@ ProjectFilesEditable::~ProjectFilesEditable()
QList<int> ProjectFilesEditable::context() const
{
return _context;
return m_context;
}
const char *ProjectFilesEditable::kind() const
......@@ -109,8 +109,8 @@ Core::IEditor *ProjectFilesEditable::duplicate(QWidget *parent)
ProjectFilesEditor::ProjectFilesEditor(QWidget *parent, ProjectFilesFactory *factory,
TextEditor::TextEditorActionHandler *handler)
: TextEditor::BaseTextEditor(parent),
_factory(factory),
_actionHandler(handler)
m_factory(factory),
m_actionHandler(handler)
{
Manager *manager = factory->manager();
ProjectFilesDocument *doc = new ProjectFilesDocument(manager);
......@@ -124,12 +124,12 @@ ProjectFilesEditor::~ProjectFilesEditor()
ProjectFilesFactory *ProjectFilesEditor::factory() const
{
return _factory;
return m_factory;
}
TextEditor::TextEditorActionHandler *ProjectFilesEditor::actionHandler() const
{
return _actionHandler;
return m_actionHandler;
}
TextEditor::BaseTextEditorEditable *ProjectFilesEditor::createEditableInterface()
......@@ -142,7 +142,7 @@ TextEditor::BaseTextEditorEditable *ProjectFilesEditor::createEditableInterface(
////////////////////////////////////////////////////////////////////////////////////////
ProjectFilesDocument::ProjectFilesDocument(Manager *manager)
: _manager(manager)
: m_manager(manager)
{
setMimeType(QLatin1String(Constants::FILES_MIMETYPE));
}
......@@ -155,6 +155,6 @@ bool ProjectFilesDocument::save(const QString &name)
if (! BaseTextDocument::save(name))
return false;
_manager->notifyChanged(name);
m_manager->notifyChanged(name);
return true;
}
......@@ -32,9 +32,9 @@ public:
virtual Core::IFile *open(const QString &fileName);
private:
Manager *_manager;
TextEditor::TextEditorActionHandler *_actionHandler;
QStringList _mimeTypes;
Manager *m_manager;
TextEditor::TextEditorActionHandler *m_actionHandler;
QStringList m_mimeTypes;
};
class ProjectFilesEditable: public TextEditor::BaseTextEditorEditable
......@@ -52,7 +52,7 @@ public:
virtual Core::IEditor *duplicate(QWidget *parent);
private:
QList<int> _context;
QList<int> m_context;
};
class ProjectFilesEditor: public TextEditor::BaseTextEditor
......@@ -70,8 +70,8 @@ public:
virtual TextEditor::BaseTextEditorEditable *createEditableInterface();
private:
ProjectFilesFactory *_factory;
TextEditor::TextEditorActionHandler *_actionHandler;
ProjectFilesFactory *m_factory;
TextEditor::TextEditorActionHandler *m_actionHandler;
};
class ProjectFilesDocument: public TextEditor::BaseTextDocument
......@@ -85,7 +85,7 @@ public:
virtual bool save(const QString &name);
private:
Manager *_manager;
Manager *m_manager;
};
} // end of namespace Internal
......
......@@ -42,18 +42,18 @@ using namespace GenericProjectManager::Internal;
Manager::Manager()
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
_projectContext = uidm->uniqueIdentifier(GenericProjectManager::Constants::PROJECTCONTEXT);
_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_projectContext = uidm->uniqueIdentifier(GenericProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
}
Manager::~Manager()
{ }
int Manager::projectContext() const
{ return _projectContext; }
{ return m_projectContext; }
int Manager::projectLanguage() const
{ return _projectLanguage; }
{ return m_projectLanguage; }
QString Manager::mimeType() const
{ return QLatin1String(Constants::GENERICMIMETYPE); }
......@@ -71,14 +71,14 @@ ProjectExplorer::Project *Manager::openProject(const QString &fileName)
}
void Manager::registerProject(GenericProject *project)
{ _projects.append(project); }
{ m_projects.append(project); }
void Manager::unregisterProject(GenericProject *project)
{ _projects.removeAll(project); }
{ m_projects.removeAll(project); }
void Manager::notifyChanged(const QString &fileName)
{
foreach (GenericProject *project, _projects) {
foreach (GenericProject *project, m_projects) {
if (fileName == project->filesFileName() ||
fileName == project->includesFileName() ||
fileName == project->configFileName())
......
......@@ -57,9 +57,9 @@ public:
void unregisterProject(GenericProject *project);
private:
int _projectContext;
int _projectLanguage;
QList<GenericProject *> _projects;
int m_projectContext;
int m_projectLanguage;
QList<GenericProject *> m_projects;
};
} // namespace Internal
......
......@@ -42,18 +42,18 @@ using namespace GenericProjectManager::Internal;
GenericProjectNode::GenericProjectNode(GenericProject *project, Core::IFile *projectFile)
: ProjectExplorer::ProjectNode(QFileInfo(projectFile->fileName()).absolutePath()),
_project(project),
_projectFile(projectFile)
m_project(project),
m_projectFile(projectFile)
{}
GenericProjectNode::~GenericProjectNode()
{ }
Core::IFile *GenericProjectNode::projectFile() const
{ return _projectFile; }
{ return m_projectFile; }
QString GenericProjectNode::projectFilePath() const
{ return _projectFile->fileName(); }
{ return m_projectFile->fileName(); }
void GenericProjectNode::refresh()
{
......@@ -65,22 +65,22 @@ void GenericProjectNode::refresh()
ProjectExplorerPlugin::instance()->setCurrentNode(0); // ### remove me
FileNode *projectFilesNode = new FileNode(_project->filesFileName(),
FileNode *projectFilesNode = new FileNode(m_project->filesFileName(),
ProjectFileType,
/* generated = */ false);
FileNode *projectIncludesNode = new FileNode(_project->includesFileName(),
FileNode *projectIncludesNode = new FileNode(m_project->includesFileName(),
ProjectFileType,
/* generated = */ false);
FileNode *projectConfigNode = new FileNode(_project->configFileName(),
FileNode *projectConfigNode = new FileNode(m_project->configFileName(),
ProjectFileType,
/* generated = */ false);
QStringList files = _project->files();
files.removeAll(_project->filesFileName());
files.removeAll(_project->includesFileName());
files.removeAll(_project->configFileName());
QStringList files = m_project->files();
files.removeAll(m_project->filesFileName());
files.removeAll(m_project->includesFileName());
files.removeAll(m_project->configFileName());
addFileNodes(QList<FileNode *>()
<< projectFilesNode
......@@ -119,7 +119,7 @@ void GenericProjectNode::refresh()
addFileNodes(fileNodes, folder);
}
_folderByName.clear();
m_folderByName.clear();
}
ProjectExplorer::FolderNode *GenericProjectNode::findOrCreateFolderByName(const QStringList &components, int end)
......@@ -138,11 +138,11 @@ ProjectExplorer::FolderNode *GenericProjectNode::findOrCreateFolderByName(const
if (component.isEmpty())
return this;
else if (FolderNode *folder = _folderByName.value(folderName))
else if (FolderNode *folder = m_folderByName.value(folderName))
return folder;
FolderNode *folder = new FolderNode(component);
_folderByName.insert(folderName, folder);
m_folderByName.insert(folderName, folder);
FolderNode *parent = findOrCreateFolderByName(components, end - 1);
if (! parent)
......
......@@ -76,9 +76,9 @@ private:
FolderNode *findOrCreateFolderByName(const QStringList &components, int end);
private:
GenericProject *_project;
Core::IFile *_projectFile;
QHash<QString, FolderNode *> _folderByName;
GenericProject *m_project;
Core::IFile *m_projectFile;
QHash<QString, FolderNode *> m_folderByName;
};
} // namespace Internal
......
......@@ -46,13 +46,13 @@ using namespace GenericProjectManager;
using namespace GenericProjectManager::Internal;
GenericProjectPlugin::GenericProjectPlugin()
: _projectFilesEditorFactory(0)
: m_projectFilesEditorFactory(0)
{ }
GenericProjectPlugin::~GenericProjectPlugin()
{
removeObject(_projectFilesEditorFactory);
delete _projectFilesEditorFactory;
removeObject(m_projectFilesEditorFactory);
delete m_projectFilesEditorFactory;
}
bool GenericProjectPlugin::initialize(const QStringList &, QString *errorMessage)
......@@ -72,8 +72,8 @@ bool GenericProjectPlugin::initialize(const QStringList &, QString *errorMessage
TextEditor::TextEditorActionHandler *actionHandler =
new TextEditor::TextEditorActionHandler(Constants::C_FILESEDITOR);
_projectFilesEditorFactory = new ProjectFilesFactory(manager, actionHandler);
addObject(_projectFilesEditorFactory);
m_projectFilesEditorFactory = new ProjectFilesFactory(manager, actionHandler);
addObject(m_projectFilesEditorFactory);
addAutoReleasedObject(manager);
addAutoReleasedObject(new MakeBuildStepFactory);
......
......@@ -51,7 +51,7 @@ public:
virtual void extensionsInitialized();
private:
ProjectFilesFactory *_projectFilesEditorFactory;
ProjectFilesFactory *m_projectFilesEditorFactory;
};
} // namespace Internal
......
......@@ -40,7 +40,7 @@ public:
virtual QVariant data(const QModelIndex &index, int role) const
{
if (index.column() == 0 && role == Qt::CheckStateRole) {
if (_selectedPaths.contains(index))
if (m_selectedPaths.contains(index))
return Qt::Checked;
return Qt::Unchecked;
......@@ -53,9 +53,9 @@ public:
{
if (index.column() == 0 && role == Qt::CheckStateRole) {
if (value.toBool())
_selectedPaths.insert(index);
m_selectedPaths.insert(index);
else
_selectedPaths.remove(index);
m_selectedPaths.remove(index);
return true;
}
......@@ -64,20 +64,20 @@ public:
}
void clearSelectedPaths()
{ _selectedPaths.clear(); }
{ m_selectedPaths.clear(); }
QSet<QString> selectedPaths() const
{
QSet<QString> paths;
foreach (const QModelIndex &index, _selectedPaths)
foreach (const QModelIndex &index, m_selectedPaths)
paths.insert(filePath(index));
return paths;
}
private:
QSet<QModelIndex> _selectedPaths;
QSet<QModelIndex> m_selectedPaths;
};
} // end of anonymous namespace
......@@ -98,10 +98,10 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(QWidget *parent)
firstPage->setTitle(tr("Project"));
QFormLayout *layout = new QFormLayout(firstPage);
_pathChooser = new PathChooser;
layout->addRow(tr("Source Directory:"), _pathChooser);
m_pathChooser = new PathChooser;
layout->addRow(tr("Source Directory:"), m_pathChooser);
_firstPageId = addPage(firstPage);
m_firstPageId = addPage(firstPage);
#if 0
// second page
......@@ -110,9 +110,9 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(QWidget *parent)
QFormLayout *secondPageLayout = new QFormLayout(secondPage);
_dirView = new QTreeView;
_dirModel = new DirModel(this);
_dirView->setModel(_dirModel);
m_dirView = new QTreeView;
m_dirModel = new DirModel(this);
m_dirView->setModel(_dirModel);
Core::ICore *core = Core::ICore::instance();
Core::MimeDatabase *mimeDatabase = core->mimeDatabase();
......@@ -127,10 +127,10 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(QWidget *parent)
nameFilters.append(nameFilter);
}
_filesView = new QListView;
_filesModel = new QDirModel(this);
_filesModel->setNameFilters(nameFilters);
_filesModel->setFilter(QDir::Files);
m_filesView = new QListView;
m_filesModel = new QDirModel(this);
m_filesModel->setNameFilters(nameFilters);
m_filesModel->setFilter(QDir::Files);
connect(_dirView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(updateFilesView(QModelIndex,QModelIndex)));
......@@ -138,7 +138,7 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(QWidget *parent)
secondPageLayout->addRow(_dirView);
secondPageLayout->addRow(_filesView);
_secondPageId = addPage(secondPage);
m_secondPageId = addPage(secondPage);
#endif
}
......@@ -146,34 +146,34 @@ GenericProjectWizardDialog::~GenericProjectWizardDialog()
{ }
QString GenericProjectWizardDialog::path() const
{ return _pathChooser->path(); }
{ return m_pathChooser->path(); }
void GenericProjectWizardDialog::updateFilesView(const QModelIndex &current,
const QModelIndex &)
{
if (! current.isValid())
_filesView->setModel(0);
m_filesView->setModel(0);
else {
const QString selectedPath = _dirModel->filePath(current);
const QString selectedPath = m_dirModel->filePath(current);
if (! _filesView->model())
_filesView->setModel(_filesModel);
if (! m_filesView->model())
m_filesView->setModel(m_filesModel);
_filesView->setRootIndex(_filesModel->index(selectedPath));
m_filesView->setRootIndex(m_filesModel->index(selectedPath));
}
}
void GenericProjectWizardDialog::initializePage(int id)
{
#if 0
if (id == _secondPageId) {
if (id == m_secondPageId) {
using namespace Core::Utils;
const QString projectPath = _pathChooser->path();
const QString projectPath = m_pathChooser->path();
QDirModel *dirModel = qobject_cast<QDirModel *>(_dirView->model());
_dirView->setRootIndex(dirModel->index(projectPath));
m_dirView->setRootIndex(dirModel->index(projectPath));
}
#endif
}
......@@ -182,10 +182,10 @@ bool GenericProjectWizardDialog::validateCurrentPage()
{
using namespace Core::Utils;
if (currentId() == _firstPageId) {
return ! _pathChooser->path().isEmpty();
if (currentId() == m_firstPageId) {
return ! m_pathChooser->path().isEmpty();
} else if (currentId() == _secondPageId) {
} else if (currentId() == m_secondPageId) {
return true;
}
......
......@@ -37,16 +37,16 @@ protected:
virtual bool validateCurrentPage();
private:
int _firstPageId;
int _secondPageId;
int m_firstPageId;
int m_secondPageId;
Core::Utils::PathChooser *_pathChooser;
Core::Utils::PathChooser *m_pathChooser;
QTreeView *_dirView;
QDirModel *_dirModel;
QTreeView *m_dirView;
QDirModel *m_dirModel;
QListView *_filesView;
QDirModel *_filesModel;
QListView *m_filesView;
QDirModel *m_filesModel;
};
class GenericProjectWizard : public Core::BaseFileWizard
......
......@@ -96,7 +96,7 @@ class MakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory
virtual QString displayNameForName(const QString &name) const;
};
}
}
} // namespace Internal
} // namespace GenericProjectManager
#endif // MAKESTEP_H
......@@ -14,10 +14,10 @@ PkgConfigTool::~PkgConfigTool()
QList<PkgConfigTool::Package> PkgConfigTool::packages() const
{
if (_packages.isEmpty())
if (m_packages.isEmpty())
packages_helper();
return _packages;
return m_packages;
}
void PkgConfigTool::packages_helper() const
......@@ -95,7 +95,6 @@ void PkgConfigTool::packages_helper() const
}
}
_packages.append(package);
m_packages.append(package);
}
}
......@@ -30,7 +30,7 @@ private:
void packages_helper() const;
private:
mutable QList<Package> _packages;
mutable QList<Package> m_packages;
};
} // end of namespace Internal
......
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