summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadovan Zivkovic <pivonroll@gmail.com>2013-10-08 12:25:43 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-03-11 19:54:58 +0100
commit1acb0e25887d35f507fa942523f601675d71199c (patch)
tree43446a528003583f0142901df207b4cc5a2e70ee
parentb3efcb271d46e04c95a2547422a1ec0e2286152d (diff)
downloadqt-creator-1acb0e25887d35f507fa942523f601675d71199c.tar.gz
ActiveXReference now implements IReference.
Change-Id: I2a98c95240415d7cd877f3eb0f52c75a5055db2a Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
-rw-r--r--src/plugins/vcprojectmanager/interfaces/interfaces.pri1
-rw-r--r--src/plugins/vcprojectmanager/interfaces/ireference.h56
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp8
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/activexreference.h7
4 files changed, 65 insertions, 7 deletions
diff --git a/src/plugins/vcprojectmanager/interfaces/interfaces.pri b/src/plugins/vcprojectmanager/interfaces/interfaces.pri
index 4bd95259e9..a97bd9feb3 100644
--- a/src/plugins/vcprojectmanager/interfaces/interfaces.pri
+++ b/src/plugins/vcprojectmanager/interfaces/interfaces.pri
@@ -12,4 +12,5 @@ HEADERS += \
interfaces/ifile.h \
interfaces/ifilecontainer.h \
interfaces/ifiles.h \
+ interfaces/ireference.h \
interfaces/iconfigurationtool.h
diff --git a/src/plugins/vcprojectmanager/interfaces/ireference.h b/src/plugins/vcprojectmanager/interfaces/ireference.h
new file mode 100644
index 0000000000..a06d8014a8
--- /dev/null
+++ b/src/plugins/vcprojectmanager/interfaces/ireference.h
@@ -0,0 +1,56 @@
+/**************************************************************************
+**
+** Copyright (c) 2013 Bojan Petrovic
+** Copyright (c) 2013 Radovan Zivkovic
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+#ifndef VCPROJECTMANAGER_INTERNAL_IREFERENCE_H
+#define VCPROJECTMANAGER_INTERNAL_IREFERENCE_H
+
+#include <QString>
+
+#include "../vcprojectmodel/ivcprojectnodemodel.h"
+
+namespace VcProjectManager {
+namespace Internal {
+
+class IAttributeContainer;
+class ConfigurationContainer;
+
+class IReference : public IVcProjectXMLNode
+{
+public:
+ virtual ~IReference() {}
+
+ virtual IAttributeContainer* attributeContainer() const = 0;
+ virtual ConfigurationContainer* configurationContainer() const = 0;
+ virtual QString type() const = 0;
+};
+
+} // namespace Internal
+} // namespace VcProjectManager
+
+#endif // VCPROJECTMANAGER_INTERNAL_IREFERENCE_H
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp
index 36ed79ab49..25d10c4726 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp
@@ -49,11 +49,11 @@ ActiveXReference::ActiveXReference(const ActiveXReference &ref)
*m_configurations = *ref.m_configurations;
}
-IReference &ActiveXReference::operator =(const IReference &ref)
+ActiveXReference& ActiveXReference::operator=(const ActiveXReference &ref)
{
if (this != &ref) {
- *m_attributeContainer = *ref.attributeContainer();
- *m_configurations = *ref.configurations();
+ *m_attributeContainer = *ref.m_attributeContainer;
+ *m_configurations = *ref.m_configurations;
}
return *this;
@@ -124,7 +124,7 @@ IAttributeContainer *ActiveXReference::attributeContainer() const
return m_attributeContainer;
}
-ConfigurationContainer *ActiveXReference::configurations() const
+ConfigurationContainer *ActiveXReference::configurationContainer() const
{
return m_configurations;
}
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.h b/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.h
index 45c878a6d3..356f06f4a7 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.h
@@ -33,6 +33,7 @@
#include "ivcprojectnodemodel.h"
#include "vcprojectdocument_constants.h"
#include "configuration.h"
+#include "../interfaces/ireference.h"
namespace VcProjectManager {
namespace Internal {
@@ -46,7 +47,7 @@ public:
ActiveXReference();
ActiveXReference(const ActiveXReference &ref);
- IReference &operator =(const IReference &ref);
+ ActiveXReference &operator=(const ActiveXReference &ref);
virtual ~ActiveXReference();
void processNode(const QDomNode &node);
@@ -55,7 +56,7 @@ public:
// IReference interface
IAttributeContainer *attributeContainer() const;
- ConfigurationContainer *configurations() const;
+ ConfigurationContainer *configurationContainer() const;
QString type() const;
/*!
@@ -75,7 +76,7 @@ protected:
*/
virtual IConfiguration* createReferenceConfiguration() const = 0;
- IAttributeContainer *m_attributeContainer;
+ GeneralAttributeContainer *m_attributeContainer;
ConfigurationContainer *m_configurations;
};