summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadovan Zivkovic <pivonroll@gmail.com>2013-10-09 00:12:10 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-03-11 19:54:59 +0100
commitb686a80ea07f39edcaa3a0c77ed50071dbff8e2d (patch)
tree887bab492013ec3c874a0fc278d1b0519b63aa1e
parentfa069c0140a466c2312bffb3210521d31213739d (diff)
downloadqt-creator-b686a80ea07f39edcaa3a0c77ed50071dbff8e2d.tar.gz
Moved DebuggerTools and DeploymentTools into Tools.
Change-Id: I37cc9820266a6e5f57d18fdafb645ed4cb662421 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
-rw-r--r--src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtool.h (renamed from src/plugins/vcprojectmanager/interfaces/iconfigurationtool.h)12
-rw-r--r--src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtools.h54
-rw-r--r--src/plugins/vcprojectmanager/interfaces/idebuggertool.h51
-rw-r--r--src/plugins/vcprojectmanager/interfaces/idebuggertools.h53
-rw-r--r--src/plugins/vcprojectmanager/interfaces/ideploymenttool.h49
-rw-r--r--src/plugins/vcprojectmanager/interfaces/ideploymenttools.h55
-rw-r--r--src/plugins/vcprojectmanager/interfaces/interfaces.pri9
-rw-r--r--src/plugins/vcprojectmanager/interfaces/itoolattributecontainer.h4
-rw-r--r--src/plugins/vcprojectmanager/interfaces/itooldescription.h4
-rw-r--r--src/plugins/vcprojectmanager/interfaces/itools.h14
-rw-r--r--src/plugins/vcprojectmanager/vcproject.cpp3
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp6
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/assemblyreference.cpp6
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configuration.cpp316
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configuration.h58
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.cpp (renamed from src/plugins/vcprojectmanager/vcprojectmodel/configurationtools.cpp)32
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.h61
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configurations.cpp16
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.cpp19
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.h1
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.cpp7
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.h7
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.cpp74
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.h (renamed from src/plugins/vcprojectmanager/vcprojectmodel/configurationtools.h)26
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.cpp5
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.h5
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.cpp94
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.h59
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/file.cpp15
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/projectreference_private.cpp6
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/tools.cpp89
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/tools.h64
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.cpp2
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.h6
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.cpp2
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.h2
-rw-r--r--src/plugins/vcprojectmanager/vcprojectmodel/vcprojectmodel.pri14
-rw-r--r--src/plugins/vcprojectmanager/widgets/configurationswidgets.cpp33
-rw-r--r--src/plugins/vcprojectmanager/widgets/configurationwidgets.cpp35
-rw-r--r--src/plugins/vcprojectmanager/widgets/configurationwidgets.h42
40 files changed, 847 insertions, 563 deletions
diff --git a/src/plugins/vcprojectmanager/interfaces/iconfigurationtool.h b/src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtool.h
index 51472ee9ed..73a73cffd8 100644
--- a/src/plugins/vcprojectmanager/interfaces/iconfigurationtool.h
+++ b/src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtool.h
@@ -27,8 +27,8 @@
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
-#ifndef VCPROJECTMANAGER_INTERNAL_ITOOL_H
-#define VCPROJECTMANAGER_INTERNAL_ITOOL_H
+#ifndef VCPROJECTMANAGER_INTERNAL_ICONFIGURATIONBUILDTOOL_H
+#define VCPROJECTMANAGER_INTERNAL_ICONFIGURATIONBUILDTOOL_H
#include <QString>
#include "../vcprojectmodel/ivcprojectnodemodel.h"
@@ -39,17 +39,17 @@ namespace Internal {
class ISectionContainer;
class IToolDescription;
-class IConfigurationTool : public IVcProjectXMLNode
+class IConfigurationBuildTool : public IVcProjectXMLNode
{
public:
- virtual ~IConfigurationTool() {}
+ ~IConfigurationBuildTool() {}
virtual ISectionContainer* sectionContainer() const = 0;
virtual const IToolDescription* toolDescription() const = 0;
- virtual IConfigurationTool* clone() const = 0;
+ virtual IConfigurationBuildTool* clone() const = 0;
};
} // namespace Internal
} // namespace VcProjectManager
-#endif // VCPROJECTMANAGER_INTERNAL_ITOOL_H
+#endif // VCPROJECTMANAGER_INTERNAL_ICONFIGURATIONBUILDTOOL_H
diff --git a/src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtools.h b/src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtools.h
new file mode 100644
index 0000000000..c64d22215a
--- /dev/null
+++ b/src/plugins/vcprojectmanager/interfaces/iconfigurationbuildtools.h
@@ -0,0 +1,54 @@
+/**************************************************************************
+**
+** 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_ICONFIGURATIONBUILDTOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_ICONFIGURATIONBUILDTOOLS_H
+
+#include <QString>
+#include <QDomElement>
+
+namespace VcProjectManager {
+namespace Internal {
+
+class IConfigurationBuildTool;
+
+class IConfigurationBuildTools
+{
+public:
+ virtual ~IConfigurationBuildTools() {}
+ virtual void addTool(IConfigurationBuildTool *tool) = 0;
+ virtual void removeTool(IConfigurationBuildTool *tool) = 0;
+ virtual IConfigurationBuildTool* tool(const QString &toolKey) const = 0;
+ virtual IConfigurationBuildTool* tool(int index) const = 0;
+ virtual int toolCount() const = 0;
+ virtual void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const = 0;
+};
+} // Internal
+} // VcProjectManager
+#endif // VCPROJECTMANAGER_INTERNAL_ICONFIGURATIONBUILDTOOLS_H
diff --git a/src/plugins/vcprojectmanager/interfaces/idebuggertool.h b/src/plugins/vcprojectmanager/interfaces/idebuggertool.h
new file mode 100644
index 0000000000..f47ed41efe
--- /dev/null
+++ b/src/plugins/vcprojectmanager/interfaces/idebuggertool.h
@@ -0,0 +1,51 @@
+/**************************************************************************
+**
+** 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_IDEBUGGERTOOL_H
+#define VCPROJECTMANAGER_INTERNAL_IDEBUGGERTOOL_H
+
+#include "../vcprojectmodel/ivcprojectnodemodel.h"
+
+namespace VcProjectManager {
+namespace Internal {
+
+class IAttributeContainer;
+
+class IDebuggerTool : public IVcProjectXMLNode
+{
+public:
+ ~IDebuggerTool() {}
+ virtual IAttributeContainer *attributeContainer() const = 0;
+ virtual IDebuggerTool* clone() const = 0;
+};
+
+} // Internal
+} // VcProjectManager
+
+#endif // VCPROJECTMANAGER_IDEBUGGERTOOL_H
diff --git a/src/plugins/vcprojectmanager/interfaces/idebuggertools.h b/src/plugins/vcprojectmanager/interfaces/idebuggertools.h
new file mode 100644
index 0000000000..376fa93e59
--- /dev/null
+++ b/src/plugins/vcprojectmanager/interfaces/idebuggertools.h
@@ -0,0 +1,53 @@
+/**************************************************************************
+**
+** 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_IDEBUGGERTOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_IDEBUGGERTOOLS_H
+
+class QDomElement;
+class QDomDocument;
+
+namespace VcProjectManager {
+namespace Internal {
+
+class IDebuggerTool;
+
+class IDebuggerTools
+{
+public:
+ virtual void addTool(IDebuggerTool *tool) = 0;
+ virtual void removeTool(IDebuggerTool *tool) = 0;
+ virtual IDebuggerTool* tool(int index) const = 0;
+ virtual int toolCount() const = 0;
+ virtual void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const = 0;
+
+};
+} // Internal
+} // VcProjectManager
+#endif // IDEBUGGERTOOLS_H
diff --git a/src/plugins/vcprojectmanager/interfaces/ideploymenttool.h b/src/plugins/vcprojectmanager/interfaces/ideploymenttool.h
new file mode 100644
index 0000000000..7f83859e4a
--- /dev/null
+++ b/src/plugins/vcprojectmanager/interfaces/ideploymenttool.h
@@ -0,0 +1,49 @@
+/**************************************************************************
+**
+** 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_IDEPLOYMENTTOOL_H
+#define VCPROJECTMANAGER_INTERNAL_IDEPLOYMENTTOOL_H
+
+#include "../vcprojectmodel/ivcprojectnodemodel.h"
+
+namespace VcProjectManager {
+namespace Internal {
+
+class IAttributeContainer;
+
+class IDeploymentTool : public IVcProjectXMLNode
+{
+public:
+ virtual ~IDeploymentTool() {}
+ virtual IAttributeContainer *attributeContainer() const = 0;
+ virtual IDeploymentTool* clone() const = 0;
+};
+} // Internal
+} // VcProjectManager
+#endif // VCPROJECTMANAGER_INTERNAL_IDEPLOYMENTTOOL_H
diff --git a/src/plugins/vcprojectmanager/interfaces/ideploymenttools.h b/src/plugins/vcprojectmanager/interfaces/ideploymenttools.h
new file mode 100644
index 0000000000..2c041afebf
--- /dev/null
+++ b/src/plugins/vcprojectmanager/interfaces/ideploymenttools.h
@@ -0,0 +1,55 @@
+/**************************************************************************
+**
+** 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_IDEPLOYMENTTOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_IDEPLOYMENTTOOLS_H
+
+class QDomElement;
+class QDomDocument;
+
+namespace VcProjectManager {
+namespace Internal {
+
+class IDeploymentTool;
+
+class IDeploymentTools
+{
+public:
+ virtual ~IDeploymentTools() {}
+ virtual void addTool(IDeploymentTool *tool) = 0;
+ virtual void removeTool(IDeploymentTool *tool) = 0;
+ virtual IDeploymentTool* tool(int index) const = 0;
+ virtual int toolCount() const = 0;
+ virtual void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const = 0;
+};
+
+} // Internal
+} // VcProjectManager
+
+#endif // VCPROJECTMANAGER_IDEPLOYMENTTOOLS_H
diff --git a/src/plugins/vcprojectmanager/interfaces/interfaces.pri b/src/plugins/vcprojectmanager/interfaces/interfaces.pri
index 2eb4bae2af..fca18fc918 100644
--- a/src/plugins/vcprojectmanager/interfaces/interfaces.pri
+++ b/src/plugins/vcprojectmanager/interfaces/interfaces.pri
@@ -13,5 +13,10 @@ HEADERS += \
interfaces/ifilecontainer.h \
interfaces/ifiles.h \
interfaces/ireference.h \
- interfaces/iconfigurationtool.h \
- interfaces/itoolattributecontainer.h
+ interfaces/itoolattributecontainer.h \
+ interfaces/iconfigurationbuildtools.h \
+ interfaces/ideploymenttools.h \
+ interfaces/ideploymenttool.h \
+ interfaces/iconfigurationbuildtool.h \
+ interfaces/idebuggertool.h \
+ interfaces/idebuggertools.h
diff --git a/src/plugins/vcprojectmanager/interfaces/itoolattributecontainer.h b/src/plugins/vcprojectmanager/interfaces/itoolattributecontainer.h
index 6e94b7b8fe..4b13e9efbe 100644
--- a/src/plugins/vcprojectmanager/interfaces/itoolattributecontainer.h
+++ b/src/plugins/vcprojectmanager/interfaces/itoolattributecontainer.h
@@ -27,8 +27,8 @@
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
-#ifndef ITOOLATTRIBUTECONTAINER_H
-#define ITOOLATTRIBUTECONTAINER_H
+#ifndef VCPROJECTMANAGER_ITOOLATTRIBUTECONTAINER_H
+#define VCPROJECTMANAGER_ITOOLATTRIBUTECONTAINER_H
#include <QString>
diff --git a/src/plugins/vcprojectmanager/interfaces/itooldescription.h b/src/plugins/vcprojectmanager/interfaces/itooldescription.h
index 77eca758e0..5e5b1fbd88 100644
--- a/src/plugins/vcprojectmanager/interfaces/itooldescription.h
+++ b/src/plugins/vcprojectmanager/interfaces/itooldescription.h
@@ -35,7 +35,7 @@
namespace VcProjectManager {
namespace Internal {
-class IConfigurationTool;
+class IConfigurationBuildTool;
class IToolSectionDescription;
class IToolDescription
@@ -53,7 +53,7 @@ public:
virtual QString toolDisplayName() const = 0;
virtual void setToolDisplayName(const QString &toolDisplayName) = 0;
- virtual IConfigurationTool* createTool() const = 0;
+ virtual IConfigurationBuildTool* createTool() const = 0;
};
} // Internal
diff --git a/src/plugins/vcprojectmanager/interfaces/itools.h b/src/plugins/vcprojectmanager/interfaces/itools.h
index 1ab44380ad..e40368e6f3 100644
--- a/src/plugins/vcprojectmanager/interfaces/itools.h
+++ b/src/plugins/vcprojectmanager/interfaces/itools.h
@@ -36,19 +36,17 @@
namespace VcProjectManager {
namespace Internal {
-class IConfigurationTool;
+class IConfigurationBuildTools;
+class IDeploymentTools;
+class IDebuggerTools;
class ITools
{
public:
virtual ~ITools() {}
- virtual ITools& operator= (const ITools &tools) = 0;
- virtual void addTool(IConfigurationTool *tool) = 0;
- virtual void removeTool(IConfigurationTool *tool) = 0;
- virtual IConfigurationTool* tool(const QString &toolKey) const = 0;
- virtual IConfigurationTool* tool(int index) const = 0;
- virtual int toolCount() const = 0;
- virtual void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const = 0;
+ virtual IConfigurationBuildTools* configurationBuildTools() const = 0;
+ virtual IDeploymentTools* deploymentTools() const = 0;
+ virtual IDebuggerTools* debuggerTools() const = 0;
};
} // namespace Internal
diff --git a/src/plugins/vcprojectmanager/vcproject.cpp b/src/plugins/vcprojectmanager/vcproject.cpp
index ce4dae7d45..e08196d649 100644
--- a/src/plugins/vcprojectmanager/vcproject.cpp
+++ b/src/plugins/vcprojectmanager/vcproject.cpp
@@ -47,6 +47,7 @@
#include "interfaces/iattributedescriptiondataitem.h"
#include "interfaces/isectioncontainer.h"
#include "interfaces/itools.h"
+#include "interfaces/iconfigurationbuildtools.h"
#include "interfaces/itoolattributecontainer.h"
#include <coreplugin/icontext.h>
@@ -312,7 +313,7 @@ void VcProject::updateCodeModels()
IConfiguration *configModel = m_projectFile->documentModel()->vcProjectDocument()->configurations()->configurationContainer()->configuration(configName);
if (configModel) {
- IConfigurationTool *configTool = configModel->tools()->tool(QLatin1String(ToolConstants::strVCCLCompilerTool));
+ IConfigurationBuildTool *configTool = configModel->tools()->configurationBuildTools()->tool(QLatin1String(ToolConstants::strVCCLCompilerTool));
if (configTool) {
for (int i = 0; i < configTool->sectionContainer()->sectionCount(); ++i) {
IToolSection *toolSection = configTool->sectionContainer()->section(i);
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp
index 25d10c4726..06ba94388f 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/activexreference.cpp
@@ -166,7 +166,7 @@ ActiveXReference2003::ActiveXReference2003()
IConfiguration* ActiveXReference2003::createReferenceConfiguration() const
{
- return new Configuration2003(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
@@ -190,7 +190,7 @@ ActiveXReference2005::ActiveXReference2005()
IConfiguration* ActiveXReference2005::createReferenceConfiguration() const
{
- return new Configuration2005(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
@@ -214,7 +214,7 @@ ActiveXReference2008::ActiveXReference2008()
IConfiguration* ActiveXReference2008::createReferenceConfiguration() const
{
- return new Configuration2008(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/assemblyreference.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/assemblyreference.cpp
index 2a7bf34ef8..f4a96428aa 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/assemblyreference.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/assemblyreference.cpp
@@ -200,7 +200,7 @@ AssemblyReference2003::AssemblyReference2003()
IConfiguration* AssemblyReference2003::createReferenceConfiguration() const
{
- return new Configuration2003(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
@@ -280,7 +280,7 @@ AssemblyReference2005::AssemblyReference2005()
IConfiguration* AssemblyReference2005::createReferenceConfiguration() const
{
- return new Configuration2005(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
void AssemblyReference2005::processNodeAttributes(const QDomElement &element)
@@ -420,7 +420,7 @@ AssemblyReference2008::AssemblyReference2008()
IConfiguration* AssemblyReference2008::createReferenceConfiguration() const
{
- return new Configuration2008(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
void AssemblyReference2008::processNodeAttributes(const QDomElement &element)
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configuration.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/configuration.cpp
index aa5e09f69a..ffe59a43a9 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configuration.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configuration.cpp
@@ -37,7 +37,10 @@
#include "tools/toolattributes/tooldescription.h"
#include "tools/configurationtool.h"
#include "generalattributecontainer.h"
-#include "configurationtools.h"
+#include "configurationbuildtools.h"
+#include "tools.h"
+#include "deploymenttools.h"
+#include "debuggertools.h"
namespace VcProjectManager {
namespace Internal {
@@ -45,10 +48,10 @@ namespace Internal {
using namespace ToolConstants;
Configuration::Configuration(const QString &nodeName)
- : m_nodeName(nodeName)
+ : m_nodeName(nodeName),
+ m_tools(new Tools),
+ m_attributeContainer(new GeneralAttributeContainer)
{
- m_attributeContainer = new GeneralAttributeContainer;
- m_tools = new ConfigurationTools;
}
Configuration::Configuration(const Configuration &config)
@@ -58,7 +61,7 @@ Configuration::Configuration(const Configuration &config)
m_attributeContainer = new GeneralAttributeContainer;
*m_attributeContainer = *config.m_attributeContainer;
- m_tools = new ConfigurationTools;
+ m_tools = new Tools;
*m_tools = *config.m_tools;
}
@@ -119,7 +122,10 @@ QDomNode Configuration::toXMLDomNode(QDomDocument &domXMLDocument) const
QDomElement configurationNode = domXMLDocument.createElement(m_nodeName);
configurationNode.setAttribute(QLatin1String("Name"), m_fullName);
m_attributeContainer->appendToXMLNode(configurationNode);
- m_tools->appendToXMLNode(configurationNode, domXMLDocument);
+ m_tools->configurationBuildTools()->appendToXMLNode(configurationNode, domXMLDocument);
+ m_tools->deploymentTools()->appendToXMLNode(configurationNode, domXMLDocument);
+ m_tools->debuggerTools()->appendToXMLNode(configurationNode, domXMLDocument);
+
return configurationNode;
}
@@ -164,9 +170,19 @@ ITools *Configuration::tools() const
return m_tools;
}
+IConfiguration *Configuration::clone() const
+{
+ return new Configuration(*this);
+}
+
+VcNodeWidget *Configuration::createSettingsWidget()
+{
+ return new ConfigurationBaseWidget(this);
+}
+
void Configuration::processToolNode(const QDomNode &toolNode)
{
- IConfigurationTool *toolConf = 0;
+ IConfigurationBuildTool *toolConf = 0;
QDomNamedNodeMap namedNodeMap = toolNode.toElement().attributes();
for (int i = 0; i < namedNodeMap.size(); ++i) {
@@ -185,7 +201,7 @@ void Configuration::processToolNode(const QDomNode &toolNode)
if (toolConf) {
toolConf->processNode(toolNode);
- m_tools->addTool(toolConf);
+ m_tools->configurationBuildTools()->addTool(toolConf);
// process next sibling
QDomNode nextSibling = toolNode.nextSibling();
@@ -194,289 +210,5 @@ void Configuration::processToolNode(const QDomNode &toolNode)
}
}
-
-Configuration2003::Configuration2003(const QString &nodeName)
- : Configuration(nodeName)
-{
-}
-
-Configuration2003::Configuration2003(const Configuration2003 &config)
- : Configuration(config)
-{
-}
-
-Configuration2003::~Configuration2003()
-{
-}
-
-VcNodeWidget *Configuration2003::createSettingsWidget()
-{
- return new Configuration2003Widget(this);
-}
-
-IConfiguration *Configuration2003::clone() const
-{
- return new Configuration2003(*this);
-}
-
-
-Configuration2005::Configuration2005(const QString &nodeName)
- : Configuration2003(nodeName)
-{
-}
-
-Configuration2005::~Configuration2005()
-{
- m_deploymentTools.clear();
-}
-
-Configuration2005::Configuration2005(const Configuration2005 &config)
- : Configuration2003(config)
-{
- foreach (const DeploymentTool::Ptr &tool, config.m_deploymentTools)
- m_deploymentTools.append(DeploymentTool::Ptr(new DeploymentTool(*tool)));
-
-}
-
-Configuration2005 &Configuration2005::operator=(const Configuration2005 &config)
-{
- if (this != &config) {
- Configuration2003::operator =(config);
-
- m_deploymentTools.clear();
- foreach (const DeploymentTool::Ptr &tool, config.m_deploymentTools)
- m_deploymentTools.append(DeploymentTool::Ptr(new DeploymentTool(*tool)));
- }
- return *this;
-}
-
-void Configuration2005::processToolNode(const QDomNode &toolNode)
-{
- if (toolNode.nodeName() == QLatin1String("Tool")) {
- IConfigurationTool *toolConf = 0;
- QDomNamedNodeMap namedNodeMap = toolNode.toElement().attributes();
-
- for (int i = 0; i < namedNodeMap.size(); ++i) {
- QDomNode domNode = namedNodeMap.item(i);
-
- if (domNode.nodeType() == QDomNode::AttributeNode) {
- QDomAttr domAttribute = domNode.toAttr();
- if (domAttribute.name() == QLatin1String("Name")) {
- ToolDescriptionDataManager *tDDM = ToolDescriptionDataManager::instance();
-
- if (tDDM) {
- ToolDescription *toolDesc = tDDM->toolDescription(domAttribute.value());
- toolConf = toolDesc->createTool();
- break;
- }
- }
- }
- }
-
- if (toolConf) {
- toolConf->processNode(toolNode);
- m_tools->addTool(toolConf);
- }
- } else {
- DeploymentTool::Ptr deplTool(new DeploymentTool);
- deplTool->processNode(toolNode);
- m_deploymentTools.append(deplTool);
- }
-
- // process next sibling
- QDomNode nextSibling = toolNode.nextSibling();
- if (!nextSibling.isNull())
- processToolNode(nextSibling);
-}
-
-QDomNode Configuration2005::toXMLDomNode(QDomDocument &domXMLDocument) const
-{
- QDomElement configurationNode = domXMLDocument.createElement(m_nodeName);
- configurationNode.setAttribute(QLatin1String("Name"), m_fullName);
-
- m_attributeContainer->appendToXMLNode(configurationNode);
- m_tools->appendToXMLNode(configurationNode, domXMLDocument);
-
- foreach (const DeploymentTool::Ptr &tool, m_deploymentTools)
- configurationNode.appendChild(tool->toXMLDomNode(domXMLDocument));
-
- return configurationNode;
-}
-
-
-VcNodeWidget *Configuration2005::createSettingsWidget()
-{
- return new Configuration2005Widget(this);
-}
-
-IConfiguration *Configuration2005::clone() const
-{
- return new Configuration2005(*this);
-}
-
-void Configuration2005::addDeploymentTool(DeploymentTool::Ptr tool)
-{
- if (m_deploymentTools.contains(tool))
- return;
- m_deploymentTools.append(tool);
-}
-
-void Configuration2005::removeDeploymentTool(DeploymentTool::Ptr tool)
-{
- m_deploymentTools.removeAll(tool);
-}
-
-QList<DeploymentTool::Ptr> Configuration2005::deploymentTools() const
-{
- return m_deploymentTools;
-}
-
-QList<DeploymentTool::Ptr> Configuration2005::deploymentTools(const QString &attributeName, const QString &attributeValue) const
-{
- QList<DeploymentTool::Ptr> deploymentTools;
-
- foreach (const DeploymentTool::Ptr &tool, m_deploymentTools) {
- if (tool->attributeContainer()->attributeValue(attributeName) == attributeValue)
- deploymentTools.append(tool);
- }
- return deploymentTools;
-}
-
-
-Configuration2008::Configuration2008(const QString &nodeName)
- : Configuration2005(nodeName)
-{
-}
-
-Configuration2008::Configuration2008(const Configuration2008 &config)
- : Configuration2005(config)
-{
- foreach (const DebuggerTool::Ptr &tool, config.m_debuggerTools)
- m_debuggerTools.append(DebuggerTool::Ptr(new DebuggerTool(*tool)));
-}
-
-Configuration2008 &Configuration2008::operator=(const Configuration2008 &config)
-{
- if (this != &config) {
- Configuration2005::operator =(config);
- m_debuggerTools.clear();
-
- foreach (const DebuggerTool::Ptr &tool, config.m_debuggerTools)
- m_debuggerTools.append(DebuggerTool::Ptr(new DebuggerTool(*tool)));
- }
- return *this;
-}
-
-Configuration2008::~Configuration2008()
-{
-}
-
-void Configuration2008::processToolNode(const QDomNode &toolNode)
-{
- if (toolNode.nodeName() == QLatin1String("Tool")) {
- IConfigurationTool *toolConf = 0;
- QDomNamedNodeMap namedNodeMap = toolNode.toElement().attributes();
-
- for (int i = 0; i < namedNodeMap.size(); ++i) {
- QDomNode domNode = namedNodeMap.item(i);
-
- if (domNode.nodeType() == QDomNode::AttributeNode) {
- QDomAttr domAttribute = domNode.toAttr();
- if (domAttribute.name() == QLatin1String("Name")) {
- ToolDescriptionDataManager *tDDM = ToolDescriptionDataManager::instance();
-
- if (tDDM) {
- ToolDescription *toolDesc = tDDM->toolDescription(domAttribute.value());
-
- if (toolDesc) {
- toolConf = toolDesc->createTool();
- break;
- }
- }
- }
- }
- }
-
- if (toolConf) {
- toolConf->processNode(toolNode);
- m_tools->addTool(toolConf);
- }
- }
-
- else if (toolNode.nodeName() == QLatin1String("DeploymentTool")) {
- DeploymentTool::Ptr deplTool(new DeploymentTool);
- deplTool->processNode(toolNode);
- m_deploymentTools.append(deplTool);
- }
-
- else {
- DebuggerTool::Ptr deplTool(new DebuggerTool);
- deplTool->processNode(toolNode);
- m_debuggerTools.append(deplTool);
- }
-
- // process next sibling
- QDomNode nextSibling = toolNode.nextSibling();
- if (!nextSibling.isNull())
- processToolNode(nextSibling);
-}
-
-QDomNode Configuration2008::toXMLDomNode(QDomDocument &domXMLDocument) const
-{
- QDomElement configurationNode = domXMLDocument.createElement(m_nodeName);
-
- configurationNode.setAttribute(QLatin1String("Name"), m_fullName);
-
- m_attributeContainer->appendToXMLNode(configurationNode);
-
- m_tools->appendToXMLNode(configurationNode, domXMLDocument);
-
- foreach (const DeploymentTool::Ptr &tool, m_deploymentTools)
- configurationNode.appendChild(tool->toXMLDomNode(domXMLDocument));
-
- foreach (const DebuggerTool::Ptr &tool, m_debuggerTools)
- configurationNode.appendChild(tool->toXMLDomNode(domXMLDocument));
-
- return configurationNode;
-}
-
-VcNodeWidget *Configuration2008::createSettingsWidget()
-{
- return new Configuration2008Widget(this);
-}
-
-IConfiguration *Configuration2008::clone() const
-{
- return new Configuration2008(*this);
-}
-
-void Configuration2008::addDebuggerTool(DebuggerTool::Ptr tool)
-{
- if (m_debuggerTools.contains(tool))
- return;
- m_debuggerTools.append(tool);
-}
-
-void Configuration2008::removeDebuggerTool(DebuggerTool::Ptr tool)
-{
- m_debuggerTools.removeAll(tool);
-}
-
-QList<DebuggerTool::Ptr> Configuration2008::debuggerTools() const
-{
- return m_debuggerTools;
-}
-
-QList<DebuggerTool::Ptr> Configuration2008::debuggerTools(const QString &attributeName, const QString &attributeValue) const
-{
- QList<DebuggerTool::Ptr> debuggerTools;
-
- foreach (const DebuggerTool::Ptr &tool, m_debuggerTools) {
- if (tool->attributeContainer()->attributeValue(attributeName) == attributeValue)
- debuggerTools.append(tool);
- }
- return debuggerTools;
-}
-
} // namespace Internal
} // namespace VcProjectManager
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configuration.h b/src/plugins/vcprojectmanager/vcprojectmodel/configuration.h
index ed67ac277b..f1f587e69f 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configuration.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configuration.h
@@ -41,6 +41,7 @@ namespace Internal {
class ConfigurationTool;
class GeneralAttributeContainer;
+class Tools;
class Configuration : public IConfiguration
{
@@ -63,6 +64,8 @@ public:
void setName(const QString &name);
void setPlatform(const QString &platform);
ITools *tools() const;
+ IConfiguration *clone() const;
+ VcNodeWidget *createSettingsWidget();
protected:
virtual void processToolNode(const QDomNode &toolNode);
@@ -73,60 +76,7 @@ protected:
QString m_configurationName;
QString m_nodeName;
GeneralAttributeContainer *m_attributeContainer;
- ITools *m_tools;
-};
-
-class Configuration2003 : public Configuration
-{
-public:
- Configuration2003(const QString &nodeName);
- Configuration2003(const Configuration2003 &config);
- ~Configuration2003();
-
- VcNodeWidget *createSettingsWidget();
- IConfiguration *clone() const;
-};
-
-class Configuration2005 : public Configuration2003
-{
-public:
- Configuration2005(const QString &nodeName);
- Configuration2005(const Configuration2005 &config);
- Configuration2005& operator=(const Configuration2005 &config);
- ~Configuration2005();
- void processToolNode(const QDomNode &toolNode);
- QDomNode toXMLDomNode(QDomDocument &domXMLDocument) const;
-
- VcNodeWidget* createSettingsWidget();
- IConfiguration* clone() const;
-
- void addDeploymentTool(DeploymentTool::Ptr tool);
- void removeDeploymentTool(DeploymentTool::Ptr tool);
- QList<DeploymentTool::Ptr> deploymentTools() const;
- QList<DeploymentTool::Ptr> deploymentTools(const QString &attributeName, const QString &attributeValue) const;
-
- QList<DeploymentTool::Ptr> m_deploymentTools;
-};
-
-class Configuration2008 : public Configuration2005
-{
-public:
- Configuration2008(const QString &nodeName);
- Configuration2008(const Configuration2008 &config);
- Configuration2008& operator=(const Configuration2008 &config);
- ~Configuration2008();
-
- void processToolNode(const QDomNode &toolNode);
- QDomNode toXMLDomNode(QDomDocument &domXMLDocument) const;
- VcNodeWidget* createSettingsWidget();
- IConfiguration* clone() const;
-
- void addDebuggerTool(DebuggerTool::Ptr tool);
- void removeDebuggerTool(DebuggerTool::Ptr tool);
- QList<DebuggerTool::Ptr> debuggerTools() const;
- QList<DebuggerTool::Ptr> debuggerTools(const QString &attributeName, const QString &attributeValue) const;
-
- QList<DebuggerTool::Ptr> m_debuggerTools;
+ Tools *m_tools;
};
} // namespace Internal
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configurationtools.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.cpp
index 3d270b3ad2..a30767b71c 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configurationtools.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.cpp
@@ -27,26 +27,24 @@
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
-#include "configurationtools.h"
-#include "../interfaces/iconfigurationtool.h"
+#include "configurationbuildtools.h"
+#include "../interfaces/iconfigurationbuildtool.h"
#include "../interfaces/itooldescription.h"
namespace VcProjectManager {
namespace Internal {
-ConfigurationTools::ConfigurationTools()
+ConfigurationBuildTools::ConfigurationBuildTools()
{
}
-ITools &ConfigurationTools::operator =(const ITools &tools)
+ConfigurationBuildTools &ConfigurationBuildTools::operator =(const ConfigurationBuildTools &tools)
{
if (this != &tools) {
qDeleteAll(m_tools);
m_tools.clear();
- for (int i = 0; i < tools.toolCount(); ++i) {
- IConfigurationTool *tool = tools.tool(i);
-
+ foreach (IConfigurationBuildTool *tool, tools.m_tools) {
if (tool)
m_tools.append(tool->clone());
}
@@ -55,12 +53,12 @@ ITools &ConfigurationTools::operator =(const ITools &tools)
return *this;
}
-void ConfigurationTools::addTool(IConfigurationTool *tool)
+void ConfigurationBuildTools::addTool(IConfigurationBuildTool *tool)
{
if (!tool || m_tools.contains(tool))
return;
- foreach (IConfigurationTool *toolPtr, m_tools) {
+ foreach (IConfigurationBuildTool *toolPtr, m_tools) {
if (toolPtr->toolDescription()->toolKey() == tool->toolDescription()->toolKey())
return;
}
@@ -68,9 +66,9 @@ void ConfigurationTools::addTool(IConfigurationTool *tool)
m_tools.append(tool);
}
-void ConfigurationTools::removeTool(IConfigurationTool *tool)
+void ConfigurationBuildTools::removeTool(IConfigurationBuildTool *tool)
{
- foreach (IConfigurationTool *toolPtr, m_tools) {
+ foreach (IConfigurationBuildTool *toolPtr, m_tools) {
if (toolPtr->toolDescription()->toolKey() == tool->toolDescription()->toolKey()) {
m_tools.removeOne(toolPtr);
delete toolPtr;
@@ -79,9 +77,9 @@ void ConfigurationTools::removeTool(IConfigurationTool *tool)
}
}
-IConfigurationTool *ConfigurationTools::tool(const QString &toolKey) const
+IConfigurationBuildTool *ConfigurationBuildTools::tool(const QString &toolKey) const
{
- foreach (IConfigurationTool *toolPtr, m_tools) {
+ foreach (IConfigurationBuildTool *toolPtr, m_tools) {
if (toolPtr->toolDescription()->toolKey() == toolKey) {
return toolPtr;
}
@@ -90,7 +88,7 @@ IConfigurationTool *ConfigurationTools::tool(const QString &toolKey) const
return 0;
}
-IConfigurationTool *ConfigurationTools::tool(int index) const
+IConfigurationBuildTool *ConfigurationBuildTools::tool(int index) const
{
if (0 <= index && index < m_tools.size())
return m_tools[index];
@@ -98,14 +96,14 @@ IConfigurationTool *ConfigurationTools::tool(int index) const
return 0;
}
-int ConfigurationTools::toolCount() const
+int ConfigurationBuildTools::toolCount() const
{
return m_tools.size();
}
-void ConfigurationTools::appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const
+void ConfigurationBuildTools::appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const
{
- foreach (const IConfigurationTool *confTool, m_tools)
+ foreach (const IConfigurationBuildTool *confTool, m_tools)
domElement.appendChild(confTool->toXMLDomNode(domDocument));
}
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.h b/src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.h
new file mode 100644
index 0000000000..fbf6307407
--- /dev/null
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configurationbuildtools.h
@@ -0,0 +1,61 @@
+/**************************************************************************
+**
+** 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_CONFIGURATIONBUILDTOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_CONFIGURATIONBUILDTOOLS_H
+
+#include "../interfaces/iconfigurationbuildtools.h"
+
+#include <QList>
+
+namespace VcProjectManager {
+namespace Internal {
+
+class ConfigurationBuildTools : public IConfigurationBuildTools
+{
+public:
+ ConfigurationBuildTools();
+
+ // ITools interface
+ ConfigurationBuildTools &operator =(const ConfigurationBuildTools &tools);
+ void addTool(IConfigurationBuildTool *tool);
+ void removeTool(IConfigurationBuildTool *tool);
+ IConfigurationBuildTool *tool(const QString &toolKey) const;
+ IConfigurationBuildTool *tool(int index) const;
+ int toolCount() const;
+ void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const;
+
+private:
+ QList<IConfigurationBuildTool *> m_tools;
+};
+
+} // namespace Internal
+} // namespace VcProjectManager
+
+#endif // VCPROJECTMANAGER_INTERNAL_CONFIGURATIONBUILDTOOLS_H
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configurations.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/configurations.cpp
index b98faae19d..45dda5cf00 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configurations.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configurations.cpp
@@ -100,19 +100,9 @@ ConfigurationContainer *Configurations::configurationContainer() const
void Configurations::processConfiguration(const QDomNode &configurationNode)
{
- IConfiguration *config = 0;
-
- if (m_vcProjDoc->documentVersion() == VcDocConstants::DV_MSVC_2003)
- config = new Configuration2003(QLatin1String("Configuration"));
- else if (m_vcProjDoc->documentVersion() == VcDocConstants::DV_MSVC_2005)
- config = new Configuration2005(QLatin1String("Configuration"));
- else if (m_vcProjDoc->documentVersion() == VcDocConstants::DV_MSVC_2008)
- config = new Configuration2008(QLatin1String("Configuration"));
-
- if (config) {
- config->processNode(configurationNode);
- m_configurationContainer->addConfiguration(config);
- }
+ IConfiguration *config = new Configuration(QLatin1String("Configuration"));
+ config->processNode(configurationNode);
+ m_configurationContainer->addConfiguration(config);
// process next sibling
QDomNode nextSibling = configurationNode.nextSibling();
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.cpp
index e51b41ff39..ee3f0fbcb7 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.cpp
@@ -42,25 +42,6 @@ ConfigurationsFactory::~ConfigurationsFactory()
{
}
-Configuration::Ptr ConfigurationsFactory::createConfiguration(VcDocConstants::DocumentVersion version, const QString &nodeName)
-{
- Configuration::Ptr config;
-
- switch (version) {
- case VcDocConstants::DV_MSVC_2003:
- config = Configuration::Ptr(new Configuration2003(nodeName));
- break;
- case VcDocConstants::DV_MSVC_2005:
- config = Configuration::Ptr(new Configuration2005(nodeName));
- break;
- case VcDocConstants::DV_MSVC_2008:
- config = Configuration::Ptr(new Configuration2008(nodeName));
- break;
- }
-
- return config;
-}
-
ConfigurationsBaseWidget *ConfigurationsFactory::createSettingsWidget(VcProjectDocument *vcProjDoc, Configurations *config)
{
switch (vcProjDoc->documentVersion()) {
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.h b/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.h
index 039b5f59f9..dfd3663372 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/configurationsfactory.h
@@ -47,7 +47,6 @@ public:
ConfigurationsFactory();
~ConfigurationsFactory();
- static Configuration::Ptr createConfiguration(VcDocConstants::DocumentVersion version, const QString &nodeName);
static ConfigurationsBaseWidget *createSettingsWidget(VcProjectDocument *vcProjDoc, Configurations *config);
};
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.cpp
index 86f90e4176..6865441f77 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.cpp
@@ -38,7 +38,7 @@ DebuggerTool::DebuggerTool()
m_attributeContainer = new GeneralAttributeContainer;
}
-DebuggerTool::DebuggerTool(DebuggerTool &tool)
+DebuggerTool::DebuggerTool(const DebuggerTool &tool)
{
m_attributeContainer = new GeneralAttributeContainer;
*m_attributeContainer = *tool.m_attributeContainer;
@@ -81,6 +81,11 @@ IAttributeContainer *DebuggerTool::attributeContainer() const
return m_attributeContainer;
}
+IDebuggerTool *DebuggerTool::clone() const
+{
+ return new DebuggerTool(*this);
+}
+
void DebuggerTool::processNodeAttributes(const QDomElement &element)
{
QDomNamedNodeMap namedNodeMap = element.attributes();
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.h b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.h
index cc071f0cbc..b84451a670 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertool.h
@@ -30,7 +30,7 @@
#ifndef VCPROJECTMANAGER_INTERNAL_DEBUGGERTOOL_H
#define VCPROJECTMANAGER_INTERNAL_DEBUGGERTOOL_H
-#include "ivcprojectnodemodel.h"
+#include "../interfaces/idebuggertool.h"
#include <QSharedPointer>
@@ -40,13 +40,13 @@ namespace Internal {
class IAttributeContainer;
class GeneralAttributeContainer;
-class DebuggerTool : public IVcProjectXMLNode
+class DebuggerTool : public IDebuggerTool
{
public:
typedef QSharedPointer<DebuggerTool> Ptr;
DebuggerTool();
- DebuggerTool(DebuggerTool &tool);
+ DebuggerTool(const DebuggerTool &tool);
DebuggerTool& operator=(DebuggerTool &tool);
~DebuggerTool();
@@ -55,6 +55,7 @@ public:
QDomNode toXMLDomNode(QDomDocument &domXMLDocument) const;
IAttributeContainer *attributeContainer() const;
+ IDebuggerTool* clone() const;
private:
void processNodeAttributes(const QDomElement &element);
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.cpp
new file mode 100644
index 0000000000..f6bb75cd4e
--- /dev/null
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.cpp
@@ -0,0 +1,74 @@
+/**************************************************************************
+**
+** 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.
+**
+****************************************************************************/
+#include "debuggertools.h"
+#include "../interfaces/idebuggertool.h"
+#include <utils/qtcassert.h>
+
+namespace VcProjectManager {
+namespace Internal {
+
+DebuggerTools::DebuggerTools()
+{
+}
+
+void DebuggerTools::addTool(IDebuggerTool *tool)
+{
+ if (!tool || m_debuggerTools.contains(tool))
+ return;
+ m_debuggerTools.append(tool);
+}
+
+void DebuggerTools::removeTool(IDebuggerTool *tool)
+{
+ if (!tool || !m_debuggerTools.contains(tool))
+ return;
+ m_debuggerTools.removeOne(tool);
+ delete tool;
+}
+
+IDebuggerTool *DebuggerTools::tool(int index) const
+{
+ QTC_ASSERT(0 <= index && index < m_debuggerTools.size(), return 0);
+ return m_debuggerTools[index];
+}
+
+int DebuggerTools::toolCount() const
+{
+ return m_debuggerTools.size();
+}
+
+void DebuggerTools::appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const
+{
+ foreach (const IDebuggerTool* tool, m_debuggerTools)
+ domElement.appendChild(tool->toXMLDomNode(domDocument));
+}
+
+} // namespace Internal
+} // namespace VcProjectManager
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/configurationtools.h b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.h
index d5e7f966d2..a70054e2ea 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/configurationtools.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/debuggertools.h
@@ -27,35 +27,33 @@
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
-#ifndef VCPROJECTMANAGER_INTERNAL_CONFIGURATIONTOOLS_H
-#define VCPROJECTMANAGER_INTERNAL_CONFIGURATIONTOOLS_H
-
-#include "../interfaces/itools.h"
+#ifndef VCPROJECTMANAGER_INTERNAL_DEBUGGERTOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_DEBUGGERTOOLS_H
+#include "../interfaces/idebuggertools.h"
#include <QList>
namespace VcProjectManager {
namespace Internal {
-class ConfigurationTools : public ITools
+class DebuggerTools : public IDebuggerTools
{
public:
- ConfigurationTools();
+ DebuggerTools();
- // ITools interface
- ITools &operator =(const ITools &tools);
- void addTool(IConfigurationTool *tool);
- void removeTool(IConfigurationTool *tool);
- IConfigurationTool *tool(const QString &toolKey) const;
- IConfigurationTool *tool(int index) const;
+ // IDebuggerTools interface
+public:
+ void addTool(IDebuggerTool *tool);
+ void removeTool(IDebuggerTool *tool);
+ IDebuggerTool *tool(int index) const;
int toolCount() const;
void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const;
private:
- QList<IConfigurationTool *> m_tools;
+ QList<IDebuggerTool *> m_debuggerTools;
};
} // namespace Internal
} // namespace VcProjectManager
-#endif // VCPROJECTMANAGER_INTERNAL_CONFIGURATIONTOOLS_H
+#endif // VCPROJECTMANAGER_INTERNAL_DEBUGGERTOOLS_H
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.cpp
index d4d4b4036d..5561cf21c5 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.cpp
@@ -77,6 +77,11 @@ IAttributeContainer *DeploymentTool::attributeContainer() const
return m_attributeContainer;
}
+IDeploymentTool *DeploymentTool::clone() const
+{
+ return new DeploymentTool(*this);
+}
+
void DeploymentTool::processNodeAttributes(const QDomElement &element)
{
QDomNamedNodeMap namedNodeMap = element.attributes();
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.h b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.h
index f59552b979..bc90c2d9ff 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttool.h
@@ -30,7 +30,7 @@
#ifndef VCPROJECTMANAGER_INTERNAL_DEPLOYMENTTOOL_H
#define VCPROJECTMANAGER_INTERNAL_DEPLOYMENTTOOL_H
-#include "ivcprojectnodemodel.h"
+#include "../interfaces/ideploymenttool.h"
#include <QHash>
#include <QSharedPointer>
@@ -41,7 +41,7 @@ namespace Internal {
class IAttributeContainer;
class GeneralAttributeContainer;
-class DeploymentTool : public IVcProjectXMLNode
+class DeploymentTool : public IDeploymentTool
{
public:
typedef QSharedPointer<DeploymentTool> Ptr;
@@ -56,6 +56,7 @@ public:
QDomNode toXMLDomNode(QDomDocument &domXMLDocument) const;
IAttributeContainer *attributeContainer() const;
+ IDeploymentTool* clone() const;
private:
void processNodeAttributes(const QDomElement &element);
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.cpp
new file mode 100644
index 0000000000..2f5c97f312
--- /dev/null
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.cpp
@@ -0,0 +1,94 @@
+/**************************************************************************
+**
+** 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.
+**
+****************************************************************************/
+#include "deploymenttools.h"
+#include "../interfaces/ideploymenttool.h"
+
+#include <utils/qtcassert.h>
+
+namespace VcProjectManager {
+namespace Internal {
+
+DeploymentTools::DeploymentTools()
+{
+}
+
+DeploymentTools::DeploymentTools(const DeploymentTools &tools)
+{
+ foreach (IDeploymentTool *tool, tools.m_deploymentTools)
+ m_deploymentTools.append(tool->clone());
+}
+
+DeploymentTools &DeploymentTools::operator=(const DeploymentTools &tools)
+{
+ if (this != &tools) {
+ qDeleteAll(m_deploymentTools);
+ m_deploymentTools.clear();
+ foreach (IDeploymentTool *tool, tools.m_deploymentTools)
+ m_deploymentTools.append(tool->clone());
+ }
+ return *this;
+}
+
+void DeploymentTools::addTool(IDeploymentTool *tool)
+{
+ if (!tool || m_deploymentTools.contains(tool))
+ return;
+
+ m_deploymentTools.append(tool);
+}
+
+void DeploymentTools::removeTool(IDeploymentTool *tool)
+{
+ if (!tool || !m_deploymentTools.contains(tool))
+ return;
+
+ m_deploymentTools.removeOne(tool);
+ delete tool;
+}
+
+IDeploymentTool *DeploymentTools::tool(int index) const
+{
+ QTC_ASSERT(0 <= index && index < m_deploymentTools.size(), return 0);
+ return m_deploymentTools[index];
+}
+
+int DeploymentTools::toolCount() const
+{
+ return m_deploymentTools.size();
+}
+
+void DeploymentTools::appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const
+{
+ foreach (const IDeploymentTool *tool, m_deploymentTools)
+ domElement.appendChild(tool->toXMLDomNode(domDocument));
+}
+
+} // namespace Internal
+} // namespace VcProjectManager
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.h b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.h
new file mode 100644
index 0000000000..007990a2d1
--- /dev/null
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/deploymenttools.h
@@ -0,0 +1,59 @@
+/**************************************************************************
+**
+** 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_DEPLOYMENTTOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_DEPLOYMENTTOOLS_H
+
+#include "../interfaces/ideploymenttools.h"
+#include <QList>
+
+namespace VcProjectManager {
+namespace Internal {
+
+class DeploymentTools : public IDeploymentTools
+{
+public:
+ DeploymentTools();
+ DeploymentTools(const DeploymentTools &tools);
+ DeploymentTools& operator=(const DeploymentTools &tools);
+ // IDeploymentTools interface
+ void addTool(IDeploymentTool *tool);
+ void removeTool(IDeploymentTool *tool);
+ IDeploymentTool *tool(int index) const;
+ int toolCount() const;
+ void appendToXMLNode(QDomElement &domElement, QDomDocument &domDocument) const;
+
+private:
+ QList<IDeploymentTool *> m_deploymentTools;
+};
+
+} // namespace Internal
+} // namespace VcProjectManager
+
+#endif // VCPROJECTMANAGER_INTERNAL_DEPLOYMENTTOOLS_H
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/file.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/file.cpp
index f38f7736ab..ab69e98416 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/file.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/file.cpp
@@ -195,18 +195,9 @@ QString File::canonicalPath() const
void File::processFileConfiguration(const QDomNode &fileConfigNode)
{
- IConfiguration *fileConfig = 0;
- if (m_parentProjectDoc->documentVersion() == VcDocConstants::DV_MSVC_2003)
- fileConfig = new Configuration2003(QLatin1String("FileConfiguration"));
- else if (m_parentProjectDoc->documentVersion() == VcDocConstants::DV_MSVC_2005)
- fileConfig = new Configuration2005(QLatin1String("FileConfiguration"));
- else if (m_parentProjectDoc->documentVersion() == VcDocConstants::DV_MSVC_2008)
- fileConfig = new Configuration2008(QLatin1String("FileConfiguration"));
-
- if (fileConfig) {
- fileConfig->processNode(fileConfigNode);
- m_configurationContainer->addConfiguration(fileConfig);
- }
+ IConfiguration *fileConfig = new Configuration(QLatin1String("FileConfiguration"));
+ fileConfig->processNode(fileConfigNode);
+ m_configurationContainer->addConfiguration(fileConfig);
// process next sibling
QDomNode nextSibling = fileConfigNode.nextSibling();
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/projectreference_private.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/projectreference_private.cpp
index 1b365da45d..a90b0c8d43 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/projectreference_private.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/projectreference_private.cpp
@@ -216,7 +216,7 @@ ProjectReference2003_Private &ProjectReference2003_Private::operator =(const Pro
IConfiguration *ProjectReference2003_Private::createReferenceConfiguration() const
{
- return new Configuration2003(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
@@ -315,7 +315,7 @@ void ProjectReference2005_Private::processNodeAttributes(const QDomElement &elem
IConfiguration *ProjectReference2005_Private::createReferenceConfiguration() const
{
- return new Configuration2005(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
@@ -436,7 +436,7 @@ void ProjectReference2008_Private::processNodeAttributes(const QDomElement &elem
IConfiguration *ProjectReference2008_Private::createReferenceConfiguration() const
{
- return new Configuration2008(QLatin1String("ReferenceConfiguration"));
+ return new Configuration(QLatin1String("ReferenceConfiguration"));
}
} // namespace Internal
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/tools.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/tools.cpp
new file mode 100644
index 0000000000..762f6746fc
--- /dev/null
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/tools.cpp
@@ -0,0 +1,89 @@
+/**************************************************************************
+**
+** 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.
+**
+****************************************************************************/
+#include "tools.h"
+#include "deploymenttools.h"
+#include "configurationbuildtools.h"
+#include "debuggertools.h"
+
+namespace VcProjectManager {
+namespace Internal {
+
+Tools::Tools()
+ : m_configurationBuildTools(new ConfigurationBuildTools),
+ m_deploymentTools(new DeploymentTools),
+ m_debuggerTools(new DebuggerTools)
+{
+}
+
+Tools::Tools(const Tools &tools)
+{
+ m_configurationBuildTools = new ConfigurationBuildTools;
+ m_deploymentTools = new DeploymentTools;
+ m_debuggerTools = new DebuggerTools;
+ *m_configurationBuildTools = *tools.m_configurationBuildTools;
+ *m_deploymentTools = *tools.m_deploymentTools;
+ *m_debuggerTools = *tools.m_debuggerTools;
+}
+
+Tools &Tools::operator=(const Tools &tools)
+{
+ if (this != &tools) {
+ *m_configurationBuildTools = *tools.m_configurationBuildTools;
+ *m_deploymentTools = *tools.m_deploymentTools;
+ *m_debuggerTools = *tools.m_debuggerTools;
+ }
+
+ return *this;
+}
+
+Tools::~Tools()
+{
+ delete m_configurationBuildTools;
+ delete m_debuggerTools;
+ delete m_deploymentTools;
+}
+
+IConfigurationBuildTools *Tools::configurationBuildTools() const
+{
+ return m_configurationBuildTools;
+}
+
+IDeploymentTools *Tools::deploymentTools() const
+{
+ return m_deploymentTools;
+}
+
+IDebuggerTools *Tools::debuggerTools() const
+{
+ return m_debuggerTools;
+}
+
+} // namespace Internal
+} // namespace VcProjectManager
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/tools.h b/src/plugins/vcprojectmanager/vcprojectmodel/tools.h
new file mode 100644
index 0000000000..ff3d60ceb0
--- /dev/null
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/tools.h
@@ -0,0 +1,64 @@
+/**************************************************************************
+**
+** 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_TOOLS_H
+#define VCPROJECTMANAGER_INTERNAL_TOOLS_H
+
+#include "../interfaces/itools.h"
+
+namespace VcProjectManager {
+namespace Internal {
+
+class ConfigurationBuildTools;
+class DeploymentTools;
+class DebuggerTools;
+
+class Tools : public ITools
+{
+public:
+ Tools();
+ Tools(const Tools &tools);
+ Tools& operator=(const Tools &tools);
+ ~Tools();
+
+ // ITools interface
+ IConfigurationBuildTools *configurationBuildTools() const;
+ IDeploymentTools *deploymentTools() const;
+ IDebuggerTools *debuggerTools() const;
+
+private:
+ ConfigurationBuildTools *m_configurationBuildTools;
+ DeploymentTools *m_deploymentTools;
+ DebuggerTools* m_debuggerTools;
+};
+
+} // namespace Internal
+} // namespace VcProjectManager
+
+#endif // VCPROJECTMANAGER_INTERNAL_TOOLS_H
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.cpp
index 8a4a5cfa65..555b4aa8a9 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.cpp
@@ -94,7 +94,7 @@ ISectionContainer *ConfigurationTool::sectionContainer() const
return m_sectionContainer;
}
-IConfigurationTool *ConfigurationTool::clone() const
+IConfigurationBuildTool *ConfigurationTool::clone() const
{
return new ConfigurationTool(*this);
}
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.h b/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.h
index 782aac4501..98ea5cf695 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/tools/configurationtool.h
@@ -32,7 +32,7 @@
#include "../ivcprojectnodemodel.h"
#include "../../widgets/toolwidgets/toolsettingswidget.h"
-#include "../../interfaces/iconfigurationtool.h"
+#include "../../interfaces/iconfigurationbuildtool.h"
#include <QList>
#include <QString>
@@ -44,7 +44,7 @@ class IToolAttribute;
class ToolDescription;
class ToolSection;
-class ConfigurationTool : public IConfigurationTool
+class ConfigurationTool : public IConfigurationBuildTool
{
public:
ConfigurationTool(const IToolDescription* toolDesc);
@@ -59,7 +59,7 @@ public:
VcNodeWidget* createSettingsWidget();
ISectionContainer *sectionContainer() const;
- IConfigurationTool *clone() const;
+ IConfigurationBuildTool *clone() const;
private:
void processNodeAttributes(const QDomElement &domElement);
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.cpp b/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.cpp
index 994ce2ed10..58438ce868 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.cpp
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.cpp
@@ -107,7 +107,7 @@ void ToolDescription::setToolDisplayName(const QString &toolName)
m_displayName = toolName;
}
-IConfigurationTool *ToolDescription::createTool() const
+IConfigurationBuildTool *ToolDescription::createTool() const
{
return new ConfigurationTool(this);
}
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.h b/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.h
index 27513a6f92..499be0581f 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.h
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/tools/toolattributes/tooldescription.h
@@ -57,7 +57,7 @@ public:
QString toolDisplayName() const;
void setToolDisplayName(const QString &toolDisplayName);
- IConfigurationTool* createTool() const;
+ IConfigurationBuildTool* createTool() const;
private:
QString m_displayName;
diff --git a/src/plugins/vcprojectmanager/vcprojectmodel/vcprojectmodel.pri b/src/plugins/vcprojectmanager/vcprojectmodel/vcprojectmodel.pri
index c68b917f9c..7be30c2e9e 100644
--- a/src/plugins/vcprojectmanager/vcprojectmodel/vcprojectmodel.pri
+++ b/src/plugins/vcprojectmanager/vcprojectmodel/vcprojectmodel.pri
@@ -42,10 +42,13 @@ HEADERS += \
vcprojectmodel/tools/toolattributes/toolattributeoption.h \
vcprojectmodel/tools/toolattributes/attributedescriptiondataitem.h \
vcprojectmodel/generalattributecontainer.h \
- vcprojectmodel/configurationtools.h \
vcprojectmodel/tools/toolattributes/toolsectioncontainer.h \
vcprojectmodel/configurationcontainer.h \
- vcprojectmodel/tools/generaltoolattributecontainer.h
+ vcprojectmodel/tools/generaltoolattributecontainer.h \
+ vcprojectmodel/configurationbuildtools.h \
+ vcprojectmodel/deploymenttools.h \
+ vcprojectmodel/tools.h \
+ vcprojectmodel/debuggertools.h
SOURCES += \
vcprojectmodel/vcprojectdocument.cpp \
@@ -87,10 +90,13 @@ SOURCES += \
vcprojectmodel/tools/toolattributes/toolattributeoption.cpp \
vcprojectmodel/tools/toolattributes/attributedescriptiondataitem.cpp \
vcprojectmodel/generalattributecontainer.cpp \
- vcprojectmodel/configurationtools.cpp \
vcprojectmodel/tools/toolattributes/toolsectioncontainer.cpp \
vcprojectmodel/configurationcontainer.cpp \
- vcprojectmodel/tools/generaltoolattributecontainer.cpp
+ vcprojectmodel/tools/generaltoolattributecontainer.cpp \
+ vcprojectmodel/configurationbuildtools.cpp \
+ vcprojectmodel/deploymenttools.cpp \
+ vcprojectmodel/tools.cpp \
+ vcprojectmodel/debuggertools.cpp
OTHER_FILES += \
vcprojectmodel/tools/xml_definitions/VCXMLDataGeneratorTool.xml \
diff --git a/src/plugins/vcprojectmanager/widgets/configurationswidgets.cpp b/src/plugins/vcprojectmanager/widgets/configurationswidgets.cpp
index 4a0a4dfcee..6089b90782 100644
--- a/src/plugins/vcprojectmanager/widgets/configurationswidgets.cpp
+++ b/src/plugins/vcprojectmanager/widgets/configurationswidgets.cpp
@@ -35,6 +35,7 @@
#include "../vcprojectmodel/configurations.h"
#include "../vcprojectmodel/vcprojectdocument.h"
#include "../vcprojectmodel/configurationsfactory.h"
+#include "../vcprojectmodel/configurationcontainer.h"
#include "../vcprojectmodel/configuration.h"
#include "../vcprojectmodel/tools/toolattributes/tooldescription.h"
#include "../vcprojectmodel/tools/toolattributes/tooldescriptiondatamanager.h"
@@ -42,8 +43,8 @@
#include "../vcprojectmodel/files.h"
#include "../vcprojectmodel/file.h"
#include "../interfaces/iattributecontainer.h"
+#include "../interfaces/iconfigurationbuildtools.h"
#include "../interfaces/itools.h"
-#include "../vcprojectmodel/configurationcontainer.h"
namespace VcProjectManager {
namespace Internal {
@@ -254,30 +255,20 @@ void ConfigurationsBaseWidget::removeConfiguration(IConfiguration *config)
IConfiguration *ConfigurationsBaseWidget::createConfiguration(const QString &configNameWithPlatform) const
{
- IConfiguration *config = 0;
-
- if (m_vcProjDoc->documentVersion() == VcDocConstants::DV_MSVC_2003)
- config = new Configuration2003(QLatin1String("Configuration"));
- else if (m_vcProjDoc->documentVersion() == VcDocConstants::DV_MSVC_2005)
- config = new Configuration2005(QLatin1String("Configuration"));
- else if (m_vcProjDoc->documentVersion() == VcDocConstants::DV_MSVC_2008)
- config = new Configuration2008(QLatin1String("Configuration"));
+ IConfiguration *config = new Configuration(QLatin1String("Configuration"));
+ config->setFullName(configNameWithPlatform);
- if (config) {
- config->setFullName(configNameWithPlatform);
+ ToolDescriptionDataManager *tDDM = ToolDescriptionDataManager::instance();
- ToolDescriptionDataManager *tDDM = ToolDescriptionDataManager::instance();
+ if (tDDM) {
+ for (int i = 0; i < tDDM->toolDescriptionCount(); ++i) {
+ ToolDescription *toolDesc = tDDM->toolDescription(i);
- if (tDDM) {
- for (int i = 0; i < tDDM->toolDescriptionCount(); ++i) {
- ToolDescription *toolDesc = tDDM->toolDescription(i);
+ if (toolDesc) {
+ IConfigurationBuildTool *configTool = toolDesc->createTool();
- if (toolDesc) {
- IConfigurationTool *configTool = toolDesc->createTool();
-
- if (configTool)
- config->tools()->addTool(configTool);
- }
+ if (configTool)
+ config->tools()->configurationBuildTools()->addTool(configTool);
}
}
}
diff --git a/src/plugins/vcprojectmanager/widgets/configurationwidgets.cpp b/src/plugins/vcprojectmanager/widgets/configurationwidgets.cpp
index e6ba417304..e3218384da 100644
--- a/src/plugins/vcprojectmanager/widgets/configurationwidgets.cpp
+++ b/src/plugins/vcprojectmanager/widgets/configurationwidgets.cpp
@@ -37,6 +37,7 @@
#include "../vcprojectmodel/tools/tool_constants.h"
#include "../vcprojectmodel/tools/configurationtool.h"
#include "../vcprojectmodel/tools/toolattributes/tooldescription.h"
+#include "../interfaces/iconfigurationbuildtools.h"
#include "../interfaces/itools.h"
namespace VcProjectManager {
@@ -66,8 +67,8 @@ ConfigurationBaseWidget::ConfigurationBaseWidget(Configuration *config)
mainWidgetSplitter->setStretchFactor(1, 5);
// add tool items
- for (int i = 0; i < m_config->tools()->toolCount(); ++i) {
- IConfigurationTool *configTool = m_config->tools()->tool(i);
+ for (int i = 0; i < m_config->tools()->configurationBuildTools()->toolCount(); ++i) {
+ IConfigurationBuildTool *configTool = m_config->tools()->configurationBuildTools()->tool(i);
if (configTool) {
VcNodeWidget *toolWidget = configTool->createSettingsWidget();
@@ -93,35 +94,5 @@ void ConfigurationBaseWidget::saveData()
toolWidget->saveData();
}
-
-Configuration2003Widget::Configuration2003Widget(Configuration *config)
- : ConfigurationBaseWidget(config)
-{
-}
-
-Configuration2003Widget::~Configuration2003Widget()
-{
-}
-
-
-Configuration2005Widget::Configuration2005Widget(Configuration *config)
- : ConfigurationBaseWidget(config)
-{
-}
-
-Configuration2005Widget::~Configuration2005Widget()
-{
-}
-
-
-Configuration2008Widget::Configuration2008Widget(Configuration *config)
- : ConfigurationBaseWidget(config)
-{
-}
-
-Configuration2008Widget::~Configuration2008Widget()
-{
-}
-
} // namespace Internal
} // namespace VcProjectManager
diff --git a/src/plugins/vcprojectmanager/widgets/configurationwidgets.h b/src/plugins/vcprojectmanager/widgets/configurationwidgets.h
index 654d0295e1..cd92e0ea81 100644
--- a/src/plugins/vcprojectmanager/widgets/configurationwidgets.h
+++ b/src/plugins/vcprojectmanager/widgets/configurationwidgets.h
@@ -57,48 +57,6 @@ protected:
QList<VcNodeWidget *> m_toolWidgets;
};
-class Configuration2003Widget : public ConfigurationBaseWidget
-{
-public:
- explicit Configuration2003Widget(Configuration *config);
- ~Configuration2003Widget();
-
-private:
- QListWidget *m_listWidget;
- QStackedWidget *m_stackWidget;
-
- Configuration* m_config;
- QList<VcNodeWidget *> m_toolWidgets;
-};
-
-class Configuration2005Widget : public ConfigurationBaseWidget
-{
-public:
- explicit Configuration2005Widget(Configuration* config);
- ~Configuration2005Widget();
-
-private:
- QListWidget *m_listWidget;
- QStackedWidget *m_stackWidget;
-
- Configuration* m_config;
- QList<VcNodeWidget *> m_toolWidgets;
-};
-
-class Configuration2008Widget : public ConfigurationBaseWidget
-{
-public:
- explicit Configuration2008Widget(Configuration* config);
- ~Configuration2008Widget();
-
-private:
- QListWidget *m_listWidget;
- QStackedWidget *m_stackWidget;
-
- Configuration* m_config;
- QList<VcNodeWidget *> m_toolWidgets;
-};
-
} // namespace Internal
} // namespace VcProjectManager