Skip to content

Commit

Permalink
Remove calls to method added in Qt 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 24, 2017
1 parent 6a56cb0 commit 00b0271
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -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();
Expand Down

3 comments on commit 00b0271

@3nids
Copy link
Member

@3nids 3nids commented on 00b0271 Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nyalldawson
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely use it for connects!

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

@3nids
Copy link
Member

@3nids 3nids commented on 00b0271 Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks for the info.

Please sign in to comment.