mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Temporary work-around for losing the shared-pointer.
This commit is contained in:
@@ -201,16 +201,19 @@ Api_v1::sid( QxtWebRequestEvent* event, QString unused )
|
|||||||
void
|
void
|
||||||
Api_v1::processSid( QxtWebRequestEvent* event, Tomahawk::result_ptr& rp, QSharedPointer< QIODevice >& iodev )
|
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?
|
return send404( event ); // 503?
|
||||||
}
|
}
|
||||||
|
m_ioDevice = iodev;
|
||||||
|
|
||||||
QxtWebPageEvent* e = new QxtWebPageEvent( event->sessionID, event->requestID, iodev.data() );
|
QxtWebPageEvent* e = new QxtWebPageEvent( event->sessionID, event->requestID, iodev.data() );
|
||||||
e->streaming = iodev->isSequential();
|
e->streaming = iodev->isSequential();
|
||||||
e->contentType = rp->mimetype().toLatin1();
|
e->contentType = rp->mimetype().toLatin1();
|
||||||
if ( rp->size() > 0 )
|
if ( rp->size() > 0 )
|
||||||
e->headers.insert( "Content-Length", QString::number( rp->size() ) );
|
e->headers.insert( "Content-Length", QString::number( rp->size() ) );
|
||||||
|
|
||||||
postEvent( e );
|
postEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,7 +78,9 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void processSid( QxtWebRequestEvent* event, Tomahawk::result_ptr&, QSharedPointer< QIODevice >& );
|
void processSid( QxtWebRequestEvent* event, Tomahawk::result_ptr&, QSharedPointer< QIODevice >& );
|
||||||
|
|
||||||
QxtWebRequestEvent* m_storedEvent;
|
QxtWebRequestEvent* m_storedEvent;
|
||||||
|
QSharedPointer< QIODevice > m_ioDevice;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user