From 7a37f3ab074c9e6a0d38e56452c726db9fa20a07 Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Mon, 7 Jul 2025 22:09:35 +0200 Subject: [PATCH] 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. Co-Authored-By: Harrissou Sant-anna <7983394+delazj@users.noreply.github.com> --- src/gui/qgsdbqueryhistoryprovider.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/qgsdbqueryhistoryprovider.cpp b/src/gui/qgsdbqueryhistoryprovider.cpp index 5c3c08f45d2..d5b18c665d7 100644 --- a/src/gui/qgsdbqueryhistoryprovider.cpp +++ b/src/gui/qgsdbqueryhistoryprovider.cpp @@ -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, [=] { + 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() ); } ); - menu->addAction( executeAction ); + menu->addAction( loadAction ); } QAction *copyAction = new QAction(