Skip to content
Permalink
Browse files

Remove calls to method added in Qt 5.6

  • Loading branch information
nyalldawson committed Jan 24, 2017
1 parent 6a56cb0 commit 00b02715ead1c8839f9073da9a5e8347b3c18c0e
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/app/qgsbrowserdockwidget.cpp
@@ -389,28 +389,28 @@ void QgsBrowserDockWidget::showContextMenu( QPoint pt )
if ( item->parent() && !inFavDirs )
{
// only non-root directories can be added as favorites
menu->addAction( tr( "Add as a Favorite" ), this, &QgsBrowserDockWidget::addFavorite );
menu->addAction( tr( "Add as a Favorite" ), this, SLOT( addFavorite() ) );
}
else if ( inFavDirs )
{
// only favorites can be removed
menu->addAction( tr( "Remove Favorite" ), this, &QgsBrowserDockWidget::removeFavorite );
menu->addAction( tr( "Remove Favorite" ), this, SLOT( removeFavorite() ) );
}
menu->addAction( tr( "Properties..." ), this, &QgsBrowserDockWidget::showProperties );
menu->addAction( tr( "Hide from Browser" ), this, &QgsBrowserDockWidget::hideItem );
QAction *action = menu->addAction( tr( "Fast Scan this Directory" ), this, &QgsBrowserDockWidget::toggleFastScan );
menu->addAction( tr( "Properties..." ), this, SLOT( showProperties() ) );
menu->addAction( tr( "Hide from Browser" ), this, SLOT( hideItem() ) );
QAction *action = menu->addAction( tr( "Fast Scan this Directory" ), this, SLOT( toggleFastScan() ) );
action->setCheckable( true );
action->setChecked( settings.value( QStringLiteral( "/qgis/scanItemsFastScanUris" ),
QStringList() ).toStringList().contains( item->path() ) );
}
else if ( item->type() == QgsDataItem::Layer )
{
menu->addAction( tr( "Add Selected Layer(s)" ), this, &QgsBrowserDockWidget::addSelectedLayers );
menu->addAction( tr( "Properties..." ), this, &QgsBrowserDockWidget::showProperties );
menu->addAction( tr( "Add Selected Layer(s)" ), this, SLOT( addSelectedLayers() ) );
menu->addAction( tr( "Properties..." ), this, SLOT( showProperties() ) );
}
else if ( item->type() == QgsDataItem::Favorites )
{
menu->addAction( tr( "Add a Directory..." ), this, [this] { addFavoriteDirectory(); } );
menu->addAction( tr( "Add a Directory..." ), this, SLOT( addFavoriteDirectory() ) );
}

QList<QAction*> actions = item->actions();

3 comments on commit 00b0271

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids replied Jan 24, 2017

I am not following, we shouldn't use new signal slot syntax?

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson replied Jan 24, 2017

Definitely use it for connects!

It's the QMenu::addAction version which only supports new style slots connections since 5.6

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids replied Jan 24, 2017

ok, thanks for the info.

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