aboutsummaryrefslogtreecommitdiff
path: root/src/browsertab.cpp
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-01-09 15:55:52 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-01-10 13:40:46 +0100
commitc635094a6bdfcf2f081eb3c0ed9a1454ae2933fb (patch)
treeb41aca9c2803ad3acbe89c027b340b15ac473eee /src/browsertab.cpp
parentdd3e8716b276f9f1646338f8801ca9a2f688fc46 (diff)
downloadkristall-c635094a6bdfcf2f081eb3c0ed9a1454ae2933fb.tar.gz
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
Diffstat (limited to 'src/browsertab.cpp')
-rw-r--r--src/browsertab.cpp7
1 files changed, 7 insertions, 0 deletions
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<ProtocolHandler> &&handler)
connect(handler.get(), &ProtocolHandler::requestProgress, this, &BrowserTab::on_requestProgress);
connect(handler.get(), &ProtocolHandler::requestComplete, this,
qOverload<QByteArray const &, QString const &>(&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);