aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-11-22 19:22:49 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:12 -0300
commit8a8c0f521c0f2224e8f26e8ad2b5676aaa4ddc69 (patch)
tree3b79d1e5199f129a0828fecade09de77d16d00ca /abstractmetalang.cpp
parentc79374b5a72959f541fdeb95d7e6b57396ed6b15 (diff)
Added the 'AbstractMetaField::isModifiedRemoved' method.
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index de3451d3d..3dc48fac7 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1479,6 +1479,23 @@ AbstractMetaField *AbstractMetaField::copy() const
return returned;
}
+/*******************************************************************************
+ * Indicates that this field has a modification that removes it
+ */
+bool AbstractMetaField::isModifiedRemoved(int types) const
+{
+ FieldModificationList mods = modifications();
+ foreach (FieldModification mod, mods) {
+ if (!mod.isRemoveModifier())
+ continue;
+
+ if ((mod.removal & types) == types)
+ return true;
+ }
+
+ return false;
+}
+
static QString upCaseFirst(const QString &str)
{
Q_ASSERT(!str.isEmpty());