Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
ba1fe6cc
Commit
ba1fe6cc
authored
May 05, 2021
by
Wolfgang Rohdewald
Browse files
make option parsing work with pyside
parent
79a1de3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kajongg.py
View file @
ba1fe6cc
...
...
@@ -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
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment