From 21565b99d1e138c5b89559ec2e77a600d7a691bc Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Mon, 21 Sep 2009 15:50:27 +0200
Subject: [PATCH] Export the build configuration class.

---
 .../projectexplorer/buildconfiguration.cpp        | 11 +++++++----
 src/plugins/projectexplorer/buildconfiguration.h  | 15 ++++++++++-----
 src/plugins/projectexplorer/buildstep.cpp         |  5 ++---
 src/plugins/projectexplorer/buildstep.h           | 10 ++++------
 src/plugins/projectexplorer/project.cpp           |  4 ++--
 src/plugins/projectexplorer/project.h             |  4 ++--
 6 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 8cadddaa1d4..832bb81c96a 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -29,7 +29,11 @@
 
 #include "buildconfiguration.h"
 
-using namespace ProjectExplorer::Internal;
+using namespace ProjectExplorer;
+
+BuildConfiguration::BuildConfiguration()
+{
+}
 
 BuildConfiguration::BuildConfiguration(const QString &name)
     : m_name(name)
@@ -49,7 +53,7 @@ QString BuildConfiguration::name() const
 
 QString BuildConfiguration::displayName()
 {
-    QVariant v = getValue("ProjectExplorer.BuildConfiguration.DisplayName");
+    QVariant v = value("ProjectExplorer.BuildConfiguration.DisplayName");
     if (v.isValid()) {
         return v.toString();
     } else {
@@ -63,7 +67,7 @@ void BuildConfiguration::setDisplayName(const QString &name)
     setValue("ProjectExplorer.BuildConfiguration.DisplayName", name);
 }
 
-QVariant BuildConfiguration::getValue(const QString & key) const
+QVariant BuildConfiguration::value(const QString & key) const
 {
     QHash<QString, QVariant>::const_iterator it = m_values.find(key);
     if (it != m_values.constEnd())
@@ -94,4 +98,3 @@ QMap<QString, QVariant> BuildConfiguration::toMap() const
         result.insert(it.key(), it.value());
     return result;
 }
-
diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h
index f93122a64b9..257c2d9421a 100644
--- a/src/plugins/projectexplorer/buildconfiguration.h
+++ b/src/plugins/projectexplorer/buildconfiguration.h
@@ -30,20 +30,26 @@
 #ifndef BUILDCONFIGURATION_H
 #define BUILDCONFIGURATION_H
 
+#include "projectexplorer_export.h"
+
+#include <QtCore/QHash>
 #include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QObject>
 #include <QtCore/QVariant>
-#include <QtCore/QHash>
 
 namespace ProjectExplorer {
-namespace Internal {
 
-class BuildConfiguration
+class PROJECTEXPLORER_EXPORT BuildConfiguration : public QObject
 {
+    Q_OBJECT
+
 public:
+    explicit BuildConfiguration();
     BuildConfiguration(const QString &name);
     BuildConfiguration(const QString &name, BuildConfiguration *source);
     QString name() const;
-    QVariant getValue(const QString &key) const;
+    QVariant value(const QString &key) const;
     void setValue(const QString &key, QVariant value);
 
     QString displayName();
@@ -57,7 +63,6 @@ private:
     QString m_name;
 };
 
-}
 } // namespace ProjectExplorer
 
 #endif // BUILDCONFIGURATION_H
diff --git a/src/plugins/projectexplorer/buildstep.cpp b/src/plugins/projectexplorer/buildstep.cpp
index 77c4791243f..847e9578f1c 100644
--- a/src/plugins/projectexplorer/buildstep.cpp
+++ b/src/plugins/projectexplorer/buildstep.cpp
@@ -35,7 +35,6 @@
 #include <QtGui/QLayout>
 
 using namespace ProjectExplorer;
-using namespace ProjectExplorer::Internal;
 
 BuildStep::BuildStep(Project * pro)
     : m_project(pro)
@@ -92,14 +91,14 @@ QVariant BuildStep::value(const QString &buildConfiguration, const QString &name
 {
     BuildConfiguration *bc = getBuildConfiguration(buildConfiguration);
     if (bc)
-        return bc->getValue(name);
+        return bc->value(name);
     else
         return QVariant();
 }
 
 QVariant BuildStep::value(const QString &name) const
 {
-    return m_configuration->getValue(name);
+    return m_configuration->value(name);
 }
 
 void BuildStep::setValuesFromMap(const QMap<QString, QVariant> & values)
diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h
index 360bd0f08ad..9f113967a1c 100644
--- a/src/plugins/projectexplorer/buildstep.h
+++ b/src/plugins/projectexplorer/buildstep.h
@@ -39,9 +39,7 @@
 namespace ProjectExplorer {
 
 class Project;
-namespace Internal {
 class BuildConfiguration;
-}
 
 /*
 // BuildSteps are the primary way plugin developers can customize
@@ -132,14 +130,14 @@ Q_SIGNALS:
     void addToOutputWindow(const QString &string);
 
 private:
-    QList<Internal::BuildConfiguration *> buildConfigurations();
+    QList<BuildConfiguration *> buildConfigurations();
     void addBuildConfiguration(const QString & name);
     void removeBuildConfiguration(const QString & name);
-    Internal::BuildConfiguration *getBuildConfiguration(const QString & name) const;
+    BuildConfiguration *getBuildConfiguration(const QString & name) const;
     void copyBuildConfiguration(const QString &source, const QString &dest);
 
-    QList<Internal::BuildConfiguration *> m_buildConfigurations;
-    Internal::BuildConfiguration *m_configuration;
+    QList<BuildConfiguration *> m_buildConfigurations;
+    BuildConfiguration *m_configuration;
     Project *m_project;
 };
 
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index da5da51a058..e178a87e198 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -410,7 +410,7 @@ QVariant Project::value(const QString &name) const
         return QVariant();
 }
 
-BuildConfiguration * Project::getBuildConfiguration(const QString &name) const
+BuildConfiguration *Project::getBuildConfiguration(const QString &name) const
 {
     for (int i = 0; i != m_buildConfigurationValues.size(); ++i)
         if (m_buildConfigurationValues.at(i)->name() == name)
@@ -429,7 +429,7 @@ QVariant Project::value(const QString &buildConfiguration, const QString &name)
 {
     BuildConfiguration *bc = getBuildConfiguration(buildConfiguration);
     if (bc)
-        return bc->getValue(name);
+        return bc->value(name);
     else
         return QVariant();
 }
diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h
index 9070fb51243..ffaa2aa1940 100644
--- a/src/plugins/projectexplorer/project.h
+++ b/src/plugins/projectexplorer/project.h
@@ -191,13 +191,13 @@ protected:
     virtual bool restoreSettingsImpl(PersistentSettingsReader &reader);
 
 private:
-    Internal::BuildConfiguration *getBuildConfiguration(const QString & name) const;
+    BuildConfiguration *getBuildConfiguration(const QString & name) const;
 
     QList<BuildStep *> m_buildSteps;
     QList<BuildStep *> m_cleanSteps;
     QStringList m_buildConfigurations;
     QMap<QString, QVariant> m_values;
-    QList<Internal::BuildConfiguration *> m_buildConfigurationValues;
+    QList<BuildConfiguration *> m_buildConfigurationValues;
     QString m_activeBuildConfiguration;
     QList<QSharedPointer<RunConfiguration> > m_runConfigurations;
     QSharedPointer<RunConfiguration> m_activeRunConfiguration;
-- 
GitLab