Skip to content
Permalink
Browse files

New style signal/slot connections

  • Loading branch information
m-kuhn committed Jun 17, 2017
1 parent 8bfbe19 commit c69c5963d03398f2017ef53a19c5e218c96b2def
Showing with 8 additions and 9 deletions.
  1. +3 −3 src/core/auth/qgsauthmanager.cpp
  2. +4 −5 src/gui/qgsadvanceddigitizingdockwidget.cpp
  3. +1 −1 src/gui/qgsmaptip.cpp
@@ -2911,7 +2911,7 @@ bool QgsAuthManager::passwordHelperDelete()
job.setAutoDelete( false );
job.setKey( AUTH_PASSWORD_HELPER_KEY_NAME );
QEventLoop loop;
job.connect( &job, SIGNAL( finished( QKeychain::Job * ) ), &loop, SLOT( quit() ) );
connect( &job, &QKeychain::Job::finished, &loop, &QEventLoop::quit );
job.start();
loop.exec();
if ( job.error() )
@@ -2943,7 +2943,7 @@ QString QgsAuthManager::passwordHelperRead()
job.setAutoDelete( false );
job.setKey( AUTH_PASSWORD_HELPER_KEY_NAME );
QEventLoop loop;
job.connect( &job, SIGNAL( finished( QKeychain::Job * ) ), &loop, SLOT( quit() ) );
connect( &job, &QKeychain::Job::finished, &loop, &QEventLoop::quit );
job.start();
loop.exec();
if ( job.error() )
@@ -2986,7 +2986,7 @@ bool QgsAuthManager::passwordHelperWrite( const QString &password )
job.setKey( AUTH_PASSWORD_HELPER_KEY_NAME );
job.setTextData( password );
QEventLoop loop;
job.connect( &job, SIGNAL( finished( QKeychain::Job * ) ), &loop, SLOT( quit() ) );
connect( &job, &QKeychain::Job::finished, &loop, &QEventLoop::quit );
job.start();
loop.exec();
if ( job.error() )
@@ -140,10 +140,10 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas *
connect( mRepeatingLockAngleButton, &QAbstractButton::clicked, this, &QgsAdvancedDigitizingDockWidget::setConstraintRepeatingLock );
connect( mRepeatingLockXButton, &QAbstractButton::clicked, this, &QgsAdvancedDigitizingDockWidget::setConstraintRepeatingLock );
connect( mRepeatingLockYButton, &QAbstractButton::clicked, this, &QgsAdvancedDigitizingDockWidget::setConstraintRepeatingLock );
connect( mAngleLineEdit, SIGNAL( returnPressed() ), this, SLOT( lockConstraint() ) );
connect( mDistanceLineEdit, SIGNAL( returnPressed() ), this, SLOT( lockConstraint() ) );
connect( mXLineEdit, SIGNAL( returnPressed() ), this, SLOT( lockConstraint() ) );
connect( mYLineEdit, SIGNAL( returnPressed() ), this, SLOT( lockConstraint() ) );
connect( mAngleLineEdit, &QLineEdit::returnPressed, this, [ = ]() { lockConstraint(); } );
connect( mDistanceLineEdit, &QLineEdit::returnPressed, this, [ = ]() { lockConstraint(); } );
connect( mXLineEdit, &QLineEdit::returnPressed, this, [ = ]() { lockConstraint(); } );
connect( mYLineEdit, &QLineEdit::returnPressed, this, [ = ]() { lockConstraint(); } );
connect( mAngleLineEdit, &QLineEdit::textEdited, this, &QgsAdvancedDigitizingDockWidget::constraintTextEdited );
connect( mDistanceLineEdit, &QLineEdit::textEdited, this, &QgsAdvancedDigitizingDockWidget::constraintTextEdited );
connect( mXLineEdit, &QLineEdit::textEdited, this, &QgsAdvancedDigitizingDockWidget::constraintTextEdited );
@@ -275,7 +275,6 @@ void QgsAdvancedDigitizingDockWidget::additionalConstraintClicked( bool activate
}
}


void QgsAdvancedDigitizingDockWidget::setConstraintRelative( bool activate )
{
if ( sender() == mRelativeAngleButton )
@@ -66,7 +66,7 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,
#if WITH_QTWEBKIT
mWebView->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );//Handle link clicks by yourself
mWebView->setContextMenuPolicy( Qt::NoContextMenu ); //No context menu is allowed if you don't need it
connect( mWebView, SIGNAL( linkClicked( QUrl ) ), this, SLOT( onLinkClicked( QUrl ) ) );
connect( mWebView, &QWebView::linkClicked, this, &QgsMapTip::onLinkClicked );
#endif

mWebView->page()->settings()->setAttribute(

0 comments on commit c69c596

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