summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlli Salli <olli.salli@collabora.co.uk>2008-07-17 20:33:30 +0300
committerOlli Salli <olli.salli@collabora.co.uk>2008-07-17 20:33:30 +0300
commit63cbc180e0e742cdfb598f0e9ceadb0cdbd43220 (patch)
treeb9bd49301d82b6aa148e85762a9a995df74b702d
parent6810c590611807753aeb20833cf4eb95ebfcf270 (diff)
Fix constants-gen to not close the namespace twice
-rw-r--r--qt4/tools/qt4-constants-gen.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/qt4/tools/qt4-constants-gen.py b/qt4/tools/qt4-constants-gen.py
index b7f9af4b9..6d0927319 100644
--- a/qt4/tools/qt4-constants-gen.py
+++ b/qt4/tools/qt4-constants-gen.py
@@ -36,12 +36,7 @@ class Generator(object):
self.spec = get_by_path(dom, "spec")[0]
def __call__(self):
- self.do_header()
- self.do_body()
- self.do_footer()
-
- # Header
- def do_header(self):
+ # Header
stdout.write('/* Generated from ')
stdout.write(get_descendant_text(get_by_path(self.spec, 'title')))
version = get_by_path(self.spec, "version")
@@ -91,8 +86,6 @@ class Generator(object):
*/
""")
- # Body
- def do_body(self):
# Begin namespace
stdout.write("""
namespace %s
@@ -232,10 +225,6 @@ const int NUM_%(upper-plural)s = (%(last-val)s+1);
%s = %s%s
""" % (format_docstring(val, indent=' * ', brackets=(' /**', ' */')), prefix + name, val.getAttribute('value'), (not last and ',\n') or ''))
- # Footer
- def do_footer(self):
- stdout.write('}\n')
-
if __name__ == '__main__':
options, argv = gnu_getopt(argv[1:], '',
['namespace=',