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

* Temporary work-around for losing the shared-pointer.

This commit is contained in:
Christian Muehlhaeuser 2013-04-09 11:16:50 +02:00
parent 938b136cb5
commit db240b84bc
2 changed files with 6 additions and 1 deletions

View File

@ -201,16 +201,19 @@ Api_v1::sid( QxtWebRequestEvent* event, QString unused )
void
Api_v1::processSid( QxtWebRequestEvent* event, Tomahawk::result_ptr& rp, QSharedPointer< QIODevice >& iodev )
{
if ( !iodev || iodev.isNull() )
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
if ( !iodev || !rp )
{
return send404( event ); // 503?
}
m_ioDevice = iodev;
QxtWebPageEvent* e = new QxtWebPageEvent( event->sessionID, event->requestID, iodev.data() );
e->streaming = iodev->isSequential();
e->contentType = rp->mimetype().toLatin1();
if ( rp->size() > 0 )
e->headers.insert( "Content-Length", QString::number( rp->size() ) );
postEvent( e );
}

View File

@ -78,7 +78,9 @@ public slots:
private:
void processSid( QxtWebRequestEvent* event, Tomahawk::result_ptr&, QSharedPointer< QIODevice >& );
QxtWebRequestEvent* m_storedEvent;
QSharedPointer< QIODevice > m_ioDevice;
};
#endif