1) Fixed pgAdmin hang issue when the user clicks on 'View Log' menu option.

2) Fixed some code smell in runtime code.
This commit is contained in:
Akshay Joshi
2020-07-29 15:31:38 +05:30
parent f715373218
commit 510dd5c047
15 changed files with 92 additions and 85 deletions

View File

@@ -74,11 +74,11 @@ void FloatingWindow::createActions()
connect(m_copyUrlAction, SIGNAL(triggered()), m_menuActions, SLOT(onCopyUrl()));
m_configAction = new QAction(tr("C&onfigure..."), this);
m_configAction->setEnabled(true);
m_configAction->setEnabled(false);
connect(m_configAction, SIGNAL(triggered()), m_menuActions, SLOT(onConfig()));
m_logAction = new QAction(tr("&View log..."), this);
m_logAction->setEnabled(true);
m_logAction->setEnabled(false);
connect(m_logAction, SIGNAL(triggered()), m_menuActions, SLOT(onLog()));
m_quitAction = new QAction(tr("&Shut down server"), this);
@@ -110,6 +110,20 @@ void FloatingWindow::setMenuActions(MenuActions * menuActions)
m_menuActions = menuActions;
}
// Enable the View Log option
void FloatingWindow::enableViewLogOption()
{
if (m_logAction != Q_NULLPTR)
m_logAction->setEnabled(true);
}
// Disable the View Log option
void FloatingWindow::disableViewLogOption()
{
if (m_logAction != Q_NULLPTR)
m_logAction->setEnabled(false);
}
void FloatingWindow::closeEvent(QCloseEvent * event)
{