Commit ba1fe6cc authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

make option parsing work with pyside

parent 79a1de3c
......@@ -55,15 +55,16 @@ def initRulesets():
class CommandLineOption(QCommandLineOption):
"""add some helping attributes"""
def __init__(self, *args, optName=None, argType=None, singleshot=False):
QCommandLineOption.__init__(self, *args)
def __init__(self, name, description, valueName=None,
defaultValue=None, optName=None, argType=None, singleshot=False):
QCommandLineOption.__init__(self, [name], description, valueName, defaultValue)
if argType is None:
if len(args) == 2:
if valueName is None:
argType = bool
else:
argType = str
self.argType = argType
self.optName = optName or args[0]
self.optName = optName or name
self.singleshot = singleshot
def defineOptions():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment