diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4bea632..3a542e8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -41,6 +41,7 @@ #include #include "config.h" +#include "qinfo.h" #include "mainwindow.h" #include "qwk_webpage.h" diff --git a/src/qinfo.h b/src/qinfo.h new file mode 100644 index 0000000..295476d --- /dev/null +++ b/src/qinfo.h @@ -0,0 +1,15 @@ +/** + * Add debug macros for QT < 5.5.0 + */ + +#ifndef __QINFO_H +#define __QINFO_H + +#if QT_VERSION < 0x050500 +#define qInfo qDebug +#define qWarning qDebug +#define qFatal qDebug +#define qCritical qDebug +#endif + +#endif diff --git a/src/qwk_webpage.cpp b/src/qwk_webpage.cpp index 44bd474..41bbff6 100644 --- a/src/qwk_webpage.cpp +++ b/src/qwk_webpage.cpp @@ -7,6 +7,8 @@ #include "config.h" #include +#include "qinfo.h" + #include #include #include "webview.h" diff --git a/src/webview.cpp b/src/webview.cpp index 77e1c8c..a33c27d 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -160,11 +160,12 @@ void WebView::handleSslErrors(QNetworkReply* reply, const QList &erro void WebView::handleNetworkReply(QNetworkReply* reply) { - if( reply ) { + if ( reply ) { qDebug() << QDateTime::currentDateTime().toString() << "handleNetworkReply URL:" << reply->request().url().toString(); if( reply->error()) { QString errStr = reply->errorString(); qWarning() << QDateTime::currentDateTime().toString() << "handleNetworkReply ERROR:" << reply->error() << "=" << errStr; + qWarning() << QDateTime::currentDateTime().toString() << "on URL:" << reply->request().url().toString(); emit qwkNetworkError(reply->error(), reply->errorString()); } else { qDebug() << QDateTime::currentDateTime().toString() << "handleNetworkReply OK";