Commits

dirkbaechle committed a474030

- changed all name references from Qt4 to Qt5
- updated list of valid Qt modules

  • Participants
  • Parent commits b136c01

Comments (0)

Files changed (8)

 
-"""SCons.Tool.qt4
+"""SCons.Tool.qt5
 
-Tool-specific initialization for Qt4.
+Tool-specific initialization for Qt5.
 
 There normally shouldn't be any need to import this module directly.
 It will usually be imported through the generic SCons.Tool.Tool()
 """
 
 #
-# Copyright (c) 2001-7,2010 The SCons Foundation
+# Copyright (c) 2001-7,2010,2011,2012 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
 import SCons.Tool
 import SCons.Util
 
-class ToolQt4Warning(SCons.Warnings.Warning):
+class ToolQt5Warning(SCons.Warnings.Warning):
     pass
 
-class GeneratedMocFileNotIncluded(ToolQt4Warning):
+class GeneratedMocFileNotIncluded(ToolQt5Warning):
     pass
 
-class QtdirNotFound(ToolQt4Warning):
+class QtdirNotFound(ToolQt5Warning):
     pass
 
-SCons.Warnings.enableWarningClass(ToolQt4Warning)
+SCons.Warnings.enableWarningClass(ToolQt5Warning)
 
 try:
     sorted
                        'auto_cpppath' : True,
                        'cpppaths' : []}
         try:
-            if int(env.subst('$QT4_AUTOSCAN')) == 0:
+            if int(env.subst('$QT5_AUTOSCAN')) == 0:
                 moc_options['auto_scan'] = False
         except ValueError:
             pass
         try:
-            moc_options['auto_scan_strategy'] = int(env.subst('$QT4_AUTOSCAN_STRATEGY'))
+            moc_options['auto_scan_strategy'] = int(env.subst('$QT5_AUTOSCAN_STRATEGY'))
         except ValueError:
             pass
         try:
-            moc_options['gobble_comments'] = int(env.subst('$QT4_GOBBLECOMMENTS'))
+            moc_options['gobble_comments'] = int(env.subst('$QT5_GOBBLECOMMENTS'))
         except ValueError:
             pass
         try:
-            moc_options['debug'] = int(env.subst('$QT4_DEBUG'))
+            moc_options['debug'] = int(env.subst('$QT5_DEBUG'))
         except ValueError:
             pass
         try:
-            if int(env.subst('$QT4_AUTOMOC_SCANCPPPATH')) == 0:
+            if int(env.subst('$QT5_AUTOMOC_SCANCPPPATH')) == 0:
                 moc_options['auto_cpppath'] = False
         except ValueError:
             pass
         if moc_options['auto_cpppath']:
-            paths = env.get('QT4_AUTOMOC_CPPPATH', [])
+            paths = env.get('QT5_AUTOMOC_CPPPATH', [])
             if not paths:
                 paths = env.get('CPPPATH', [])
             moc_options['cpppaths'].extend(paths)
             h = find_file(hname, [cpp.get_dir()]+moc_options['cpppaths'], env.File)
             if h:
                 if moc_options['debug']:
-                    print "scons: qt4: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
+                    print "scons: qt5: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
                 h_contents = h.get_contents()
                 if moc_options['gobble_comments']:
                     h_contents = self.ccomment.sub('', h_contents)
                 h_contents = self.literal_qobject.sub('""', h_contents)
                 break
         if not h and moc_options['debug']:
-            print "scons: qt4: no header for '%s'." % (str(cpp))
+            print "scons: qt5: no header for '%s'." % (str(cpp))
         if h and self.qo_search.search(h_contents):
             # h file with the Q_OBJECT macro found -> add moc_cpp
-            moc_cpp = env.Moc4(h)
+            moc_cpp = env.Moc5(h)
             moc_o = self.objBuilder(moc_cpp)
             out_sources.extend(moc_o)
             if moc_options['debug']:
-                print "scons: qt4: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp))
+                print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp))
         if cpp and self.qo_search.search(cpp_contents):
             # cpp file with Q_OBJECT macro found -> add moc
             # (to be included in cpp)
-            moc = env.Moc4(cpp)
+            moc = env.Moc5(cpp)
             env.Ignore(moc, moc)
             if moc_options['debug']:
-                print "scons: qt4: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
+                print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
 
     def __automoc_strategy_include_driven(self, env, moc_options,
                                           cpp, cpp_contents, out_sources):
         """
         if self.splitext(str(cpp))[1] in cxx_suffixes:
             added = False
-            h_moc = "%s%s%s" % (env.subst('$QT4_XMOCHPREFIX'),
+            h_moc = "%s%s%s" % (env.subst('$QT5_XMOCHPREFIX'),
                                 self.splitext(cpp.name)[0],
-                                env.subst('$QT4_XMOCHSUFFIX'))
-            cxx_moc = "%s%s%s" % (env.subst('$QT4_XMOCCXXPREFIX'),
+                                env.subst('$QT5_XMOCHSUFFIX'))
+            cxx_moc = "%s%s%s" % (env.subst('$QT5_XMOCCXXPREFIX'),
                                   self.splitext(cpp.name)[0],
-                                  env.subst('$QT4_XMOCCXXSUFFIX'))
+                                  env.subst('$QT5_XMOCCXXSUFFIX'))
             inc_h_moc = r'#include\s+"%s"' % h_moc
             inc_cxx_moc = r'#include\s+"%s"' % cxx_moc
             
                     h = find_file(hname, [cpp.get_dir()]+moc_options['cpppaths'], env.File)
                     if h:
                         if moc_options['debug']:
-                            print "scons: qt4: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
+                            print "scons: qt5: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
                         h_contents = h.get_contents()
                         if moc_options['gobble_comments']:
                             h_contents = self.ccomment.sub('', h_contents)
                         h_contents = self.literal_qobject.sub('""', h_contents)
                         break
                 if not h and moc_options['debug']:
-                    print "scons: qt4: no header for '%s'." % (str(cpp))
+                    print "scons: qt5: no header for '%s'." % (str(cpp))
                 if h and self.qo_search.search(h_contents):
                     # h file with the Q_OBJECT macro found -> add moc_cpp
-                    moc_cpp = env.XMoc4(h)
+                    moc_cpp = env.XMoc5(h)
                     env.Ignore(moc_cpp, moc_cpp)
                     added = True
                     # Removing file from list of sources, because it is not to be
                                 out_sources.pop(idx)
                                 break
                     if moc_options['debug']:
-                        print "scons: qt4: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(h_moc))
+                        print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(h_moc))
                 else:
                     if moc_options['debug']:
-                        print "scons: qt4: found no Q_OBJECT macro in '%s', but a moc'ed version '%s' gets included in '%s'" % (str(h), inc_h_moc, cpp.name)
+                        print "scons: qt5: found no Q_OBJECT macro in '%s', but a moc'ed version '%s' gets included in '%s'" % (str(h), inc_h_moc, cpp.name)
 
             if cpp and re.search(inc_cxx_moc, cpp_contents):
                 # cpp file with #include directive for a MOCed cxx file found -> add moc
                 if self.qo_search.search(cpp_contents):
-                    moc = env.XMoc4(target=cxx_moc, source=cpp)
+                    moc = env.XMoc5(target=cxx_moc, source=cpp)
                     env.Ignore(moc, moc)
                     added = True
                     if moc_options['debug']:
-                        print "scons: qt4: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
+                        print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
                 else:
                     if moc_options['debug']:
-                        print "scons: qt4: found no Q_OBJECT macro in '%s', although a moc'ed version '%s' of itself gets included" % (cpp.name, inc_cxx_moc)
+                        print "scons: qt5: found no Q_OBJECT macro in '%s', although a moc'ed version '%s' of itself gets included" % (cpp.name, inc_cxx_moc)
 
             if not added:
                 # Fallback to default Automoc strategy (Q_OBJECT driven)
     def __call__(self, target, source, env):
         """
         Smart autoscan function. Gets the list of objects for the Program
-        or Lib. Adds objects and builders for the special qt4 files.
+        or Lib. Adds objects and builders for the special qt5 files.
         """
         moc_options = self.create_automoc_options(env)
         
         # The following is kind of hacky to get builders working properly (FIXME)
         objBuilderEnv = self.objBuilder.env
         self.objBuilder.env = env
-        mocBuilderEnv = env.Moc4.env
-        env.Moc4.env = env
-        xMocBuilderEnv = env.XMoc4.env
-        env.XMoc4.env = env
+        mocBuilderEnv = env.Moc5.env
+        env.Moc5.env = env
+        xMocBuilderEnv = env.XMoc5.env
+        env.XMoc5.env = env
         
         # make a deep copy for the result; MocH objects will be appended
         out_sources = source[:]
             if not moc_options['auto_scan']:
                 break
             if isinstance(obj,basestring):  # big kludge!
-                print "scons: qt4: '%s' MAYBE USING AN OLD SCONS VERSION AND NOT CONVERTED TO 'File'. Discarded." % str(obj)
+                print "scons: qt5: '%s' MAYBE USING AN OLD SCONS VERSION AND NOT CONVERTED TO 'File'. Discarded." % str(obj)
                 continue
             if not obj.has_builder():
                 # binary obj file provided
                 if moc_options['debug']:
-                    print "scons: qt4: '%s' seems to be a binary. Discarded." % str(obj)
+                    print "scons: qt5: '%s' seems to be a binary. Discarded." % str(obj)
                 continue
             cpp = obj.sources[0]
             if not self.splitext(str(cpp))[1] in cxx_suffixes:
                 if moc_options['debug']:
-                    print "scons: qt4: '%s' is no cxx file. Discarded." % str(cpp) 
+                    print "scons: qt5: '%s' is no cxx file. Discarded." % str(cpp) 
                 # c or fortran source
                 continue
             try:
 
         # restore the original env attributes (FIXME)
         self.objBuilder.env = objBuilderEnv
-        env.Moc4.env = mocBuilderEnv
-        env.XMoc4.env = xMocBuilderEnv
+        env.Moc5.env = mocBuilderEnv
+        env.XMoc5.env = xMocBuilderEnv
 
         # We return the set of source entries as sorted sequence, else
         # the order might accidentally change from one build to another
 AutomocStatic = _Automoc('StaticObject')
 
 def _detect(env):
-    """Not really safe, but fast method to detect the Qt4 library"""
-    # TODO: check output of "moc -v" for correct version >= 4.0.0
-    try: return env['QT4DIR']
+    """Not really safe, but fast method to detect the Qt5 library"""
+    # TODO: check output of "moc -v" for correct version >= 5.0.0
+    try: return env['QT5DIR']
     except KeyError: pass
 
     try: return env['QTDIR']
     except KeyError: pass
 
-    try: return os.environ['QT4DIR']
+    try: return os.environ['QT5DIR']
     except KeyError: pass
 
     try: return os.environ['QTDIR']
     except KeyError: pass
 
-    moc = env.WhereIs('moc-qt4') or env.WhereIs('moc4') or env.WhereIs('moc')
+    moc = env.WhereIs('moc-qt5') or env.WhereIs('moc5') or env.WhereIs('moc')
     if moc:
-        QT4DIR = os.path.dirname(os.path.dirname(moc))
+        QT5DIR = os.path.dirname(os.path.dirname(moc))
         SCons.Warnings.warn(
             QtdirNotFound,
-            "QT4DIR variable is not defined, using moc executable as a hint (QT4DIR=%s)" % QT4DIR)
-        return QT4DIR
+            "QT5DIR variable is not defined, using moc executable as a hint (QT5DIR=%s)" % QT5DIR)
+        return QT5DIR
 
     raise SCons.Errors.StopError(
         QtdirNotFound,
-        "Could not detect Qt 4 installation")
+        "Could not detect Qt 5 installation")
     return None
 
 
     if sourceBase:
         sHead, sTail = os.path.split(sourceBase)
 
-    t = __qrc_path(sHead, env.subst('$QT4_QRCCXXPREFIX'),
-                   sTail, env.subst('$QT4_QRCCXXSUFFIX'))
+    t = __qrc_path(sHead, env.subst('$QT5_QRCCXXPREFIX'),
+                   sTail, env.subst('$QT5_QRCCXXSUFFIX'))
 
     return t, source
 
 def __moc_generator_from_h(source, target, env, for_signature):
     pass_defines = False
     try:
-        if int(env.subst('$QT4_CPPDEFINES_PASSTOMOC')) == 1:
+        if int(env.subst('$QT5_CPPDEFINES_PASSTOMOC')) == 1:
             pass_defines = True
     except ValueError:
         pass
     
     if pass_defines:
-        return '$QT4_MOC $QT4_MOCDEFINES $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE'
+        return '$QT5_MOC $QT5_MOCDEFINES $QT5_MOCFROMHFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE'
     else:
-        return '$QT4_MOC $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE'
+        return '$QT5_MOC $QT5_MOCFROMHFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE'
 
 def __moc_generator_from_cxx(source, target, env, for_signature):
     pass_defines = False
     try:
-        if int(env.subst('$QT4_CPPDEFINES_PASSTOMOC')) == 1:
+        if int(env.subst('$QT5_CPPDEFINES_PASSTOMOC')) == 1:
             pass_defines = True
     except ValueError:
         pass
     
     if pass_defines:
-        return ['$QT4_MOC $QT4_MOCDEFINES $QT4_MOCFROMCXXFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
+        return ['$QT5_MOC $QT5_MOCDEFINES $QT5_MOCFROMCXXFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE',
                 SCons.Action.Action(checkMocIncluded,None)]
     else:
-        return ['$QT4_MOC $QT4_MOCFROMCXXFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
+        return ['$QT5_MOC $QT5_MOCFROMCXXFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE',
                 SCons.Action.Action(checkMocIncluded,None)]
 
 def __mocx_generator_from_h(source, target, env, for_signature):
     pass_defines = False
     try:
-        if int(env.subst('$QT4_CPPDEFINES_PASSTOMOC')) == 1:
+        if int(env.subst('$QT5_CPPDEFINES_PASSTOMOC')) == 1:
             pass_defines = True
     except ValueError:
         pass
     
     if pass_defines:
-        return '$QT4_MOC $QT4_MOCDEFINES $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE'
+        return '$QT5_MOC $QT5_MOCDEFINES $QT5_MOCFROMHFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE'
     else:
-        return '$QT4_MOC $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE'
+        return '$QT5_MOC $QT5_MOCFROMHFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE'
 
 def __mocx_generator_from_cxx(source, target, env, for_signature):
     pass_defines = False
     try:
-        if int(env.subst('$QT4_CPPDEFINES_PASSTOMOC')) == 1:
+        if int(env.subst('$QT5_CPPDEFINES_PASSTOMOC')) == 1:
             pass_defines = True
     except ValueError:
         pass
     
     if pass_defines:
-        return ['$QT4_MOC $QT4_MOCDEFINES $QT4_MOCFROMCXXFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
+        return ['$QT5_MOC $QT5_MOCDEFINES $QT5_MOCFROMCXXFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE',
                 SCons.Action.Action(checkMocIncluded,None)]
     else:
-        return ['$QT4_MOC $QT4_MOCFROMCXXFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
+        return ['$QT5_MOC $QT5_MOCFROMCXXFLAGS $QT5_MOCINCFLAGS -o $TARGET $SOURCE',
                 SCons.Action.Action(checkMocIncluded,None)]
 
 def __qrc_generator(source, target, env, for_signature):
     name_defined = False
     try:
-        if env.subst('$QT4_QRCFLAGS').find('-name') >= 0:
+        if env.subst('$QT5_QRCFLAGS').find('-name') >= 0:
             name_defined = True
     except ValueError:
         pass
     
     if name_defined:
-        return '$QT4_RCC $QT4_QRCFLAGS $SOURCE -o $TARGET'
+        return '$QT5_RCC $QT5_QRCFLAGS $SOURCE -o $TARGET'
     else:
-        qrc_suffix = env.subst('$QT4_QRCSUFFIX')
+        qrc_suffix = env.subst('$QT5_QRCSUFFIX')
         src = str(source[0])
         head, tail = os.path.split(src)
         if tail:
             src = tail
-        qrc_suffix = env.subst('$QT4_QRCSUFFIX')
+        qrc_suffix = env.subst('$QT5_QRCSUFFIX')
         if src.endswith(qrc_suffix):
             qrc_stem = src[:-len(qrc_suffix)]
         else:
             qrc_stem = src
-        return '$QT4_RCC $QT4_QRCFLAGS -name %s $SOURCE -o $TARGET' % qrc_stem
+        return '$QT5_RCC $QT5_QRCFLAGS -name %s $SOURCE -o $TARGET' % qrc_stem
 
 #
 # Builders
 #
 __ts_builder = SCons.Builder.Builder(        
-        action = SCons.Action.Action('$QT4_LUPDATECOM','$QT4_LUPDATECOMSTR'),
+        action = SCons.Action.Action('$QT5_LUPDATECOM','$QT5_LUPDATECOMSTR'),
         suffix = '.ts',
         source_factory = SCons.Node.FS.Entry)
 __qm_builder = SCons.Builder.Builder(
-        action = SCons.Action.Action('$QT4_LRELEASECOM','$QT4_LRELEASECOMSTR'),
+        action = SCons.Action.Action('$QT5_LRELEASECOM','$QT5_LRELEASECOMSTR'),
         src_suffix = '.ts',
         suffix = '.qm')
 __qrc_builder = SCons.Builder.Builder(
         action = SCons.Action.CommandGeneratorAction(__qrc_generator, {}),
         source_scanner = __qrcscanner,
-        src_suffix = '$QT4_QRCSUFFIX',
-        suffix = '$QT4_QRCCXXSUFFIX',
-        prefix = '$QT4_QRCCXXPREFIX',
+        src_suffix = '$QT5_QRCSUFFIX',
+        suffix = '$QT5_QRCCXXSUFFIX',
+        prefix = '$QT5_QRCCXXPREFIX',
         single_source = 1)
 __ex_moc_builder = SCons.Builder.Builder(
         action = SCons.Action.CommandGeneratorAction(__moc_generator_from_h, {}))
 __ex_uic_builder = SCons.Builder.Builder(
-        action = SCons.Action.Action('$QT4_UICCOM', '$QT4_UICCOMSTR'),
+        action = SCons.Action.Action('$QT5_UICCOM', '$QT5_UICCOMSTR'),
         src_suffix = '.ui')
 
 
 #
 # Wrappers (pseudo-Builders)
 #
-def Ts4(env, target, source=None, *args, **kw):
+def Ts5(env, target, source=None, *args, **kw):
     """
-    A pseudo-Builder wrapper around the LUPDATE executable of Qt4.
+    A pseudo-Builder wrapper around the LUPDATE executable of Qt5.
         lupdate [options] [source-file|path]... -ts ts-files
     """
     if not SCons.Util.is_List(target):
     if not SCons.Util.is_List(source):
         source = [source]
 
-    # Check QT4_CLEAN_TS and use NoClean() function
+    # Check QT5_CLEAN_TS and use NoClean() function
     clean_ts = False
     try:
-        if int(env.subst('$QT4_CLEAN_TS')) == 1:
+        if int(env.subst('$QT5_CLEAN_TS')) == 1:
             clean_ts = True
     except ValueError:
         pass
 
     return result
 
-def Qm4(env, target, source=None, *args, **kw):
+def Qm5(env, target, source=None, *args, **kw):
     """
-    A pseudo-Builder wrapper around the LRELEASE executable of Qt4.
+    A pseudo-Builder wrapper around the LRELEASE executable of Qt5.
         lrelease [options] ts-files [-qm qm-file]
     """
     if not SCons.Util.is_List(target):
 
     return result
 
-def Qrc4(env, target, source=None, *args, **kw):
+def Qrc5(env, target, source=None, *args, **kw):
     """
-    A pseudo-Builder wrapper around the RCC executable of Qt4.
+    A pseudo-Builder wrapper around the RCC executable of Qt5.
         rcc [options] qrc-files -o out-file
     """
     if not SCons.Util.is_List(target):
 
     return result
 
-def ExplicitMoc4(env, target, source, *args, **kw):
+def ExplicitMoc5(env, target, source, *args, **kw):
     """
-    A pseudo-Builder wrapper around the MOC executable of Qt4.
+    A pseudo-Builder wrapper around the MOC executable of Qt5.
         moc [options] <header-file>
     """
     if not SCons.Util.is_List(target):
 
     return result
 
-def ExplicitUic4(env, target, source, *args, **kw):
+def ExplicitUic5(env, target, source, *args, **kw):
     """
-    A pseudo-Builder wrapper around the UIC executable of Qt4.
+    A pseudo-Builder wrapper around the UIC executable of Qt5.
         uic [options] <uifile>
     """
     if not SCons.Util.is_List(target):
     return result
 
 def generate(env):
-    """Add Builders and construction variables for qt4 to an Environment."""
+    """Add Builders and construction variables for qt5 to an Environment."""
 
-    def locateQt4Command(env, command, qtdir) :
-        suffixes = [
-            '-qt4',
-            '-qt4.exe',
-            '4',
-            '4.exe',
-            '',
-            '.exe',
-        ]
+    suffixes = [
+        '-qt5',
+        '-qt5.exe',
+        '5',
+        '5.exe',
+        '',
+        '.exe',
+    ]
+    command_suffixes = ['-qt5', '5', '']
+        
+    def locateQt5Command(env, command, qtdir) :
         triedPaths = []
         for suffix in suffixes :
             fullpath = os.path.join(qtdir,'bin',command + suffix)
                 return fullpath
             triedPaths.append(fullpath)
 
-        fullpath = env.Detect([command+'-qt4', command+'4', command])
+        fullpath = env.Detect([command+s for s in command_suffixes])
         if not (fullpath is None) : return fullpath
 
-        raise Exception("Qt4 command '" + command + "' not found. Tried: " + ', '.join(triedPaths))
+        raise Exception("Qt5 command '" + command + "' not found. Tried: " + ', '.join(triedPaths))
 
     CLVar = SCons.Util.CLVar
     Action = SCons.Action.Action
     Builder = SCons.Builder.Builder
 
-    env['QT4DIR']  = _detect(env)
+    env['QT5DIR']  = _detect(env)
     # TODO: 'Replace' should be 'SetDefault'
 #    env.SetDefault(
     env.Replace(
-        QT4DIR  = _detect(env),
-        QT4_BINPATH = os.path.join('$QT4DIR', 'bin'),
-        # TODO: This is not reliable to QT4DIR value changes but needed in order to support '-qt4' variants
-        QT4_MOC = locateQt4Command(env,'moc', env['QT4DIR']),
-        QT4_UIC = locateQt4Command(env,'uic', env['QT4DIR']),
-        QT4_RCC = locateQt4Command(env,'rcc', env['QT4DIR']),
-        QT4_LUPDATE = locateQt4Command(env,'lupdate', env['QT4DIR']),
-        QT4_LRELEASE = locateQt4Command(env,'lrelease', env['QT4DIR']),
+        QT5DIR  = _detect(env),
+        QT5_BINPATH = os.path.join('$QT5DIR', 'bin'),
+        # TODO: This is not reliable to QT5DIR value changes but needed in order to support '-qt5' variants
+        QT5_MOC = locateQt5Command(env,'moc', env['QT5DIR']),
+        QT5_UIC = locateQt5Command(env,'uic', env['QT5DIR']),
+        QT5_RCC = locateQt5Command(env,'rcc', env['QT5DIR']),
+        QT5_LUPDATE = locateQt5Command(env,'lupdate', env['QT5DIR']),
+        QT5_LRELEASE = locateQt5Command(env,'lrelease', env['QT5DIR']),
 
-        QT4_AUTOSCAN = 1, # Should the qt4 tool try to figure out, which sources are to be moc'ed?
-        QT4_AUTOSCAN_STRATEGY = 0, # While scanning for files to moc, should we search for includes in qtsolutions style?
-        QT4_GOBBLECOMMENTS = 0, # If set to 1, comments are removed before scanning cxx/h files.
-        QT4_CPPDEFINES_PASSTOMOC = 1, # If set to 1, all CPPDEFINES get passed to the moc executable.
-        QT4_CLEAN_TS = 0, # If set to 1, translation files (.ts) get cleaned on 'scons -c'
-        QT4_AUTOMOC_SCANCPPPATH = 1, # If set to 1, the CPPPATHs (or QT4_AUTOMOC_CPPPATH) get scanned for moc'able files
-        QT4_AUTOMOC_CPPPATH = [], # Alternative paths that get scanned for moc files
+        QT5_AUTOSCAN = 1, # Should the qt5 tool try to figure out, which sources are to be moc'ed?
+        QT5_AUTOSCAN_STRATEGY = 0, # While scanning for files to moc, should we search for includes in qtsolutions style?
+        QT5_GOBBLECOMMENTS = 0, # If set to 1, comments are removed before scanning cxx/h files.
+        QT5_CPPDEFINES_PASSTOMOC = 1, # If set to 1, all CPPDEFINES get passed to the moc executable.
+        QT5_CLEAN_TS = 0, # If set to 1, translation files (.ts) get cleaned on 'scons -c'
+        QT5_AUTOMOC_SCANCPPPATH = 1, # If set to 1, the CPPPATHs (or QT5_AUTOMOC_CPPPATH) get scanned for moc'able files
+        QT5_AUTOMOC_CPPPATH = [], # Alternative paths that get scanned for moc files
 
-        # Some Qt4 specific flags. I don't expect someone wants to
+        # Some Qt5 specific flags. I don't expect someone wants to
         # manipulate those ...
-        QT4_UICFLAGS = CLVar(''),
-        QT4_MOCFROMHFLAGS = CLVar(''),
-        QT4_MOCFROMCXXFLAGS = CLVar('-i'),
-        QT4_QRCFLAGS = '',
-        QT4_LUPDATEFLAGS = '',
-        QT4_LRELEASEFLAGS = '',
+        QT5_UICFLAGS = CLVar(''),
+        QT5_MOCFROMHFLAGS = CLVar(''),
+        QT5_MOCFROMCXXFLAGS = CLVar('-i'),
+        QT5_QRCFLAGS = '',
+        QT5_LUPDATEFLAGS = '',
+        QT5_LRELEASEFLAGS = '',
 
         # suffixes/prefixes for the headers / sources to generate
-        QT4_UISUFFIX = '.ui',
-        QT4_UICDECLPREFIX = 'ui_',
-        QT4_UICDECLSUFFIX = '.h',
-        QT4_MOCINCPREFIX = '-I',
-        QT4_MOCHPREFIX = 'moc_',
-        QT4_MOCHSUFFIX = '$CXXFILESUFFIX',
-        QT4_MOCCXXPREFIX = '',
-        QT4_MOCCXXSUFFIX = '.moc',
-        QT4_QRCSUFFIX = '.qrc',
-        QT4_QRCCXXSUFFIX = '$CXXFILESUFFIX',
-        QT4_QRCCXXPREFIX = 'qrc_',
-        QT4_MOCDEFPREFIX = '-D',
-        QT4_MOCDEFSUFFIX = '',
-        QT4_MOCDEFINES = '${_defines(QT4_MOCDEFPREFIX, CPPDEFINES, QT4_MOCDEFSUFFIX, __env__)}',
-        QT4_MOCCPPPATH = [],
-        QT4_MOCINCFLAGS = '$( ${_concat(QT4_MOCINCPREFIX, QT4_MOCCPPPATH, INCSUFFIX, __env__, RDirs)} $)',
+        QT5_UISUFFIX = '.ui',
+        QT5_UICDECLPREFIX = 'ui_',
+        QT5_UICDECLSUFFIX = '.h',
+        QT5_MOCINCPREFIX = '-I',
+        QT5_MOCHPREFIX = 'moc_',
+        QT5_MOCHSUFFIX = '$CXXFILESUFFIX',
+        QT5_MOCCXXPREFIX = '',
+        QT5_MOCCXXSUFFIX = '.moc',
+        QT5_QRCSUFFIX = '.qrc',
+        QT5_QRCCXXSUFFIX = '$CXXFILESUFFIX',
+        QT5_QRCCXXPREFIX = 'qrc_',
+        QT5_MOCDEFPREFIX = '-D',
+        QT5_MOCDEFSUFFIX = '',
+        QT5_MOCDEFINES = '${_defines(QT5_MOCDEFPREFIX, CPPDEFINES, QT5_MOCDEFSUFFIX, __env__)}',
+        QT5_MOCCPPPATH = [],
+        QT5_MOCINCFLAGS = '$( ${_concat(QT5_MOCINCPREFIX, QT5_MOCCPPPATH, INCSUFFIX, __env__, RDirs)} $)',
 
-        # Commands for the qt4 support ...
-        QT4_UICCOM = '$QT4_UIC $QT4_UICFLAGS -o $TARGET $SOURCE',
-        QT4_LUPDATECOM = '$QT4_LUPDATE $QT4_LUPDATEFLAGS $SOURCES -ts $TARGET',
-        QT4_LRELEASECOM = '$QT4_LRELEASE $QT4_LRELEASEFLAGS -qm $TARGET $SOURCES',
+        # Commands for the qt5 support ...
+        QT5_UICCOM = '$QT5_UIC $QT5_UICFLAGS -o $TARGET $SOURCE',
+        QT5_LUPDATECOM = '$QT5_LUPDATE $QT5_LUPDATEFLAGS $SOURCES -ts $TARGET',
+        QT5_LRELEASECOM = '$QT5_LRELEASE $QT5_LRELEASEFLAGS -qm $TARGET $SOURCES',
         
         # Specialized variables for the Extended Automoc support
         # (Strategy #1 for qtsolutions)
-        QT4_XMOCHPREFIX = 'moc_',
-        QT4_XMOCHSUFFIX = '.cpp',
-        QT4_XMOCCXXPREFIX = '',
-        QT4_XMOCCXXSUFFIX = '.moc',
+        QT5_XMOCHPREFIX = 'moc_',
+        QT5_XMOCHSUFFIX = '.cpp',
+        QT5_XMOCCXXPREFIX = '',
+        QT5_XMOCCXXSUFFIX = '.moc',
                 
         )
 
     try:
-        env.AddMethod(Ts4, "Ts4")
-        env.AddMethod(Qm4, "Qm4")
-        env.AddMethod(Qrc4, "Qrc4")
-        env.AddMethod(ExplicitMoc4, "ExplicitMoc4")
-        env.AddMethod(ExplicitUic4, "ExplicitUic4")
+        env.AddMethod(Ts5, "Ts5")
+        env.AddMethod(Qm5, "Qm5")
+        env.AddMethod(Qrc5, "Qrc5")
+        env.AddMethod(ExplicitMoc5, "ExplicitMoc5")
+        env.AddMethod(ExplicitUic5, "ExplicitUic5")
     except AttributeError:
         # Looks like we use a pre-0.98 version of SCons...
         from SCons.Script.SConscript import SConsEnvironment
-        SConsEnvironment.Ts4 = Ts4
-        SConsEnvironment.Qm4 = Qm4
-        SConsEnvironment.Qrc4 = Qrc4
-        SConsEnvironment.ExplicitMoc4 = ExplicitMoc4
-        SConsEnvironment.ExplicitUic4 = ExplicitUic4
+        SConsEnvironment.Ts5 = Ts5
+        SConsEnvironment.Qm5 = Qm5
+        SConsEnvironment.Qrc5 = Qrc5
+        SConsEnvironment.ExplicitMoc5 = ExplicitMoc5
+        SConsEnvironment.ExplicitUic5 = ExplicitUic5
 
     # Interface builder
-    uic4builder = Builder(
-        action = SCons.Action.Action('$QT4_UICCOM', '$QT4_UICCOMSTR'),
-        src_suffix='$QT4_UISUFFIX',
-        suffix='$QT4_UICDECLSUFFIX',
-        prefix='$QT4_UICDECLPREFIX',
+    uic5builder = Builder(
+        action = SCons.Action.Action('$QT5_UICCOM', '$QT5_UICCOMSTR'),
+        src_suffix='$QT5_UISUFFIX',
+        suffix='$QT5_UICDECLSUFFIX',
+        prefix='$QT5_UICDECLPREFIX',
         single_source = True
         #TODO: Consider the uiscanner on new scons version
         )
-    env['BUILDERS']['Uic4'] = uic4builder
+    env['BUILDERS']['Uic5'] = uic5builder
 
     # Metaobject builder
     mocBld = Builder(action={}, prefix={}, suffix={})
     for h in header_extensions:
         act = SCons.Action.CommandGeneratorAction(__moc_generator_from_h, {})    
         mocBld.add_action(h, act)
-        mocBld.prefix[h] = '$QT4_MOCHPREFIX'
-        mocBld.suffix[h] = '$QT4_MOCHSUFFIX'
+        mocBld.prefix[h] = '$QT5_MOCHPREFIX'
+        mocBld.suffix[h] = '$QT5_MOCHSUFFIX'
     for cxx in cxx_suffixes:
         act = SCons.Action.CommandGeneratorAction(__moc_generator_from_cxx, {})    
         mocBld.add_action(cxx, act)
-        mocBld.prefix[cxx] = '$QT4_MOCCXXPREFIX'
-        mocBld.suffix[cxx] = '$QT4_MOCCXXSUFFIX'
-    env['BUILDERS']['Moc4'] = mocBld
+        mocBld.prefix[cxx] = '$QT5_MOCCXXPREFIX'
+        mocBld.suffix[cxx] = '$QT5_MOCCXXSUFFIX'
+    env['BUILDERS']['Moc5'] = mocBld
 
     # Metaobject builder for the extended auto scan feature 
     # (Strategy #1 for qtsolutions)
     for h in header_extensions:
         act = SCons.Action.CommandGeneratorAction(__mocx_generator_from_h, {})
         xMocBld.add_action(h, act)
-        xMocBld.prefix[h] = '$QT4_XMOCHPREFIX'
-        xMocBld.suffix[h] = '$QT4_XMOCHSUFFIX'
+        xMocBld.prefix[h] = '$QT5_XMOCHPREFIX'
+        xMocBld.suffix[h] = '$QT5_XMOCHSUFFIX'
     for cxx in cxx_suffixes:
         act = SCons.Action.CommandGeneratorAction(__mocx_generator_from_cxx, {})    
         xMocBld.add_action(cxx, act)
-        xMocBld.prefix[cxx] = '$QT4_XMOCCXXPREFIX'
-        xMocBld.suffix[cxx] = '$QT4_XMOCCXXSUFFIX'
-    env['BUILDERS']['XMoc4'] = xMocBld
+        xMocBld.prefix[cxx] = '$QT5_XMOCCXXPREFIX'
+        xMocBld.suffix[cxx] = '$QT5_XMOCCXXSUFFIX'
+    env['BUILDERS']['XMoc5'] = xMocBld
 
-    # Add the Qrc4 action to the CXX file builder (registers the
+    # Add the Qrc5 action to the CXX file builder (registers the
     # *.qrc extension with the Environment)     
     cfile_builder, cxxfile_builder = SCons.Tool.createCFileBuilders(env)
     qrc_act = SCons.Action.CommandGeneratorAction(__qrc_generator, {})
-    cxxfile_builder.add_action('$QT4_QRCSUFFIX', qrc_act)    
-    cxxfile_builder.add_emitter('$QT4_QRCSUFFIX', __qrc_emitter)    
+    cxxfile_builder.add_action('$QT5_QRCSUFFIX', qrc_act)    
+    cxxfile_builder.add_emitter('$QT5_QRCSUFFIX', __qrc_emitter)    
 
     # We use the emitters of Program / StaticLibrary / SharedLibrary
     # to scan for moc'able files
 
     # TODO: Does dbusxml2cpp need an adapter
     try:
-        env.AddMethod(enable_modules, "EnableQt4Modules")
+        env.AddMethod(enable_modules, "EnableQt5Modules")
     except AttributeError:
         # Looks like we use a pre-0.98 version of SCons...
         from SCons.Script.SConscript import SConsEnvironment
-        SConsEnvironment.EnableQt4Modules = enable_modules
+        SConsEnvironment.EnableQt5Modules = enable_modules
 
 def enable_modules(self, modules, debug=False, crosscompiling=False) :
     import sys
 
     validModules = [
+        # Qt Essentials
         'QtCore',
         'QtGui',
+        'QtMultimedia',
+        'QtMultimediaQuick_p',
+        'QtMultimediaWidgets'
+        'QtNetwork',
+        'QtQml',
+        'QtQuick',
+        'QtQuickParticles',
+        'QtSql',
+        'QtQuickTest',
+        'QtTest',
+        'QtWebKit',
+        'QtWebKitWidgets'
+        'QtWidgets',
+        # Qt Add-Ons
+        'QtConcurrent',
+        'QtDBus',
         'QtOpenGL',
-        'Qt3Support',
-        'QtAssistant', # deprecated
-        'QtAssistantClient',
+        'QtPrintSupport',
+        'QtDeclarative',
         'QtScript',
-        'QtDBus',
-        'QtSql',
+        'QtScriptTools',
         'QtSvg',
-        # The next modules have not been tested yet so, please
-        # maybe they require additional work on non Linux platforms
-        'QtNetwork',
-        'QtTest',
         'QtXml',
         'QtXmlPatterns',
-        'QtUiTools',
+        # Qt Tools
+        'QtHelp',
         'QtDesigner',
         'QtDesignerComponents',
-        'QtWebKit',
-        'QtHelp',
-        'QtScript',
-        'QtScriptTools',
-        'QtMultimedia',
+        # Other
+        'QtCLucene',
+        'QtConcurrent',
+        'QtV8'
         ]
     pclessModules = [
-# in qt <= 4.3 designer and designerComponents are pcless, on qt4.4 they are not, so removed.    
-#        'QtDesigner',
-#        'QtDesignerComponents',
     ]
     staticModules = [
-        'QtUiTools',
     ]
     invalidModules=[]
     for module in modules:
         if module not in validModules :
             invalidModules.append(module)
     if invalidModules :
-        raise Exception("Modules %s are not Qt4 modules. Valid Qt4 modules are: %s"% (
+        raise Exception("Modules %s are not Qt5 modules. Valid Qt5 modules are: %s"% (
             str(invalidModules),str(validModules)))
 
     moduleDefines = {
         'QtScript'   : ['QT_SCRIPT_LIB'],
         'QtSvg'      : ['QT_SVG_LIB'],
-        'Qt3Support' : ['QT_QT3SUPPORT_LIB','QT3_SUPPORT'],
         'QtSql'      : ['QT_SQL_LIB'],
         'QtXml'      : ['QT_XML_LIB'],
         'QtOpenGL'   : ['QT_OPENGL_LIB'],
         if debug : debugSuffix = '_debug'
         for module in modules :
             if module not in pclessModules : continue
-            self.AppendUnique(LIBS=[module+debugSuffix])
-            self.AppendUnique(LIBPATH=[os.path.join("$QT4DIR","lib")])
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include","qt4")])
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include","qt4",module)])
-        pcmodules = [module+debugSuffix for module in modules if module not in pclessModules ]
-        if 'QtDBus' in pcmodules:
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include","qt4","QtDBus")])
-        if "QtAssistant" in pcmodules:
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include","qt4","QtAssistant")])
-            pcmodules.remove("QtAssistant")
-            pcmodules.append("QtAssistantClient")
+            self.AppendUnique(LIBS=[module.replace('Qt','Qt5')+debugSuffix])
+            self.AppendUnique(LIBPATH=[os.path.join("$QT5DIR","lib")])
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include")])
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include",module)])
+        pcmodules = [module.replace('Qt','Qt5')+debugSuffix for module in modules if module not in pclessModules ]
+        if 'Qt5DBus' in pcmodules:
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include","Qt5DBus")])
+        if "Qt5Assistant" in pcmodules:
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include","Qt5Assistant")])
+            pcmodules.remove("Qt5Assistant")
+            pcmodules.append("Qt5AssistantClient")
         self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules))
-        self["QT4_MOCCPPPATH"] = self["CPPPATH"]
+        self["QT5_MOCCPPPATH"] = self["CPPPATH"]
         return
     if sys.platform == "win32" or crosscompiling :
         if crosscompiling:
-            transformedQtdir = transformToWinePath(self['QT4DIR'])
-            self['QT4_MOC'] = "QT4DIR=%s %s"%( transformedQtdir, self['QT4_MOC'])
-        self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include")])
+            transformedQtdir = transformToWinePath(self['QT5DIR'])
+            self['QT5_MOC'] = "QT5DIR=%s %s"%( transformedQtdir, self['QT5_MOC'])
+        self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include")])
         try: modules.remove("QtDBus")
         except: pass
         if debug : debugSuffix = 'd'
         if "QtAssistant" in modules:
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include","QtAssistant")])
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include","QtAssistant")])
             modules.remove("QtAssistant")
             modules.append("QtAssistantClient")
         self.AppendUnique(LIBS=['qtmain'+debugSuffix])
-        self.AppendUnique(LIBS=[lib+debugSuffix+'4' for lib in modules if lib not in staticModules])
+        self.AppendUnique(LIBS=[lib+debugSuffix+'5' for lib in modules if lib not in staticModules])
         self.PrependUnique(LIBS=[lib+debugSuffix for lib in modules if lib in staticModules])
         if 'QtOpenGL' in modules:
             self.AppendUnique(LIBS=['opengl32'])
-        self.AppendUnique(CPPPATH=[ '$QT4DIR/include/'])
-        self.AppendUnique(CPPPATH=[ '$QT4DIR/include/'+module for module in modules])
+        self.AppendUnique(CPPPATH=[ '$QT5DIR/include/'])
+        self.AppendUnique(CPPPATH=[ '$QT5DIR/include/'+module for module in modules])
         if crosscompiling :
-            self["QT4_MOCCPPPATH"] = [
-                path.replace('$QT4DIR', transformedQtdir)
+            self["QT5_MOCCPPPATH"] = [
+                path.replace('$QT5DIR', transformedQtdir)
                     for path in self['CPPPATH'] ]
         else :
-            self["QT4_MOCCPPPATH"] = self["CPPPATH"]
-        self.AppendUnique(LIBPATH=[os.path.join('$QT4DIR','lib')])
+            self["QT5_MOCCPPPATH"] = self["CPPPATH"]
+        self.AppendUnique(LIBPATH=[os.path.join('$QT5DIR','lib')])
         return
+        
     """
     if sys.platform=="darwin" :
         # TODO: Test debug version on Mac
-        self.AppendUnique(LIBPATH=[os.path.join('$QT4DIR','lib')])
-        self.AppendUnique(LINKFLAGS="-F$QT4DIR/lib")
-        self.AppendUnique(LINKFLAGS="-L$QT4DIR/lib") #TODO clean!
+        self.AppendUnique(LIBPATH=[os.path.join('$QT5DIR','lib')])
+        self.AppendUnique(LINKFLAGS="-F$QT5DIR/lib")
+        self.AppendUnique(LINKFLAGS="-L$QT5DIR/lib") #TODO clean!
         if debug : debugSuffix = 'd'
         for module in modules :
-#            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include")])
-#            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include",module)])
-# port qt4-mac:
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include", "qt4")])
-            self.AppendUnique(CPPPATH=[os.path.join("$QT4DIR","include", "qt4", module)])
+#            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include")])
+#            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include",module)])
+# port qt5-mac:
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include", "qt5")])
+            self.AppendUnique(CPPPATH=[os.path.join("$QT5DIR","include", "qt5", module)])
             if module in staticModules :
                 self.AppendUnique(LIBS=[module+debugSuffix]) # TODO: Add the debug suffix
-                self.AppendUnique(LIBPATH=[os.path.join("$QT4DIR","lib")])
+                self.AppendUnique(LIBPATH=[os.path.join("$QT5DIR","lib")])
             else :
 #                self.Append(LINKFLAGS=['-framework', module])
-# port qt4-mac:
+# port qt5-mac:
                 self.Append(LIBS=module)
         if 'QtOpenGL' in modules:
             self.AppendUnique(LINKFLAGS="-F/System/Library/Frameworks")
             self.Append(LINKFLAGS=['-framework', 'AGL']) #TODO ughly kludge to avoid quotes
             self.Append(LINKFLAGS=['-framework', 'OpenGL'])
-        self["QT4_MOCCPPPATH"] = self["CPPPATH"]
+        self["QT5_MOCCPPPATH"] = self["CPPPATH"]
         return
 # This should work for mac but doesn't
-#    env.AppendUnique(FRAMEWORKPATH=[os.path.join(env['QT4DIR'],'lib')])
+#    env.AppendUnique(FRAMEWORKPATH=[os.path.join(env['QT5DIR'],'lib')])
 #    env.AppendUnique(FRAMEWORKS=['QtCore','QtGui','QtOpenGL', 'AGL'])
     """
-
-
+        
 def exists(env):
     return _detect(env)

File docs/SConstruct

 #
-# Copyright (c) 2001-2010 The SCons Foundation
+# Copyright (c) 2001-2010,2011,2012 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the

File docs/html.xsl

 <?xml version='1.0'?>
 <!--
 
-  Copyright (c) 2001-2010 The SCons Foundation
+  Copyright (c) 2001-2010,2011,2012 The SCons Foundation
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the

File docs/manual.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-  Copyright (c) 2001-2010 The SCons Foundation
+  Copyright (c) 2001-2010,2011,2012 The SCons Foundation
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 <article>
-  <title>The SCons qt4 tool</title>
+  <title>The SCons qt5 tool</title>
 
   <articleinfo>
     <author>
       <surname>Dirk Baechle</surname>
     </author>
 
-    <pubdate>2010-12-06</pubdate>
+    <pubdate>2012-12-13</pubdate>
   </articleinfo>
 
   <section id="basics">
     <title>Basics</title>
 
     <para>This tool can be used to compile Qt projects, designed for versions
-    4.x.y and higher. It is not usable for Qt3 and older versions, since some
+    5.x.y and higher. It is not usable for Qt3 and older versions, since some
     of the helper tools (<literal>moc</literal>, <literal>uic</literal>)
     behave different.</para>
 
       <title>Install</title>
 
       <para>Installing it, requires you to copy (or, even better: checkout)
-      the contents of the package's <literal>qt4</literal> folder to</para>
+      the contents of the package's <literal>qt5</literal> folder to</para>
 
       <orderedlist>
         <listitem>
-          <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt4</literal></quote>,
-          if you need the Qt4 Tool in one project only, or</para>
+          <para><quote><literal>/path_to_your_project/site_scons/site_tools/qt5</literal></quote>,
+          if you need the Qt5 Tool in one project only, or</para>
         </listitem>
 
         <listitem>
-          <para><quote><literal>~/.scons/site_scons/site_tools/qt4</literal></quote>,
+          <para><quote><literal>~/.scons/site_scons/site_tools/qt5</literal></quote>,
           for a system-wide installation under your current login.</para>
         </listitem>
       </orderedlist>
     <section id="activation">
       <title>How to activate</title>
 
-      <para>For activating the tool "qt4", you have to add its name to the
+      <para>For activating the tool "qt5", you have to add its name to the
       Environment constructor, like this</para>
 
-      <screen>env = Environment(tools=['default','qt4'])
+      <screen>env = Environment(tools=['default','qt5'])
 </screen>
 
-      <para>On its startup, the Qt4 tool tries to read the variable
-      <literal>QT4DIR</literal> from the current Environment and
+      <para>On its startup, the Qt5 tool tries to read the variable
+      <literal>QT5DIR</literal> from the current Environment and
       <literal>os.environ</literal>. If it is not set, the value of
       <literal>QTDIR</literal> (in Environment/<literal>os.environ</literal>)
       is used as a fallback.</para>
 
-      <para>So, you either have to explicitly give the path of your Qt4
+      <para>So, you either have to explicitly give the path of your Qt5
       installation to the Environment with</para>
 
-      <screen>env['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3'
+      <screen>env['QT5DIR'] = '/usr/local/Trolltech/Qt-5.2.3'
 </screen>
 
-      <para>or set the <literal>QT4DIR</literal> as environment variable in
+      <para>or set the <literal>QT5DIR</literal> as environment variable in
       your shell.</para>
     </section>
 
     <section id="requirements">
       <title>Requirements</title>
 
-      <para>Under Linux, "qt4" uses the system tool
+      <para>Under Linux, "qt5" uses the system tool
       <literal>pkg-config</literal> for automatically setting the required
-      compile and link flags of the single Qt4 modules (like QtCore,
+      compile and link flags of the single Qt5 modules (like QtCore,
       QtGui,...). This means that</para>
 
       <orderedlist>
         <listitem>
           <para>you additionally have to set
           <literal>PKG_CONFIG_PATH</literal> in your shell environment, such
-          that it points to $<literal>QT4DIR/lib/pkgconfig</literal> (or
-          $<literal>QT4DIR/lib</literal> for some older versions).</para>
+          that it points to $<literal>QT5DIR/lib/pkgconfig</literal> (or
+          $<literal>QT5DIR/lib</literal> for some older versions).</para>
         </listitem>
       </orderedlist>
 
       <para>Based on these two environment variables
-      (<literal>QT4DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
-      "qt4" tool initializes all <literal>QT4_*</literal> construction
+      (<literal>QT5DIR</literal> and <literal>PKG_CONFIG_PATH</literal>), the
+      "qt5" tool initializes all <literal>QT5_*</literal> construction
       variables listed in the Reference manual. This happens when the tool is
       "detected" during Environment construction. As a consequence, the setup
       of the tool gets a two-stage process, if you want to override the values
       <screen># Stage 1: create plain environment
 qtEnv = Environment()
 # Set new vars
-qtEnv['QT4DIR'] = '/usr/local/Trolltech/Qt-4.2.3
-qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-4.2.3/lib/pkgconfig'
-# Stage 2: add qt4 tool
-qtEnv.Tool('qt4')
+qtEnv['QT5DIR'] = '/usr/local/Trolltech/Qt-5.2.3
+qtEnv['ENV']['PKG_CONFIG_PATH'] = '/usr/local/Trolltech/Qt-5.2.3/lib/pkgconfig'
+# Stage 2: add qt5 tool
+qtEnv.Tool('qt5')
 </screen>
     </section>
   </section>
 
 # Clone Qt environment
 qtEnv = baseEnv.Clone()
-# Set QT4DIR and PKG_CONFIG_PATH
+# Set QT5DIR and PKG_CONFIG_PATH
 qtEnv['ENV']['PKG_CONFIG_PATH'] = os.path.join(qtdir, 'lib/pkgconfig')
-qtEnv['QT4DIR'] = qtdir
-# Add qt4 tool
-qtEnv.Tool('qt4')
+qtEnv['QT5DIR'] = qtdir
+# Add qt5 tool
+qtEnv.Tool('qt5')
 #...further customization of qt env
 
 # Export environments
 
     <para>In a SConscript</para>
 
-    <screen># Get the Qt4 environment
+    <screen># Get the Qt5 environment
 Import('qtEnv')
 # Clone it
 env = qtEnv.clone()
     assigning a fixed path</para>
 
     <screen>def detectLatestQtDir():
-    return "/usr/local/qt4.3.2"
+    return "/usr/local/qt5.3.2"
 </screen>
 
     <para>or a little more sophisticated</para>
 
     <screen>Import('qtEnv')
 env = qtEnv.Clone()
-env.EnableQt4Modules([
+env.EnableQt5Modules([
                       'QtGui',
                       'QtCore',
                       'QtNetwork'
     <para>If you don't want this, you can switch off the automocing by
     a</para>
 
-    <screen>env['QT4_AUTOSCAN'] = 0
+    <screen>env['QT5_AUTOSCAN'] = 0
 </screen>
 
     <para>in your SConscript file. Then, you have to moc your files
-    explicitly, using the Moc4 builder.</para>
+    explicitly, using the Moc5 builder.</para>
 
     <para>You can also switch to an extended automoc strategy with</para>
 
-    <screen>env['QT4_AUTOSCAN_STRATEGY'] = 1
+    <screen>env['QT5_AUTOSCAN_STRATEGY'] = 1
 </screen>
 
     <para>Please read the description of the
-    <literal>QT4_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
+    <literal>QT5_AUTOSCAN_STRATEGY</literal> variable in the Reference manual
     for details.</para>
 
     <para>For debugging purposes, you can set the variable
-    <literal>QT4_DEBUG</literal> with</para>
+    <literal>QT5_DEBUG</literal> with</para>
 
-    <screen>env['QT4_DEBUG'] = 1
+    <screen>env['QT5_DEBUG'] = 1
 </screen>
 
     <para>which outputs a lot of messages during automocing.</para>
 
     <para>The header files with setup code for your GUI classes, are not
     compiled automatically from your <literal>.ui</literal> files. You always
-    have to call the Uic4 builder explicitly like</para>
+    have to call the Uic5 builder explicitly like</para>
 
-    <screen>env.Uic4(Glob('*.ui'))
+    <screen>env.Uic5(Glob('*.ui'))
 env.Program('foo', Glob('*.cpp'))
 </screen>
   </section>
     <quote><literal>-name</literal></quote> option is added to the call of the
     <literal>rcc</literal> executable by default.</para>
 
-    <para>You can also call the Qrc4 builder explicitly as</para>
+    <para>You can also call the Qrc5 builder explicitly as</para>
 
-    <screen>qrccc = env.Qrc4('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
+    <screen>qrccc = env.Qrc5('foo') # ['foo.qrc'] -&gt; ['qrc_foo.cc']
 </screen>
 
     <para>or (overriding the default suffix)</para>
 
-    <screen>qrccc = env.Qrc4('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
+    <screen>qrccc = env.Qrc5('myprefix_foo.cxx','foo.qrc') # -&gt; ['qrc_myprefix_foo.cxx']
 </screen>
 
     <para>and then add the resulting cxx file to the sources of your
 
     <para>Example for updating a translation file:</para>
 
-    <screen>env.Ts4('foo.ts','.') # -&gt; ['foo.ts']
+    <screen>env.Ts5('foo.ts','.') # -&gt; ['foo.ts']
 </screen>
 
     <para>By default, the <literal>.ts</literal> files are treated as
     not get cleaned on a <quote><literal>scons -c</literal></quote>. If you
     want to delete the translation files on the
     <quote><literal>-c</literal></quote> SCons command, you can set the
-    variable <quote><literal>QT4_CLEAN_TS</literal></quote> like this</para>
+    variable <quote><literal>QT5_CLEAN_TS</literal></quote> like this</para>
 
-    <screen>env['QT4_CLEAN_TS']=1
+    <screen>env['QT5_CLEAN_TS']=1
 </screen>
 
     <para>Example for releasing a translation file, i.e. compiling it to a
     <literal>.qm</literal> binary file:</para>
 
-    <screen>env.Qm4('foo') # ['foo.ts'] -&gt; ['foo.qm']
+    <screen>env.Qm5('foo') # ['foo.ts'] -&gt; ['foo.qm']
 </screen>
 
     <para>or (overriding the output prefix)</para>
 
-    <screen>env.Qm4('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
+    <screen>env.Qm5('myprefix','foo') # ['foo.ts'] -&gt; ['myprefix.qm']
 </screen>
 
-    <para>As an extension both, the Ts4() and Qm4 builder, support the
+    <para>As an extension both, the Ts5() and Qm5 builder, support the
     definition of multiple targets. So, calling</para>
 
-    <screen>env.Ts4(['app_en','app_de'], Glob('*.cpp'))
+    <screen>env.Ts5(['app_en','app_de'], Glob('*.cpp'))
 </screen>
 
     <para>and</para>
 
-    <screen>env.Qm4(['app','copy'], Glob('*.ts'))
+    <screen>env.Qm5(['app','copy'], Glob('*.ts'))
 </screen>
 
     <para>should work fine.</para>
 
     <para>Finally, two short notes about the support of directories for the
-    Ts4() builder. You can pass an arbitrary mix of cxx files and subdirs to
+    Ts5() builder. You can pass an arbitrary mix of cxx files and subdirs to
     it, as in</para>
 
-    <screen>env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp']))
+    <screen>env.Ts5('app_en',['sub1','appwindow.cpp','main.cpp']))
 </screen>
 
     <para>where <literal>sub1</literal> is a folder that gets scanned
     the folder changes, the .ts file is not updated automatically! In this
     case you should tell SCons to always update the target:</para>
 
-    <screen>ts = env.Ts4('app_en',['sub1','appwindow.cpp','main.cpp'])
+    <screen>ts = env.Ts5('app_en',['sub1','appwindow.cpp','main.cpp'])
 env.AlwaysBuild(ts)
 </screen>
 
     <para>Last note: specifying the current folder
-    <quote><literal>.</literal></quote> as input to Ts4() and storing the
+    <quote><literal>.</literal></quote> as input to Ts5() and storing the
     resulting .ts file in the same directory, leads to a dependency cycle! You
     then have to store the .ts and .qm files outside of the current folder, or
     use <literal>Glob('*.cpp'))</literal> instead.</para>

File docs/pdf.xsl

 <?xml version='1.0'?>
 <!--
 
-  Copyright (c) 2001-2010 The SCons Foundation
+  Copyright (c) 2001-2010,2011,2012 The SCons Foundation
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the

File docs/qt4.xml

 <!--
-  Copyright (c) 2001-2010 The SCons Foundation
+  Copyright (c) 2001-2010,2011,2012 The SCons Foundation
 
 This file is processed by the bin/SConsDoc.py module.
 See its __doc__ string for a discussion of the format.
 -->
-<tool name="qt4">
+<tool name="qt5">
 <summary>
-Sets construction variables for building Qt4 applications.
+Sets construction variables for building Qt5 applications.
 </summary>
 <sets>
-QT4DIR
-QT4_BINPATH
-QT4_MOC
-QT4_UIC
-QT4_RCC
-QT4_AUTOSCAN
-QT4_AUTOSCAN_STRATEGY
-QT4_AUTOMOC_CPPPATH
-QT4_AUTOMOC_SCANCPPPATH
-QT4_UICFLAGS
-QT4_MOCFROMHFLAGS
-QT4_MOCFROMCXXFLAGS
-QT4_UICDECLPREFIX
-QT4_UICDECLSUFFIX
-QT4_MOCHPREFIX
-QT4_MOCHSUFFIX
-QT4_MOCCXXPREFIX
-QT4_MOCCXXSUFFIX
-QT4_MOCDEFPREFIX
-QT4_MOCDEFSUFFIX
-QT4_UISUFFIX
-QT4_UICCOM
-QT4_GOBBLECOMMENTS
-QT4_CPPDEFINES_PASSTOMOC
-QT4_CLEAN_TS
-QT4_DEBUG
-QT4_XMOCHPREFIX
-QT4_XMOCHSUFFIX
-QT4_XMOCCXXPREFIX
-QT4_XMOCCXXSUFFIX
-QT4_LUPDATE
-QT4_LRELEASE
-QT4_LUPDATEFLAGS
-QT4_LRELEASEFLAGS
-QT4_QRCFLAGS
-QT4_UICDECLPREFIX
-QT4_UICDECLSUFFIX
-QT4_MOCINCPREFIX
-QT4_QRCSUFFIX
-QT4_QRCCXXSUFFIX
-QT4_QRCCXXPREFIX
-QT4_MOCDEFINES
-QT4_MOCCPPPATH
-QT4_MOCINCFLAGS
-QT4_LUPDATECOM
-QT4_LRELEASECOM
+QT5DIR
+QT5_BINPATH
+QT5_MOC
+QT5_UIC
+QT5_RCC
+QT5_AUTOSCAN
+QT5_AUTOSCAN_STRATEGY
+QT5_AUTOMOC_CPPPATH
+QT5_AUTOMOC_SCANCPPPATH
+QT5_UICFLAGS
+QT5_MOCFROMHFLAGS
+QT5_MOCFROMCXXFLAGS
+QT5_UICDECLPREFIX
+QT5_UICDECLSUFFIX
+QT5_MOCHPREFIX
+QT5_MOCHSUFFIX
+QT5_MOCCXXPREFIX
+QT5_MOCCXXSUFFIX
+QT5_MOCDEFPREFIX
+QT5_MOCDEFSUFFIX
+QT5_UISUFFIX
+QT5_UICCOM
+QT5_GOBBLECOMMENTS
+QT5_CPPDEFINES_PASSTOMOC
+QT5_CLEAN_TS
+QT5_DEBUG
+QT5_XMOCHPREFIX
+QT5_XMOCHSUFFIX
+QT5_XMOCCXXPREFIX
+QT5_XMOCCXXSUFFIX
+QT5_LUPDATE
+QT5_LRELEASE
+QT5_LUPDATEFLAGS
+QT5_LRELEASEFLAGS
+QT5_QRCFLAGS
+QT5_UICDECLPREFIX
+QT5_UICDECLSUFFIX
+QT5_MOCINCPREFIX
+QT5_QRCSUFFIX
+QT5_QRCCXXSUFFIX
+QT5_QRCCXXPREFIX
+QT5_MOCDEFINES
+QT5_MOCCPPPATH
+QT5_MOCINCFLAGS
+QT5_LUPDATECOM
+QT5_LRELEASECOM
 </sets>
 <uses>
 </uses>
 </tool>
 
-<builder name="Moc4">
+<builder name="Moc5">
 <summary>
 Builds an output file from a moc input file. Moc input files are either
 header files or cxx files. This builder is only available after using the
-tool 'qt4'. It should be your first choice when manually Mocing files
+tool 'qt5'. It should be your first choice when manually Mocing files
 and is the builder for the Q_OBJECT driven Automoc strategy (#0, the default).
-It can can be controlled via the QT4_MOC* variables. See the &cv-link-QT4DIR; and
-&cv-link-QT4_AUTOSCAN_STRATEGY; variables for more information.
+It can can be controlled via the QT5_MOC* variables. See the &cv-link-QT5DIR; and
+&cv-link-QT5_AUTOSCAN_STRATEGY; variables for more information.
 Example:
 
 <example>
-env.Moc4('foo.h') # generates moc_foo.cc
-env.Moc4('foo.cpp') # generates foo.moc
+env.Moc5('foo.h') # generates moc_foo.cc
+env.Moc5('foo.cpp') # generates foo.moc
 </example>
 </summary>
 </builder>
 
-<builder name="XMoc4">
+<builder name="XMoc5">
 <summary>
-Just like the &b-Moc4; builder, it builds an output file from a moc input file.
+Just like the &b-Moc5; builder, it builds an output file from a moc input file.
 Moc input files are either header files or cxx files. This builder is only available after using the
-tool 'qt4'. It is defined separately for the include driven Automoc strategy (#1)
-and can be controlled via the QT4_XMOC* variables. See the &cv-link-QT4DIR; and
-&cv-link-QT4_AUTOSCAN_STRATEGY; variables for more information.
+tool 'qt5'. It is defined separately for the include driven Automoc strategy (#1)
+and can be controlled via the QT5_XMOC* variables. See the &cv-link-QT5DIR; and
+&cv-link-QT5_AUTOSCAN_STRATEGY; variables for more information.
 Example:
 
 <example>
-env.XMoc4('foo.h') # generates moc_foo.cpp
-env.XMoc4('foo.cpp') # generates foo.moc
+env.XMoc5('foo.h') # generates moc_foo.cpp
+env.XMoc5('foo.cpp') # generates foo.moc
 </example>
 </summary>
 </builder>
 
-<builder name="ExplicitMoc4">
+<builder name="ExplicitMoc5">
 <summary>
-Just like the &b-Moc4; builder, it builds an output file from a moc input file.
+Just like the &b-Moc5; builder, it builds an output file from a moc input file.
 However, it does not use any default prefix or suffix for the filenames.
 You can, and have to, specify the full source and target names explicitly.
 This builder is only available after using the
-tool 'qt4'. It can be your last resort, when you have to moc single files
+tool 'qt5'. It can be your last resort, when you have to moc single files
 from/to exotic filenames.
 Example:
 
 <example>
-env.ExplicitMoc4('moced_foo.cxx','foo.h') # generates moced_foo.cxx
+env.ExplicitMoc5('moced_foo.cxx','foo.h') # generates moced_foo.cxx
 </example>
 </summary>
 </builder>
 
 
-<builder name="Uic4">
+<builder name="Uic5">
 <summary>
 Builds a header file from an .ui file, where the former
 contains the setup code for a GUI class.
-This builder is only available after using the tool 'qt4'.
+This builder is only available after using the tool 'qt5'.
 Using this builder lets you override the standard
 naming conventions (be careful: prefixes are always prepended to names of
 built files; if you don't want prefixes, you may set them to ``).
-See the &cv-link-QT4DIR; variable for more information.
+See the &cv-link-QT5DIR; variable for more information.
 Example:
 
 <example>
-env.Uic4('foo.ui') # -> 'ui_foo.h'
+env.Uic5('foo.ui') # -> 'ui_foo.h'
 </example>
 </summary>
 </builder>
 
-<builder name="ExplicitUic4">
+<builder name="ExplicitUic5">
 <summary>
-Just like the &b-Uic4; builder, it builds a header file from a .ui input file.
+Just like the &b-Uic5; builder, it builds a header file from a .ui input file.
 However, it does not use any default prefix or suffix for the filenames.
 You can, and have to, specify the full source and target names explicitly.
 This builder is only available after using the
-tool 'qt4'. It can be your last resort, when you have to convert .ui
+tool 'qt5'. It can be your last resort, when you have to convert .ui
 files to exotic filenames.
 Example:
 
 <example>
-env.ExplicitUic4('uiced_foo.hpp','foo.ui') # generates uiced_foo.hpp
+env.ExplicitUic5('uiced_foo.hpp','foo.ui') # generates uiced_foo.hpp
 </example>
 </summary>
 </builder>
 
-<builder name="Qrc4">
+<builder name="Qrc5">
 <summary>
 Builds a cxx file, containing all resources from the given
 .qrc file.
-This builder is only available after using the tool 'qt4'.
+This builder is only available after using the tool 'qt5'.
 
 Example:
 
 <example>
-env.Qrc4('foo.qrc') # -> ['qrc_foo.cc']
+env.Qrc5('foo.qrc') # -> ['qrc_foo.cc']
 </example>
 </summary>
 </builder>
 
-<builder name="Ts4">
+<builder name="Ts5">
 <summary>
 Scans the source files in the given path for tr() marked strings,
 that should get translated. Writes a .ts file for the Qt Linguist.
-This builder is only available after using the tool 'qt4'.
+This builder is only available after using the tool 'qt5'.
 
 Example:
 
 <example>
-env.Ts4('foo.ts','.') # -> ['foo.ts']
+env.Ts5('foo.ts','.') # -> ['foo.ts']
 </example>
 </summary>
 </builder>
 
 
-<builder name="Qm4">
+<builder name="Qm5">
 <summary>
 Compiles a given .ts file (Qt Linguist) into a binary .qm file.
-This builder is only available after using the tool 'qt4'.
+This builder is only available after using the tool 'qt5'.
 
 Example:
 
 <example>
-env.Qm4('foo.ts') # -> ['foo.qm']
+env.Qm5('foo.ts') # -> ['foo.qm']
 </example>
 </summary>
 </builder>
 
 
-<cvar name="QT4DIR">
+<cvar name="QT5DIR">
 <summary>
-The Qt4 tool tries to read this from the current Environment and then from os.environ.
+The Qt5 tool tries to read this from the current Environment and then from os.environ.
 If it is not set and found, the value of QTDIR (in the Environment and os.environ) is
 used as a fallback.
-It also initializes all QT4_*
+It also initializes all QT5_*
 construction variables listed below.
 (Note that all paths are constructed
 with python's os.path.join() method,
 you have to explicitly specify it at Environment creation:
 
 <example>
-Environment(tools=['default','qt4'])
+Environment(tools=['default','qt5'])
 </example>
 
-The Qt4 tool supports the following operations:
+The Qt5 tool supports the following operations:
 
 <emphasis Role="strong">Automatic moc file generation from header files.</emphasis>
 You do not have to specify moc files explicitly, the tool does it for you.
 However, there are a few preconditions to do so: Your header file must have
 the same filebase as your implementation file and must stay in the same
 directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. You
-can turn off automatic moc file generation by setting &cv-link-QT4_AUTOSCAN; to 0.
+can turn off automatic moc file generation by setting &cv-link-QT5_AUTOSCAN; to 0.
 See also the corresponding builder method
-&b-Moc4;().
+&b-Moc5;().
 
 <emphasis Role="strong">Automatic moc file generation from cxx files.</emphasis>
 As stated in the Qt documentation, include the moc file at the end of
 the cxx file. Note that you have to include the file, which is generated
-by the transformation ${QT4_MOCCXXPREFIX}&lt;basename&gt;${QT4_MOCCXXSUFFIX}, by default
+by the transformation ${QT5_MOCCXXPREFIX}&lt;basename&gt;${QT5_MOCCXXSUFFIX}, by default
 &lt;basename&gt;.moc. A warning is generated after building the moc file, if you
 do not include the correct file. If you are using VariantDir, you may
 need to specify duplicate=1. You can turn off automatic moc file generation
-by setting &cv-link-QT4_AUTOSCAN; to 0. See also the corresponding
-&b-Moc4;
+by setting &cv-link-QT5_AUTOSCAN; to 0. See also the corresponding
+&b-Moc5;
 builder method.
 
 <emphasis Role="strong">Handling of .ui files.</emphasis>
 TODO: describe a little
 See also the corresponding
-&b-Uic4;
+&b-Uic5;
 builder method.
 
 <emphasis Role="strong">Handling translation files (.ts and .qm).</emphasis>
 TODO: describe a little
 See also the corresponding
-builder methods &b-Ts4; and &b-Qm4;.
+builder methods &b-Ts5; and &b-Qm5;.
 
 <emphasis Role="strong">Compiling resource files (.qrc).</emphasis>
 TODO: describe a little
 See also the corresponding
-&b-Qrc4; builder method.
+&b-Qrc5; builder method.
 
 </summary>
 </cvar>
 
-<cvar name="QT4_AUTOSCAN">
+<cvar name="QT5_AUTOSCAN">
 <summary>
 The default is '1', which means that the tool is automatically 
-scanning for mocable files (see also &cv-link-QT4_AUTOSCAN_STRATEGY;).
+scanning for mocable files (see also &cv-link-QT5_AUTOSCAN_STRATEGY;).
 You can set this variable to '0' to
-switch it off, and then use the &b-Moc4; Builder to explicitly
+switch it off, and then use the &b-Moc5; Builder to explicitly
 specify files to run moc on.
 </summary>
 </cvar>
 
-<cvar name="QT4_BINPATH">
+<cvar name="QT5_BINPATH">
 <summary>
-The path where the Qt4 binaries are installed.
-The default value is '&cv-link-QT4DIR;/bin'.
+The path where the Qt5 binaries are installed.
+The default value is '&cv-link-QT5DIR;/bin'.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCCPPPATH">
+<cvar name="QT5_MOCCPPPATH">
 <summary>
-The path where the Qt4 header files are installed.
-The default value is '&cv-link-QT4DIR;/include'.
+The path where the Qt5 header files are installed.
+The default value is '&cv-link-QT5DIR;/include'.
 Note: If you set this variable to None,
 the tool won't change the &cv-link-CPPPATH;
 construction variable.
 </summary>
 </cvar>
 
-<cvar name="QT4_DEBUG">
+<cvar name="QT5_DEBUG">
 <summary>
 Prints lots of debugging information while scanning for moc files.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOC">
+<cvar name="QT5_MOC">
 <summary>
-The path to the Qt4 moc executable.
-Default value is '&cv-link-QT4_BINPATH;/moc'.
+The path to the Qt5 moc executable.
+Default value is '&cv-link-QT5_BINPATH;/moc'.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCCXXPREFIX">
+<cvar name="QT5_MOCCXXPREFIX">
 <summary>
 Default value is ''. Prefix for moc output files, when source is a cxx file and the 
 Automoc strategy #0 (Q_OBJECT driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCCXXSUFFIX">
+<cvar name="QT5_MOCCXXSUFFIX">
 <summary>
 Default value is '.moc'. Suffix for moc output files, when source is a cxx file and the
 Automoc strategy #0 (Q_OBJECT driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCFROMCXXFLAGS">
+<cvar name="QT5_MOCFROMCXXFLAGS">
 <summary>
 Default value is '-i'. These flags are passed to moc, when moccing a
 C++ file.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCFROMHFLAGS">
+<cvar name="QT5_MOCFROMHFLAGS">
 <summary>
 Default value is ''. These flags are passed to moc, when moccing a header
 file.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCHPREFIX">
+<cvar name="QT5_MOCHPREFIX">
 <summary>
 Default value is 'moc_'. Prefix for moc output files, when the source file is a header
 and the Automoc strategy #0 (Q_OBJECT driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCHSUFFIX">
+<cvar name="QT5_MOCHSUFFIX">
 <summary>
 Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for moc output files, when 
 the source file is a header and the Automoc strategy #0 (Q_OBJECT driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_UIC">
+<cvar name="QT5_UIC">
 <summary>
-Default value is '&cv-link-QT4_BINPATH;/uic'. The path to the Qt4 uic executable.
+Default value is '&cv-link-QT5_BINPATH;/uic'. The path to the Qt5 uic executable.
 </summary>
 </cvar>
 
-<cvar name="QT4_UICCOM">
+<cvar name="QT5_UICCOM">
 <summary>
 Command to generate the required header and source files from .ui form files.
-Is compiled from &cv-link-QT4_UIC; and &cv-link-QT4_UICFLAGS;.
+Is compiled from &cv-link-QT5_UIC; and &cv-link-QT5_UICFLAGS;.
 </summary>
 </cvar>
 
-<cvar name="QT4_UICCOMSTR">
+<cvar name="QT5_UICCOMSTR">
 <summary>
 The string displayed when generating header and source files from .ui form files.
-If this is not set, then &cv-link-QT4_UICCOM; (the command line) is displayed.
+If this is not set, then &cv-link-QT5_UICCOM; (the command line) is displayed.
 </summary>
 </cvar>
 
-<cvar name="QT4_UICFLAGS">
+<cvar name="QT5_UICFLAGS">
 <summary>
-Default value is ''. These flags are passed to the Qt4 uic executable, when creating header
+Default value is ''. These flags are passed to the Qt5 uic executable, when creating header
 and source files from a .ui form file.
 </summary>
 </cvar>
 
-<cvar name="QT4_UICDECLPREFIX">
+<cvar name="QT5_UICDECLPREFIX">
 <summary>
 Default value is 'ui_'. Prefix for uic generated header files.
 </summary>
 </cvar>
 
-<cvar name="QT4_UICDECLSUFFIX">
+<cvar name="QT5_UICDECLSUFFIX">
 <summary>
 Default value is '.h'. Suffix for uic generated header files.
 </summary>
 </cvar>
 
-<cvar name="QT4_UISUFFIX">
+<cvar name="QT5_UISUFFIX">
 <summary>
-Default value is '.ui'. Suffix of designer input files (form files) in Qt4.
+Default value is '.ui'. Suffix of designer input files (form files) in Qt5.
 </summary>
 </cvar>
 
-<cvar name="QT4_AUTOSCAN_STRATEGY">
+<cvar name="QT5_AUTOSCAN_STRATEGY">
 <summary>
-Default value is '0'. When using the Automoc feature of the Qt4 tool, you
+Default value is '0'. When using the Automoc feature of the Qt5 tool, you
 can select different strategies for detecting which files should get moced.
 The simple approach ('0' as the default) scans header and source files for
 the Q_OBJECT macro, so the trigger 'moc or not' is Q_OBJECT driven. If it is
 found, the corresponding file gets moced with
-the &b-Moc4; builder. This results in the files 'moc_foo.cc' and 'foo.moc' for header
+the &b-Moc5; builder. This results in the files 'moc_foo.cc' and 'foo.moc' for header
 and source file, respectively. They get added to the list of sources, for compiling
 the current library or program.
 
 In older Qt manuals, a different technique for mocing is recommended. A cxx file
 includes the moced output of itself or its header at the end. This approach is somewhat
 deprecated, but the 'qtsolutions' by Qt are still based on it, for example. You also
-might have to switch older Qt sources to a new version 4.x.y. Then you can set
+might have to switch older Qt sources to a new version 5.x.y. Then you can set
 this variable to '1', for 'include driven' mocing. This means that the tool searches
 for '#include' statements in all cxx files, containing a file pattern 'moc_foo.cpp'
 and 'foo.moc' for header and source file, respectively. If the file 'foo.h/foo.cpp'
 </summary>
 </cvar>
 
-<cvar name="QT4_AUTOMOC_SCANCPPPATH">
+<cvar name="QT5_AUTOMOC_SCANCPPPATH">
 <summary>
 The default is '1', meaning that the tool scans 
 for mocable files not only in the current directory, but
-also in all CPPPATH folders (see also &cv-link-QT4_AUTOMOC_CPPPATH;).
+also in all CPPPATH folders (see also &cv-link-QT5_AUTOMOC_CPPPATH;).
 You can set this variable to '0' to
 switch it off on rare occasions, e.g. when too many search
 folders give you a bad performance in large projects.
 </summary>
 </cvar>
 
-<cvar name="QT4_AUTOMOC_CPPPATH">
+<cvar name="QT5_AUTOMOC_CPPPATH">
 <summary>
 The list of paths to scan for mocable files
-(see also &cv-link-QT4_AUTOMOC_SCANCPPPATH;), it is empty by default
+(see also &cv-link-QT5_AUTOMOC_SCANCPPPATH;), it is empty by default
 which means that the CPPPATH variable is used.
 You can set this variable to a subset of CPPPATH in order
 to improve performance, i.e. to minimize the search space.
 </summary>
 </cvar>
 
-<cvar name="QT4_GOBBLECOMMENTS">
+<cvar name="QT5_GOBBLECOMMENTS">
 <summary>
 Default value is '0' (disabled). When you set this variable to '1',
 you enable the automatic removal of C/C++ comments, while searching for
 </summary>
 </cvar>
 
-<cvar name="QT4_CPPDEFINES_PASSTOMOC">
+<cvar name="QT5_CPPDEFINES_PASSTOMOC">
 <summary>
 Default value is '1' (enabled). When you set this variable to '1',
 all currently set CPPDEFINES get passed to the moc executable. It does not matter
-which strategy you selected with &cv-link-QT4_AUTOSCAN_STRATEGY; or whether you
-call the &b-Moc4; builder directly.
+which strategy you selected with &cv-link-QT5_AUTOSCAN_STRATEGY; or whether you
+call the &b-Moc5; builder directly.
 </summary>
 </cvar>
 
-<cvar name="QT4_CLEAN_TS">
+<cvar name="QT5_CLEAN_TS">
 <summary>
 Default value is '0' (disabled). When you set this variable to '1',
-the &b-Ts4; builder will delete your .ts files on a 'scons -c'. Normally,
+the &b-Ts5; builder will delete your .ts files on a 'scons -c'. Normally,
 these files for the QtLinguist are treated as 'precious' (they are not removed
 prior to a rebuild) and do not get cleaned.
 </summary>
 </cvar>
 
-<cvar name="QT4_XMOCHPREFIX">
+<cvar name="QT5_XMOCHPREFIX">
 <summary>
 Default value is 'moc_'. 
-Like &cv-link-QT4_MOCHPREFIX;, this is the prefix for moc output files, when
+Like &cv-link-QT5_MOCHPREFIX;, this is the prefix for moc output files, when
 the source file is a header
 and the Automoc strategy #1 (include driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_XMOCHSUFFIX">
+<cvar name="QT5_XMOCHSUFFIX">
 <summary>
 Default value is '.cpp'. 
-Like &cv-link-QT4_MOCHSUFFIX;, this is the suffix for moc output files, when 
+Like &cv-link-QT5_MOCHSUFFIX;, this is the suffix for moc output files, when 
 the source file is a header and the Automoc strategy #1
 (include driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_XMOCCXXPREFIX">
+<cvar name="QT5_XMOCCXXPREFIX">
 <summary>
 Default value is ''. 
-Like &cv-link-QT4_MOCCXXPREFIX;, this is the
+Like &cv-link-QT5_MOCCXXPREFIX;, this is the
 prefix for moc output files, when source is a cxx file and the 
 Automoc strategy #1 (include driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_XMOCCXXSUFFIX">
+<cvar name="QT5_XMOCCXXSUFFIX">
 <summary>
 Default value is '.moc'. 
-Like &cv-link-QT4_MOCCXXSUFFIX;, this is the 
+Like &cv-link-QT5_MOCCXXSUFFIX;, this is the 
 suffix for moc output files, when source is a cxx file and the
 Automoc strategy #1 (include driven) is used.
 </summary>
 </cvar>
 
-<cvar name="QT4_RCC">
+<cvar name="QT5_RCC">
 <summary>
-Default value is '&cv-link-QT4_BINPATH;/rcc'. The path to the Qt4 rcc
+Default value is '&cv-link-QT5_BINPATH;/rcc'. The path to the Qt5 rcc
 executable (resource file compiler).
 </summary>
 </cvar>
 
-<cvar name="QT4_LUPDATE">
+<cvar name="QT5_LUPDATE">
 <summary>
-Default value is '&cv-link-QT4_BINPATH;/lupdate'. The path to the Qt4 lupdate
+Default value is '&cv-link-QT5_BINPATH;/lupdate'. The path to the Qt5 lupdate
 executable (updates the .ts files from sources).
 </summary>
 </cvar>
 
-<cvar name="QT4_LRELEASE">
+<cvar name="QT5_LRELEASE">
 <summary>
-Default value is '&cv-link-QT4_BINPATH;/lrelease'. The path to the Qt4 lrelease
+Default value is '&cv-link-QT5_BINPATH;/lrelease'. The path to the Qt5 lrelease
 executable (converts .ts files to binary .qm files).
 </summary>
 </cvar>
 
-<cvar name="QT4_QRCFLAGS">
+<cvar name="QT5_QRCFLAGS">
 <summary>
-Default value is ''. These flags are passed to the Qt4 rcc executable,
+Default value is ''. These flags are passed to the Qt5 rcc executable,
 when compiling a resource file.
 </summary>
 </cvar>
 
-<cvar name="QT4_LUPDATEFLAGS">
+<cvar name="QT5_LUPDATEFLAGS">
 <summary>
-Default value is ''. These flags are passed to the Qt4 lupdate executable,
+Default value is ''. These flags are passed to the Qt5 lupdate executable,
 when updating .ts files from sources.
 </summary>
 </cvar>
 
-<cvar name="QT4_LRELEASEFLAGS">
+<cvar name="QT5_LRELEASEFLAGS">
 <summary>
-Default value is ''. These flags are passed to the Qt4 lrelease executable,
+Default value is ''. These flags are passed to the Qt5 lrelease executable,
 when compiling .ts files into binary .qm files.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCINCPREFIX">
+<cvar name="QT5_MOCINCPREFIX">
 <summary>
 Default value is '-I'. The prefix for specifying include directories to the
-Qt4 moc executable.
+Qt5 moc executable.
 </summary>
 </cvar>
 
-<cvar name="QT4_QRCSUFFIX">
+<cvar name="QT5_QRCSUFFIX">
 <summary>
-Default value is '.qrc'. Suffix of Qt4 resource files.
+Default value is '.qrc'. Suffix of Qt5 resource files.
 </summary>
 </cvar>
 
-<cvar name="QT4_QRCCXXSUFFIX">
+<cvar name="QT5_QRCCXXSUFFIX">
 <summary>
 Default value is '$CXXFILESUFFIX'. 
 This is the suffix for compiled .qrc resource files.
 </summary>
 </cvar>
 
-<cvar name="QT4_QRCCXXPREFIX">
+<cvar name="QT5_QRCCXXPREFIX">
 <summary>
 Default value is 'qrc_'.
 This is the prefix for compiled .qrc resource files.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCINCFLAGS">
+<cvar name="QT5_MOCINCFLAGS">
 <summary>
-List of include paths for the Qt4 moc executable, is compiled from
-&cv-link-QT4_MOCINCPREFIX;, &cv-link-QT4_MOCCPPPATH; and &cv-link-INCSUFFIX;.
+List of include paths for the Qt5 moc executable, is compiled from
+&cv-link-QT5_MOCINCPREFIX;, &cv-link-QT5_MOCCPPPATH; and &cv-link-INCSUFFIX;.
 </summary>
 </cvar>
 
-<cvar name="QT4_MOCDEFINES">
+<cvar name="QT5_MOCDEFINES">
 <summary>
-List of CPP defines that are passed to the Qt4 moc executable,
-is compiled from &cv-link-QT4_MOCDEFPREFIX;, &cv-link-CPPDEFINES; and &cv-link-QT4_MOCDEFSUFFIX;.
+List of CPP defines that are passed to the Qt5 moc executable,
+is compiled from &cv-link-QT5_MOCDEFPREFIX;, &cv-link-CPPDEFINES; and &cv-link-QT5_MOCDEFSUFFIX;.
 </summary>
 </cvar>
 
-<cvar name="QT4_LUPDATECOM">
+<cvar name="QT5_LUPDATECOM">
 <summary>
 Command to update .ts files for translation from the sources.
 </summary>
 </cvar>
 
-<cvar name="QT4_LUPDATECOMSTR">
+<cvar name="QT5_LUPDATECOMSTR">
 <summary>
 The string displayed when updating .ts files from the sources.
-If this is not set, then &cv-link-QT4_LUPDATECOM; (the command line) is displayed.
+If this is not set, then &cv-link-QT5_LUPDATECOM; (the command line) is displayed.
 </summary>
 </cvar>
 
-<cvar name="QT4_LRELEASECOM">
+<cvar name="QT5_LRELEASECOM">
 <summary>
 Command to convert .ts files to binary .qm files.
 </summary>
 </cvar>
 
-<cvar name="QT4_LRELEASECOMSTR">
+<cvar name="QT5_LRELEASECOMSTR">
 <summary>
 The string displayed when converting .ts files to binary .qm files.
-If this is not set, then &cv-link-QT4_RCC; (the command line) is displayed.
+If this is not set, then &cv-link-QT5_RCC; (the command line) is displayed.
 </summary>
 </cvar>
 

File docs/reference.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-  Copyright (c) 2001-2010 The SCons Foundation
+  Copyright (c) 2001-2010,2011,2012 The SCons Foundation
 
   Permission is hereby granted, free of charge, to any person obtaining
   a copy of this software and associated documentation files (the
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
 <article>
   <articleinfo>
-    <title>SCons tool <quote>qt4</quote> - Reference</title>
-
-    <author>
-      <surname>Philippe Vaucher</surname>
-    </author>
+    <title>SCons tool <quote>qt5</quote> - Reference</title>
 
     <author>
       <firstname>Dirk</firstname>
       <surname>Baechle</surname>
     </author>
 
-    <pubdate>2010-07-13</pubdate>
+    <pubdate>2012-12-13</pubdate>
   </articleinfo>
 
   <abstract>
     <para>This reference lists all the variables that are used within the
-    <quote>qt4</quote> tool, and the available builders. It is intended for
+    <quote>qt5</quote> tool, and the available builders. It is intended for
     SCons tool developers and core programmers, as a normal user you should
     read the manual instead.</para>
   </abstract>
   <section>
     <title>What it does</title>
 
-    <para>The <quote>qt4</quote> tool sets construction variables and
+    <para>The <quote>qt5</quote> tool sets construction variables and
     registers builders for creating applications and libraries that use the
-    Qt4 framework by Trolltech/Nokia.</para>
+    Qt5 framework by Trolltech/Nokia.</para>
 
     <para>It supports the following operations:</para>
 
       have one of the suffixes <literal>.h</literal>, <literal>.hpp</literal>,
       <literal>.H</literal>, <literal>.hxx</literal>, <literal>.hh</literal>.
       You can turn off automatic moc file generation by setting
-      <literal>QT4_AUTOSCAN</literal> to 0. See also the corresponding builder
-      method <literal>Moc4()</literal>.</para>
+      <literal>QT5_AUTOSCAN</literal> to 0. See also the corresponding builder
+      method <literal>Moc5()</literal>.</para>
     </section>
 
     <section>
       of the cxx file. Note that you have to include the file, which is
       generated by the transformation</para>
 
-      <para><screen>${QT4_MOCCXXPREFIX}&lt;basename&gt;${QT4_MOCCXXSUFFIX}</screen>,
+      <para><screen>${QT5_MOCCXXPREFIX}&lt;basename&gt;${QT5_MOCCXXSUFFIX}</screen>,
       by default <literal>&lt;basename&gt;.moc</literal>. A warning is
       generated after building the moc file, if you do not include the correct
       file. If you are using VariantDir, you may need to specify
       <literal>duplicate=1</literal>. You can turn off automatic moc file
-      generation by setting <literal>QT4_AUTOSCAN</literal> to 0. See also the
-      corresponding <literal>Moc4</literal> builder method.</para>
+      generation by setting <literal>QT5_AUTOSCAN</literal> to 0. See also the
+      corresponding <literal>Moc5</literal> builder method.</para>
     </section>
 
     <section>
 
       <para>TODO: describe in a little more detail.</para>
 
-      <para>See also the corresponding <literal>Uic4</literal> builder
+      <para>See also the corresponding <literal>Uic5</literal> builder
       metho