void QgsAuthConfigSelect::populateConfigSelector() { loadAvailableConfigs(); validateConfig(); cmbConfigSelect->blockSignals( true ); cmbConfigSelect->clear(); cmbConfigSelect->addItem( tr( "No authentication" ), "0" ); QgsStringMap sortmap; QgsAuthMethodConfigsMap::const_iterator cit = mConfigs.constBegin(); for ( cit = mConfigs.constBegin(); cit != mConfigs.constEnd(); ++cit ) { QgsAuthMethodConfig config = cit.value(); sortmap.insert( config.name(), cit.key() ); } QgsStringMap::const_iterator sm = sortmap.constBegin(); for ( sm = sortmap.constBegin(); sm != sortmap.constEnd(); ++sm ) { cmbConfigSelect->addItem( sm.key(), sm.value() ); } cmbConfigSelect->blockSignals( false ); int indx = 0; if ( !mAuthCfg.isEmpty() ) { indx = cmbConfigSelect->findData( mAuthCfg ); } cmbConfigSelect->setCurrentIndex( indx > 0 ? indx : 0 ); }
bool QgsAuthMethodConfig::operator==( const QgsAuthMethodConfig &other ) const { return ( other.id() == id() && other.name() == name() && other.uri() == uri() && other.method() == method() && other.version() == version() && other.configMap() == configMap() ); }
QgsAuthMethodConfig::QgsAuthMethodConfig( const QgsAuthMethodConfig &methodconfig ) : mId( methodconfig.id() ) , mName( methodconfig.name() ) , mUri( methodconfig.uri() ) , mMethod( methodconfig.method() ) , mVersion( methodconfig.version() ) , mConfigMap( methodconfig.configMap() ) { }