[welcome] Remove name-tangle
- use useful, not-single-letter, variable names - don't rename inconsistently in the lambda capture
This commit is contained in:
parent
8255bc3fc1
commit
f35fab24ac
@ -336,7 +336,7 @@ setCountry( Config* config, const QString& countryCode, CalamaresUtils::GeoIP::H
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
setGeoIP( Config* c, const QVariantMap& configurationMap )
|
setGeoIP( Config* config, const QVariantMap& configurationMap )
|
||||||
{
|
{
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );
|
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );
|
||||||
@ -350,12 +350,12 @@ setGeoIP( Config* c, const QVariantMap& configurationMap )
|
|||||||
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
|
if ( handler->type() != CalamaresUtils::GeoIP::Handler::Type::None )
|
||||||
{
|
{
|
||||||
auto* future = new FWString();
|
auto* future = new FWString();
|
||||||
QObject::connect( future, &FWString::finished, [config = c, f = future, h = handler]() {
|
QObject::connect( future, &FWString::finished, [config, future, handler]() {
|
||||||
QString countryResult = f->future().result();
|
QString countryResult = future->future().result();
|
||||||
cDebug() << "GeoIP result for welcome=" << countryResult;
|
cDebug() << "GeoIP result for welcome=" << countryResult;
|
||||||
::setCountry( config, countryResult, h );
|
::setCountry( config, countryResult, handler );
|
||||||
f->deleteLater();
|
future->deleteLater();
|
||||||
delete h;
|
delete handler;
|
||||||
} );
|
} );
|
||||||
future->setFuture( handler->queryRaw() );
|
future->setFuture( handler->queryRaw() );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user