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:
parent
938b136cb5
commit
db240b84bc
@ -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 );
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,9 @@ public slots:
|
||||
|
||||
private:
|
||||
void processSid( QxtWebRequestEvent* event, Tomahawk::result_ptr&, QSharedPointer< QIODevice >& );
|
||||
|
||||
QxtWebRequestEvent* m_storedEvent;
|
||||
QSharedPointer< QIODevice > m_ioDevice;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user