mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 11:50:37 +02:00
don't crash when jason tries to use tomahawk
This commit is contained in:
@@ -180,7 +180,7 @@ Api_v1::send404( QxtWebRequestEvent* event )
|
|||||||
qDebug() << "404" << event->url.toString();
|
qDebug() << "404" << event->url.toString();
|
||||||
QxtWebPageEvent* wpe = new QxtWebPageEvent( event->sessionID, event->requestID, "<h1>Not Found</h1>" );
|
QxtWebPageEvent* wpe = new QxtWebPageEvent( event->sessionID, event->requestID, "<h1>Not Found</h1>" );
|
||||||
wpe->status = 404;
|
wpe->status = 404;
|
||||||
wpe->statusMessage = "not feventound";
|
wpe->statusMessage = "no event found";
|
||||||
postEvent( wpe );
|
postEvent( wpe );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
thirdparty/jreen
vendored
2
thirdparty/jreen
vendored
Submodule thirdparty/jreen updated: 2957d0ff03...8f995f2466
@@ -682,6 +682,9 @@ void QxtHttpSessionManager::sendNextBlock(int requestID)
|
|||||||
{
|
{
|
||||||
QSharedPointer<QIODevice>& dataSource = connector()->getRequestDataSource( requestID );
|
QSharedPointer<QIODevice>& dataSource = connector()->getRequestDataSource( requestID );
|
||||||
QIODevice* device = connector()->getRequestConnection(requestID);
|
QIODevice* device = connector()->getRequestConnection(requestID);
|
||||||
|
if (!device)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!qxt_d().connectionState.contains(device)) return; // in case a disconnect signal and a bytesWritten signal get fired in the wrong order
|
if (!qxt_d().connectionState.contains(device)) return; // in case a disconnect signal and a bytesWritten signal get fired in the wrong order
|
||||||
QxtHttpSessionManagerPrivate::ConnectionState& state = qxt_d().connectionState[device];
|
QxtHttpSessionManagerPrivate::ConnectionState& state = qxt_d().connectionState[device];
|
||||||
if (state.finishedTransfer) return;
|
if (state.finishedTransfer) return;
|
||||||
|
@@ -323,6 +323,11 @@ namespace QxtMetaObject
|
|||||||
*/
|
*/
|
||||||
bool connect(QObject* sender, const char* signal, QxtBoundFunction* slot, Qt::ConnectionType type)
|
bool connect(QObject* sender, const char* signal, QxtBoundFunction* slot, Qt::ConnectionType type)
|
||||||
{
|
{
|
||||||
|
if (!sender)
|
||||||
|
{
|
||||||
|
qWarning() << "Got connect() with a null sender!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const QMetaObject* meta = sender->metaObject();
|
const QMetaObject* meta = sender->metaObject();
|
||||||
int methodID = meta->indexOfMethod(meta->normalizedSignature(signal).mid(1).constData());
|
int methodID = meta->indexOfMethod(meta->normalizedSignature(signal).mid(1).constData());
|
||||||
if (methodID < 0)
|
if (methodID < 0)
|
||||||
|
Reference in New Issue
Block a user