Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Upgrade app network timeout message to include url
  • Loading branch information
nyalldawson committed Jan 23, 2019
1 parent 5824faf commit ca592b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgisapp.h
Expand Up @@ -134,6 +134,7 @@ class QgsBrowserModel;
class QgsGeoCmsProviderRegistry;
class QgsLayoutQptDropHandler;
class QgsProxyProgressTask;
class QgsNetworkRequestParameters;

#include <QMainWindow>
#include <QToolBar>
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit ca592b7

Please sign in to comment.