Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More old style connect removal
  • Loading branch information
nyalldawson committed Nov 5, 2018
1 parent 7b24bd3 commit 0ea86bf
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -1655,7 +1655,7 @@ void QgsPluginManager::showEvent( QShowEvent *e )
}
else
{
QTimer::singleShot( 0, this, SLOT( warnAboutMissingObjects() ) );
QTimer::singleShot( 0, this, &QgsPluginManager::warnAboutMissingObjects );
}

QgsOptionsDialogBase::showEvent( e );
Expand Down
16 changes: 8 additions & 8 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -112,22 +112,22 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanv

mBtnStyle = new QPushButton( tr( "Style" ) );
QMenu *menuStyle = new QMenu( this );
menuStyle->addAction( tr( "Load Style…" ), this, SLOT( loadStyle_clicked() ) );
menuStyle->addAction( tr( "Save Style…" ), this, SLOT( saveStyleAs_clicked() ) );
menuStyle->addAction( tr( "Load Style…" ), this, &QgsRasterLayerProperties::loadStyle_clicked );
menuStyle->addAction( tr( "Save Style…" ), this, &QgsRasterLayerProperties::saveStyleAs_clicked );
menuStyle->addSeparator();
menuStyle->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
menuStyle->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
menuStyle->addAction( tr( "Save as Default" ), this, &QgsRasterLayerProperties::saveDefaultStyle_clicked );
menuStyle->addAction( tr( "Restore Default" ), this, &QgsRasterLayerProperties::loadDefaultStyle_clicked );
mBtnStyle->setMenu( menuStyle );
connect( menuStyle, &QMenu::aboutToShow, this, &QgsRasterLayerProperties::aboutToShowStyleMenu );
buttonBox->addButton( mBtnStyle, QDialogButtonBox::ResetRole );

mBtnMetadata = new QPushButton( tr( "Metadata" ), this );
QMenu *menuMetadata = new QMenu( this );
mActionLoadMetadata = menuMetadata->addAction( tr( "Load Metadata…" ), this, SLOT( loadMetadata() ) );
mActionSaveMetadataAs = menuMetadata->addAction( tr( "Save Metadata…" ), this, SLOT( saveMetadataAs() ) );
mActionLoadMetadata = menuMetadata->addAction( tr( "Load Metadata…" ), this, &QgsRasterLayerProperties::loadMetadata );
mActionSaveMetadataAs = menuMetadata->addAction( tr( "Save Metadata…" ), this, &QgsRasterLayerProperties::saveMetadataAs );
menuMetadata->addSeparator();
menuMetadata->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultMetadata() ) );
menuMetadata->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultMetadata() ) );
menuMetadata->addAction( tr( "Save as Default" ), this, &QgsRasterLayerProperties::saveDefaultMetadata );
menuMetadata->addAction( tr( "Restore Default" ), this, &QgsRasterLayerProperties::loadDefaultMetadata );
mBtnMetadata->setMenu( menuMetadata );
buttonBox->addButton( mBtnMetadata, QDialogButtonBox::ResetRole );

Expand Down
12 changes: 6 additions & 6 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -127,19 +127,19 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
mActionSaveStyle = menuStyle->addAction( tr( "Save Style…" ) );
connect( mActionSaveStyle, &QAction::triggered, this, &QgsVectorLayerProperties::saveStyleAs );
menuStyle->addSeparator();
menuStyle->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
menuStyle->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
menuStyle->addAction( tr( "Save as Default" ), this, &QgsVectorLayerProperties::saveDefaultStyle_clicked );
menuStyle->addAction( tr( "Restore Default" ), this, &QgsVectorLayerProperties::loadDefaultStyle_clicked );
mBtnStyle->setMenu( menuStyle );
connect( menuStyle, &QMenu::aboutToShow, this, &QgsVectorLayerProperties::aboutToShowStyleMenu );
buttonBox->addButton( mBtnStyle, QDialogButtonBox::ResetRole );

mBtnMetadata = new QPushButton( tr( "Metadata" ), this );
QMenu *menuMetadata = new QMenu( this );
mActionLoadMetadata = menuMetadata->addAction( tr( "Load Metadata…" ), this, SLOT( loadMetadata() ) );
mActionSaveMetadataAs = menuMetadata->addAction( tr( "Save Metadata…" ), this, SLOT( saveMetadataAs() ) );
mActionLoadMetadata = menuMetadata->addAction( tr( "Load Metadata…" ), this, &QgsVectorLayerProperties::loadMetadata );
mActionSaveMetadataAs = menuMetadata->addAction( tr( "Save Metadata…" ), this, &QgsVectorLayerProperties::saveMetadataAs );
menuMetadata->addSeparator();
menuMetadata->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultMetadata() ) );
menuMetadata->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultMetadata() ) );
menuMetadata->addAction( tr( "Save as Default" ), this, &QgsVectorLayerProperties::saveDefaultMetadata );
menuMetadata->addAction( tr( "Restore Default" ), this, &QgsVectorLayerProperties::loadDefaultMetadata );
mBtnMetadata->setMenu( menuMetadata );
buttonBox->addButton( mBtnMetadata, QDialogButtonBox::ResetRole );

Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/qgsauthmanager.cpp
Expand Up @@ -845,7 +845,7 @@ const QString QgsAuthManager::uniqueConfigId() const
int len = 7;
// sleep just a bit to make sure the current time has changed
QEventLoop loop;
QTimer::singleShot( 3, &loop, SLOT( quit() ) );
QTimer::singleShot( 3, &loop, &QEventLoop::quit );
loop.exec();

uint seed = static_cast< uint >( QTime::currentTime().msec() );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsdataitem.cpp
Expand Up @@ -969,7 +969,7 @@ void QgsDirectoryItem::directoryChanged()
// this happens when a new file appears in the directory and
// the item's children thread will try to open the file with
// GDAL or OGR even if it is still being written.
QTimer::singleShot( 100, this, SLOT( refresh() ) );
QTimer::singleShot( 100, this, [ = ] { refresh(); } );
}
}

Expand Down Expand Up @@ -1124,7 +1124,7 @@ void QgsDirectoryParamWidget::mousePressEvent( QMouseEvent *event )
labels << tr( "Name" ) << tr( "Size" ) << tr( "Date" ) << tr( "Permissions" ) << tr( "Owner" ) << tr( "Group" ) << tr( "Type" );
for ( int i = 0; i < labels.count(); i++ )
{
QAction *action = popupMenu.addAction( labels[i], this, SLOT( showHideColumn() ) );
QAction *action = popupMenu.addAction( labels[i], this, &QgsDirectoryParamWidget::showHideColumn );
action->setObjectName( QString::number( i ) );
action->setCheckable( true );
action->setChecked( !isColumnHidden( i ) );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgstransactiongroup.cpp
Expand Up @@ -117,7 +117,7 @@ void QgsTransactionGroup::onCommitChanges()
{
emit commitError( errMsg );
// Restart editing the calling layer in the next event loop cycle
QTimer::singleShot( 0, triggeringLayer, SLOT( startEditing() ) );
QTimer::singleShot( 0, triggeringLayer, &QgsVectorLayer::startEditing );
}
mEditingStopping = false;
}
Expand All @@ -144,7 +144,7 @@ void QgsTransactionGroup::onRollback()
else
{
// Restart editing the calling layer in the next event loop cycle
QTimer::singleShot( 0, triggeringLayer, SLOT( startEditing() ) );
QTimer::singleShot( 0, triggeringLayer, &QgsVectorLayer::startEditing );
}
mEditingStopping = false;
}
Expand Down

0 comments on commit 0ea86bf

Please sign in to comment.