1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-29 12:39:28 +01:00

don't crash when jason tries to use tomahawk

This commit is contained in:
Leo Franchi 2011-06-11 12:18:12 -04:00
parent efc29a1c92
commit 1c43cabd7e
4 changed files with 10 additions and 2 deletions

View File

@ -180,7 +180,7 @@ Api_v1::send404( QxtWebRequestEvent* event )
qDebug() << "404" << event->url.toString();
QxtWebPageEvent* wpe = new QxtWebPageEvent( event->sessionID, event->requestID, "<h1>Not Found</h1>" );
wpe->status = 404;
wpe->statusMessage = "not feventound";
wpe->statusMessage = "no event found";
postEvent( wpe );
}

2
thirdparty/jreen vendored

@ -1 +1 @@
Subproject commit 2957d0ff03d9561af8afc4bd3a45947392868875
Subproject commit 8f995f246637f533feb7124744e113034a32b505

View File

@ -682,6 +682,9 @@ void QxtHttpSessionManager::sendNextBlock(int requestID)
{
QSharedPointer<QIODevice>& dataSource = connector()->getRequestDataSource( 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
QxtHttpSessionManagerPrivate::ConnectionState& state = qxt_d().connectionState[device];
if (state.finishedTransfer) return;

View File

@ -323,6 +323,11 @@ namespace QxtMetaObject
*/
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();
int methodID = meta->indexOfMethod(meta->normalizedSignature(signal).mid(1).constData());
if (methodID < 0)