From c635094a6bdfcf2f081eb3c0ed9a1454ae2933fb Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Sat, 9 Jan 2021 15:55:52 +1100 Subject: status bar: show request status when loading pages status text for loading HTTP/S is only a simple 'loading webpage'. The other protocols display more information --- src/browsertab.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/browsertab.cpp') diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 0bb1133..faae7dd 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -520,6 +520,9 @@ void BrowserTab::on_requestComplete(const QByteArray &ref_data, const MimeType & emit this->fileLoaded(this->current_stats); this->updateMouseCursor(false); + + emit this->requestStateChanged(RequestState::None); + this->request_state = RequestState::None; } void BrowserTab::renderPage(const QByteArray &data, const MimeType &mime) @@ -1355,6 +1358,10 @@ void BrowserTab::addProtocolHandler(std::unique_ptr &&handler) connect(handler.get(), &ProtocolHandler::requestProgress, this, &BrowserTab::on_requestProgress); connect(handler.get(), &ProtocolHandler::requestComplete, this, qOverload(&BrowserTab::on_requestComplete)); + connect(handler.get(), &ProtocolHandler::requestStateChange, this, [this](RequestState state) { + emit this->requestStateChanged(state); + this->request_state = state; + }); connect(handler.get(), &ProtocolHandler::redirected, this, &BrowserTab::on_redirected); connect(handler.get(), &ProtocolHandler::inputRequired, this, &BrowserTab::on_inputRequired); connect(handler.get(), &ProtocolHandler::networkError, this, &BrowserTab::on_networkError); -- cgit v1.2.3