mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
UI/Qt: Add a debug menu item to dump RequestServer connection info
This commit is contained in:
parent
b1433a8097
commit
96bb8fe944
Notes:
github-actions[bot]
2024-08-03 19:54:02 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/96bb8fe9441 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/946 Reviewed-by: https://github.com/alimpfard ✅
5 changed files with 15 additions and 0 deletions
BIN
Base/res/icons/16x16/network.png
Normal file
BIN
Base/res/icons/16x16/network.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 454 B |
|
@ -432,6 +432,11 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, WebView::Cook
|
|||
debug_request("dump-local-storage");
|
||||
});
|
||||
|
||||
auto* dump_connection_info = new QAction("Dump Co&nnection Info", this);
|
||||
dump_connection_info->setIcon(load_icon_from_uri("resource://icons/16x16/network.png"sv));
|
||||
debug_menu->addAction(dump_connection_info);
|
||||
QObject::connect(dump_connection_info, &QAction::triggered, this, &BrowserWindow::dump_connection_info);
|
||||
|
||||
debug_menu->addSeparator();
|
||||
|
||||
m_show_line_box_borders_action = new QAction("Show Line Box Borders", this);
|
||||
|
@ -1227,4 +1232,10 @@ void BrowserWindow::closeEvent(QCloseEvent* event)
|
|||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
void BrowserWindow::dump_connection_info()
|
||||
{
|
||||
if (auto& application = static_cast<Application&>(WebView::Application::the()); application.request_server_client)
|
||||
application.request_server_client->dump_connection_info();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -183,6 +183,8 @@ private:
|
|||
Web::CSS::PreferredColorScheme m_preferred_color_scheme;
|
||||
void set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_scheme);
|
||||
|
||||
static void dump_connection_info();
|
||||
|
||||
QTabWidget* m_tabs_container { nullptr };
|
||||
Tab* m_current_tab { nullptr };
|
||||
QMenu* m_zoom_menu { nullptr };
|
||||
|
|
|
@ -23,6 +23,7 @@ set(16x16_ICONS
|
|||
history.png
|
||||
layers.png
|
||||
layout.png
|
||||
network.png
|
||||
new-tab.png
|
||||
open-parent-directory.png
|
||||
paste.png
|
||||
|
|
|
@ -226,6 +226,7 @@ icons_16x16 = [
|
|||
"//Base/res/icons/16x16/history.png",
|
||||
"//Base/res/icons/16x16/layers.png",
|
||||
"//Base/res/icons/16x16/layout.png",
|
||||
"//Base/res/icons/16x16/network.png",
|
||||
"//Base/res/icons/16x16/new-tab.png",
|
||||
"//Base/res/icons/16x16/open-parent-directory.png",
|
||||
"//Base/res/icons/16x16/paste.png",
|
||||
|
|
Loading…
Reference in a new issue