From 7977413bb6aa8bc129ca0f8ab094f5ea9024c9fc Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Mon, 25 May 2020 18:47:14 +0100 Subject: [PATCH] Review comment changes --- src/server.cpp | 2 +- src/server.h | 5 ----- src/serverdlg.cpp | 20 ++------------------ src/serverdlg.h | 16 +++++++++++++--- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index f9849530..3901fbb4 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -470,7 +470,7 @@ CServer::CServer ( const int iNewMaxNumChan, QObject::connect( &JamRecorder, SIGNAL ( RecordingSessionStarted ( QString ) ), - this, SLOT ( OnRecordingSessionStarted ( QString ) ) ); + SIGNAL ( RecordingSessionStarted ( QString ) ) ); QObject::connect ( QCoreApplication::instance(), SIGNAL ( aboutToQuit() ), diff --git a/src/server.h b/src/server.h index 49a45a25..241fe119 100755 --- a/src/server.h +++ b/src/server.h @@ -459,11 +459,6 @@ public slots: void OnCLDisconnection ( CHostAddress InetAddr ); - void OnRecordingSessionStarted ( QString sessionDir ) - { - emit RecordingSessionStarted ( sessionDir ); - } - void OnAboutToQuit(); void OnHandledSignal ( int sigNum ); diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 7dcd9d02..48895317 100755 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -336,8 +336,8 @@ lvwClients->setMinimumHeight ( 140 ); this, SLOT ( OnCentServAddrTypeActivated ( int ) ) ); // push buttons - QObject::connect( pbtNewRecording, SIGNAL ( released() ), - this, SLOT ( OnNewRecordingClicked() ) ); + QObject::connect ( pbtNewRecording, SIGNAL ( released() ), + this, SLOT ( OnNewRecordingClicked() ) ); // timers QObject::connect ( &Timer, SIGNAL ( timeout() ), this, SLOT ( OnTimer() ) ); @@ -474,11 +474,6 @@ void CServerDlg::OnCentServAddrTypeActivated ( int iTypeIdx ) UpdateGUIDependencies(); } -void CServerDlg::OnNewRecordingClicked() -{ - pServer->RestartRecorder(); -} - void CServerDlg::OnSysTrayActivated ( QSystemTrayIcon::ActivationReason ActReason ) { // on double click on the icon, show window in fore ground @@ -532,17 +527,6 @@ void CServerDlg::OnTimer() ListViewMutex.unlock(); } -void CServerDlg::OnServerStarted() -{ - UpdateSystemTrayIcon ( true ); -} - -void CServerDlg::OnServerStopped() -{ - UpdateSystemTrayIcon ( false ); - - UpdateRecorderStatus ( QString::null ); -} void CServerDlg::UpdateGUIDependencies() { diff --git a/src/serverdlg.h b/src/serverdlg.h index dbfc9f3d..55600744 100755 --- a/src/serverdlg.h +++ b/src/serverdlg.h @@ -91,10 +91,15 @@ public slots: void OnLocationCityTextChanged ( const QString& strNewCity ); void OnLocationCountryActivated ( int iCntryListItem ); void OnCentServAddrTypeActivated ( int iTypeIdx ); - void OnNewRecordingClicked(); void OnTimer(); - void OnServerStarted(); - void OnServerStopped(); + + void OnServerStarted() { UpdateSystemTrayIcon ( true ); } + void OnServerStopped() + { + UpdateSystemTrayIcon ( false ); + UpdateRecorderStatus ( QString::null ); + } + void OnSvrRegStatusChanged() { UpdateGUIDependencies(); } void OnSysTrayMenuOpen() { ShowWindowInForeground(); } void OnSysTrayMenuHide() { hide(); } @@ -104,6 +109,11 @@ public slots: void keyPressEvent ( QKeyEvent *e ) // block escape key { if ( e->key() != Qt::Key_Escape ) QDialog::keyPressEvent ( e ); } + void OnNewRecordingClicked(); + { + pServer->RestartRecorder(); + } + void OnRecordingSessionStarted ( QString sessionDir ) { UpdateRecorderStatus ( sessionDir );