1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 13:01:53 +02:00

Move m_name into ConnectionPrivate

This commit is contained in:
Uwe L. Korn 2013-06-15 20:36:13 +02:00
parent 88742ba1d5
commit c7dfe80c82
3 changed files with 10 additions and 5 deletions

View File

@ -206,13 +206,17 @@ Connection::markAsFailed()
void
Connection::setName( const QString& n )
{
m_name = n;
Q_D( Connection );
d->name = n;
}
QString
Connection::name() const
{
return m_name;
Q_D( const Connection );
return d->name;
}
void
@ -273,15 +277,16 @@ Connection::peerIpAddress() const
void
Connection::start( QTcpSocket* sock )
{
Q_D( Connection );
Q_ASSERT( m_sock.isNull() );
Q_ASSERT( sock );
Q_ASSERT( sock->isValid() );
m_sock = sock;
if ( m_name.isEmpty() )
if ( d->name.isEmpty() )
{
m_name = QString( "peer[%1]" ).arg( m_sock->peerAddress().toString() );
d->name = QString( "peer[%1]" ).arg( m_sock->peerAddress().toString() );
}
QTimer::singleShot( 0, this, SLOT( checkACL() ) );

View File

@ -127,7 +127,6 @@ protected:
Servent* m_servent;
bool m_outbound, m_ready, m_onceonly;
msg_ptr m_firstmsg;
QString m_name;
private:
Q_DECLARE_PRIVATE( Connection )

View File

@ -59,6 +59,7 @@ private:
qint64 tx_bytes_requested;
qint64 rx_bytes;
QString id;
QString name;
QString nodeid;
QTimer* statstimer;