diff --git a/src/libcalamares/geoip/Handler.cpp b/src/libcalamares/geoip/Handler.cpp index 3ee41eaa5..a803889b2 100644 --- a/src/libcalamares/geoip/Handler.cpp +++ b/src/libcalamares/geoip/Handler.cpp @@ -74,19 +74,10 @@ 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( CalamaresUtils::getString( config, QStringLiteral( "style" ) ), + CalamaresUtils::getString( config, QStringLiteral( "url" ) ), + CalamaresUtils::getString( config, QStringLiteral( "selector" ) ) ) { } diff --git a/src/libcalamares/geoip/Handler.h b/src/libcalamares/geoip/Handler.h index 8285682dd..0a5ec1e12 100644 --- a/src/libcalamares/geoip/Handler.h +++ b/src/libcalamares/geoip/Handler.h @@ -61,9 +61,9 @@ public: * This is like the 3-QString Handler constructor, except the strings * are extracted from the map, which is typically part of the configuration * of a Calamares module. The strings are fetched from these keys: - * - implementation from "style" or "geoipStyle" (if the first does not exist) - * - url from "url" or "geoipUrl" (if the first does not exist) - * - selector from "selector" or "geoipSelector" (if the first does not exist) + * - implementation from "style" + * - url from "url" + * - selector from "selector" */ Handler( const QVariantMap& config );