Review Request 126672: Fix most of Clazy warnings in plasma-framework
Aleix Pol Gonzalez
aleixpol at kde.org
Mon Feb 1 22:56:40 UTC 2016
> On Feb. 1, 2016, 10 p.m., Kai Uwe Broulik wrote:
> > src/declarativeimports/plasmaextracomponents/plasmaextracomponentsplugin.cpp, line 34
> > <https://git.reviewboard.kde.org/r/126672/diff/2/?file=432546#file432546line34>
> >
> > I thought QLatin1String was better for comparison?
+1
> On Feb. 1, 2016, 10 p.m., Kai Uwe Broulik wrote:
> > src/declarativeimports/calendar/daysmodel.cpp, line 135
> > <https://git.reviewboard.kde.org/r/126672/diff/2/?file=432536#file432536line135>
> >
> > Why this change?
Because Clazy found that it's easier to optimize the code if not passing the reference. Note the only attribute in the class is a`qint64 jd;`, which fits in a 64bit processor register.
> On Feb. 1, 2016, 10 p.m., Kai Uwe Broulik wrote:
> > src/plasma/package.cpp, line 262
> > <https://git.reviewboard.kde.org/r/126672/diff/2/?file=432555#file432555line262>
> >
> > auto &data
> >
> > Coding style, and below.
in any case, it should be `const auto &data`.
> On Feb. 1, 2016, 10 p.m., Kai Uwe Broulik wrote:
> > src/plasma/private/applet_p.cpp, line 128
> > <https://git.reviewboard.kde.org/r/126672/diff/2/?file=432558#file432558line128>
> >
> > QLatin1Char('&') ?
+1
> On Feb. 1, 2016, 10 p.m., Kai Uwe Broulik wrote:
> > src/plasma/private/storage.cpp, line 139
> > <https://git.reviewboard.kde.org/r/126672/diff/2/?file=432565#file432565line139>
> >
> > QLatin1Char('.') ?
And QLatin1Char on the first too.
> On Feb. 1, 2016, 10 p.m., Kai Uwe Broulik wrote:
> > src/plasma/scripting/scriptengine.cpp, line 67
> > <https://git.reviewboard.kde.org/r/126672/diff/2/?file=432570#file432570line67>
> >
> > This vector is already const, so it cannot detach
const &.
In any case, I'd say it's safe to just agree to always use foreach on Qt containers.
- Aleix
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126672/#review91889
-----------------------------------------------------------
On Jan. 17, 2016, 9:50 p.m., Sergey Popov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126672/
> -----------------------------------------------------------
>
> (Updated Jan. 17, 2016, 9:50 p.m.)
>
>
> Review request for KDE Frameworks, Plasma and Aleix Pol Gonzalez.
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> Fix almost all the Clazy warnings in plasma-framework.
>
> Related GCI-2015 task: [https://codein.withgoogle.com/tasks/6272625345036288/](https://codein.withgoogle.com/tasks/6272625345036288/)
>
>
> Diffs
> -----
>
> autotests/coronatest.cpp 378a4b7
> autotests/dialogqmltest.cpp 618e64d
> autotests/fallbackpackagetest.cpp 91bc6e9
> autotests/packagestructuretest.cpp 67cdb4f
> autotests/pluginloadertest.cpp 868d5f8
> autotests/sortfiltermodeltest.cpp 6ee0e35
> autotests/storagetest.cpp 8a7dbd0
> src/declarativeimports/calendar/calendar.cpp 5515550
> src/declarativeimports/calendar/daysmodel.cpp 0f81b5a
> src/declarativeimports/core/corebindingsplugin.cpp adfdc29
> src/declarativeimports/core/datamodel.cpp 4449f30
> src/declarativeimports/core/datasource.cpp 4fe5dc5
> src/declarativeimports/core/tooltip.cpp a5e223b
> src/declarativeimports/core/tooltipdialog.cpp 6c3712e
> src/declarativeimports/core/units.cpp 1798727
> src/declarativeimports/core/windowthumbnail.cpp 21e655e
> src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp 9e924b3
> src/declarativeimports/plasmacomponents/qmenuitem.cpp 287e9b3
> src/declarativeimports/plasmaextracomponents/plasmaextracomponentsplugin.cpp 1a25f06
> src/plasma/applet.cpp 4ce2d28
> src/plasma/containment.cpp 0beb196
> src/plasma/containmentactions.cpp f42807f
> src/plasma/corona.cpp bae9244
> src/plasma/datacontainer.cpp 396bc6d
> src/plasma/dataengine.cpp dd56807
> src/plasma/dataengineconsumer.cpp 7c9b5f9
> src/plasma/framesvg.cpp 81187dc
> src/plasma/package.cpp 09f36f3
> src/plasma/packagestructure.cpp 09ea698
> src/plasma/pluginloader.cpp d7c49f2
> src/plasma/private/applet_p.cpp 949c92e
> src/plasma/private/associatedapplicationmanager.cpp e1620e9
> src/plasma/private/componentinstaller.cpp 8fbef24
> src/plasma/private/containment_p.cpp 09ed2cd
> src/plasma/private/dataenginemanager.cpp 7862171
> src/plasma/private/packages.cpp 1edd55a
> src/plasma/private/service_p.h 8a48487
> src/plasma/private/storage.cpp bc6992e
> src/plasma/private/storagethread.cpp 91b490b
> src/plasma/private/svg_p.h 1d1000d
> src/plasma/private/theme_p.cpp 18419bb
> src/plasma/private/timetracker.cpp cdfe94b
> src/plasma/scripting/scriptengine.cpp b9f43fe
> src/plasma/service.cpp d603cf2
> src/plasma/svg.cpp 28abd00
> src/plasma/theme.cpp e9420e6
> src/plasmapkg/main.cpp 336b14e
> src/plasmapkg/plasmapkg.cpp 4626323
> src/plasmaquick/appletquickitem.cpp ec2ed24
> src/plasmaquick/configmodel.cpp df537c1
> src/plasmaquick/configview.cpp c4ab518
> src/plasmaquick/dialog.cpp 8f4ee57
> src/plasmaquick/dialogshadows.cpp db408ae
> src/plasmaquick/dialogshadows_p.h 7e17c12
> src/plasmaquick/packageurlinterceptor.cpp 5e349d2
> src/plasmaquick/private/packages.h aa08b11
> src/plasmaquick/private/packages.cpp 5275848
> src/scriptengines/qml/plasmoid/appletinterface.cpp 8e4979a
> src/scriptengines/qml/plasmoid/containmentinterface.cpp 31285a2
> src/scriptengines/qml/plasmoid/declarativeappletscript.cpp b15695b
> src/scriptengines/qml/plasmoid/wallpaperinterface.cpp 9ecd62b
> tests/dpi/main.cpp 6767b2d
> tests/kplugins/main.cpp 421e3fb
> tests/kplugins/plugintest.h a99701a
> tests/kplugins/plugintest.cpp 3d98dec
> tests/testengine/testengine.cpp 76947c3
>
> Diff: https://git.reviewboard.kde.org/r/126672/diff/
>
>
> Testing
> -------
>
> Tests passed
>
>
> Thanks,
>
> Sergey Popov
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160201/6fea3b9d/attachment-0001.html>
More information about the Plasma-devel
mailing list