1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-25 18:49:16 +02:00

Removed debug stuff from release builds

This commit is contained in:
2018-02-13 23:03:18 +01:00
parent 18fc6cc3e2
commit b6e798f5c3
35 changed files with 82 additions and 7 deletions

View File

@ -83,8 +83,10 @@ double AngularUnits::fromDegrees(double val) const
return (_code == 9110) ? deg2sDMS(val) : val / _f;
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const AngularUnits &au)
{
dbg.nospace() << "AngularUnits(" << deg2rad(au._f) << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -17,8 +17,9 @@ public:
double fromDegrees(double val) const;
friend bool operator==(const AngularUnits &au1, const AngularUnits &au2);
#ifndef QT_NO_DEBUG
friend QDebug operator<<(QDebug dbg, const AngularUnits &au);
#endif // QT_NO_DEBUG
private:
int _code;
double _f;
@ -27,6 +28,8 @@ private:
inline bool operator==(const AngularUnits &au1, const AngularUnits &au2)
{return (au1._f == au2._f);}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const AngularUnits &au);
#endif // QT_NO_DEBUG
#endif // ANGULARUNITS_H

View File

@ -61,9 +61,11 @@ Coordinates Datum::fromWGS84(const Coordinates &c) const
return _WGS84 ? c : molodensky(c, WGS84, *this);
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Datum &datum)
{
dbg.nospace() << "Datum(" << *datum.ellipsoid() << ", " << datum.dx()
<< ", " << datum.dy() << ", " << datum.dz() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -39,6 +39,8 @@ inline bool operator==(const Datum &d1, const Datum &d2)
{return (d1.ellipsoid() == d2.ellipsoid() && d1.dx() == d2.dx()
&& d1.dy() == d2.dy() && d1.dz() == d2.dz());}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Datum &datum);
#endif // QT_NO_DEBUG
#endif // DATUM_H

View File

@ -66,9 +66,11 @@ void Ellipsoid::loadList(const QString &path)
}
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Ellipsoid &ellipsoid)
{
dbg.nospace() << "Ellipsoid(" << ellipsoid.radius() << ", "
<< 1.0 / ellipsoid.flattening() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -35,6 +35,8 @@ private:
inline bool operator==(const Ellipsoid &e1, const Ellipsoid &e2)
{return (e1.radius() == e2.radius() && e1.flattening() == e2.flattening());}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Ellipsoid &ellipsoid);
#endif // QT_NO_DEBUG
#endif // ELLIPSOID_H

View File

@ -183,9 +183,11 @@ Coordinates GCS::fromWGS84(const Coordinates &c) const
return Coordinates(_primeMeridian.fromGreenwich(ds.lon()), ds.lat());
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const GCS &gcs)
{
dbg.nospace() << "GCS(" << gcs.datum() << ", " << gcs.primeMeridian()
<< ", " << gcs.angularUnits() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -50,6 +50,8 @@ inline bool operator==(const GCS &gcs1, const GCS &gcs2)
&& gcs1.primeMeridian() == gcs2.primeMeridian()
&& gcs1.angularUnits() == gcs2.angularUnits());}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const GCS &gcs);
#endif // QT_NO_DEBUG
#endif // GCS_H

View File

@ -20,8 +20,10 @@ LinearUnits::LinearUnits(int code)
}
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const LinearUnits &lu)
{
dbg.nospace() << "LinearUnits(" << lu._f << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -22,7 +22,9 @@ public:
{return QPointF(p.x() / _f, p.y() /_f);}
friend bool operator==(const LinearUnits &lu1, const LinearUnits &lu2);
#ifndef QT_NO_DEBUG
friend QDebug operator<<(QDebug dbg, const LinearUnits &lu);
#endif // QT_NO_DEBUG
private:
double _f;
@ -31,6 +33,8 @@ private:
inline bool operator==(const LinearUnits &lu1, const LinearUnits &lu2)
{return (lu1._f == lu2._f);}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const LinearUnits &lu);
#endif // QT_NO_DEBUG
#endif // LINEARUNITS_H

View File

@ -116,6 +116,7 @@ void Matrix::zeroize()
_m[i] = 0;
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Matrix &matrix)
{
dbg.nospace() << "Matrix(" << endl;
@ -128,3 +129,4 @@ QDebug operator<<(QDebug dbg, const Matrix &matrix)
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -31,6 +31,8 @@ private:
size_t _w;
};
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Matrix &matrix);
#endif // QT_NO_DEBUG
#endif // MATRIX_H

View File

@ -187,9 +187,11 @@ void PCS::loadList(const QString &path)
}
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const PCS &pcs)
{
dbg.nospace() << "PCS(" << *pcs.gcs() << ", " << pcs.method() << ", "
<< pcs.units() << ", " << pcs.setup() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -43,6 +43,8 @@ private:
static GCS _nullGCS;
};
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const PCS &pcs);
#endif // QT_NO_DEBUG
#endif // PCS_H

View File

@ -66,8 +66,10 @@ double PrimeMeridian::fromGreenwich(double val) const
return shift(val, -_pm);
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const PrimeMeridian &pm)
{
dbg.nospace() << "PrimeMeridian(" << pm._pm << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -17,7 +17,9 @@ public:
double fromGreenwich(double val) const;
friend bool operator==(const PrimeMeridian &pm1, const PrimeMeridian &pm2);
#ifndef QT_NO_DEBUG
friend QDebug operator<<(QDebug dbg, const PrimeMeridian &pm);
#endif // QT_NO_DEBUG
private:
double _pm;
@ -26,6 +28,8 @@ private:
inline bool operator==(const PrimeMeridian &pm1, const PrimeMeridian &pm2)
{return (pm1._pm == pm2._pm);}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const PrimeMeridian &pm);
#endif // QT_NO_DEBUG
#endif // PRIMEMERIDIAN_H

View File

@ -105,6 +105,7 @@ Coordinates Projection::xy2ll(const QPointF &p) const
return _gcs->toWGS84(_ct->xy2ll(_units.toMeters(p)));
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Projection::Setup &setup)
{
dbg.nospace() << "Setup(" << setup.latitudeOrigin() << ", "
@ -119,3 +120,4 @@ QDebug operator<<(QDebug dbg, const Projection::Method &method)
dbg.nospace() << "Method(" << method.id() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -86,7 +86,9 @@ private:
LinearUnits _units;
};
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Projection::Setup &setup);
QDebug operator<<(QDebug dbg, const Projection::Method &method);
#endif // QT_NO_DEBUG
#endif // PROJECTION_H

View File

@ -21,10 +21,12 @@ private:
QPixmap _pixmap;
};
#ifndef QT_NO_DEBUG
inline QDebug operator<<(QDebug dbg, const Tile &tile)
{
dbg.nospace() << "Tile(" << tile.zoom() << ", " << tile.xy() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG
#endif // TILE_H

View File

@ -73,8 +73,10 @@ Transform::Transform(const QList<ReferencePoint> &points)
affine(points);
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const ReferencePoint &p)
{
dbg.nospace() << "ReferencePoint(" << p.xy << ", " << p.pp << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -27,6 +27,8 @@ private:
QString _errorString;
};
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const ReferencePoint &p);
#endif // QT_NO_DEBUG
#endif // TRANSFORM_H