Review Request 110065: fix notifcation plasmoid about some undefined data when retreive data from data engine

Xuetian Weng wengxt at gmail.com
Thu Apr 18 15:29:52 UTC 2013



> On April 18, 2013, 8:17 a.m., Aaron J. Seigo wrote:
> > plasma/generic/applets/notifications/contents/ui/JobDelegate.qml, lines 33-39
> > <http://git.reviewboard.kde.org/r/110065/diff/2/?file=139268#file139268line33>
> >
> >     this is likely to break property binding, so if infoMessage changes (for instance) the string property won't also update.
> >     
> >     while it's more verbose in the QML, each of the properties should simply use the full form directly so that property binding can happen, e.g.
> >     
> >     label0: jobsSource.data["labelName0"] ? jobsSource.data["labelName0"];

well so there is a code style problem.. any advice to make this looks better instead copy-paste such long expression here and there?

Because when loading, data[modelData] can be undefined, and data[modelData][name] can be also undefined so both of them have to be checked to avoid warning in qml.

BTW, the update is working here... I know it looks like it will break property binding, but seems qml is cleverer.


- Xuetian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110065/#review31233
-----------------------------------------------------------


On April 17, 2013, 4:57 p.m., Xuetian Weng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110065/
> -----------------------------------------------------------
> 
> (Updated April 17, 2013, 4:57 p.m.)
> 
> 
> Review request for Plasma and Marco Martin.
> 
> 
> Description
> -------
> 
> Current notifications will give quite a lot warning, since jobsSource.data[modelData] might be undefined in the first place.
> 
> And this can also cause label1NameText to be shown as "undefinded: " for a job, this can be reproduced when you do the job of copy a large folder to sftp, the label1 will be undefined when doing the folder creation.
> 
> 
> Diffs
> -----
> 
>   plasma/generic/applets/notifications/contents/ui/JobDelegate.qml cf60946 
> 
> Diff: http://git.reviewboard.kde.org/r/110065/diff/
> 
> 
> Testing
> -------
> 
> all related warning is now suppressed, and undefined will not be shown in the same case.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130418/0c8310a3/attachment.html>


More information about the Plasma-devel mailing list