[Kstars-devel] KDE/kdeedu/kstars/kstars
Alexey Khudyakov
alexey.skladnoy at gmail.com
Wed Jul 29 20:07:47 CEST 2009
SVN commit 1004257 by khudyakov:
Remove GeoLocation(const GeoLocation*) constructor.
It was used only once and in unexpected way.
void KStarsData::setLocation( const GeoLocation &l );
was called with (GeoLocataion*) parameter. Temporary object was created
with beforementioned constructor and passed to function.
I fount this quite amusing
CCMAIL: kstars-devel at kde.org
M +1 -14 geolocation.cpp
M +0 -5 geolocation.h
M +1 -1 kstarsactions.cpp
--- trunk/KDE/kdeedu/kstars/kstars/geolocation.cpp #1004256:1004257
@@ -26,6 +26,7 @@
TZrule = NULL;
}
+// FIXME: check whether this constructor needed
GeoLocation::GeoLocation( const GeoLocation &g ) {
Longitude = g.Longitude;
Latitude = g.Latitude;
@@ -40,20 +41,6 @@
geodToCart();
}
-GeoLocation::GeoLocation( GeoLocation *g ) {
- Longitude = g->Longitude;
- Latitude = g->Latitude;
- Name = g->Name;
- Province = g->Province;
- Country = g->Country;
- TimeZone = g->TimeZone;
- TZrule = g->TZrule;
- Height = g->Height;
- indexEllipsoid = g->indexEllipsoid;
- setEllipsoid ( indexEllipsoid );
- geodToCart();
-}
-
GeoLocation::GeoLocation( dms lng, dms lat,
const QString &name, const QString &province, const QString &country, double tz, TimeZoneRule *tzrule, int iEllips, double hght ) {
Longitude = lng;
--- trunk/KDE/kdeedu/kstars/kstars/geolocation.h #1004256:1004257
@@ -48,11 +48,6 @@
*/
GeoLocation( const GeoLocation &g );
- /**Copy Constructor. Differs from the above function only in argument type.
- *@param g pointer to the GeoLocation to duplicate
- */
- GeoLocation( GeoLocation *g );
-
/**Constructor using dms objects to specify longitude and latitude.
*@param lng the longitude
*@param lat the latitude
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #1004256:1004257
@@ -187,7 +187,7 @@
if ( wizard->exec() == QDialog::Accepted ) {
Options::setRunStartupWizard( false ); //don't run on startup next time
- data()->setLocation( wizard->geo() );
+ data()->setLocation( *(wizard->geo()) );
// reset infoboxes
infoBoxes()->geoChanged( geo() );
More information about the Kstars-devel
mailing list