Skip to content
Permalink
Browse files

qgsapplayertreeviewmenuprovider.cpp: avoid false positive error from …

…old cppcheck about uninitialized variable
  • Loading branch information
rouault authored and nyalldawson committed Jun 15, 2020
1 parent e292cb7 commit 949f631fcb563e036daff0f623095b6bdf287aeb
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/qgsapplayertreeviewmenuprovider.cpp
@@ -231,8 +231,9 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
// attribute table
QgsSettings settings;
QgsAttributeTableFilterModel::FilterMode initialMode = settings.enumValue( QStringLiteral( "qgis/attributeTableBehavior" ), QgsAttributeTableFilterModel::ShowAll );
const auto lambdaOpenAttributeTable = [ = ] { QgisApp::instance()->attributeTable( initialMode ); };
QAction *attributeTableAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionOpenTable.svg" ) ), tr( "&Open Attribute Table" ),
QgisApp::instance(), [ = ] { QgisApp::instance()->attributeTable( initialMode ); } );
QgisApp::instance(), lambdaOpenAttributeTable );
attributeTableAction->setEnabled( vlayer->isValid() );

// allow editing

0 comments on commit 949f631

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