forked from qt-creator/qt-creator
Qbs: Simplify QbsProjectManager a bit by using member initialization
Change-Id: I848b61bb67023852db51043e9eca0b417c2e6725 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -78,14 +78,6 @@ static QbsProject *currentEditorProject()
|
|||||||
return doc ? qobject_cast<QbsProject *>(SessionManager::projectForFile(doc->filePath())) : 0;
|
return doc ? qobject_cast<QbsProject *>(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)
|
bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(arguments);
|
Q_UNUSED(arguments);
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ class QbsProjectManagerPlugin : public ExtensionSystem::IPlugin
|
|||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QbsProjectManager.json")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QbsProjectManager.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QbsProjectManagerPlugin();
|
|
||||||
|
|
||||||
bool initialize(const QStringList &arguments, QString *errorMessage);
|
bool initialize(const QStringList &arguments, QString *errorMessage);
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
@@ -87,22 +85,22 @@ private:
|
|||||||
void buildSingleFile(QbsProject *project, const QString &file);
|
void buildSingleFile(QbsProject *project, const QString &file);
|
||||||
void buildProducts(QbsProject *project, const QStringList &products);
|
void buildProducts(QbsProject *project, const QStringList &products);
|
||||||
|
|
||||||
QAction *m_reparseQbs;
|
QAction *m_reparseQbs = nullptr;
|
||||||
QAction *m_reparseQbsCtx;
|
QAction *m_reparseQbsCtx = nullptr;
|
||||||
QAction *m_buildFileCtx;
|
QAction *m_buildFileCtx = nullptr;
|
||||||
QAction *m_buildProductCtx;
|
QAction *m_buildProductCtx = nullptr;
|
||||||
QAction *m_buildSubprojectCtx;
|
QAction *m_buildSubprojectCtx = nullptr;
|
||||||
Utils::ParameterAction *m_buildFile;
|
Utils::ParameterAction *m_buildFile = nullptr;
|
||||||
Utils::ParameterAction *m_buildProduct;
|
Utils::ParameterAction *m_buildProduct = nullptr;
|
||||||
Utils::ParameterAction *m_buildSubproject;
|
Utils::ParameterAction *m_buildSubproject = nullptr;
|
||||||
|
|
||||||
Internal::QbsProject *m_selectedProject;
|
Internal::QbsProject *m_selectedProject = nullptr;
|
||||||
ProjectExplorer::Node *m_selectedNode;
|
ProjectExplorer::Node *m_selectedNode = nullptr;
|
||||||
|
|
||||||
Internal::QbsProject *m_currentProject;
|
Internal::QbsProject *m_currentProject = nullptr;
|
||||||
|
|
||||||
Internal::QbsProject *m_editorProject;
|
Internal::QbsProject *m_editorProject = nullptr;
|
||||||
ProjectExplorer::Node *m_editorNode;
|
ProjectExplorer::Node *m_editorNode = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user