aboutsummaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/widgets/BrowserApp.cpp4
-rw-r--r--src/widgets/BrowserWindow.cpp2
-rw-r--r--src/widgets/WebViewStack.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/BrowserApp.cpp b/src/widgets/BrowserApp.cpp
index 26124d6..4a43dfb 100644
--- a/src/widgets/BrowserApp.cpp
+++ b/src/widgets/BrowserApp.cpp
@@ -12,13 +12,13 @@ BrowserApp::BrowserApp() {
// Router init
auto &window_action_router = WindowActionRouter::instance();
- window_action_router.initialize();
+ window_action_router.initialize(&configuration);
// Global event filter
qApp->installEventFilter(this);
// NOTE: TMP
- lua.load_file("./config.lua");
+ lua.load_file_sync("./config.lua");
connect(&window_action_router, &WindowActionRouter::new_window_requested, this,
[this](const QUrl &url) { create_window({url.toString()}); });
diff --git a/src/widgets/BrowserWindow.cpp b/src/widgets/BrowserWindow.cpp
index cc3c6a8..2c4c5b4 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.toString());
+ 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 d43c9b5..f15ab64 100644
--- a/src/widgets/WebViewStack.cpp
+++ b/src/widgets/WebViewStack.cpp
@@ -204,7 +204,7 @@ QUrl WebViewStack::current_url() {
auto *webview = current_webview();
if (webview == nullptr) {
qDebug() << "No current webview";
- return configuration->new_view_url;
+ return QUrl{configuration->new_view_url};
}
return webview->url();