aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/generator/iarew/iarewsettingspropertygroup.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-07-23 15:45:29 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-07-31 13:12:01 +0000
commit86747ff36bb162764fd8c2f741a1674d16b0b3cd (patch)
treeebc9323f57c601ae49af9cff9fe0674fd71bb6ca /src/plugins/generator/iarew/iarewsettingspropertygroup.cpp
parent2363f13f8fbd001a3544acb2a600010893e4cf80 (diff)
baremetal: Share common generators code
Common code which are used for the 'iarew' and 'keiluv' generators was moved to the corelib/generators library. Besides, this code also can be used in future for the XML-based generators. Change-Id: I79a21e3e078d563600d7f365785731fe9e847045 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/generator/iarew/iarewsettingspropertygroup.cpp')
-rw-r--r--src/plugins/generator/iarew/iarewsettingspropertygroup.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/plugins/generator/iarew/iarewsettingspropertygroup.cpp b/src/plugins/generator/iarew/iarewsettingspropertygroup.cpp
index e51cd317a..de6fae45a 100644
--- a/src/plugins/generator/iarew/iarewsettingspropertygroup.cpp
+++ b/src/plugins/generator/iarew/iarewsettingspropertygroup.cpp
@@ -29,7 +29,6 @@
****************************************************************************/
#include "iarewoptionpropertygroup.h"
-#include "iarewproperty.h"
#include "iarewsettingspropertygroup.h"
namespace qbs {
@@ -37,28 +36,30 @@ namespace qbs {
constexpr int kDataWantNonLocalPropertyValue = 1;
IarewSettingsPropertyGroup::IarewSettingsPropertyGroup()
- : IarewPropertyGroup(QByteArrayLiteral("settings"))
+ : gen::xml::PropertyGroup(QByteArrayLiteral("settings"))
{
// Append name property item.
- m_nameProperty = appendChild<IarewProperty>(
+ m_nameProperty = appendChild<gen::xml::Property>(
QByteArrayLiteral("name"), QVariant{});
// Append archive version property item.
- m_archiveVersionProperty = appendChild<IarewProperty>(
+ m_archiveVersionProperty = appendChild<gen::xml::Property>(
QByteArrayLiteral("archiveVersion"), QVariant{});
// Append data property group item.
- m_dataPropertyGroup = appendChild<IarewPropertyGroup>(
+ m_dataPropertyGroup = appendChild<gen::xml::PropertyGroup>(
QByteArrayLiteral("data"));
// Append data version property item.
- m_dataVersionProperty = m_dataPropertyGroup->appendChild<IarewProperty>(
+ m_dataVersionProperty = m_dataPropertyGroup->appendChild<
+ gen::xml::Property>(
QByteArrayLiteral("version"), QVariant{});
// Append data want non-local property item.
- m_dataPropertyGroup->appendChild<IarewProperty>(
+ m_dataPropertyGroup->appendChild<gen::xml::Property>(
QByteArrayLiteral("wantNonLocal"),
kDataWantNonLocalPropertyValue);
// Append data debug property item.
- m_dataDebugProperty = m_dataPropertyGroup->appendChild<IarewProperty>(
+ m_dataDebugProperty = m_dataPropertyGroup->appendChild<
+ gen::xml::Property>(
QByteArrayLiteral("debug"), QVariant{});
}
@@ -72,7 +73,8 @@ QByteArray IarewSettingsPropertyGroup::name() const
return m_nameProperty->value().toByteArray();
}
-void IarewSettingsPropertyGroup::setArchiveVersion(int archiveVersion)
+void IarewSettingsPropertyGroup::setArchiveVersion(
+ int archiveVersion)
{
m_archiveVersionProperty->setValue(archiveVersion);
}
@@ -92,9 +94,10 @@ void IarewSettingsPropertyGroup::setDataDebugInfo(int debugInfo)
m_dataDebugProperty->setValue(debugInfo);
}
-void IarewSettingsPropertyGroup::addOptionsGroup(QByteArray name,
- QVariant version,
- const QVariantList &states)
+void IarewSettingsPropertyGroup::addOptionsGroup(
+ QByteArray name,
+ QVariant version,
+ const QVariantList &states)
{
m_dataPropertyGroup->appendChild<IarewOptionPropertyGroup>(
std::move(name), std::move(version), states);