Review Request: Fix behavior of "runners" property

Aaron J. Seigo aseigo at kde.org
Sun May 27 18:26:27 UTC 2012


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


good catch; two small fixes needed and then please commit :)


plasma/declarativeimports/krunnermodel/runnermodel.cpp
<http://git.reviewboard.kde.org/r/105024/#comment11229>

    we do not use the "_ after name" paradigm; let's not start it here :)



plasma/declarativeimports/krunnermodel/runnermodel.cpp
<http://git.reviewboard.kde.org/r/105024/#comment11230>

    this probably doesn't work as expected. m_maner->allowedRunners() returns the values from a QHash, which is not sorted. so both lists need to be sorted.
    
    i would suggest something like this:
    
    QStringList newRunnerList = allowedRunners;
    qSort(allowedRunners);
    QStringList currentRunnerList = runners();
    qSort(currentRunners);
    
    if (currentRunnerList == newRunnerList)


- Aaron J. Seigo


On May 24, 2012, 11:53 a.m., Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105024/
> -----------------------------------------------------------
> 
> (Updated May 24, 2012, 11:53 a.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Description
> -------
> 
> This commit changes the behavior of the "runners" property when no manager has been created yet:
> - Setting the property emits runnersChanged() (unless it is the same as the old value)
> - Reading the property after setting it returns the new value
> 
> 
> Diffs
> -----
> 
>   plasma/declarativeimports/krunnermodel/runnermodel.cpp 2717ef8 
> 
> Diff: http://git.reviewboard.kde.org/r/105024/diff/
> 
> 
> Testing
> -------
> 
> Run attached test script. Without the patch, output is:
> """
> runners before: 
> runners after:
> """
> 
> With the patch one gets:
> """
> runners before: 
> onRunnersChanged(): runners=services,shell
> runners after: services,shell
> """
> 
> 
> Thanks,
> 
> Aurélien Gâteau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120527/39d2e6f9/attachment.html>


More information about the Plasma-devel mailing list