Bug 391523 - Code improvement: reduce unnecessary switch
Summary: Code improvement: reduce unnecessary switch
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-kuserfeedback
Classification: Frameworks and Libraries
Component: Telemetry Provider (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-07 14:53 UTC by Aleksey Kontsevich
Modified: 2018-03-07 16:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Kontsevich 2018-03-07 14:53:04 UTC
Hi Volker,

I think feedbackconfiguicontroller.cpp could be improved a little. We can change line 129 to:

const auto name = (d->appName().isEmpty()) ? "this application" : d->appName().isEmpty();

and remove 1st switch to make code simpler and keep messages consistency. Thanks!
Comment 1 Aleksey Kontsevich 2018-03-07 14:54:35 UTC
Copy paste missplell - need to change to:

const auto name = (d->appName().isEmpty()) ? "this application" : d->appName();
Comment 2 Volker Krause 2018-03-07 15:21:06 UTC
Code-wise I agree with your suggestion, but human languages don't work like this unfortunately ;)

In English this is fine, in German however the translation of "this" varies based on the context it's used in. I suspect there are more languages this is translated to with similar grammatical issues.
Comment 3 Aleksey Kontsevich 2018-03-07 15:43:56 UTC
I see :) Did not thought about tr(). Ok. Just wanted to improve the code :D