aboutsummaryrefslogtreecommitdiff
path: root/src/browsertab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/browsertab.cpp')
-rw-r--r--src/browsertab.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp
index 687dcd8..e8b8443 100644
--- a/src/browsertab.cpp
+++ b/src/browsertab.cpp
@@ -485,6 +485,8 @@ void BrowserTab::on_requestComplete(const QByteArray &ref_data, const QString &m
this->current_stats.mime_type = mime;
this->current_stats.loading_time = this->timer.elapsed();
emit this->fileLoaded(this->current_stats);
+
+ this->updateMouseCursor(false);
}
void BrowserTab::renderPage(const QByteArray &data, const MimeType &mime)
@@ -1263,6 +1265,8 @@ void BrowserTab::addProtocolHandler(std::unique_ptr<ProtocolHandler> &&handler)
bool BrowserTab::startRequest(const QUrl &url, ProtocolHandler::RequestOptions options)
{
+ this->updateMouseCursor(true);
+
this->current_server_certificate = QSslCertificate { };
this->current_handler = nullptr;
@@ -1359,6 +1363,14 @@ bool BrowserTab::startRequest(const QUrl &url, ProtocolHandler::RequestOptions o
return this->current_handler->startRequest(url.adjusted(QUrl::RemoveFragment), options);
}
+void BrowserTab::updateMouseCursor(bool waiting)
+{
+ if (waiting)
+ this->ui->text_browser->setDefaultCursor(Qt::BusyCursor);
+ else
+ this->ui->text_browser->setDefaultCursor(Qt::ArrowCursor);
+}
+
bool BrowserTab::enableClientCertificate(const CryptoIdentity &ident)
{
if (not ident.isValid())