From 721c902cd827583d76e9743689518aba771a0a54 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 23 Feb 2017 14:07:47 +0100 Subject: [PATCH] Qbs: Simplify QbsProjectManager a bit by using member initialization Change-Id: I848b61bb67023852db51043e9eca0b417c2e6725 Reviewed-by: hjk --- .../qbsprojectmanagerplugin.cpp | 8 ------ .../qbsprojectmanagerplugin.h | 28 +++++++++---------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp index 0524696e9e6..c9c80adba89 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp @@ -78,14 +78,6 @@ static QbsProject *currentEditorProject() return doc ? qobject_cast(SessionManager::projectForFile(doc->filePath())) : 0; } -QbsProjectManagerPlugin::QbsProjectManagerPlugin() : - m_selectedProject(0), - m_selectedNode(0), - m_currentProject(0), - m_editorProject(0), - m_editorNode(0) -{ } - bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage) { Q_UNUSED(arguments); diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.h b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.h index 89df5183441..1f17a76a494 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.h +++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.h @@ -52,8 +52,6 @@ class QbsProjectManagerPlugin : public ExtensionSystem::IPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QbsProjectManager.json") public: - QbsProjectManagerPlugin(); - bool initialize(const QStringList &arguments, QString *errorMessage); void extensionsInitialized(); @@ -87,22 +85,22 @@ private: void buildSingleFile(QbsProject *project, const QString &file); void buildProducts(QbsProject *project, const QStringList &products); - QAction *m_reparseQbs; - QAction *m_reparseQbsCtx; - QAction *m_buildFileCtx; - QAction *m_buildProductCtx; - QAction *m_buildSubprojectCtx; - Utils::ParameterAction *m_buildFile; - Utils::ParameterAction *m_buildProduct; - Utils::ParameterAction *m_buildSubproject; + QAction *m_reparseQbs = nullptr; + QAction *m_reparseQbsCtx = nullptr; + QAction *m_buildFileCtx = nullptr; + QAction *m_buildProductCtx = nullptr; + QAction *m_buildSubprojectCtx = nullptr; + Utils::ParameterAction *m_buildFile = nullptr; + Utils::ParameterAction *m_buildProduct = nullptr; + Utils::ParameterAction *m_buildSubproject = nullptr; - Internal::QbsProject *m_selectedProject; - ProjectExplorer::Node *m_selectedNode; + Internal::QbsProject *m_selectedProject = nullptr; + ProjectExplorer::Node *m_selectedNode = nullptr; - Internal::QbsProject *m_currentProject; + Internal::QbsProject *m_currentProject = nullptr; - Internal::QbsProject *m_editorProject; - ProjectExplorer::Node *m_editorNode; + Internal::QbsProject *m_editorProject = nullptr; + ProjectExplorer::Node *m_editorNode = nullptr; }; } // namespace Internal