PDA

View Full Version : QNetworkAccessManager Warnings



KaptainKarl
7th January 2015, 21:29
I'm using QNetworkAccessManager to upload files using FTP.
I am "putting" the contents of a QByteArray not a file.
When the "put" occurs, I get the following warnings:


QSslSocket: cannot resolve TLSv1_1_client_method
QSslSocket: cannot resolve TLSv1_2_client_method
QSslSocket: cannot resolve TLSv1_1_server_method
QSslSocket: cannot resolve TLSv1_2_server_method
QSslSocket: cannot resolve SSL_select_next_proto
QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
QIODevice::read: device not open

These are puzzling to me because:
A: The data I am attempting to send arrives at the server just fine.
B: I am using FTP not SFTP so a secure socket layer is not involved. Why am I seeing SSL warnings?
C: I am putting a QByteArray so there is no file to be read. What QIODevice is not open for read?

Here is a snippet of my code:


In .h file:
QNetworkAccessManager namAlert;

In .cpp file:
QString sTMDMgs("Here is some data.");
QByteArray baTMD(sTMDMsg.toUtf8().data());
connect(&namAlert, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
QUrl url("ftp://" + sFTPHost + "/" + sTMDFile);
url.setUserName(sFTPUser);
url.setPassword(sFTPPass);
namAlert.put(QNetworkRequest(url), baTMD);

void ALERT::replyFinished(QNetworkReply *reply)
{
#ifdef DEBUG
qDebug() << "Reply finished.";
#endif

if (reply->error())
{
qDebug() << reply->errorString();
}
reply->deleteLater();
}

Thanks,
Karl