[locale] Reduce API surface

- getLocationPosition doesn't need to be a method, since it calls out
  to a static function of TimeZoneImageList anyway.
This commit is contained in:
Adriaan de Groot 2020-07-20 13:38:20 +02:00
parent 25ba1bb767
commit 931ce20f30
2 changed files with 7 additions and 5 deletions

View File

@ -34,6 +34,13 @@
#define ZONE_NAME QStringLiteral( "zone" )
#endif
static QPoint
getLocationPosition( const CalamaresUtils::Locale::TZZone* l )
{
return TimeZoneImageList::getLocationPosition( l->longitude(), l->latitude() );
}
TimeZoneWidget::TimeZoneWidget( QWidget* parent )
: QWidget( parent )
, timeZoneImages( TimeZoneImageList::fromQRC() )

View File

@ -53,11 +53,6 @@ private:
TimeZoneImageList timeZoneImages;
const TZZone* m_currentLocation = nullptr; // Not owned by me
QPoint getLocationPosition( const TZZone* l )
{
return timeZoneImages.getLocationPosition( l->longitude(), l->latitude() );
}
void paintEvent( QPaintEvent* event );
void mousePressEvent( QMouseEvent* event );
};