[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-edu-devel
Subject: Re: Review Request: Krazy fixes: mark single argument constructors as explicit #1
From: "Laszlo Papp" <lpapp () kde ! org>
Date: 2013-01-11 18:47:55
Message-ID: 20130111184755.1846.36468 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Jan. 1, 2013, 8:54 p.m., Laszlo Papp wrote:
> > IMO, krazy should not warn in such cases. It seems to be an old habit i=
n projects here and there not to use explicit for such cases when the argum=
ent is only the parent qobject (for understandable reason in my opinion).
> =
> Laszlo Papp wrote:
> Just in case: I do not wish to disturb the commit for this change; I =
was just thinking loudly for future reference. :)
> =
> A short grep in kde-runtime and other projects show that for instance=
even if the explicit keyword is used properly, the vast majority leaves th=
at out for the qobject parent constructors, probably for the same reason.
> =
> Kevin Krammer wrote:
> With C++11 we'll have to add it to all constructors which have argume=
nts, so this reduces the changes we have to do then :)
OK, interesting. I do not know much about C++11 yet, but in general I see t=
he Qt sources converging to the explicit usage. Perhaps, this is also one r=
eason.
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108069/#review24383
-----------------------------------------------------------
On Jan. 1, 2013, 7:19 p.m., Kyle Morris wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108069/
> -----------------------------------------------------------
> =
> (Updated Jan. 1, 2013, 7:19 p.m.)
> =
> =
> Review request for KDE Edu.
> =
> =
> Description
> -------
> =
> Add explicit keyword to constructors which could potentially lead to impl=
icit type conversions
> =
> =
> Diffs
> -----
> =
> src/plugins/declarative/OfflineDataModel.h 2f2ddcb =
> src/plugins/declarative/Placemark.h dc383b3 =
> src/plugins/positionprovider/geoclue/GeoCute/MasterClient.h 893cce0 =
> src/plugins/positionprovider/gpsd/GpsdConnection.h f266996 =
> src/plugins/render/aprs/AprsFile.h 96fb4fa =
> src/plugins/render/aprs/AprsSource.h 372cf31 =
> src/plugins/render/aprs/AprsTTY.h baff58e =
> src/plugins/render/crosshairs/CrosshairsPlugin.h 061555b =
> src/plugins/render/earthquake/EarthquakeItem.h 85c13f8 =
> src/plugins/render/opendesktop/OpenDesktopItem.h bf901f7 =
> src/plugins/render/osmannotate/osm/OsmBoundsGraphicsItem.h 5437835 =
> src/plugins/render/panoramio/PanoramioModel.h 1b18f32 =
> src/plugins/render/panoramio/PanoramioWidget.h cddc372 =
> src/plugins/render/photo/CoordinatesParser.h ee7cc2f =
> src/plugins/render/postalcode/PostalCodeItem.h 020703e =
> src/plugins/render/satellites/SatellitesConfigDialog.h 64f9809 =
> src/plugins/render/satellites/TrackerPluginItem.h f224981 =
> src/plugins/render/satellites/mex/attlib.h 4b06be3 =
> src/plugins/render/weather/BBCItemGetter.h 0b5c6f1 =
> src/plugins/render/weather/BBCWeatherItem.h b7f1536 =
> src/plugins/render/weather/BBCWeatherService.h c0a4324 =
> src/plugins/render/weather/FakeWeatherItem.h a057804 =
> src/plugins/render/weather/FakeWeatherService.h 73c786c =
> src/plugins/render/weather/GeoNamesWeatherItem.h 597b139 =
> src/plugins/render/weather/GeoNamesWeatherService.h 007a28d =
> src/plugins/render/weather/StationListParser.h ac04137 =
> src/plugins/render/weather/WeatherItem.h 2b88905 =
> src/plugins/runner/latlon/LatLonRunner.h 1ea8e67 =
> src/plugins/runner/localdatabase/LocalDatabaseRunner.h 5341a02 =
> =
> Diff: http://git.reviewboard.kde.org/r/108069/diff/
> =
> =
> Testing
> -------
> =
> =
> Thanks,
> =
> Kyle Morris
> =
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/108069/">http://git.reviewboard.kde.org/r/108069/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On January 1st, 2013, 8:54 p.m., <b>Laszlo \
Papp</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">IMO, krazy should not warn in such cases. It seems to be an old habit in \
projects here and there not to use explicit for such cases when the argument is only \
the parent qobject (for understandable reason in my opinion).</pre> </blockquote>
<p>On January 1st, 2013, 9:03 p.m., <b>Laszlo Papp</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just in case: I do not \
wish to disturb the commit for this change; I was just thinking loudly for future \
reference. :)
A short grep in kde-runtime and other projects show that for instance even if the \
explicit keyword is used properly, the vast majority leaves that out for the qobject \
parent constructors, probably for the same reason.</pre> </blockquote>
<p>On January 1st, 2013, 10:15 p.m., <b>Kevin Krammer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">With C++11 we'll \
have to add it to all constructors which have arguments, so this reduces the changes \
we have to do then :)</pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">OK, interesting. I do \
not know much about C++11 yet, but in general I see the Qt sources converging to the \
explicit usage. Perhaps, this is also one reason.</pre> <br />
<p>- Laszlo</p>
<br />
<p>On January 1st, 2013, 7:19 p.m., Kyle Morris wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for KDE Edu.</div>
<div>By Kyle Morris.</div>
<p style="color: grey;"><i>Updated Jan. 1, 2013, 7:19 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Add explicit keyword to constructors which could potentially lead to \
implicit type conversions</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/plugins/declarative/OfflineDataModel.h <span style="color: \
grey">(2f2ddcb)</span></li>
<li>src/plugins/declarative/Placemark.h <span style="color: \
grey">(dc383b3)</span></li>
<li>src/plugins/positionprovider/geoclue/GeoCute/MasterClient.h <span style="color: \
grey">(893cce0)</span></li>
<li>src/plugins/positionprovider/gpsd/GpsdConnection.h <span style="color: \
grey">(f266996)</span></li>
<li>src/plugins/render/aprs/AprsFile.h <span style="color: \
grey">(96fb4fa)</span></li>
<li>src/plugins/render/aprs/AprsSource.h <span style="color: \
grey">(372cf31)</span></li>
<li>src/plugins/render/aprs/AprsTTY.h <span style="color: \
grey">(baff58e)</span></li>
<li>src/plugins/render/crosshairs/CrosshairsPlugin.h <span style="color: \
grey">(061555b)</span></li>
<li>src/plugins/render/earthquake/EarthquakeItem.h <span style="color: \
grey">(85c13f8)</span></li>
<li>src/plugins/render/opendesktop/OpenDesktopItem.h <span style="color: \
grey">(bf901f7)</span></li>
<li>src/plugins/render/osmannotate/osm/OsmBoundsGraphicsItem.h <span style="color: \
grey">(5437835)</span></li>
<li>src/plugins/render/panoramio/PanoramioModel.h <span style="color: \
grey">(1b18f32)</span></li>
<li>src/plugins/render/panoramio/PanoramioWidget.h <span style="color: \
grey">(cddc372)</span></li>
<li>src/plugins/render/photo/CoordinatesParser.h <span style="color: \
grey">(ee7cc2f)</span></li>
<li>src/plugins/render/postalcode/PostalCodeItem.h <span style="color: \
grey">(020703e)</span></li>
<li>src/plugins/render/satellites/SatellitesConfigDialog.h <span style="color: \
grey">(64f9809)</span></li>
<li>src/plugins/render/satellites/TrackerPluginItem.h <span style="color: \
grey">(f224981)</span></li>
<li>src/plugins/render/satellites/mex/attlib.h <span style="color: \
grey">(4b06be3)</span></li>
<li>src/plugins/render/weather/BBCItemGetter.h <span style="color: \
grey">(0b5c6f1)</span></li>
<li>src/plugins/render/weather/BBCWeatherItem.h <span style="color: \
grey">(b7f1536)</span></li>
<li>src/plugins/render/weather/BBCWeatherService.h <span style="color: \
grey">(c0a4324)</span></li>
<li>src/plugins/render/weather/FakeWeatherItem.h <span style="color: \
grey">(a057804)</span></li>
<li>src/plugins/render/weather/FakeWeatherService.h <span style="color: \
grey">(73c786c)</span></li>
<li>src/plugins/render/weather/GeoNamesWeatherItem.h <span style="color: \
grey">(597b139)</span></li>
<li>src/plugins/render/weather/GeoNamesWeatherService.h <span style="color: \
grey">(007a28d)</span></li>
<li>src/plugins/render/weather/StationListParser.h <span style="color: \
grey">(ac04137)</span></li>
<li>src/plugins/render/weather/WeatherItem.h <span style="color: \
grey">(2b88905)</span></li>
<li>src/plugins/runner/latlon/LatLonRunner.h <span style="color: \
grey">(1ea8e67)</span></li>
<li>src/plugins/runner/localdatabase/LocalDatabaseRunner.h <span style="color: \
grey">(5341a02)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/108069/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic