mudlet-makers team mailing list archive
-
mudlet-makers team
-
Mailing list archive
-
Message #02061
[Bug 984539] [NEW] sysDownloadError does not specify which file failed
Public bug reported:
sysDownloadError does not specify which file failed, and thus you can't
tell if it was your file that failed on a file download.
This is an easy fix, void TLuaInterpreter::replyFinished(QNetworkReply *
reply ) needs to include the name:
void TLuaInterpreter::replyFinished(QNetworkReply * reply )
{
if( ! downloadMap.contains(reply) ) return;
QString name = downloadMap[reply];
QFile file(name);
file.open( QFile::WriteOnly );
file.write( reply->readAll() );
file.flush();
file.close();
TEvent * e = new TEvent;
if( reply->error() == 0 )
{
e->mArgumentList << "sysDownloadDone";
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
e->mArgumentList << name;
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
}
else
{
e->mArgumentList << "sysDownloadError";
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
e->mArgumentList << reply->errorString();
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
e->mArgumentList << name;
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
}
mpHost->raiseEvent( e );
}
** Affects: mudlet
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/984539
Title:
sysDownloadError does not specify which file failed
Status in Mudlet the MUD client:
New
Bug description:
sysDownloadError does not specify which file failed, and thus you
can't tell if it was your file that failed on a file download.
This is an easy fix, void TLuaInterpreter::replyFinished(QNetworkReply
* reply ) needs to include the name:
void TLuaInterpreter::replyFinished(QNetworkReply * reply )
{
if( ! downloadMap.contains(reply) ) return;
QString name = downloadMap[reply];
QFile file(name);
file.open( QFile::WriteOnly );
file.write( reply->readAll() );
file.flush();
file.close();
TEvent * e = new TEvent;
if( reply->error() == 0 )
{
e->mArgumentList << "sysDownloadDone";
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
e->mArgumentList << name;
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
}
else
{
e->mArgumentList << "sysDownloadError";
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
e->mArgumentList << reply->errorString();
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
e->mArgumentList << name;
e->mArgumentTypeList << ARGUMENT_TYPE_STRING;
}
mpHost->raiseEvent( e );
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/984539/+subscriptions
Follow ups
References