D11118: Show a message if Konsole part is not installed

Elvis Angelaccio noreply at phabricator.kde.org
Sun Mar 11 17:11:03 GMT 2018


elvisangelaccio added inline comments.

INLINE COMMENTS

> terminalpanel.cpp:149
> +            const auto konsoleNotInstalledText = i18n("Terminal cannot be shown because Konsole is not installed. "
> +                                                              "Please install it and then reopen the panel.");
> +            const auto doesOsHandleAppstream = KIO::DesktopExecParser::hasSchemeHandler(konsoleInstallUrl);

Please align with "Terminal" above.

> terminalpanel.cpp:150
> +                                                              "Please install it and then reopen the panel.");
> +            const auto doesOsHandleAppstream = KIO::DesktopExecParser::hasSchemeHandler(konsoleInstallUrl);
> +            m_konsolePartMissingMessage = new KMessageWidget(konsoleNotInstalledText);

This variable is used only once, we can remove it and just do

  if (KIO::DesktopExecParser::hasSchemeHandler(konsoleInstallUrl)) {
      ...
  }

> terminalpanel.cpp:151
> +            const auto doesOsHandleAppstream = KIO::DesktopExecParser::hasSchemeHandler(konsoleInstallUrl);
> +            m_konsolePartMissingMessage = new KMessageWidget(konsoleNotInstalledText);
> +            m_konsolePartMissingMessage->setCloseButtonVisible(false);

Please add `this` as parent.

> terminalpanel.cpp:155
> +            if (doesOsHandleAppstream) {
> +                auto installKonsoleAction = new QAction(i18n("Install Konsole"));
> +                connect(installKonsoleAction, &QAction::triggered, [konsoleInstallUrl]() {

Please add `this` as parent.

REPOSITORY
  R318 Dolphin

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

To: rominf, #dolphin, ngraham, progwolff, elvisangelaccio
Cc: rkflx, ngraham, elvisangelaccio, broulik, progwolff, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180311/0a2af882/attachment.htm>


More information about the kfm-devel mailing list