Add Cancel back to query menu
This commit is contained in:
parent
460d6f5809
commit
6d4df99100
2 changed files with 18 additions and 1 deletions
|
|
@ -109,6 +109,12 @@ void DatabaseWindow::createActions()
|
|||
auto action = actionAbout = new QAction(icon, tr("About"), this);
|
||||
action->setObjectName("actionAbout");
|
||||
}
|
||||
{
|
||||
QIcon icon;
|
||||
icon.addFile(QString::fromUtf8(":/icons/script_delete.png"), QSize(), QIcon::Normal, QIcon::On);
|
||||
auto action = actionCancelQuery = new QAction(icon, tr("Cancel query"), this);
|
||||
action->setObjectName("actionCancelQuery");
|
||||
}
|
||||
{
|
||||
QIcon icon;
|
||||
icon.addFile(QString::fromUtf8(":/icons/page_white_delete.png"), QSize(), QIcon::Normal, QIcon::On);
|
||||
|
|
@ -251,7 +257,8 @@ void DatabaseWindow::initMenus()
|
|||
menuQuery->addActions({
|
||||
actionExecuteQuery,
|
||||
actionExplain,
|
||||
actionExplainAnalyze
|
||||
actionExplainAnalyze,
|
||||
actionCancelQuery
|
||||
});
|
||||
|
||||
menuWindow = mb->addMenu(tr("Window"));
|
||||
|
|
@ -318,6 +325,14 @@ void DatabaseWindow::on_actionAbout_triggered()
|
|||
|
||||
}
|
||||
|
||||
void DatabaseWindow::on_actionCancelQuery_triggered()
|
||||
{
|
||||
auto query_tool = GetActiveQueryTool();
|
||||
if (query_tool) {
|
||||
query_tool->cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWindow::on_actionCopy_triggered()
|
||||
{
|
||||
QWidget *w = QApplication::focusWidget();
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ private:
|
|||
|
||||
// Standard actions
|
||||
QAction *actionAbout = nullptr;
|
||||
QAction *actionCancelQuery = nullptr;
|
||||
QAction *actionClose = nullptr;
|
||||
QAction *actionCopy = nullptr;
|
||||
QAction *actionCopyAsCString = nullptr;
|
||||
|
|
@ -116,6 +117,7 @@ private slots:
|
|||
// void tabWidget_currentChanged(int index);
|
||||
|
||||
void on_actionAbout_triggered();
|
||||
void on_actionCancelQuery_triggered();
|
||||
void on_actionClose_triggered();
|
||||
void on_actionCopy_triggered();
|
||||
void on_actionCopyAsCString_triggered();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue