|
|
|
@ -25,6 +25,7 @@
|
|
|
|
|
|
|
|
|
|
#include "utils/Logger.h"
|
|
|
|
|
#include "utils/NamedEnum.h"
|
|
|
|
|
#include "utils/Variant.h"
|
|
|
|
|
|
|
|
|
|
#include <QEventLoop>
|
|
|
|
|
#include <QNetworkRequest>
|
|
|
|
@ -73,6 +74,22 @@ Handler::Handler( const QString& implementation, const QString& url, const QStri
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static QString
|
|
|
|
|
getMapAlternates( const QVariantMap& config, const QString& key1, const QString& key2 )
|
|
|
|
|
{
|
|
|
|
|
QString r = CalamaresUtils::getString( config, key1 );
|
|
|
|
|
if ( r.isEmpty() )
|
|
|
|
|
r = CalamaresUtils::getString( config, key2 );
|
|
|
|
|
return r;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Handler::Handler( const QVariantMap& config )
|
|
|
|
|
: Handler( getMapAlternates( config, QStringLiteral( "style" ), QStringLiteral( "geoipStyle" ) ),
|
|
|
|
|
getMapAlternates( config, QStringLiteral( "url" ), QStringLiteral( "geoipUrl" ) ),
|
|
|
|
|
getMapAlternates( config, QStringLiteral( "selector" ), QStringLiteral( "geoipSelector" ) ) )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Handler::~Handler()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|