Skip to content
Permalink
Browse files

Upgrade app network timeout message to include url

  • Loading branch information
nyalldawson committed Jan 23, 2019
1 parent 5824faf commit ca592b7386382d9b46466327de98967effc5817d
Showing with 5 additions and 5 deletions.
  1. +3 −4 src/app/qgisapp.cpp
  2. +2 −1 src/app/qgisapp.h
@@ -13817,7 +13817,7 @@ void QgisApp::namSetup()
connect( nam, &QNetworkAccessManager::proxyAuthenticationRequired,
this, &QgisApp::namProxyAuthenticationRequired );

connect( nam, &QgsNetworkAccessManager::requestTimedOut,
connect( nam, qgis::overload< QgsNetworkRequestParameters >::of( &QgsNetworkAccessManager::requestTimedOut ),
this, &QgisApp::namRequestTimedOut );

#ifndef QT_NO_SSL
@@ -14025,10 +14025,9 @@ void QgisApp::namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors
}
#endif

void QgisApp::namRequestTimedOut( QNetworkReply *reply )
void QgisApp::namRequestTimedOut( const QgsNetworkRequestParameters &request )
{
Q_UNUSED( reply );
QLabel *msgLabel = new QLabel( tr( "A network request timed out, any data received is likely incomplete." ) +
QLabel *msgLabel = new QLabel( tr( "Network request to %1 timed out, any data received is likely incomplete." ).arg( request.request().url().toString() ) +
tr( " Please check the <a href=\"#messageLog\">message log</a> for further info." ), messageBar() );
msgLabel->setWordWrap( true );
connect( msgLabel, &QLabel::linkActivated, mLogDock, &QWidget::show );
@@ -134,6 +134,7 @@ class QgsBrowserModel;
class QgsGeoCmsProviderRegistry;
class QgsLayoutQptDropHandler;
class QgsProxyProgressTask;
class QgsNetworkRequestParameters;

#include <QMainWindow>
#include <QToolBar>
@@ -882,7 +883,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
#ifndef QT_NO_SSL
void namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors );
#endif
void namRequestTimedOut( QNetworkReply *reply );
void namRequestTimedOut( const QgsNetworkRequestParameters &request );

//! Schedule and erase of the authentication database upon confirmation
void eraseAuthenticationDatabase();

0 comments on commit ca592b7

Please sign in to comment.
You can’t perform that action at this time.