Skip to content
Permalink
Browse files

Fix table name

  • Loading branch information
elpaso committed Jul 12, 2020
1 parent 93d9700 commit 9a3659f3ae2b0cb178ad99f3bdac5b4f2e783d2c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/browser/qgsinbuiltdataitemproviders.cpp
@@ -716,7 +716,7 @@ void QgsFieldsItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu *me
{
QAction *addColumnAction = new QAction( tr( "Add New Field…" ), menu );
const QString itemName { item->name() };
const QString tableName { fieldsItem->name() };
const QString tableName { fieldsItem->tableName() };
const QString schema { fieldsItem->schema() };
QgsVectorLayer *itemLayer { fieldsItem->layer( ) };
const QString connectionUri { fieldsItem->connectionUri() };
@@ -795,11 +795,11 @@ void QgsFieldItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu *men
QAction *deleteFieldAction = new QAction( tr( "Delete Field…" ), menu );
const bool supportsCascade { conn->capabilities().testFlag( QgsAbstractDatabaseProviderConnection::Capability::DeleteFieldCascade ) };
const QString itemName { item->name() };
const QString tableName { fieldsItem->name() };
const QString tableName { fieldsItem->tableName() };
const QString schema { fieldsItem->schema() };
const QString connectionUri { fieldsItem->connectionUri() };

connect( deleteFieldAction, &QAction::triggered, this, [ md, itemName, connectionUri, tableName, schema, context, supportsCascade, menu ]
connect( deleteFieldAction, &QAction::triggered, fieldsItem, [ md, itemName, connectionUri, tableName, schema, context, supportsCascade, menu ]
{
// Confirmation dialog
QMessageBox msgbox{QMessageBox::Icon::Question, tr( "Delete Field" ), tr( "Delete '%1' permanently?" ).arg( itemName ), QMessageBox::Ok | QMessageBox::Cancel };

0 comments on commit 9a3659f

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