aboutsummaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-04-12 19:05:24 +0530
committerAkshay Nair <phenax5@gmail.com>2025-04-12 19:05:24 +0530
commitc8352009ceb6b9240ef7c1ad5be93f42312b59a2 (patch)
tree9f71d00d2a8c5200dde4dd6a3f44354168d9017f /src/widgets
parent39b3e8d1e2581a47dff1f09450383df0466dac94 (diff)
downloadnull-browser-c8352009ceb6b9240ef7c1ad5be93f42312b59a2.tar.gz
null-browser-c8352009ceb6b9240ef7c1ad5be93f42312b59a2.zip
Switch to using map for configuration
Diffstat (limited to '')
-rw-r--r--src/widgets/BrowserWindow.cpp2
-rw-r--r--src/widgets/WebViewStack.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/BrowserWindow.cpp b/src/widgets/BrowserWindow.cpp
index 2c4c5b4..dbefdd6 100644
--- a/src/widgets/BrowserWindow.cpp
+++ b/src/widgets/BrowserWindow.cpp
@@ -27,7 +27,7 @@ BrowserWindow::BrowserWindow(const Configuration &configuration, const QStringLi
// Open webviews for given urls
if (urls.isEmpty()) {
- webview_stack->open_url(configuration.new_view_url);
+ webview_stack->open_url(configuration.new_view_url());
} else {
for (const auto &url : urls) {
webview_stack->open_url(url, OpenType::OpenUrlInView);
diff --git a/src/widgets/WebViewStack.cpp b/src/widgets/WebViewStack.cpp
index f15ab64..bdec508 100644
--- a/src/widgets/WebViewStack.cpp
+++ b/src/widgets/WebViewStack.cpp
@@ -126,10 +126,10 @@ void WebViewStack::close(WebViewId webview_id) {
webview->deleteLater();
if (webview_list.isEmpty()) {
- if (configuration->close_window_when_no_views) {
+ if (configuration->close_window_when_no_views()) {
emit close_window_requested();
} else {
- create_new_webview(configuration->new_view_url, true);
+ create_new_webview(configuration->new_view_url(), true);
}
}
}
@@ -204,7 +204,7 @@ QUrl WebViewStack::current_url() {
auto *webview = current_webview();
if (webview == nullptr) {
qDebug() << "No current webview";
- return QUrl{configuration->new_view_url};
+ return QUrl{configuration->new_view_url()};
}
return webview->url();