Skip to content
Permalink
Browse files

[oauth] Use whileBlocking instead of blockSignals

  • Loading branch information
elpaso committed Jul 20, 2018
1 parent d8ffdaa commit fbe05be5f7c8edd02d48caeda3f6c20afa5f61f4
Showing with 3 additions and 8 deletions.
  1. +2 −7 src/auth/oauth2/qgsauthoauth2edit.cpp
  2. +1 −1 src/auth/oauth2/qgso2.cpp
@@ -647,10 +647,7 @@ void QgsAuthOAuth2Edit::updateDefinedConfigsCache()

void QgsAuthOAuth2Edit::loadDefinedConfigs()
{
lstwdgDefinedConfigs->blockSignals( true );
lstwdgDefinedConfigs->clear();
lstwdgDefinedConfigs->blockSignals( false );

whileBlocking( lstwdgDefinedConfigs )->clear();
updateDefinedConfigsCache();

QgsStringMap::const_iterator i = mDefinedConfigsCache.constBegin();
@@ -716,9 +713,7 @@ void QgsAuthOAuth2Edit::updateGrantFlow( int indx )
{
if ( cmbbxGrantFlow->currentIndex() != indx )
{
cmbbxGrantFlow->blockSignals( true );
cmbbxGrantFlow->setCurrentIndex( indx );
cmbbxGrantFlow->blockSignals( false );
whileBlocking( cmbbxGrantFlow )->setCurrentIndex( indx );
}

QgsAuthOAuth2Config::GrantFlow flow =
@@ -228,7 +228,7 @@ void QgsO2::link()

QUrl url( tokenUrl_ );
QNetworkRequest tokenRequest( url );
tokenRequest.setHeader( QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded" );
tokenRequest.setHeader( QNetworkRequest::ContentTypeHeader, QLatin1Literal( "application/x-www-form-urlencoded" ) );
QNetworkReply *tokenReply = manager_->post( tokenRequest, payload );

connect( tokenReply, SIGNAL( finished() ), this, SLOT( onTokenReplyFinished() ), Qt::QueuedConnection );

0 comments on commit fbe05be

Please sign in to comment.
You can’t perform that action at this time.