D9875: Extend parsing ssh prompt

Fabian Vogt noreply at phabricator.kde.org
Fri Apr 20 17:48:14 UTC 2018


fvogt added inline comments.

INLINE COMMENTS

> main.cpp:330
> +    // Item could not be retrieved from wallet. Open dialog
> +    if (item.isEmpty()) {
> +        if (type == TypeConfirm) {

Can you replace this if with

  if (!item.isEmpty()) {
      QTextStream(stdout) << item;
      return 0;
  }

That way there's one layer of indentation less on the following code.

> main.cpp:331
> +    if (item.isEmpty()) {
> +        if (type == TypeConfirm) {
> +            if (KMessageBox::questionYesNo(0, dialog, i18n("Ksshaskpass")) != KMessageBox::Yes) {

Please use `switch(type) { case TypeConfirm: { ...} ... }` instead of an if..else if..else chain.

REPOSITORY
  R105 KDE SSH Password Dialog

REVISION DETAIL
  https://phabricator.kde.org/D9875

To: pali, fvogt
Cc: fvogt, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180420/42ec1bb3/attachment.html>


More information about the Plasma-devel mailing list