mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
@@ -78,11 +78,11 @@ void TrayIcon::createActions()
|
||||
connect(m_copyUrlAction, SIGNAL(triggered()), m_menuActions, SLOT(onCopyUrl()));
|
||||
|
||||
m_configAction = new QAction(tr("&Configure..."), 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);
|
||||
@@ -109,6 +109,21 @@ void TrayIcon::enablePostStartOptions()
|
||||
m_quitAction->setEnabled(true);
|
||||
}
|
||||
|
||||
// Enable the View Log option
|
||||
void TrayIcon::enableViewLogOption()
|
||||
{
|
||||
if (m_logAction != Q_NULLPTR)
|
||||
m_logAction->setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
// Disable the View Log option
|
||||
void TrayIcon::disableViewLogOption()
|
||||
{
|
||||
if (m_logAction != Q_NULLPTR)
|
||||
m_logAction->setEnabled(false);
|
||||
}
|
||||
|
||||
void TrayIcon::setMenuActions(MenuActions * menuActions)
|
||||
{
|
||||
m_menuActions = menuActions;
|
||||
|
||||
Reference in New Issue
Block a user