Merge pull request #62533 from agiudiceandrea/backport-62483-to-release-3_44

[Backport release-3_44] Replace label in contextual menu of SQL History item
This commit is contained in:
Alexander Bruy 2025-07-08 09:33:00 +01:00 committed by GitHub
commit a4725c5ae8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,13 +164,13 @@ class DatabaseQueryRootNode : public DatabaseQueryHistoryNode
{ {
if ( QgsDatabaseQueryHistoryWidget *queryHistoryWidget = qobject_cast< QgsDatabaseQueryHistoryWidget * >( context.historyWidget() ) ) if ( QgsDatabaseQueryHistoryWidget *queryHistoryWidget = qobject_cast< QgsDatabaseQueryHistoryWidget * >( context.historyWidget() ) )
{ {
QAction *executeAction = new QAction( QAction *loadAction = new QAction(
QObject::tr( "Execute SQL Command…" ), menu QObject::tr( "Load SQL Command…" ), menu
); );
QObject::connect( executeAction, &QAction::triggered, menu, [=] { QObject::connect( loadAction, &QAction::triggered, menu, [=] {
queryHistoryWidget->emitSqlTriggered( mEntry.entry.value( QStringLiteral( "connection" ) ).toString(), mEntry.entry.value( QStringLiteral( "provider" ) ).toString(), mEntry.entry.value( QStringLiteral( "query" ) ).toString() ); queryHistoryWidget->emitSqlTriggered( mEntry.entry.value( QStringLiteral( "connection" ) ).toString(), mEntry.entry.value( QStringLiteral( "provider" ) ).toString(), mEntry.entry.value( QStringLiteral( "query" ) ).toString() );
} ); } );
menu->addAction( executeAction ); menu->addAction( loadAction );
} }
QAction *copyAction = new QAction( QAction *copyAction = new QAction(