Introduce more user-visible error reporting for installations
ClosedPublic

Authored by leinir on Apr 3 2020, 9:17 AM.

Details

Summary

Prior to this, we did have error reporting, but only in the way of
writing errors out on the command line (through qCCritical). While
this is fine for debugging purposes, it is unfortunate when errors
can be expected to occur in day to day use (as we are dealing with
a wide range of things that can (and often do) go wrong), and giving
proper feedback to the user as to why, for example, their new icons
aren't showing up when they seem to have installed just fine would
seem a reasonable thing to do.

  • Add a signal to Installation fired when there's a critical error
  • Forward the installer errors through KNSCore::Engine
  • Add the MessageBoxSheet component from kaccounts-integration
  • Add a component for displaying errors from the engine
  • Use the ErrorDisplayer component (only show on the current page)

CCBUG:418466

Test Plan

An error displayey thing:

Diff Detail

Repository
R304 KNewStuff
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Apr 3 2020, 9:17 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 3 2020, 9:17 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Apr 3 2020, 9:17 AM
leinir edited the summary of this revision. (Show Details)Apr 3 2020, 9:19 AM
leinir edited the test plan for this revision. (Show Details)Apr 3 2020, 10:21 AM
pino added a subscriber: pino.Apr 3 2020, 10:35 AM

Please fix the i18n() calls, as the values of placeholders are passed as parameter to it instead of using .arg():

i18n("foo %1").arg(foo)  // WRONG
i18n("foo %1", foo)  // correct
leinir updated this revision to Diff 79195.Apr 3 2020, 10:44 AM
  • Address @pino's comment re i18n overload usage
leinir edited the test plan for this revision. (Show Details)Apr 6 2020, 9:09 AM
pino removed a subscriber: pino.Apr 6 2020, 9:16 AM
leinir updated this revision to Diff 79474.Apr 6 2020, 11:50 AM
  • Merge branch 'master' into more-installation-error-handling
  • Actually read the error (not just all)
leinir edited the test plan for this revision. (Show Details)Apr 6 2020, 11:51 AM
ngraham accepted this revision.Apr 6 2020, 2:20 PM
This revision is now accepted and ready to land.Apr 6 2020, 2:20 PM
This revision was automatically updated to reflect the committed changes.