Weird Qt SSL issue -- error "No Error" shows up, nothing else, and if I ignore it, everything works

Posted by houbysoft on Stack Overflow See other posts from Stack Overflow or by houbysoft
Published on 2012-04-15T22:44:25Z Indexed on 2012/04/15 23:29 UTC
Read the original article Hit count: 292

Filed under:
|
|

The issue is as follows : in my Qt app, I have a QWebView, which I use to load a HTTPS page.

Everything worked fine on my development machine, so I'm now trying to get it to run on a test machine. I ran the app, but the page didn't load (the QWebView was blank). After much debugging, I found the problem is that an SSL error shows up, and the sslErrors() signal is fired.

Here is my sslErrors() handling code:

void blah::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors) {
  foreach(QSslError error, errors) {
    qDebug() << error.errorString() << endl;
  }
  reply->ignoreSslErrors();
}

The only thing the above code prints is:

"No error"

So there's no error, but unless I call reply->ignoreSslErrors(), the page doesn't load (on the test machine, on my developer computer no error is reported). Huh? Is this a bug?

Is it safe to ignore the error, if I make sure it's of the type "No error"?

© Stack Overflow or respective owner

Related posts about qt

Related posts about ssl