[locale] Debugging support for Location

- code formatting
 - provide an operator << for debugging TZ widget
This commit is contained in:
Adriaan de Groot 2019-01-07 18:34:25 +01:00
parent 3ff480eaa9
commit bc398756f5

View File

@ -38,11 +38,13 @@
class LocaleGlobal class LocaleGlobal
{ {
public: public:
struct Locale { struct Locale
{
QString description, locale; QString description, locale;
}; };
struct Location { struct Location
{
QString region, zone, country; QString region, zone, country;
double latitude, longitude; double latitude, longitude;
static QString pretty( const QString& s ); static QString pretty( const QString& s );
@ -59,7 +61,12 @@ private:
static void initLocales(); static void initLocales();
static void initLocations(); static void initLocations();
static double getRightGeoLocation(QString str); static double getRightGeoLocation( QString str );
}; };
inline QDebug& operator <<( QDebug& s, const LocaleGlobal::Location& l )
{
return s << l.region << '/' << l.zone << '(' << l.country << ") @N" << l.latitude << 'E' << l.longitude;
}
#endif // LOCALEGLOBAL_H #endif // LOCALEGLOBAL_H