aboutsummaryrefslogtreecommitdiff
path: root/src/browsertab.cpp
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-02-27 17:51:52 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-02-27 11:47:39 +0100
commitbeaccb9d284fc86a3ff56d597723dbb7ca1900a5 (patch)
treecf7eb8c8bdda3ddc4b88432543afe0b1fc5f9712 /src/browsertab.cpp
parent562938e11feeba71da36fd46663a3034f82839cb (diff)
downloadkristall-beaccb9d284fc86a3ff56d597723dbb7ca1900a5.tar.gz
BrowserTab.cpp: allow parent/root on all except about: pages
This allows, e.g going to parent directory in local directory listings, and also allows doing so on error pages
Diffstat (limited to 'src/browsertab.cpp')
-rw-r--r--src/browsertab.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp
index 78e43b6..0db9797 100644
--- a/src/browsertab.cpp
+++ b/src/browsertab.cpp
@@ -229,7 +229,7 @@ void BrowserTab::navOneForward()
void BrowserTab::navigateToRoot()
{
- if(this->is_internal_location) return;
+ if(this->current_location.scheme() == "about") return;
QUrl url = this->current_location;
url.setPath("/");
@@ -238,7 +238,7 @@ void BrowserTab::navigateToRoot()
void BrowserTab::navigateToParent()
{
- if(this->is_internal_location) return;
+ if(this->current_location.scheme() == "about") return;
QUrl url = this->current_location;
@@ -1321,12 +1321,12 @@ void BrowserTab::updateUrlBarStyle()
QUrl url { this->ui->url_bar->text().trimmed() };
// Set all text to default colour if url bar
- // is focused, is at an internal location (like about:...),
+ // is focused, is at an about: location,
// or has an invalid URL.
if (!kristall::options.fancy_urlbar ||
this->ui->url_bar->hasFocus() ||
!url.isValid() ||
- this->is_internal_location)
+ this->current_location.scheme() == "about")
{
// Disable styling
if (!this->no_url_style)