1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

Set interval to timeout

This commit is contained in:
Uwe L. Korn
2013-05-23 19:43:50 +02:00
parent fab81d7958
commit f076ab9988

View File

@@ -316,6 +316,7 @@ Servent::registerLazyOffer(const QString &key, const peerinfo_ptr &peerInfo, con
{ {
m_lazyoffers[key] = QPair< peerinfo_ptr, QString >( peerInfo, nodeid ); m_lazyoffers[key] = QPair< peerinfo_ptr, QString >( peerInfo, nodeid );
QTimer* timer = new QTimer( this ); QTimer* timer = new QTimer( this );
timer->setInterval( timeout );
timer->setSingleShot( true ); timer->setSingleShot( true );
NewClosure( timer, SIGNAL( timeout() ), this, SLOT( deleteLazyOffer( const QString& ) ), key ); NewClosure( timer, SIGNAL( timeout() ), this, SLOT( deleteLazyOffer( const QString& ) ), key );
timer->start(); timer->start();