Ensure the dialog title is correct with an uninitialised engine
ClosedPublic

Authored by leinir on Dec 10 2019, 2:50 PM.

Details

Summary

Prior to this patch, when the engine was not correctly initialised,
it would cause the dialog title to be Download New %1. With this
patch, it will be Download New Stuff, whenever the engine's name
is empty (which can happen in a couple of situations)

Diff Detail

Repository
R304 KNewStuff
Branch
ensure-dialog-title-with-uninitialised-engine (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19672
Build 19690: arc lint + arc unit
leinir created this revision.Dec 10 2019, 2:50 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 10 2019, 2:50 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Dec 10 2019, 2:50 PM
ngraham requested changes to this revision.Dec 10 2019, 3:04 PM
ngraham added inline comments.
src/qtquick/qml/Dialog.qml
55

For readability's sake and to avoid nested i18n() calls which would cause string puzzles, I would do it like this:

title: component.downloadNewWhat.length === 0 ? i18n("Download new stuff"): i18n("Download New %1," component.downloadNewWhat)

also "stuff" lol

This revision now requires changes to proceed.Dec 10 2019, 3:04 PM
leinir updated this revision to Diff 71234.Dec 10 2019, 9:47 PM
  • Less string puzzles are better
leinir marked an inline comment as done.Dec 10 2019, 9:47 PM
leinir added inline comments.
src/qtquick/qml/Dialog.qml
55

Quite right, also just simpler code in general :)

Stuff indeed ;)

ngraham accepted this revision.Dec 14 2019, 1:02 PM

Kaboom

This revision is now accepted and ready to land.Dec 14 2019, 1:02 PM
This revision was automatically updated to reflect the committed changes.
leinir marked an inline comment as done.