<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
- <value type="int">1</value>
+ <value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
</valuemap>
<value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
<valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
- <value key="192.168.1.3" type="QDateTime">2010-07-01T01:31:56</value>
+ <value key="192.168.1.3" type="QDateTime">2010-07-01T03:13:16</value>
</valuemap>
<value key="Qt4ProjectManager.MaemoRunConfiguration.Simulator" type="QString"></value>
</valuemap>
req.setHeader(req.ContentTypeHeader,QVariant("application/x-www-form-urlencoded"));
if(reply)
{
- reply->abort();
- delete reply;
+ reply->disconnect();
+ reply->deleteLater();
}
reply = manager->post(req,QString("streamKey=" + pList->at(this->currentdownloaditem)->streamkey->toAscii()).toAscii());
pList->at(this->currentdownloaditem)->buffer->open(QBuffer::ReadWrite | QBuffer::Truncate);
connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(downloadSlot(qint64,qint64)));
connect(reply,SIGNAL(finished()),this,SLOT(networkReplyFinish()));
connect(this,SIGNAL(downloadComplete(int)),this,SLOT(downloadDone(int)));
+ connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(getNError(QNetworkReply::NetworkError)));
startStreamT = QTime::currentTime();
}
+void playlist::getNError(QNetworkReply::NetworkError error)
+{
+ qDebug() << "Network Error (if this is 99 then it will retry" << error;
+ if(error == QNetworkReply::UnknownNetworkError)
+ beginDownload(this->currentdownloaditem);
+
+}
void playlist::setGscom(gscom *comm)
{
QNetworkRequest req;
req.setUrl(url.toUrl());
qDebug() << url;
+ if(reply)
+ {
+ reply->disconnect();
+ reply->deleteLater();
+ }
reply = manager->get(req);
startStreamT = QTime::currentTime();
//connect(reply,SIGNAL(finished()),this,SLOT(start()));
connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(downloadSlot(qint64,qint64)));
+ connect(reply,SIGNAL(finished()),this,SLOT(networkReplyFinish()));
+ connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(getNError(QNetworkReply::NetworkError)));
}
}