QbsProjectManager: Use qbs::Project as a value.

Those objects are shared data pointers that can (and should)
be used as values. This is now actually possible due to
the newly introduced public default constructor and
isValid() method.

Change-Id: I989e339bd495aa7581b01f17f00cbffe0b617b9c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Christian Kandeler
2013-09-06 18:02:46 +02:00
parent f9aa1207d2
commit 3948f9d887
5 changed files with 39 additions and 42 deletions

View File

@@ -32,7 +32,7 @@
#include <projectexplorer/projectnodes.h>
#include <api/projectdata.h>
#include <qbs.h>
#include <QIcon>
@@ -170,11 +170,11 @@ public:
explicit QbsProjectNode(const QString &path);
~QbsProjectNode();
void update(const qbs::Project *prj);
void update(const qbs::Project &prj);
void update(const qbs::ProjectData &prjData);
QbsProject *project() const;
const qbs::Project *qbsProject() const;
const qbs::Project qbsProject() const;
const qbs::ProjectData qbsProjectData() const;
private:
@@ -185,7 +185,7 @@ private:
QbsProject *m_project;
const qbs::Project *m_qbsProject;
qbs::Project m_qbsProject;
qbs::ProjectData m_qbsProjectData;
static QIcon m_projectIcon;
};