Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[oauth] Use whileBlocking instead of blockSignals
  • Loading branch information
elpaso committed Jul 20, 2018
1 parent d8ffdaa commit fbe05be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/auth/oauth2/qgsauthoauth2edit.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion src/auth/oauth2/qgso2.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit fbe05be

Please sign in to comment.