using Qt5 connections instead of the old Qt4 ones (just a subset converted right now, more TODO)
This commit is contained in:
parent
bb0c3a03c5
commit
8edb3185b0
11 changed files with 156 additions and 180 deletions
|
@ -369,35 +369,35 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
// timers
|
// timers
|
||||||
QObject::connect ( &TimerStatus, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerStatus, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerStatus() ) );
|
this, &CClientSettingsDlg::OnTimerStatus );
|
||||||
|
|
||||||
// slider controls
|
// slider controls
|
||||||
QObject::connect ( sldNetBuf, SIGNAL ( valueChanged ( int ) ),
|
QObject::connect ( sldNetBuf, &QSlider::valueChanged,
|
||||||
this, SLOT ( OnNetBufValueChanged ( int ) ) );
|
this, &CClientSettingsDlg::OnNetBufValueChanged );
|
||||||
|
|
||||||
QObject::connect ( sldNetBufServer, SIGNAL ( valueChanged ( int ) ),
|
QObject::connect ( sldNetBufServer, &QSlider::valueChanged,
|
||||||
this, SLOT ( OnNetBufServerValueChanged ( int ) ) );
|
this, &CClientSettingsDlg::OnNetBufServerValueChanged );
|
||||||
|
|
||||||
// check boxes
|
// check boxes
|
||||||
QObject::connect ( chbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbGUIDesignFancy, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) );
|
this, &CClientSettingsDlg::OnGUIDesignFancyStateChanged );
|
||||||
|
|
||||||
QObject::connect ( chbDisplayChannelLevels, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbDisplayChannelLevels, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnDisplayChannelLevelsStateChanged ( int ) ) );
|
this, &CClientSettingsDlg::OnDisplayChannelLevelsStateChanged );
|
||||||
|
|
||||||
QObject::connect ( chbAutoJitBuf, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbAutoJitBuf, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnAutoJitBufStateChanged ( int ) ) );
|
this, &CClientSettingsDlg::OnAutoJitBufStateChanged );
|
||||||
|
|
||||||
QObject::connect ( chbEnableOPUS64, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbEnableOPUS64, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnEnableOPUS64StateChanged ( int ) ) );
|
this, &CClientSettingsDlg::OnEnableOPUS64StateChanged );
|
||||||
|
|
||||||
// line edits
|
// line edits
|
||||||
QObject::connect ( edtCentralServerAddress, SIGNAL ( editingFinished() ),
|
QObject::connect ( edtCentralServerAddress, &QLineEdit::editingFinished,
|
||||||
this, SLOT ( OnCentralServerAddressEditingFinished() ) );
|
this, &CClientSettingsDlg::OnCentralServerAddressEditingFinished );
|
||||||
|
|
||||||
QObject::connect ( edtNewClientLevel, SIGNAL ( editingFinished() ),
|
QObject::connect ( edtNewClientLevel, &QLineEdit::editingFinished,
|
||||||
this, SLOT ( OnNewClientLevelEditingFinished() ) );
|
this, &CClientSettingsDlg::OnNewClientLevelEditingFinished );
|
||||||
|
|
||||||
// combo boxes
|
// combo boxes
|
||||||
QObject::connect ( cbxSoundcard, SIGNAL ( activated ( int ) ),
|
QObject::connect ( cbxSoundcard, SIGNAL ( activated ( int ) ),
|
||||||
|
@ -422,8 +422,8 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
this, SLOT ( OnAudioQualityActivated ( int ) ) );
|
this, SLOT ( OnAudioQualityActivated ( int ) ) );
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
QObject::connect ( butDriverSetup, SIGNAL ( clicked() ),
|
QObject::connect ( butDriverSetup, &QPushButton::clicked,
|
||||||
this, SLOT ( OnDriverSetupClicked() ) );
|
this, &CClientSettingsDlg::OnDriverSetupClicked );
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
QObject::connect ( &SndCrdBufferDelayButtonGroup,
|
QObject::connect ( &SndCrdBufferDelayButtonGroup,
|
||||||
|
|
|
@ -151,46 +151,44 @@ CConnectDlg::CConnectDlg ( CClient* pNCliP,
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
// list view
|
// list view
|
||||||
QObject::connect ( lvwServers,
|
QObject::connect ( lvwServers, &QTreeWidget::itemSelectionChanged,
|
||||||
SIGNAL ( itemSelectionChanged() ),
|
this, &CConnectDlg::OnServerListItemSelectionChanged );
|
||||||
this, SLOT ( OnServerListItemSelectionChanged() ) );
|
|
||||||
|
|
||||||
QObject::connect ( lvwServers,
|
QObject::connect ( lvwServers, &QTreeWidget::itemDoubleClicked,
|
||||||
SIGNAL ( itemDoubleClicked ( QTreeWidgetItem*, int ) ),
|
this, &CConnectDlg::OnServerListItemDoubleClicked );
|
||||||
this, SLOT ( OnServerListItemDoubleClicked ( QTreeWidgetItem*, int ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( lvwServers, // to get default return key behaviour working
|
// to get default return key behaviour working
|
||||||
SIGNAL ( activated ( QModelIndex ) ),
|
QObject::connect ( lvwServers, &QTreeWidget::activated,
|
||||||
this, SLOT ( OnConnectClicked() ) );
|
this, &CConnectDlg::OnConnectClicked );
|
||||||
|
|
||||||
// line edit
|
// line edit
|
||||||
QObject::connect ( edtFilter, SIGNAL ( textEdited ( const QString& ) ),
|
QObject::connect ( edtFilter, &QLineEdit::textEdited,
|
||||||
this, SLOT ( OnFilterTextEdited ( const QString& ) ) );
|
this, &CConnectDlg::OnFilterTextEdited );
|
||||||
|
|
||||||
// combo boxes
|
// combo boxes
|
||||||
QObject::connect ( cbxServerAddr, SIGNAL ( editTextChanged ( const QString& ) ),
|
QObject::connect ( cbxServerAddr, &QComboBox::editTextChanged,
|
||||||
this, SLOT ( OnServerAddrEditTextChanged ( const QString& ) ) );
|
this, &CConnectDlg::OnServerAddrEditTextChanged );
|
||||||
|
|
||||||
QObject::connect ( cbxCentServAddrType, SIGNAL ( activated ( int ) ),
|
QObject::connect ( cbxCentServAddrType, SIGNAL ( activated ( int ) ),
|
||||||
this, SLOT ( OnCentServAddrTypeChanged ( int ) ) );
|
this, SLOT ( OnCentServAddrTypeChanged ( int ) ) );
|
||||||
|
|
||||||
// check boxes
|
// check boxes
|
||||||
QObject::connect ( chbExpandAll, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbExpandAll, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnExpandAllStateChanged ( int ) ) );
|
this, &CConnectDlg::OnExpandAllStateChanged );
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
QObject::connect ( butCancel, SIGNAL ( clicked() ),
|
QObject::connect ( butCancel, &QPushButton::clicked,
|
||||||
this, SLOT ( close() ) );
|
this, &CConnectDlg::close );
|
||||||
|
|
||||||
QObject::connect ( butConnect, SIGNAL ( clicked() ),
|
QObject::connect ( butConnect, &QPushButton::clicked,
|
||||||
this, SLOT ( OnConnectClicked() ) );
|
this, &CConnectDlg::OnConnectClicked );
|
||||||
|
|
||||||
// timers
|
// timers
|
||||||
QObject::connect ( &TimerPing, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerPing, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerPing() ) );
|
this, &CConnectDlg::OnTimerPing );
|
||||||
|
|
||||||
QObject::connect ( &TimerReRequestServList, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerReRequestServList, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerReRequestServList() ) );
|
this, &CConnectDlg::OnTimerReRequestServList );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConnectDlg::Init ( const CVector<QString>& vstrIPAddresses )
|
void CConnectDlg::Init ( const CVector<QString>& vstrIPAddresses )
|
||||||
|
|
|
@ -350,8 +350,8 @@ CJpegHistoryGraph::CJpegHistoryGraph ( const int iMaxDaysHistory ) :
|
||||||
|
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
QObject::connect ( &TimerDailyUpdate, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerDailyUpdate, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerDailyUpdate() ) );
|
this, &CJpegHistoryGraph::OnTimerDailyUpdate );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override Update to blank out the plot area each time
|
// Override Update to blank out the plot area each time
|
||||||
|
@ -426,8 +426,8 @@ CSvgHistoryGraph::CSvgHistoryGraph ( const int iMaxDaysHistory ) :
|
||||||
|
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
QObject::connect ( &TimerDailyUpdate, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerDailyUpdate, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerDailyUpdate() ) );
|
this, &CSvgHistoryGraph::OnTimerDailyUpdate );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override Update to create the fresh SVG stream each time
|
// Override Update to create the fresh SVG stream each time
|
||||||
|
|
|
@ -389,8 +389,8 @@ CProtocol::CProtocol()
|
||||||
|
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
QObject::connect ( &TimerSendMess, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerSendMess, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerSendMess() ) );
|
this, &CProtocol::OnTimerSendMess );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProtocol::Reset()
|
void CProtocol::Reset()
|
||||||
|
|
|
@ -417,68 +417,53 @@ CServer::CServer ( const int iNewMaxNumChan,
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
// connect timer timeout signal
|
// connect timer timeout signal
|
||||||
QObject::connect ( &HighPrecisionTimer, SIGNAL ( timeout() ),
|
QObject::connect ( &HighPrecisionTimer, &CHighPrecisionTimer::timeout,
|
||||||
this, SLOT ( OnTimer() ) );
|
this, &CServer::OnTimer );
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLMessReadyForSending,
|
||||||
SIGNAL ( CLMessReadyForSending ( CHostAddress, CVector<uint8_t> ) ),
|
this, &CServer::OnSendCLProtMessage );
|
||||||
this, SLOT ( OnSendCLProtMessage ( CHostAddress, CVector<uint8_t> ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLPingReceived,
|
||||||
SIGNAL ( CLPingReceived ( CHostAddress, int ) ),
|
this, &CServer::OnCLPingReceived );
|
||||||
this, SLOT ( OnCLPingReceived ( CHostAddress, int ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLPingWithNumClientsReceived,
|
||||||
SIGNAL ( CLPingWithNumClientsReceived ( CHostAddress, int, int ) ),
|
this, &CServer::OnCLPingWithNumClientsReceived );
|
||||||
this, SLOT ( OnCLPingWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLRegisterServerReceived,
|
||||||
SIGNAL ( CLRegisterServerReceived ( CHostAddress, CHostAddress, CServerCoreInfo ) ),
|
this, &CServer::OnCLRegisterServerReceived );
|
||||||
this, SLOT ( OnCLRegisterServerReceived ( CHostAddress, CHostAddress, CServerCoreInfo ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLUnregisterServerReceived,
|
||||||
SIGNAL ( CLUnregisterServerReceived ( CHostAddress ) ),
|
this, &CServer::OnCLUnregisterServerReceived );
|
||||||
this, SLOT ( OnCLUnregisterServerReceived ( CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqServerList,
|
||||||
SIGNAL ( CLReqServerList ( CHostAddress ) ),
|
this, &CServer::OnCLReqServerList );
|
||||||
this, SLOT ( OnCLReqServerList ( CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLRegisterServerResp,
|
||||||
SIGNAL ( CLRegisterServerResp ( CHostAddress, ESvrRegResult ) ),
|
this, &CServer::OnCLRegisterServerResp );
|
||||||
this, SLOT ( OnCLRegisterServerResp ( CHostAddress, ESvrRegResult ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLSendEmptyMes,
|
||||||
SIGNAL ( CLSendEmptyMes ( CHostAddress ) ),
|
this, &CServer::OnCLSendEmptyMes );
|
||||||
this, SLOT ( OnCLSendEmptyMes ( CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLDisconnection,
|
||||||
SIGNAL ( CLDisconnection ( CHostAddress ) ),
|
this, &CServer::OnCLDisconnection );
|
||||||
this, SLOT ( OnCLDisconnection ( CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqVersionAndOS,
|
||||||
SIGNAL ( CLReqVersionAndOS ( CHostAddress ) ),
|
this, &CServer::OnCLReqVersionAndOS );
|
||||||
this, SLOT ( OnCLReqVersionAndOS ( CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLReqConnClientsList,
|
||||||
SIGNAL ( CLReqConnClientsList ( CHostAddress ) ),
|
this, &CServer::OnCLReqConnClientsList );
|
||||||
this, SLOT ( OnCLReqConnClientsList ( CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( &ServerListManager,
|
QObject::connect ( &ServerListManager, &CServerListManager::SvrRegStatusChanged,
|
||||||
SIGNAL ( SvrRegStatusChanged() ),
|
this, &CServer::SvrRegStatusChanged );
|
||||||
SIGNAL ( SvrRegStatusChanged() ) );
|
|
||||||
|
|
||||||
QObject::connect( &JamRecorder,
|
QObject::connect( &JamRecorder, &recorder::CJamRecorder::RecordingSessionStarted,
|
||||||
SIGNAL ( RecordingSessionStarted ( QString ) ),
|
this, &CServer::RecordingSessionStarted );
|
||||||
SIGNAL ( RecordingSessionStarted ( QString ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( QCoreApplication::instance(),
|
QObject::connect ( QCoreApplication::instance(), &QCoreApplication::aboutToQuit,
|
||||||
SIGNAL ( aboutToQuit() ),
|
this, &CServer::OnAboutToQuit );
|
||||||
this, SLOT ( OnAboutToQuit() ) );
|
|
||||||
|
|
||||||
QObject::connect ( pSignalHandler,
|
QObject::connect ( pSignalHandler, &CSignalHandler::HandledSignal,
|
||||||
SIGNAL ( HandledSignal ( int ) ),
|
this, &CServer::OnHandledSignal );
|
||||||
this, SLOT ( OnHandledSignal ( int ) ) );
|
|
||||||
|
|
||||||
connectChannelSignalsToServerSlots<MAX_NUM_CHANNELS>();
|
connectChannelSignalsToServerSlots<MAX_NUM_CHANNELS>();
|
||||||
|
|
||||||
|
@ -532,10 +517,10 @@ inline void CServer::connectChannelSignalsToServerSlots()
|
||||||
this, pOnServerAutoSockBufSizeChangeCh );
|
this, pOnServerAutoSockBufSizeChangeCh );
|
||||||
|
|
||||||
connectChannelSignalsToServerSlots<slotId - 1>();
|
connectChannelSignalsToServerSlots<slotId - 1>();
|
||||||
};
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline void CServer::connectChannelSignalsToServerSlots<0>() {};
|
inline void CServer::connectChannelSignalsToServerSlots<0>() {}
|
||||||
|
|
||||||
void CServer::CreateAndSendJitBufMessage ( const int iCurChanID,
|
void CServer::CreateAndSendJitBufMessage ( const int iCurChanID,
|
||||||
const int iNNumFra )
|
const int iNNumFra )
|
||||||
|
|
|
@ -334,27 +334,27 @@ lvwClients->setMinimumHeight ( 140 );
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
// check boxes
|
// check boxes
|
||||||
QObject::connect ( chbRegisterServer, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbRegisterServer, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnRegisterServerStateChanged ( int ) ) );
|
this, &CServerDlg::OnRegisterServerStateChanged );
|
||||||
|
|
||||||
QObject::connect ( chbStartOnOSStart, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbStartOnOSStart, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnStartOnOSStartStateChanged ( int ) ) );
|
this, &CServerDlg::OnStartOnOSStartStateChanged );
|
||||||
|
|
||||||
QObject::connect ( chbUseCCLicence, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbUseCCLicence, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnUseCCLicenceStateChanged ( int ) ) );
|
this, &CServerDlg::OnUseCCLicenceStateChanged );
|
||||||
|
|
||||||
QObject::connect ( chbEnableRecorder, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbEnableRecorder, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnEnableRecorderStateChanged ( int ) ) );
|
this, &CServerDlg::OnEnableRecorderStateChanged );
|
||||||
|
|
||||||
// line edits
|
// line edits
|
||||||
QObject::connect ( edtCentralServerAddress, SIGNAL ( editingFinished() ),
|
QObject::connect ( edtCentralServerAddress, &QLineEdit::editingFinished,
|
||||||
this, SLOT ( OnCentralServerAddressEditingFinished() ) );
|
this, &CServerDlg::OnCentralServerAddressEditingFinished );
|
||||||
|
|
||||||
QObject::connect ( edtServerName, SIGNAL ( textChanged ( const QString& ) ),
|
QObject::connect ( edtServerName, &QLineEdit::textChanged,
|
||||||
this, SLOT ( OnServerNameTextChanged ( const QString& ) ) );
|
this, &CServerDlg::OnServerNameTextChanged );
|
||||||
|
|
||||||
QObject::connect ( edtLocationCity, SIGNAL ( textChanged ( const QString& ) ),
|
QObject::connect ( edtLocationCity, &QLineEdit::textChanged,
|
||||||
this, SLOT ( OnLocationCityTextChanged ( const QString& ) ) );
|
this, &CServerDlg::OnLocationCityTextChanged );
|
||||||
|
|
||||||
// combo boxes
|
// combo boxes
|
||||||
QObject::connect ( cbxLocationCountry, SIGNAL ( activated ( int ) ),
|
QObject::connect ( cbxLocationCountry, SIGNAL ( activated ( int ) ),
|
||||||
|
@ -364,34 +364,34 @@ lvwClients->setMinimumHeight ( 140 );
|
||||||
this, SLOT ( OnCentServAddrTypeActivated ( int ) ) );
|
this, SLOT ( OnCentServAddrTypeActivated ( int ) ) );
|
||||||
|
|
||||||
// push buttons
|
// push buttons
|
||||||
QObject::connect ( pbtNewRecording, SIGNAL ( released() ),
|
QObject::connect ( pbtNewRecording, &QPushButton::released,
|
||||||
this, SLOT ( OnNewRecordingClicked() ) );
|
this, &CServerDlg::OnNewRecordingClicked );
|
||||||
|
|
||||||
// timers
|
// timers
|
||||||
QObject::connect ( &Timer, SIGNAL ( timeout() ), this, SLOT ( OnTimer() ) );
|
QObject::connect ( &Timer, &QTimer::timeout,
|
||||||
|
this, &CServerDlg::OnTimer );
|
||||||
|
|
||||||
// other
|
// other
|
||||||
QObject::connect ( pServer, SIGNAL ( Started() ),
|
QObject::connect ( pServer, &CServer::Started,
|
||||||
this, SLOT ( OnServerStarted() ) );
|
this, &CServerDlg::OnServerStarted );
|
||||||
|
|
||||||
QObject::connect ( pServer, SIGNAL ( Stopped() ),
|
QObject::connect ( pServer, &CServer::Stopped,
|
||||||
this, SLOT ( OnServerStopped() ) );
|
this, &CServerDlg::OnServerStopped );
|
||||||
|
|
||||||
QObject::connect ( pServer, SIGNAL ( SvrRegStatusChanged() ),
|
QObject::connect ( pServer, &CServer::SvrRegStatusChanged,
|
||||||
this, SLOT ( OnSvrRegStatusChanged() ) );
|
this, &CServerDlg::OnSvrRegStatusChanged );
|
||||||
|
|
||||||
QObject::connect ( pServer, SIGNAL ( RecordingSessionStarted ( QString ) ),
|
QObject::connect ( pServer, &CServer::RecordingSessionStarted,
|
||||||
this, SLOT ( OnRecordingSessionStarted ( QString ) ) );
|
this, &CServerDlg::OnRecordingSessionStarted );
|
||||||
|
|
||||||
QObject::connect ( pServer, SIGNAL ( StopRecorder() ),
|
QObject::connect ( pServer, &CServer::StopRecorder,
|
||||||
this, SLOT ( OnStopRecorder() ) );
|
this, &CServerDlg::OnStopRecorder );
|
||||||
|
|
||||||
QObject::connect ( QCoreApplication::instance(), SIGNAL ( aboutToQuit() ),
|
QObject::connect ( QCoreApplication::instance(), &QCoreApplication::aboutToQuit,
|
||||||
this, SLOT ( OnAboutToQuit() ) );
|
this, &CServerDlg::OnAboutToQuit );
|
||||||
|
|
||||||
QObject::connect ( &SystemTrayIcon,
|
QObject::connect ( &SystemTrayIcon, &QSystemTrayIcon::activated,
|
||||||
SIGNAL ( activated ( QSystemTrayIcon::ActivationReason ) ),
|
this, &CServerDlg::OnSysTrayActivated );
|
||||||
this, SLOT ( OnSysTrayActivated ( QSystemTrayIcon::ActivationReason ) ) );
|
|
||||||
|
|
||||||
|
|
||||||
// Timers ------------------------------------------------------------------
|
// Timers ------------------------------------------------------------------
|
||||||
|
|
|
@ -173,20 +173,20 @@ CServerListManager::CServerListManager ( const quint16 iNPortNum,
|
||||||
|
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
QObject::connect ( &TimerPollList, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerPollList, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerPollList() ) );
|
this, &CServerListManager::OnTimerPollList );
|
||||||
|
|
||||||
QObject::connect ( &TimerPingServerInList, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerPingServerInList, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerPingServerInList() ) );
|
this, &CServerListManager::OnTimerPingServerInList );
|
||||||
|
|
||||||
QObject::connect ( &TimerPingCentralServer, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerPingCentralServer, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerPingCentralServer() ) );
|
this, &CServerListManager::OnTimerPingCentralServer );
|
||||||
|
|
||||||
QObject::connect ( &TimerRegistering, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerRegistering, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerRegistering() ) );
|
this, &CServerListManager::OnTimerRegistering );
|
||||||
|
|
||||||
QObject::connect ( &TimerCLRegisterServerResp, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerCLRegisterServerResp, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimerCLRegisterServerResp() ) );
|
this, &CServerListManager::OnTimerCLRegisterServerResp );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CServerListManager::SetCentralServerAddress ( const QString sNCentServAddr )
|
void CServerListManager::SetCentralServerAddress ( const QString sNCentServAddr )
|
||||||
|
|
|
@ -111,37 +111,30 @@ void CSocket::Init ( const quint16 iPortNumber )
|
||||||
{
|
{
|
||||||
// client connections:
|
// client connections:
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, &CSocket::ProtcolMessageReceived,
|
||||||
SIGNAL ( ProtcolMessageReceived ( int, int, CVector<uint8_t>, CHostAddress ) ),
|
pChannel, &CChannel::OnProtcolMessageReceived );
|
||||||
pChannel, SLOT ( OnProtcolMessageReceived ( int, int, CVector<uint8_t>, CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, &CSocket::ProtcolCLMessageReceived,
|
||||||
SIGNAL ( ProtcolCLMessageReceived ( int, CVector<uint8_t>, CHostAddress ) ),
|
pChannel, &CChannel::OnProtcolCLMessageReceived );
|
||||||
pChannel, SLOT ( OnProtcolCLMessageReceived ( int, CVector<uint8_t>, CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, SIGNAL ( NewConnection() ),
|
||||||
SIGNAL ( NewConnection() ),
|
|
||||||
pChannel, SLOT ( OnNewConnection() ) );
|
pChannel, SLOT ( OnNewConnection() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// server connections:
|
// server connections:
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, &CSocket::ProtcolMessageReceived,
|
||||||
SIGNAL ( ProtcolMessageReceived ( int, int, CVector<uint8_t>, CHostAddress ) ),
|
pServer, &CServer::OnProtcolMessageReceived );
|
||||||
pServer, SLOT ( OnProtcolMessageReceived ( int, int, CVector<uint8_t>, CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, &CSocket::ProtcolCLMessageReceived,
|
||||||
SIGNAL ( ProtcolCLMessageReceived ( int, CVector<uint8_t>, CHostAddress ) ),
|
pServer, &CServer::OnProtcolCLMessageReceived );
|
||||||
pServer, SLOT ( OnProtcolCLMessageReceived ( int, CVector<uint8_t>, CHostAddress ) ) );
|
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, SIGNAL ( NewConnection ( int, CHostAddress ) ),
|
||||||
SIGNAL ( NewConnection ( int, CHostAddress ) ),
|
|
||||||
pServer, SLOT ( OnNewConnection ( int, CHostAddress ) ) );
|
pServer, SLOT ( OnNewConnection ( int, CHostAddress ) ) );
|
||||||
|
|
||||||
QObject::connect ( this,
|
QObject::connect ( this, &CSocket::ServerFull,
|
||||||
SIGNAL ( ServerFull ( CHostAddress ) ),
|
pServer, &CServer::OnServerFull );
|
||||||
pServer, SLOT ( OnServerFull ( CHostAddress ) ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,9 +217,8 @@ protected:
|
||||||
NetworkWorkerThread.SetSocket ( &Socket );
|
NetworkWorkerThread.SetSocket ( &Socket );
|
||||||
|
|
||||||
// connect the "InvalidPacketReceived" signal
|
// connect the "InvalidPacketReceived" signal
|
||||||
QObject::connect ( &Socket,
|
QObject::connect ( &Socket, &CSocket::InvalidPacketReceived,
|
||||||
SIGNAL ( InvalidPacketReceived ( CHostAddress ) ),
|
this, &CHighPrioSocket::InvalidPacketReceived );
|
||||||
SIGNAL ( InvalidPacketReceived ( CHostAddress ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CSocketThread NetworkWorkerThread;
|
CSocketThread NetworkWorkerThread;
|
||||||
|
|
|
@ -61,14 +61,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect protocol signals
|
// connect protocol signals
|
||||||
QObject::connect ( &Protocol, SIGNAL ( MessReadyForSending ( CVector<uint8_t> ) ),
|
QObject::connect ( &Protocol, &CProtocol::MessReadyForSending,
|
||||||
this, SLOT ( OnSendProtMessage ( CVector<uint8_t> ) ) );
|
this, &CTestbench::OnSendProtMessage );
|
||||||
QObject::connect ( &Protocol, SIGNAL ( CLMessReadyForSending ( CHostAddress, CVector<uint8_t> ) ),
|
|
||||||
this, SLOT ( OnSendCLMessage ( CHostAddress, CVector<uint8_t> ) ) );
|
QObject::connect ( &Protocol, &CProtocol::CLMessReadyForSending,
|
||||||
|
this, &CTestbench::OnSendCLMessage );
|
||||||
|
|
||||||
// connect and start the timer (testbench heartbeat)
|
// connect and start the timer (testbench heartbeat)
|
||||||
QObject::connect ( &Timer, SIGNAL ( timeout() ),
|
QObject::connect ( &Timer, &QTimer::timeout,
|
||||||
this, SLOT ( OnTimer() ) );
|
this, &CTestbench::OnTimer );
|
||||||
|
|
||||||
Timer.start ( 1 ); // 1 ms
|
Timer.start ( 1 ); // 1 ms
|
||||||
}
|
}
|
||||||
|
|
24
src/util.cpp
24
src/util.cpp
|
@ -531,14 +531,14 @@ CLicenceDlg::CLicenceDlg ( QWidget* parent ) : QDialog ( parent )
|
||||||
tr ( "You may not apply legal terms or technological measures that legally restrict "
|
tr ( "You may not apply legal terms or technological measures that legally restrict "
|
||||||
"others from doing anything the license permits." ) + "</p>" );
|
"others from doing anything the license permits." ) + "</p>" );
|
||||||
|
|
||||||
QObject::connect ( chbAgree, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbAgree, &QCheckBox::stateChanged,
|
||||||
this, SLOT ( OnAgreeStateChanged ( int ) ) );
|
this, &CLicenceDlg::OnAgreeStateChanged );
|
||||||
|
|
||||||
QObject::connect ( butAccept, SIGNAL ( clicked() ),
|
QObject::connect ( butAccept, &QPushButton::clicked,
|
||||||
this, SLOT ( accept() ) );
|
this, &CLicenceDlg::accept );
|
||||||
|
|
||||||
QObject::connect ( butDecline, SIGNAL ( clicked() ),
|
QObject::connect ( butDecline, &QPushButton::clicked,
|
||||||
this, SLOT ( reject() ) );
|
this, &CLicenceDlg::reject );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -728,8 +728,8 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
|
||||||
|
|
||||||
|
|
||||||
// Connections -------------------------------------------------------------
|
// Connections -------------------------------------------------------------
|
||||||
QObject::connect ( pedtAlias, SIGNAL ( textChanged ( const QString& ) ),
|
QObject::connect ( pedtAlias, &QLineEdit::textChanged,
|
||||||
this, SLOT ( OnAliasTextChanged ( const QString& ) ) );
|
this, &CMusProfDlg::OnAliasTextChanged );
|
||||||
|
|
||||||
QObject::connect ( pcbxInstrument, SIGNAL ( activated ( int ) ),
|
QObject::connect ( pcbxInstrument, SIGNAL ( activated ( int ) ),
|
||||||
this, SLOT ( OnInstrumentActivated ( int ) ) );
|
this, SLOT ( OnInstrumentActivated ( int ) ) );
|
||||||
|
@ -737,14 +737,14 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
|
||||||
QObject::connect ( pcbxCountry, SIGNAL ( activated ( int ) ),
|
QObject::connect ( pcbxCountry, SIGNAL ( activated ( int ) ),
|
||||||
this, SLOT ( OnCountryActivated ( int ) ) );
|
this, SLOT ( OnCountryActivated ( int ) ) );
|
||||||
|
|
||||||
QObject::connect ( pedtCity, SIGNAL ( textChanged ( const QString& ) ),
|
QObject::connect ( pedtCity, &QLineEdit::textChanged,
|
||||||
this, SLOT ( OnCityTextChanged ( const QString& ) ) );
|
this, &CMusProfDlg::OnCityTextChanged );
|
||||||
|
|
||||||
QObject::connect ( pcbxSkill, SIGNAL ( activated ( int ) ),
|
QObject::connect ( pcbxSkill, SIGNAL ( activated ( int ) ),
|
||||||
this, SLOT ( OnSkillActivated ( int ) ) );
|
this, SLOT ( OnSkillActivated ( int ) ) );
|
||||||
|
|
||||||
QObject::connect ( butClose, SIGNAL ( clicked() ),
|
QObject::connect ( butClose, &QPushButton::clicked,
|
||||||
this, SLOT ( accept() ) );
|
this, &CMusProfDlg::accept );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMusProfDlg::showEvent ( QShowEvent* )
|
void CMusProfDlg::showEvent ( QShowEvent* )
|
||||||
|
|
Loading…
Reference in a new issue