diff options
author | hjk <qtc-committer@nokia.com> | 2011-11-30 15:08:34 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-11-30 15:34:37 +0100 |
commit | 93a4237602a0cfbc56e60ff40f4713b810d9c1dd (patch) | |
tree | 4501436b651b6bf01bc77d9871d0fd5905b9ff7e | |
parent | 6d3657722065a1c75fe76e76dafb33de43b55a6e (diff) | |
download | qt-creator-93a4237602a0cfbc56e60ff40f4713b810d9c1dd.tar.gz |
autotools: minor cleanup
Change-Id: Ic7862a4a97e60ed016a53f5893e03e3f9ec11e53
Reviewed-by: Patricia Santana Cruz <patriciasc@openismus.com>
Reviewed-by: hjk <qthjk@ovi.com>
30 files changed, 62 insertions, 197 deletions
diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.cpp b/src/plugins/autotoolsprojectmanager/autogenstep.cpp index f5144e8d9c..876318c3f7 100644 --- a/src/plugins/autotoolsprojectmanager/autogenstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autogenstep.cpp @@ -54,10 +54,8 @@ using namespace AutotoolsProjectManager; using namespace AutotoolsProjectManager::Internal; using namespace ProjectExplorer; -namespace { const char AUTOGEN_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.AutogenStep.AdditionalArguments"; const char AUTOGEN_STEP_ID[] = "AutotoolsProjectManager.AutogenStep"; -} ///////////////////////////// // AutogenStepFactory class @@ -67,10 +65,6 @@ AutogenStepFactory::AutogenStepFactory(QObject *parent) : { } -AutogenStepFactory::~AutogenStepFactory() -{ -} - QStringList AutogenStepFactory::availableCreationIds(BuildStepList *parent) const { if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID)) @@ -160,10 +154,6 @@ void AutogenStep::ctor() setDefaultDisplayName(tr("Autogen")); } -AutogenStep::~AutogenStep() -{ -} - AutotoolsBuildConfiguration *AutogenStep::autotoolsBuildConfiguration() const { return static_cast<AutotoolsBuildConfiguration *>(buildConfiguration()); @@ -276,10 +266,6 @@ AutogenStepConfigWidget::AutogenStepConfigWidget(AutogenStep *autogenStep) : this, SLOT(updateDetails())); } -AutogenStepConfigWidget::~AutogenStepConfigWidget() -{ -} - QString AutogenStepConfigWidget::displayName() const { return tr("Autogen", "AutotoolsProjectManager::AutogenStepConfigWidget display name."); diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.h b/src/plugins/autotoolsprojectmanager/autogenstep.h index 4fa0590211..b9ddd3bfa7 100644 --- a/src/plugins/autotoolsprojectmanager/autogenstep.h +++ b/src/plugins/autotoolsprojectmanager/autogenstep.h @@ -63,7 +63,6 @@ class AutogenStepFactory : public ProjectExplorer::IBuildStepFactory public: AutogenStepFactory(QObject *parent = 0); - ~AutogenStepFactory(); QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const; QString displayNameForId(const QString &id) const; @@ -97,7 +96,6 @@ class AutogenStep : public ProjectExplorer::AbstractProcessStep public: AutogenStep(ProjectExplorer::BuildStepList *bsl); - ~AutogenStep(); AutotoolsBuildConfiguration *autotoolsBuildConfiguration() const; bool init(); @@ -140,12 +138,10 @@ class AutogenStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget public: AutogenStepConfigWidget(AutogenStep *autogenStep); - ~AutogenStepConfigWidget(); QString displayName() const; QString summaryText() const; - private slots: void updateDetails(); diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp index 2769ec50e5..1525ff8ef6 100644 --- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp @@ -53,10 +53,8 @@ using namespace AutotoolsProjectManager; using namespace AutotoolsProjectManager::Internal; using namespace ProjectExplorer; -namespace { const char AUTORECONF_STEP_ID[] = "AutotoolsProjectManager.AutoreconfStep"; const char AUTORECONF_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.AutoreconfStep.AdditionalArguments"; -} //////////////////////////////// // AutoreconfStepFactory class @@ -66,10 +64,6 @@ AutoreconfStepFactory::AutoreconfStepFactory(QObject *parent) : { } -AutoreconfStepFactory::~AutoreconfStepFactory() -{ -} - QStringList AutoreconfStepFactory::availableCreationIds(BuildStepList *parent) const { if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID)) @@ -159,10 +153,6 @@ void AutoreconfStep::ctor() setDefaultDisplayName(tr("Autoreconf")); } -AutoreconfStep::~AutoreconfStep() -{ -} - AutotoolsBuildConfiguration *AutoreconfStep::autotoolsBuildConfiguration() const { return static_cast<AutotoolsBuildConfiguration *>(buildConfiguration()); @@ -232,7 +222,7 @@ QString AutoreconfStep::additionalArguments() const QVariantMap AutoreconfStep::toMap() const { - QVariantMap map(AbstractProcessStep::toMap()); + QVariantMap map = AbstractProcessStep::toMap(); map.insert(QLatin1String(AUTORECONF_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments); return map; @@ -270,10 +260,6 @@ AutoreconfStepConfigWidget::AutoreconfStepConfigWidget(AutoreconfStep *autorecon this, SLOT(updateDetails())); } -AutoreconfStepConfigWidget::~AutoreconfStepConfigWidget() -{ -} - QString AutoreconfStepConfigWidget::displayName() const { return tr("Autoreconf", "AutotoolsProjectManager::AutoreconfStepConfigWidget display name."); diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.h b/src/plugins/autotoolsprojectmanager/autoreconfstep.h index bafe0df6a0..c5f6fe0769 100644 --- a/src/plugins/autotoolsprojectmanager/autoreconfstep.h +++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.h @@ -36,7 +36,6 @@ #define AUTORECONFSTEP_H #include <projectexplorer/abstractprocessstep.h> -#include <QtGui/QLineEdit> QT_BEGIN_NAMESPACE class QLineEdit; @@ -63,7 +62,6 @@ class AutoreconfStepFactory : public ProjectExplorer::IBuildStepFactory public: AutoreconfStepFactory(QObject *parent = 0); - ~AutoreconfStepFactory(); QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const; QString displayNameForId(const QString &id) const; @@ -97,9 +95,7 @@ class AutoreconfStep : public ProjectExplorer::AbstractProcessStep friend class AutoreconfStepConfigWidget; public: - AutoreconfStep(ProjectExplorer::BuildStepList *bsl); - ~AutoreconfStep(); AutotoolsBuildConfiguration *autotoolsBuildConfiguration() const; bool init(); @@ -142,7 +138,6 @@ class AutoreconfStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget public: AutoreconfStepConfigWidget(AutoreconfStep *autoreconfStep); - ~AutoreconfStepConfigWidget(); QString displayName() const; QString summaryText() const; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp index 80f7ba3ab0..a194354f9b 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp @@ -74,13 +74,9 @@ AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(AutotoolsTarget *parent cloneSteps(source); } -AutotoolsBuildConfiguration::~AutotoolsBuildConfiguration() -{ -} - QVariantMap AutotoolsBuildConfiguration::toMap() const { - QVariantMap map(ProjectExplorer::BuildConfiguration::toMap()); + QVariantMap map = ProjectExplorer::BuildConfiguration::toMap(); map.insert(QLatin1String(Constants::BUILD_DIRECTORY_KEY), m_buildDirectory); return map; } @@ -128,10 +124,6 @@ AutotoolsBuildConfigurationFactory::AutotoolsBuildConfigurationFactory(QObject * { } -AutotoolsBuildConfigurationFactory::~AutotoolsBuildConfigurationFactory() -{ -} - QStringList AutotoolsBuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const { if (!qobject_cast<AutotoolsTarget *>(parent)) @@ -160,8 +152,8 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(ProjectE if (!canCreate(parent, id)) return 0; - AutotoolsTarget *t(static_cast<AutotoolsTarget *>(parent)); - AutotoolsBuildConfiguration *bc =createDefaultConfiguration(t); + AutotoolsTarget *t = static_cast<AutotoolsTarget *>(parent); + AutotoolsBuildConfiguration *bc = createDefaultConfiguration(t); bool ok; QString buildConfigurationName = QInputDialog::getText(0, diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h index 9889a1c677..9c772f7196 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h @@ -50,7 +50,6 @@ class AutotoolsBuildConfiguration : public ProjectExplorer::BuildConfiguration public: explicit AutotoolsBuildConfiguration(AutotoolsTarget *parent); - ~AutotoolsBuildConfiguration(); AutotoolsTarget *autotoolsTarget() const; QString buildDirectory() const; @@ -75,7 +74,6 @@ class AutotoolsBuildConfigurationFactory : public ProjectExplorer::IBuildConfigu public: explicit AutotoolsBuildConfigurationFactory(QObject *parent = 0); - ~AutotoolsBuildConfigurationFactory(); QStringList availableCreationIds(ProjectExplorer::Target *parent) const; QString displayNameForId(const QString &id) const; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp index 7d05b051e6..44735a624a 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp @@ -82,10 +82,6 @@ AutotoolsBuildSettingsWidget::AutotoolsBuildSettingsWidget(AutotoolsTarget *targ this, SLOT(updateToolChainList())); } -AutotoolsBuildSettingsWidget::~AutotoolsBuildSettingsWidget() -{ -} - QString AutotoolsBuildSettingsWidget::displayName() const { return QLatin1String("Autotools Manager"); @@ -113,7 +109,7 @@ void AutotoolsBuildSettingsWidget::toolChainSelected(int index) void AutotoolsBuildSettingsWidget::toolChainChanged(ProjectExplorer::ToolChain *tc) { for (int i = 0; i < m_toolChainChooser->count(); ++i) { - ToolChain * currentTc = static_cast<ToolChain *>(m_toolChainChooser->itemData(i).value<void *>()); + ToolChain *currentTc = static_cast<ToolChain *>(m_toolChainChooser->itemData(i).value<void *>()); if (currentTc != tc) continue; m_toolChainChooser->setCurrentIndex(i); diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.h index 6fc3be08ad..2cf39a5c11 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.h @@ -63,16 +63,15 @@ class AutotoolsBuildSettingsWidget : public ProjectExplorer::BuildConfigWidget Q_OBJECT public: - AutotoolsBuildSettingsWidget(AutotoolsTarget* target); - ~AutotoolsBuildSettingsWidget(); + explicit AutotoolsBuildSettingsWidget(AutotoolsTarget *target); QString displayName() const; - void init(ProjectExplorer::BuildConfiguration* bc); + void init(ProjectExplorer::BuildConfiguration *bc); private slots: void buildDirectoryChanged(); void toolChainSelected(int index); - void toolChainChanged(ProjectExplorer::ToolChain *); + void toolChainChanged(ProjectExplorer::ToolChain *tc); void updateToolChainList(); private: diff --git a/src/plugins/autotoolsprojectmanager/autotoolsmanager.cpp b/src/plugins/autotoolsprojectmanager/autotoolsmanager.cpp index 474fb6997e..aabd378b93 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsmanager.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsmanager.cpp @@ -43,17 +43,10 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/session.h> -using namespace AutotoolsProjectManager::Internal; +namespace AutotoolsProjectManager { +namespace Internal { -AutotoolsManager::AutotoolsManager() -{ -} - -AutotoolsManager::~AutotoolsManager() -{ -} - -ProjectExplorer::Project *AutotoolsManager::openProject(const QString& fileName, QString *errorString) +ProjectExplorer::Project *AutotoolsManager::openProject(const QString &fileName, QString *errorString) { QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath(); @@ -81,3 +74,6 @@ QString AutotoolsManager::mimeType() const { return QLatin1String(Constants::MAKEFILE_MIMETYPE); } + +} // namespace Internal +} // namespace AutotoolsProjectManager diff --git a/src/plugins/autotoolsprojectmanager/autotoolsmanager.h b/src/plugins/autotoolsprojectmanager/autotoolsmanager.h index 2f9aaa6d1e..7f4048bf33 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsmanager.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsmanager.h @@ -52,10 +52,9 @@ class AutotoolsManager : public ProjectExplorer::IProjectManager Q_OBJECT public: - AutotoolsManager(); - ~AutotoolsManager(); + AutotoolsManager() {} - ProjectExplorer::Project *openProject(const QString& fileName, QString *errorString); + ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString); QString mimeType() const; }; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp index d53a42acc9..13a85d2f52 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp @@ -61,10 +61,6 @@ AutotoolsOpenProjectWizard::AutotoolsOpenProjectWizard(AutotoolsManager *manager init(); } -AutotoolsOpenProjectWizard::~AutotoolsOpenProjectWizard() -{ -} - void AutotoolsOpenProjectWizard::init() { setOption(QWizard::NoBackButtonOnStartPage); diff --git a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.h b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.h index 5a1056a723..043136399c 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.h @@ -46,6 +46,7 @@ class AutotoolsManager; class AutotoolsOpenProjectWizard : public Utils::Wizard { Q_OBJECT + public: enum PageId { @@ -56,8 +57,6 @@ public: const QString &sourceDirectory, QWidget *parent = 0); - ~AutotoolsOpenProjectWizard(); - QString buildDirectory() const; QString sourceDirectory() const; void setBuildDirectory(const QString &directory); @@ -73,10 +72,13 @@ private: class BuildPathPage : public QWizardPage { Q_OBJECT + public: explicit BuildPathPage(AutotoolsOpenProjectWizard *wizard); + private slots: void buildDirectoryChanged(); + private: AutotoolsOpenProjectWizard *m_wizard; Utils::PathChooser *m_pc; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index 7a1a514d8e..a26cd864d7 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -65,9 +65,7 @@ using namespace AutotoolsProjectManager; using namespace AutotoolsProjectManager::Internal; using namespace ProjectExplorer; -namespace { const char TOOLCHAIN_KEY[] = "AutotoolsProjectManager.AutotoolsProject.Toolchain"; -} AutotoolsProject::AutotoolsProject(AutotoolsManager *manager, const QString &fileName) : m_manager(manager), @@ -135,7 +133,7 @@ QString AutotoolsProject::id() const return QLatin1String(Constants::AUTOTOOLS_PROJECT_ID); } -Core::IFile* AutotoolsProject::file() const +Core::IFile *AutotoolsProject::file() const { return m_file; } @@ -150,7 +148,7 @@ AutotoolsTarget *AutotoolsProject::activeTarget() const return static_cast<AutotoolsTarget *>(Project::activeTarget()); } -QList<ProjectExplorer::Project*> AutotoolsProject::dependsOn() +QList<ProjectExplorer::Project *> AutotoolsProject::dependsOn() { return QList<Project *>(); } @@ -185,7 +183,7 @@ QString AutotoolsProject::sourceDirectory() const QVariantMap AutotoolsProject::toMap() const { - QVariantMap map(Project::toMap()); + QVariantMap map = Project::toMap(); map.insert(QLatin1String(TOOLCHAIN_KEY), m_toolChain ? m_toolChain->id() : QString()); return map; } @@ -321,7 +319,7 @@ void AutotoolsProject::makefileParsingFinished() // Watch for changes of Makefile.am files. If a Makefile.am file // has been changed, the project tree must be reparsed. const QStringList makefiles = m_makefileParserThread->makefiles(); - foreach (const QString& makefile, makefiles) { + foreach (const QString &makefile, makefiles) { files.append(makefile); const QString watchedFile = dir.absoluteFilePath(makefile); @@ -329,7 +327,7 @@ void AutotoolsProject::makefileParsingFinished() m_watchedFiles.append(watchedFile); } - // Add configure.ac file to project and watch for changes + // Add configure.ac file to project and watch for changes. const QLatin1String configureAc(QLatin1String("configure.ac")); const QFile configureAcFile(fileInfo.absolutePath() + QChar('/') + configureAc); if (configureAcFile.exists()) { @@ -366,17 +364,17 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory, // Get all existing nodes and remember them in a hash table. // This allows to reuse existing nodes and to remove obsolete // nodes later. - QHash<QString, ProjectExplorer::Node*> nodeHash; - foreach (ProjectExplorer::Node* node, nodes(m_rootNode)) + QHash<QString, ProjectExplorer::Node *> nodeHash; + foreach (ProjectExplorer::Node * node, nodes(m_rootNode)) nodeHash.insert(node->path(), node); // Add the sources to the filenode project tree. Sources // inside the same directory are grouped into a folder-node. const QString baseDir = directory.absolutePath(); - QList<ProjectExplorer::FileNode*> fileNodes; - ProjectExplorer::FolderNode* parentFolder = 0; - ProjectExplorer::FolderNode* oldParentFolder = 0; + QList<ProjectExplorer::FileNode *> fileNodes; + ProjectExplorer::FolderNode *parentFolder = 0; + ProjectExplorer::FolderNode *oldParentFolder = 0; foreach (const QString& file, files) { if (file.contains(QLatin1String(".moc"))) @@ -417,7 +415,7 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory, if (nodeHash.contains(filePath)) { nodeHash.remove(filePath); } else { - ProjectExplorer::FileNode* node = + ProjectExplorer::FileNode *node = new ProjectExplorer::FileNode(filePath, ProjectExplorer::ResourceType, false); @@ -429,16 +427,16 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory, m_rootNode->addFileNodes(fileNodes, parentFolder); // Remove unused file nodes and empty folder nodes - QHash<QString, ProjectExplorer::Node*>::const_iterator it = nodeHash.constBegin(); + QHash<QString, ProjectExplorer::Node *>::const_iterator it = nodeHash.constBegin(); while (it != nodeHash.constEnd()) { if ((*it)->nodeType() == ProjectExplorer::FileNodeType) { - ProjectExplorer::FileNode* fileNode = static_cast<ProjectExplorer::FileNode*>(*it); + ProjectExplorer::FileNode *fileNode = static_cast<ProjectExplorer::FileNode *>(*it); ProjectExplorer::FolderNode* parent = fileNode->parentFolderNode(); - m_rootNode->removeFileNodes(QList<ProjectExplorer::FileNode*>() << fileNode, parent); + m_rootNode->removeFileNodes(QList<ProjectExplorer::FileNode *>() << fileNode, parent); // Remove all empty parent folders while (parent->subFolderNodes().isEmpty() && parent->fileNodes().isEmpty()) { - ProjectExplorer::FolderNode* grandParent = parent->parentFolderNode(); + ProjectExplorer::FolderNode *grandParent = parent->parentFolderNode(); m_rootNode->removeFolderNodes(QList<ProjectExplorer::FolderNode *>() << parent, grandParent); parent = grandParent; if (parent == m_rootNode) @@ -449,8 +447,8 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory, } } -ProjectExplorer::FolderNode* AutotoolsProject::insertFolderNode(const QDir &nodeDir, - QHash<QString, ProjectExplorer::Node*> &nodes) +ProjectExplorer::FolderNode *AutotoolsProject::insertFolderNode(const QDir &nodeDir, + QHash<QString, ProjectExplorer::Node *> &nodes) { const QString nodePath = nodeDir.absolutePath(); QFileInfo rootInfo(m_rootNode->path()); @@ -460,41 +458,41 @@ ProjectExplorer::FolderNode* AutotoolsProject::insertFolderNode(const QDir &node if (rootPath == nodePath) return 0; - ProjectExplorer::FolderNode* folder = new ProjectExplorer::FolderNode(nodePath); + ProjectExplorer::FolderNode *folder = new ProjectExplorer::FolderNode(nodePath); QDir dir(nodeDir); folder->setDisplayName(dir.dirName()); // Get parent-folder. If it does not exist, create it recursively. // Take care that the m_rootNode is considered as top folder. - ProjectExplorer::FolderNode* parentFolder = m_rootNode; + ProjectExplorer::FolderNode *parentFolder = m_rootNode; if ((rootPath != folder->path()) && dir.cdUp()) { const QString parentDir = dir.absolutePath(); if (!nodes.contains(parentDir)) { - ProjectExplorer::FolderNode* insertedFolder = insertFolderNode(parentDir, nodes); + ProjectExplorer::FolderNode *insertedFolder = insertFolderNode(parentDir, nodes); if (insertedFolder != 0) parentFolder = insertedFolder; } else { QTC_ASSERT(nodes[parentDir]->nodeType() == ProjectExplorer::FolderNodeType, return 0); - parentFolder = static_cast<ProjectExplorer::FolderNode*>(nodes[parentDir]); + parentFolder = static_cast<ProjectExplorer::FolderNode *>(nodes[parentDir]); } } - m_rootNode->addFolderNodes(QList<ProjectExplorer::FolderNode*>() << folder, parentFolder); + m_rootNode->addFolderNodes(QList<ProjectExplorer::FolderNode *>() << folder, parentFolder); nodes.insert(nodePath, folder); return folder; } -QList<ProjectExplorer::Node*> AutotoolsProject::nodes(ProjectExplorer::FolderNode *parent) const +QList<ProjectExplorer::Node *> AutotoolsProject::nodes(ProjectExplorer::FolderNode *parent) const { - QList<ProjectExplorer::Node*> list; + QList<ProjectExplorer::Node *> list; QTC_ASSERT(parent != 0, return list); - foreach (ProjectExplorer::FolderNode* folder, parent->subFolderNodes()) { + foreach (ProjectExplorer::FolderNode *folder, parent->subFolderNodes()) { list.append(nodes(folder)); list.append(folder); } - foreach (ProjectExplorer::FileNode* file, parent->fileNodes()) + foreach (ProjectExplorer::FileNode *file, parent->fileNodes()) list.append(file); return list; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.h b/src/plugins/autotoolsprojectmanager/autotoolsproject.h index e84c56c992..e495eeb968 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.h @@ -84,7 +84,7 @@ public: QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets(); ProjectExplorer::ProjectNode *rootProjectNode() const; QStringList files(FilesMode fileMode) const; - QList<ProjectExplorer::Project*> dependsOn(); + QList<ProjectExplorer::Project *> dependsOn(); QString defaultBuildDirectory() const; QString sourceDirectory() const; QStringList buildTargets() const; @@ -93,7 +93,7 @@ public: QVariantMap toMap() const; signals: - void toolChainChanged(ProjectExplorer::ToolChain *); + void toolChainChanged(ProjectExplorer::ToolChain *tc); protected: bool fromMap(const QVariantMap &map); @@ -137,13 +137,13 @@ private: * the directory \p nodeDir and inserts it into \p nodes. If no parent * folder exists, it will be created recursively. */ - ProjectExplorer::FolderNode* insertFolderNode(const QDir &nodeDir, - QHash<QString, ProjectExplorer::Node*> &nodes); + ProjectExplorer::FolderNode *insertFolderNode(const QDir &nodeDir, + QHash<QString, ProjectExplorer::Node *> &nodes); /** * @return All nodes (including sub-folder- and file-nodes) for the given parent folder. */ - QList<ProjectExplorer::Node*> nodes(ProjectExplorer::FolderNode *parent) const; + QList<ProjectExplorer::Node *> nodes(ProjectExplorer::FolderNode *parent) const; /** * This function is in charge of the code completion. diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.cpp b/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.cpp index cdbb2b13ff..48ca34ad14 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.cpp @@ -46,10 +46,6 @@ AutotoolsProjectFile::AutotoolsProjectFile(AutotoolsProject *project, const QStr { } -AutotoolsProjectFile::~AutotoolsProjectFile() -{ -} - bool AutotoolsProjectFile::save(QString *errorString, const QString &fileName, bool autoSave) { Q_UNUSED(errorString); diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.h b/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.h index 9bf70aa1ad..4bc6c1bb6a 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectfile.h @@ -58,7 +58,6 @@ class AutotoolsProjectFile : public Core::IFile public: AutotoolsProjectFile(AutotoolsProject *project, const QString &fileName); - ~AutotoolsProjectFile(); bool save(QString *errorString, const QString &fileName, bool autoSave); QString fileName() const; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp index 52feb0368d..22504879bf 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp @@ -45,10 +45,6 @@ AutotoolsProjectNode::AutotoolsProjectNode(AutotoolsProject *project, Core::IFil { } -AutotoolsProjectNode::~AutotoolsProjectNode() -{ -} - bool AutotoolsProjectNode::hasBuildTargets() const { return true; diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h index a615ce86bd..e0963f77a8 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h @@ -58,7 +58,6 @@ class AutotoolsProjectNode : public ProjectExplorer::ProjectNode public: AutotoolsProjectNode(AutotoolsProject *project, Core::IFile *projectFile); - ~AutotoolsProjectNode(); bool hasBuildTargets() const; QList<ProjectExplorer::ProjectNode::ProjectAction> supportedActions(Node *node) const; @@ -69,7 +68,7 @@ public: const QStringList &filePaths, QStringList *notAdded = 0); bool removeFiles(const ProjectExplorer::FileType fileType, - const QStringList& filePaths, + const QStringList &filePaths, QStringList *notRemoved = 0); bool deleteFiles(const ProjectExplorer::FileType fileType, const QStringList &filePaths); diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.cpp b/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.cpp index 2e53addffc..3b36754115 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.cpp @@ -54,10 +54,6 @@ AutotoolsProjectPlugin::AutotoolsProjectPlugin() { } -AutotoolsProjectPlugin::~AutotoolsProjectPlugin() -{ -} - void AutotoolsProjectPlugin::extensionsInitialized() { } @@ -73,11 +69,11 @@ bool AutotoolsProjectPlugin::initialize(const QStringList &arguments, addAutoReleasedObject(new AutotoolsTargetFactory); addAutoReleasedObject(new AutotoolsBuildConfigurationFactory); - addAutoReleasedObject(new MakeStepFactory()); - addAutoReleasedObject(new AutogenStepFactory()); - addAutoReleasedObject(new ConfigureStepFactory()); - addAutoReleasedObject(new AutoreconfStepFactory()); - addAutoReleasedObject(new AutotoolsManager()); + addAutoReleasedObject(new MakeStepFactory); + addAutoReleasedObject(new AutogenStepFactory); + addAutoReleasedObject(new ConfigureStepFactory); + addAutoReleasedObject(new AutoreconfStepFactory); + addAutoReleasedObject(new AutotoolsManager); return true; } diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.h b/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.h index 2b5e15c435..e7210d0ac3 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectplugin.h @@ -72,7 +72,6 @@ class AutotoolsProjectPlugin : public ExtensionSystem::IPlugin { public: AutotoolsProjectPlugin(); - ~AutotoolsProjectPlugin(); void extensionsInitialized(); bool initialize(const QStringList &arguments, QString *errorString); diff --git a/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp b/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp index 1c32bec871..fe033fcd67 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp @@ -53,15 +53,13 @@ using namespace AutotoolsProjectManager; using namespace AutotoolsProjectManager::Internal; -namespace { - -QString displayNameForId(const QString &id) { +static QString displayNameForId(const QString &id) +{ if (id == QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID)) return QApplication::translate("AutotoolsProjectManager::Internal::AutotoolsTarget", "Desktop", "Autotools Default target display name"); return QString(); } -} ////////////////////////// // AutotoolsTarget class @@ -75,10 +73,6 @@ AutotoolsTarget::AutotoolsTarget(AutotoolsProject *parent) : setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon)); } -AutotoolsTarget::~AutotoolsTarget() -{ -} - ProjectExplorer::BuildConfigWidget *AutotoolsTarget::createConfigWidget() { return new AutotoolsBuildSettingsWidget(this); @@ -118,10 +112,6 @@ AutotoolsTargetFactory::AutotoolsTargetFactory(QObject *parent) : { } -AutotoolsTargetFactory::~AutotoolsTargetFactory() -{ -} - bool AutotoolsTargetFactory::supportsTargetId(const QString &id) const { return id == QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID); diff --git a/src/plugins/autotoolsprojectmanager/autotoolstarget.h b/src/plugins/autotoolsprojectmanager/autotoolstarget.h index 6ac9481af8..636a098318 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolstarget.h +++ b/src/plugins/autotoolsprojectmanager/autotoolstarget.h @@ -57,7 +57,6 @@ class AutotoolsTarget : public ProjectExplorer::Target public: explicit AutotoolsTarget(AutotoolsProject *parent); - ~AutotoolsTarget(); ProjectExplorer::BuildConfigWidget *createConfigWidget(); AutotoolsProject *autotoolsProject() const; @@ -82,7 +81,6 @@ class AutotoolsTargetFactory : public ProjectExplorer::ITargetFactory public: explicit AutotoolsTargetFactory(QObject *parent = 0); - ~AutotoolsTargetFactory(); bool supportsTargetId(const QString &id) const; diff --git a/src/plugins/autotoolsprojectmanager/configurestep.cpp b/src/plugins/autotoolsprojectmanager/configurestep.cpp index 80037bb0a6..7098e9aec6 100644 --- a/src/plugins/autotoolsprojectmanager/configurestep.cpp +++ b/src/plugins/autotoolsprojectmanager/configurestep.cpp @@ -54,10 +54,8 @@ using namespace AutotoolsProjectManager; using namespace AutotoolsProjectManager::Internal; using namespace ProjectExplorer; -namespace { const char CONFIGURE_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.ConfigureStep.AdditionalArguments"; const char CONFIGURE_STEP_ID[] = "AutotoolsProjectManager.ConfigureStep"; -} //////////////////////////////// // ConfigureStepFactory Class @@ -67,10 +65,6 @@ ConfigureStepFactory::ConfigureStepFactory(QObject *parent) : { } -ConfigureStepFactory::~ConfigureStepFactory() -{ -} - QStringList ConfigureStepFactory::availableCreationIds(BuildStepList *parent) const { if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID)) @@ -160,10 +154,6 @@ void ConfigureStep::ctor() setDefaultDisplayName(tr("Configure")); } -ConfigureStep::~ConfigureStep() -{ -} - AutotoolsBuildConfiguration *ConfigureStep::autotoolsBuildConfiguration() const { return static_cast<AutotoolsBuildConfiguration *>(buildConfiguration()); @@ -236,7 +226,7 @@ QString ConfigureStep::additionalArguments() const QVariantMap ConfigureStep::toMap() const { - QVariantMap map(AbstractProcessStep::toMap()); + QVariantMap map = AbstractProcessStep::toMap(); map.insert(QLatin1String(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments); return map; @@ -274,10 +264,6 @@ ConfigureStepConfigWidget::ConfigureStepConfigWidget(ConfigureStep *configureSte this, SLOT(updateDetails())); } -ConfigureStepConfigWidget::~ConfigureStepConfigWidget() -{ -} - QString ConfigureStepConfigWidget::displayName() const { return tr("Configure", "AutotoolsProjectManager::ConfigureStepConfigWidget display name."); diff --git a/src/plugins/autotoolsprojectmanager/configurestep.h b/src/plugins/autotoolsprojectmanager/configurestep.h index ffc5aea17c..c36f0f4a63 100644 --- a/src/plugins/autotoolsprojectmanager/configurestep.h +++ b/src/plugins/autotoolsprojectmanager/configurestep.h @@ -62,7 +62,6 @@ class ConfigureStepFactory : public ProjectExplorer::IBuildStepFactory public: ConfigureStepFactory(QObject *parent = 0); - ~ConfigureStepFactory(); QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const; QString displayNameForId(const QString &id) const; @@ -95,9 +94,7 @@ class ConfigureStep : public ProjectExplorer::AbstractProcessStep friend class ConfigureStepConfigWidget; public: - ConfigureStep(ProjectExplorer::BuildStepList *bsl); - ~ConfigureStep(); AutotoolsBuildConfiguration *autotoolsBuildConfiguration() const; bool init(); @@ -140,12 +137,10 @@ class ConfigureStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget public: ConfigureStepConfigWidget(ConfigureStep *configureStep); - ~ConfigureStepConfigWidget(); QString displayName() const; QString summaryText() const; - private slots: void updateDetails(); diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index a9db927ee4..71cf9cce4a 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -57,10 +57,6 @@ MakefileParser::MakefileParser(const QString &makefile) : { } -MakefileParser::~MakefileParser() -{ -} - bool MakefileParser::parse() { m_mutex.lock(); diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.h b/src/plugins/autotoolsprojectmanager/makefileparser.h index ede6bfe45c..ca660b657b 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.h +++ b/src/plugins/autotoolsprojectmanager/makefileparser.h @@ -64,7 +64,6 @@ public: * makefile that should be parsed. */ MakefileParser(const QString &makefile); - ~MakefileParser(); /** * Parses the makefile. Must be invoked at least once, otherwise diff --git a/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp b/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp index eee5c718dc..3296ebe06c 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparserthread.cpp @@ -51,10 +51,6 @@ MakefileParserThread::MakefileParserThread(const QString &makefile) : connect(&m_parser, SIGNAL(status(QString)), this, SIGNAL(status(QString))); } -MakefileParserThread::~MakefileParserThread() -{ -} - QStringList MakefileParserThread::sources() const { QMutexLocker locker(&m_mutex); diff --git a/src/plugins/autotoolsprojectmanager/makefileparserthread.h b/src/plugins/autotoolsprojectmanager/makefileparserthread.h index 4815dc392b..893c6c61f2 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparserthread.h +++ b/src/plugins/autotoolsprojectmanager/makefileparserthread.h @@ -57,7 +57,6 @@ class MakefileParserThread : public QThread public: MakefileParserThread(const QString &makefile); - ~MakefileParserThread(); /** @see QThread::run() */ void run(); diff --git a/src/plugins/autotoolsprojectmanager/makestep.cpp b/src/plugins/autotoolsprojectmanager/makestep.cpp index 2cafcc82d3..a78dc7a8e0 100644 --- a/src/plugins/autotoolsprojectmanager/makestep.cpp +++ b/src/plugins/autotoolsprojectmanager/makestep.cpp @@ -53,12 +53,10 @@ using namespace AutotoolsProjectManager; using namespace AutotoolsProjectManager::Internal; using namespace ProjectExplorer; -namespace { const char MAKE_STEP_ID[] = "AutotoolsProjectManager.MakeStep"; const char CLEAN_KEY[] = "AutotoolsProjectManager.MakeStep.Clean"; const char BUILD_TARGETS_KEY[] = "AutotoolsProjectManager.MakeStep.BuildTargets"; const char MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.MakeStep.AdditionalArguments"; -} ////////////////////////// // MakeStepFactory class @@ -68,10 +66,6 @@ MakeStepFactory::MakeStepFactory(QObject *parent) : { } -MakeStepFactory::~MakeStepFactory() -{ -} - QStringList MakeStepFactory::availableCreationIds(BuildStepList *parent) const { if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID)) @@ -164,10 +158,6 @@ void MakeStep::ctor() setDefaultDisplayName(tr("Make")); } -MakeStep::~MakeStep() -{ -} - AutotoolsBuildConfiguration *MakeStep::autotoolsBuildConfiguration() const { return static_cast<AutotoolsBuildConfiguration *>(buildConfiguration()); @@ -208,7 +198,7 @@ void MakeStep::run(QFutureInterface<bool> &interface) AbstractProcessStep::run(interface); } -ProjectExplorer::BuildStepConfigWidget* MakeStep::createConfigWidget() +ProjectExplorer::BuildStepConfigWidget *MakeStep::createConfigWidget() { return new MakeStepConfigWidget(this); } @@ -246,7 +236,7 @@ QString MakeStep::additionalArguments() const QVariantMap MakeStep::toMap() const { - QVariantMap map(AbstractProcessStep::toMap()); + QVariantMap map = AbstractProcessStep::toMap(); map.insert(QLatin1String(BUILD_TARGETS_KEY), m_buildTargets); map.insert(QLatin1String(MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments); @@ -288,10 +278,6 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) : this, SLOT(updateDetails())); } -MakeStepConfigWidget::~MakeStepConfigWidget() -{ -} - QString MakeStepConfigWidget::displayName() const { return tr("Make", "AutotoolsProjectManager::MakeStepConfigWidget display name."); diff --git a/src/plugins/autotoolsprojectmanager/makestep.h b/src/plugins/autotoolsprojectmanager/makestep.h index af849ff870..15b682d2bf 100644 --- a/src/plugins/autotoolsprojectmanager/makestep.h +++ b/src/plugins/autotoolsprojectmanager/makestep.h @@ -62,7 +62,6 @@ class MakeStepFactory : public ProjectExplorer::IBuildStepFactory public: MakeStepFactory(QObject *parent = 0); - ~MakeStepFactory(); QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const; QString displayNameForId(const QString &id) const; @@ -95,9 +94,7 @@ class MakeStep : public ProjectExplorer::AbstractProcessStep friend class MakeStepConfigWidget; public: - MakeStep(ProjectExplorer::BuildStepList *bsl); - ~MakeStep(); AutotoolsBuildConfiguration *autotoolsBuildConfiguration() const; bool init(); @@ -143,7 +140,6 @@ class MakeStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget public: MakeStepConfigWidget(MakeStep *makeStep); - ~MakeStepConfigWidget(); QString displayName() const; QString summaryText() const; |