[Kde-hardware-devel] Re: Review Request: Few minor improvments for UDisks solid backend manager...
Dawit Alemayehu
adawit at kde.org
Mon Nov 8 23:54:22 CET 2010
> On 2010-11-08 22:36:14, Kevin Ottens wrote:
> > Only minor whitespace issues. Also could you remove the foreach->Q_FOREACH changes, I don't see the point of it and we're using foreach everywhere else in the lib.
It is always better to be safe than sorry and use a namespace construct as much as possible. Q_FOREACH is more likely to be namespace safe than the plain foreach definition. But it does not matter to me in this instance ; so I will revert it. Personally though I never use 'foreach' in code I write and encourge others not to do the same...
> On 2010-11-08 22:36:14, Kevin Ottens wrote:
> > trunk/KDE/kdelibs/solid/solid/backends/udisks/udisksmanager.h, line 58
> > <http://svn.reviewboard.kde.org/r/5797/diff/1/?file=40782#file40782line58>
> >
> > s/QStringList& /QStringList &/
> >
> > (I know the backend is kind of not homogeneous there, but that's the style used in libsolid).
Funny how everyone has their own preference on that issue. Qt has it both ways, but the QtWebKit guys and webkit's style checker will reject code unless you do the way I normally do it, QStringList&. Anyhow, it is simple enough to fix the white space issues you pointed out...
- Dawit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5797/#review8571
-----------------------------------------------------------
On 2010-11-08 07:39:06, Dawit Alemayehu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5797/
> -----------------------------------------------------------
>
> (Updated 2010-11-08 07:39:06)
>
>
> Review request for Solid.
>
>
> Summary
> -------
>
> The attached patch does the following:
>
> 1.) Remove the call to allDevices() from UDisksManager's ctor. Instead a new
> private method is added to properly initialize the devices list cache before
> use.
>
> 2.) Remove the 'result' variable from UDisksManager::allDevices since it is
> unnecessary and m_deviceCache can be used directly.
>
> 3.) Other minor namespace (foreach -> Q_FOREACH) and macro-performance (moving
> the call for propertyCount() out of the for loop.
>
> Note that the Bug number above is only mentioned as a reference to point out the origins of the attached patches...
>
>
> This addresses bug 253039.
> https://bugs.kde.org/show_bug.cgi?id=253039
>
>
> Diffs
> -----
>
> trunk/KDE/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp 1192709
> trunk/KDE/kdelibs/solid/solid/backends/udisks/udisksmanager.h 1192709
> trunk/KDE/kdelibs/solid/solid/backends/udisks/udisksmanager.cpp 1192709
>
> Diff: http://svn.reviewboard.kde.org/r/5797/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dawit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20101108/58bc2166/attachment-0001.htm
More information about the Kde-hardware-devel
mailing list