D16189: kio_help: Fix crash in QCoreApplication when accessing help://

Michael Pyne noreply at phabricator.kde.org
Sun Oct 14 00:20:03 BST 2018


mpyne created this revision.
mpyne added reviewers: Frameworks, sitter.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
mpyne requested review of this revision.

REVISION SUMMARY
  A recent commit d428fc8e6447ede81f1e1911d0b66b39265672f3 <https://phabricator.kde.org/R241:d428fc8e6447ede81f1e1911d0b66b39265672f3> removed old custom crash handling code in favor of KCrash. But this actually adds a dependency on there being a valid `QCoreApplication` object (since KCrash uses it in its own init).
  
  I had thought this was done in kdeinit5 (which launches the kioslave) but that does not appear to be the case, when I looked at the sibling `kio_file` code, it initialized its own QCoreApplication.
  
  I took from that example to simply create the QCoreApplication here.
  
  Reported as bug 399709 <https://bugs.kde.org/show_bug.cgi?id=399709>.
  
  If this works I'd like to commit shortly to avoid landing a new bug in 5.51.0 :)

TEST PLAN
  I tried running KHelpCenter as discussed in the original bug report, and kdeinit5 did not crash.
  
  I also tried `kioclient5 cat help:konsole` directly and still no crash.

REPOSITORY
  R241 KIO

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

AFFECTED FILES
  src/ioslaves/help/main.cpp

To: mpyne, #frameworks, sitter
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181013/cf0b304b/attachment.html>


More information about the Kde-frameworks-devel mailing list