void TrainingsTageBuch::writeFileCompleted() { printd("TrainingStageBuch::writeFileCompleted()\n"); QNetworkReply *reply = static_cast<QNetworkReply*>(QObject::sender()); printd("reply:%s\n", reply->readAll().toStdString().c_str()); TTBUploadParser handler; QXmlInputSource source(reply); QXmlSimpleReader reader; reader.setContentHandler(&handler); bool success = true; if(! reader.parse(source)) { success = false; } if(success && handler.error.length() > 0){ success = false; } if(success && handler.id.length() == 0 ){ success = false; } if (success && reply->error() == QNetworkReply::NoError) { notifyWriteComplete(replyName(static_cast<QNetworkReply*>(QObject::sender())), tr("Completed.")); } else { notifyWriteComplete( replyName(static_cast<QNetworkReply*>(QObject::sender())), tr("Error - Upload failed.")); } }
void Dropbox::writeFileCompleted() { QNetworkReply *reply = static_cast<QNetworkReply*>(QObject::sender()); if (reply->error() == QNetworkReply::NoError) { notifyWriteComplete( replyName(static_cast<QNetworkReply*>(QObject::sender())), tr("Completed.")); } else { notifyWriteComplete( replyName(static_cast<QNetworkReply*>(QObject::sender())), tr("Network Error - Upload failed.")); } }
void PolarFlow::readFileCompleted() { printd("PolarFlow::readFileCompleted\n"); QNetworkReply *reply = static_cast<QNetworkReply*>(QObject::sender()); printd("reply:%s\n", buffers.value(reply)->toStdString().c_str()); notifyReadComplete(buffers.value(reply), replyName(reply), tr("Completed.")); }
void Dropbox::readFileCompleted() { QNetworkReply *reply = static_cast<QNetworkReply*>(QObject::sender()); notifyReadComplete(buffers.value(reply), replyName(reply), tr("Completed.")); }
void Dropbox::writeFileCompleted() { notifyWriteComplete(replyName(static_cast<QNetworkReply*>(QObject::sender())), tr("Completed.")); }