Skip to content
GitLab
Menu
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
1c546740
Commit
1c546740
authored
Dec 14, 2017
by
Wolfgang Rohdewald
Browse files
get rid of global APP variable
parent
4640f9ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kajongg.py
View file @
1c546740
...
...
@@ -105,7 +105,6 @@ def defineOptions():
def
parseOptions
():
"""parse command line options and save the values"""
args
=
KCmdLineArgs
.
parsedArgs
()
Internal
.
app
=
APP
Options
.
playOpen
|=
args
.
isSet
(
'playopen'
)
Options
.
showRulesets
|=
args
.
isSet
(
'rulesets'
)
Options
.
rulesetName
=
str
(
args
.
getOption
(
'ruleset'
))
...
...
@@ -165,7 +164,6 @@ if os.name == 'nt':
ABOUT
=
About
()
KCmdLineArgs
.
init
(
sys
.
argv
,
ABOUT
.
about
)
KCmdLineArgs
.
addCmdLineOptions
(
defineOptions
())
APP
=
KApplication
()
parseOptions
()
if
hasattr
(
QGuiApplication
,
'setDesktopFileName'
):
...
...
@@ -173,10 +171,11 @@ if hasattr(QGuiApplication, 'setDesktopFileName'):
if
Debug
.
neutral
:
MLocale
.
translation
=
None
Internal
.
app
=
KApplication
()
if
Debug
.
events
:
EVHANDLER
=
EvHandler
()
APP
.
installEventFilter
(
EVHANDLER
)
Internal
.
app
.
installEventFilter
(
EVHANDLER
)
from
config
import
SetupPreferences
SetupPreferences
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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