mirror of https://gitlab.com/ita1024/waf.git
Code simplifications
This commit is contained in:
parent
1a876716cb
commit
008c9016a8
|
@ -244,7 +244,7 @@ def add_settings_enums(self, namespace, filename_list):
|
||||||
raise Errors.WafError("Tried to add gsettings enums to %r more than once" % self.name)
|
raise Errors.WafError("Tried to add gsettings enums to %r more than once" % self.name)
|
||||||
self.settings_enum_namespace = namespace
|
self.settings_enum_namespace = namespace
|
||||||
|
|
||||||
if type(filename_list) != 'list':
|
if not isinstance(filename_list, list):
|
||||||
filename_list = [filename_list]
|
filename_list = [filename_list]
|
||||||
self.settings_enum_files = filename_list
|
self.settings_enum_files = filename_list
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,7 @@ class XMLHandler(ContentHandler):
|
||||||
Parses ``.qrc`` files
|
Parses ``.qrc`` files
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
ContentHandler.__init__(self)
|
||||||
self.buf = []
|
self.buf = []
|
||||||
self.files = []
|
self.files = []
|
||||||
def startElement(self, name, attrs):
|
def startElement(self, name, attrs):
|
||||||
|
@ -455,7 +456,6 @@ def configure(self):
|
||||||
self.fatal('Could not build a simple Qt application')
|
self.fatal('Could not build a simple Qt application')
|
||||||
|
|
||||||
# FreeBSD does not add /usr/local/lib and the pkg-config files do not provide it either :-/
|
# FreeBSD does not add /usr/local/lib and the pkg-config files do not provide it either :-/
|
||||||
from waflib import Utils
|
|
||||||
if Utils.unversioned_sys_platform() == 'freebsd':
|
if Utils.unversioned_sys_platform() == 'freebsd':
|
||||||
frag = '#include <QApplication>\nint main(int argc, char **argv) { QApplication app(argc, argv); return NULL != (void*) (&app);}\n'
|
frag = '#include <QApplication>\nint main(int argc, char **argv) { QApplication app(argc, argv); return NULL != (void*) (&app);}\n'
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -28,7 +28,7 @@ else:
|
||||||
try:
|
try:
|
||||||
TimeoutExpired = subprocess.TimeoutExpired
|
TimeoutExpired = subprocess.TimeoutExpired
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
class TimeoutExpired(object):
|
class TimeoutExpired(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from collections import deque, defaultdict
|
from collections import deque, defaultdict
|
||||||
|
|
|
@ -16,7 +16,7 @@ except ImportError:
|
||||||
try:
|
try:
|
||||||
TimeoutExpired = subprocess.TimeoutExpired
|
TimeoutExpired = subprocess.TimeoutExpired
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
class TimeoutExpired(object):
|
class TimeoutExpired(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
|
|
Loading…
Reference in New Issue