summaryrefslogtreecommitdiff
path: root/qt4/tools
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2010-11-04 01:50:06 -0200
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2010-11-08 18:37:20 -0200
commit21af1d1e9ce13e27c6d57684e7c47b86789e8155 (patch)
treeb8187833f4c4c168c1ca5b79b4fee4bb4be10260 /qt4/tools
parent2561d033c643bab74bdf616b9d31555b4bc3fa7c (diff)
Added padding for all enums.
Diffstat (limited to 'qt4/tools')
-rw-r--r--qt4/tools/qt4-constants-gen.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/qt4/tools/qt4-constants-gen.py b/qt4/tools/qt4-constants-gen.py
index 44f97cf38..4c9d7914c 100644
--- a/qt4/tools/qt4-constants-gen.py
+++ b/qt4/tools/qt4-constants-gen.py
@@ -217,6 +217,11 @@ enum %(singular)s
self.do_val(flag, singular, flag == flagvalues[-1])
self.h("""\
+
+ %s = 0xffffffffU
+""" % ("_" + singular + "Padding"))
+
+ self.h("""\
};
/**
@@ -259,8 +264,13 @@ enum %(singular)s
self.do_val(val, singular, val == vals[-1])
self.h("""\
+
+ %s = 0xffffffffU
};
+""" % ("_" + singular + "Padding"))
+
+ self.h("""\
/**
* \\ingroup enumtypeconsts
*
@@ -276,8 +286,8 @@ const int NUM_%(upper-plural)s = (%(last-val)s+1);
name = (val.getAttribute('suffix') or val.getAttribute('name')).replace('_', '')
self.h("""\
%s\
- %s = %s%s
-""" % (format_docstring(val, indent=' * ', brackets=(' /**', ' */')), prefix + name, val.getAttribute('value'), (not last and ',\n') or ''))
+ %s = %s,
+""" % (format_docstring(val, indent=' * ', brackets=(' /**', ' */')), prefix + name, val.getAttribute('value')))
if __name__ == '__main__':
options, argv = gnu_getopt(argv[1:], '',