introduce macro ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING for enabling the version and OS query in the client (for debugging reasons)
This commit is contained in:
parent
5cfdf988d4
commit
17b5bb6dd9
7 changed files with 22 additions and 11 deletions
|
@ -199,9 +199,11 @@ QObject::connect ( &Channel, SIGNAL ( OpusSupported() ),
|
|||
SIGNAL ( CLPingWithNumClientsReceived ( CHostAddress, int, int ) ),
|
||||
this, SLOT ( OnCLPingWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
||||
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
QObject::connect ( &ConnLessProtocol,
|
||||
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),
|
||||
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
|
||||
#endif
|
||||
|
||||
// other
|
||||
QObject::connect ( &Sound, SIGNAL ( ReinitRequest ( int ) ),
|
||||
|
|
|
@ -416,9 +416,11 @@ signals:
|
|||
int iPingTime,
|
||||
int iNumClients );
|
||||
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
void CLVersionAndOSReceived ( CHostAddress InetAddr,
|
||||
COSUtil::EOpSystemType eOSType,
|
||||
QString strVersion );
|
||||
#endif
|
||||
|
||||
void Disconnected();
|
||||
|
||||
|
|
|
@ -495,9 +495,11 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
|||
SIGNAL ( CLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ),
|
||||
this, SLOT ( OnCLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ) );
|
||||
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
QObject::connect ( pClient,
|
||||
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),
|
||||
this, SLOT ( OnCLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
|
||||
#endif
|
||||
|
||||
QObject::connect ( pClient,
|
||||
SIGNAL ( UpstreamRateChanged() ),
|
||||
|
|
|
@ -129,10 +129,12 @@ public slots:
|
|||
int iPingTime,
|
||||
int iNumClients );
|
||||
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
void OnCLVersionAndOSReceived ( CHostAddress InetAddr,
|
||||
COSUtil::EOpSystemType eOSType,
|
||||
QString strVersion )
|
||||
{ ConnectDlg.SetVersionAndOSType ( InetAddr, eOSType, strVersion ); }
|
||||
#endif
|
||||
|
||||
void OnOpenConnectionSetupDialog() { ShowConnectionSetupDialog(); }
|
||||
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
|
||||
|
|
|
@ -384,18 +384,12 @@ void CConnectDlg::OnTimerPing()
|
|||
data ( 0, Qt::UserRole ).toString(),
|
||||
CurServerAddress ) )
|
||||
{
|
||||
// if address is valid, send ping
|
||||
|
||||
// TEST send request for version and OS instead of ping message
|
||||
const bool bEnableVerOSDebugging = false; // if this is set the "false", we have to regular version
|
||||
if ( bEnableVerOSDebugging )
|
||||
{
|
||||
// if address is valid, send ping or the version and OS request
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
emit CreateCLServerListReqVerAndOSMes ( CurServerAddress );
|
||||
}
|
||||
else
|
||||
{
|
||||
#else
|
||||
emit CreateCLServerListPingMes ( CurServerAddress );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -479,6 +473,7 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress&
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
void CConnectDlg::SetVersionAndOSType ( CHostAddress InetAddr,
|
||||
COSUtil::EOpSystemType eOSType,
|
||||
QString strVersion )
|
||||
|
@ -508,3 +503,4 @@ if ( lvwServers->topLevelItem ( iIdx )->isHidden() )
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -62,9 +62,11 @@ public:
|
|||
const CMultiColorLED::ELightColor ePingTimeLEDColor,
|
||||
const int iNumClients );
|
||||
|
||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
void SetVersionAndOSType ( CHostAddress InetAddr,
|
||||
COSUtil::EOpSystemType eOSType,
|
||||
QString strVersion );
|
||||
#endif
|
||||
|
||||
bool GetServerListItemWasChosen() const { return bServerListItemWasChosen; }
|
||||
QString GetSelectedAddress() const { return strSelectedAddress; }
|
||||
|
|
|
@ -69,6 +69,11 @@ LED bar: lbr
|
|||
//#define _DEBUG_
|
||||
#undef _DEBUG_
|
||||
|
||||
// define this macro if the version and operating system debugging shall
|
||||
// be enabled in the client (the ping time column in the connect dialog then
|
||||
// shows the requested information instead of the ping time)
|
||||
#undef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||
|
||||
// version and application name (use version from qt prject file)
|
||||
#undef VERSION
|
||||
#define VERSION APP_VERSION
|
||||
|
|
Loading…
Reference in a new issue