diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-30 19:16:07 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-30 19:16:37 +0530 |
| commit | 4f945367ebc8e34263acbfca0416e3f75653924e (patch) | |
| tree | aff34361a2b2160aea284df9b619193917bcbc88 /src/widgets/BrowserApp.cpp | |
| parent | e690963fb6c0240171236fc2d669f95ee26b6798 (diff) | |
| download | null-browser-4f945367ebc8e34263acbfca0416e3f75653924e.tar.gz null-browser-4f945367ebc8e34263acbfca0416e3f75653924e.zip | |
Update window title on tab change + refactoring
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/BrowserApp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/BrowserApp.cpp b/src/widgets/BrowserApp.cpp index 13d855b..f2d541d 100644 --- a/src/widgets/BrowserApp.cpp +++ b/src/widgets/BrowserApp.cpp @@ -7,24 +7,24 @@ #include "widgets/BrowserWindow.hpp" BrowserApp::BrowserApp() { - auto *lua = LuaRuntime::instance(); - lua->start_event_loop(); + auto &lua = LuaRuntime::instance(); + lua.start_event_loop(); // Router init - auto *router = WindowActionRouter::instance(); - router->initialize(); + auto &router = WindowActionRouter::instance(); + router.initialize(); // Global event filter qApp->installEventFilter(this); // NOTE: TMP - LuaRuntime::instance()->load_file("./config.lua"); + lua.load_file("./config.lua"); }; BrowserWindow *BrowserApp::create_window() { auto *win = new BrowserWindow((const Configuration &)configuration); - WindowActionRouter::instance()->add_window(win); win->setWindowTitle("null-browser"); + WindowActionRouter::instance().add_window(win); win->show(); return win; } @@ -33,7 +33,7 @@ bool BrowserApp::eventFilter(QObject *target, QEvent *event) { if (event->type() != QEvent::KeyPress) return false; - for (const auto &match : WindowActionRouter::instance()->windows()) { + for (const auto &match : WindowActionRouter::instance().windows()) { auto *win = match.second; if (auto *target_widget = dynamic_cast<QWidget *>(target); |
