diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-08-21 12:12:09 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-08-21 12:12:09 +0530 |
| commit | 7db40483aa2edb9be380bae3c90d2f54eae4deb1 (patch) | |
| tree | c26498b8c583c1f178edd985a9780a7a668385ab /src | |
| parent | a634243a1d563ab4fe8dcd14bc9abd5b5617c858 (diff) | |
| download | null-browser-7db40483aa2edb9be380bae3c90d2f54eae4deb1.tar.gz null-browser-7db40483aa2edb9be380bae3c90d2f54eae4deb1.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/LuaRuntimeApi.hpp | 2 | ||||
| -rw-r--r-- | src/widgets/WebView.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/LuaRuntimeApi.hpp b/src/LuaRuntimeApi.hpp index de8cc66..a198d50 100644 --- a/src/LuaRuntimeApi.hpp +++ b/src/LuaRuntimeApi.hpp @@ -134,6 +134,7 @@ int lua_api_keymap_set(lua_State *state) { int lua_api_view_current(lua_State *state) { auto &router = WindowActionRouter::instance(); + // TODO: get win id param auto view_id = router.fetch_current_view_id(); lua_pushinteger(state, view_id); return 1; @@ -141,6 +142,7 @@ int lua_api_view_current(lua_State *state) { int lua_view_list(lua_State *state) { auto &router = WindowActionRouter::instance(); + // TODO: get win id param auto views = router.fetch_webview_data_list(); lua_newtable(state); diff --git a/src/widgets/WebView.cpp b/src/widgets/WebView.cpp index ceb9c8e..1cd3d54 100644 --- a/src/widgets/WebView.cpp +++ b/src/widgets/WebView.cpp @@ -24,6 +24,11 @@ void WebView::open_devtools() { devtools_window = nullptr; }); + connect(this, &WebView::destroyed, this, [this]() { + devtools_window->deleteLater(); + devtools_window = nullptr; + }); + page()->setDevToolsPage(devtools_window->page()); } |
