Bug 391523

Summary: Code improvement: reduce unnecessary switch
Product: [Frameworks and Libraries] frameworks-kuserfeedback Reporter: Aleksey Kontsevich <akontsevich>
Component: Telemetry ProviderAssignee: Volker Krause <vkrause>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

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