Merge branch 'master' into dev

This commit is contained in:
Eric Kotato 2018-09-09 23:43:11 +03:00
commit b8aff863c8
3 changed files with 20 additions and 3 deletions

View file

@ -25,7 +25,7 @@ Create file `theme.conf.user` in theme folder. See `slice/theme.conf` for refere
### Debug mode options
Since "Power" screen can't be viewed in greeter because it depends on `sddm.*` properties, there is a debug mode.
There are some things that can't be tested well in greeter (e.g. shutdown options or login error). So there is a debug mode.
#### Boolean options
@ -37,6 +37,12 @@ Since "Power" screen can't be viewed in greeter because it depends on `sddm.*` p
* `debug_can_suspend` - sets `sddm.canSuspend` (shows "Suspend").
* `debug_can_hibernate` - sets `sddm.canHibernate` (shows "Hibernate").
* `debug_can_hybrid_sleep` - sets `sddm.canHybridSleep` (shows "Hybrid Sleep").
* `debug_login_error` - forces login error.
#### Number options
* `debug_login_timeout` - time between pressing "Login" and login error in seconds. Not effective if `debug_login_error` is disabled.
#### String options

View file

@ -31,7 +31,8 @@ Item
readonly property bool canSuspend: debugbool(config.debug_can_suspend, sddm.canSuspend)
readonly property bool canHibernate: debugbool(config.debug_can_hibernate, sddm.canHibernate)
readonly property bool canHybridSleep: debugbool(config.debug_can_hybrid_sleep, sddm.canHybridSleep)
readonly property bool loginError: debugbool(config.debug_login_error, false)
readonly property int loginTimeout: debugnum(config.debug_login_timeout, 0)
readonly property string hostName: debugstr(config.debug_hostname, sddm.hostName)
}

View file

@ -631,7 +631,10 @@ Item
pageRoot.enabled = false
progressBarLoop.start()
loginEnterAnimation.start()
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
if (debug.loginError)
loginTimeoutTimer.start()
else
sddm.login(currentUserLogin, passwordField.text, selectedSessionIndex)
}
else
{
@ -659,6 +662,13 @@ Item
}
}
Timer
{
id: loginTimeoutTimer
interval: debug.loginTimeout * 1000
onTriggered: sddm.onLoginFailed()
}
Keys.onUpPressed: scroll_down()
Keys.onDownPressed: scroll_up()
Keys.onEnterPressed: select_or_login()