Skip to content

Commit fbe05be

Browse files
committedJul 20, 2018
[oauth] Use whileBlocking instead of blockSignals
1 parent d8ffdaa commit fbe05be

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed
 

‎src/auth/oauth2/qgsauthoauth2edit.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,7 @@ void QgsAuthOAuth2Edit::updateDefinedConfigsCache()
647647

648648
void QgsAuthOAuth2Edit::loadDefinedConfigs()
649649
{
650-
lstwdgDefinedConfigs->blockSignals( true );
651-
lstwdgDefinedConfigs->clear();
652-
lstwdgDefinedConfigs->blockSignals( false );
653-
650+
whileBlocking( lstwdgDefinedConfigs )->clear();
654651
updateDefinedConfigsCache();
655652

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

724719
QgsAuthOAuth2Config::GrantFlow flow =

‎src/auth/oauth2/qgso2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void QgsO2::link()
228228

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.