From 6f17cb9a31bb81d00073f3af50fd1fa85619c80b Mon Sep 17 00:00:00 2001 From: Jamie Newbon Date: Tue, 30 Apr 2019 11:42:34 +0100 Subject: [PATCH] #6471 Added Pending retry state --- src/gui/src/MainWindow.cpp | 3 ++- src/gui/src/MainWindow.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 7e9e8744..dc367b95 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -914,6 +914,7 @@ void MainWindow::synergyFinished(int exitCode, QProcess::ExitStatus) if (m_ExpectedRunningState == kStarted) { QTimer::singleShot(1000, this, SLOT(startSynergy())); appendLogInfo(QString("detected process not running, auto restarting")); + setSynergyState(synergyPendingRetry); } else { setSynergyState(synergyDisconnected); @@ -932,7 +933,7 @@ void MainWindow::setSynergyState(qSynergyState state) if (synergyState() == state) return; - if ((state == synergyConnected) || (state == synergyListening)) + if ((state == synergyConnected) || (state == synergyConnecting) || (state == synergyListening) || (state == synergyPendingRetry)) { disconnect (m_pButtonToggleStart, SIGNAL(clicked()), m_pActionStartSynergy, SLOT(trigger())); connect (m_pButtonToggleStart, SIGNAL(clicked()), m_pActionStopSynergy, SLOT(trigger())); diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index e267ccf2..035252b9 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -73,7 +73,8 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase synergyDisconnected, synergyConnecting, synergyConnected, - synergyListening + synergyListening, + synergyPendingRetry }; enum qSynergyType