Compare commits

...

2 Commits

Author SHA1 Message Date
Harrissou Sant-anna
f9b8f1526e
Merge 34ca57f39123fd1cd75b39e444d6649cfb9ee753 into fe299930cd60e668fda5142b9de9c6ee06ccf1b8 2025-07-02 05:55:12 +02:00
Harrissou Sant-anna
34ca57f391
Replace label in contextual menu of SQL History item
The query contextual menu item loads the query in the main widget, it does not execute it.
2025-07-01 17:52:03 +02:00

View File

@ -164,13 +164,13 @@ class DatabaseQueryRootNode : public DatabaseQueryHistoryNode
{
if ( QgsDatabaseQueryHistoryWidget *queryHistoryWidget = qobject_cast< QgsDatabaseQueryHistoryWidget * >( context.historyWidget() ) )
{
QAction *executeAction = new QAction(
QObject::tr( "Execute SQL Command…" ), menu
QAction *loadAction = new QAction(
QObject::tr( "Load SQL Command…" ), menu
);
QObject::connect( executeAction, &QAction::triggered, menu, [this, queryHistoryWidget] {
QObject::connect( loadAction, &QAction::triggered, menu, [this, queryHistoryWidget] {
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(