mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 23:19:44 +00:00
UI/Qt: Do not rely on the URL implicit constructors
This commit is contained in:
parent
0f495421f1
commit
3fb9c37783
Notes:
github-actions[bot]
2025-03-04 21:26:06 +00:00
Author: https://github.com/shannonbooth
Commit: 3fb9c37783
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3668
Reviewed-by: https://github.com/trflynn89
6 changed files with 21 additions and 11 deletions
|
@ -596,7 +596,7 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, IsPopupWindow
|
|||
auto* about_action = new QAction("&About Ladybird", this);
|
||||
help_menu->addAction(about_action);
|
||||
QObject::connect(about_action, &QAction::triggered, this, [this] {
|
||||
new_tab_from_url("about:version"sv, Web::HTML::ActivateTab::Yes);
|
||||
new_tab_from_url(URL::about_version(), Web::HTML::ActivateTab::Yes);
|
||||
});
|
||||
|
||||
m_hamburger_menu->addSeparator();
|
||||
|
@ -609,7 +609,9 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, IsPopupWindow
|
|||
QObject::connect(quit_action, &QAction::triggered, this, &QMainWindow::close);
|
||||
|
||||
QObject::connect(m_new_tab_action, &QAction::triggered, this, [this] {
|
||||
auto& tab = new_tab_from_url(ak_url_from_qstring(Settings::the()->new_tab_page()), Web::HTML::ActivateTab::Yes);
|
||||
auto url = ak_url_from_qstring(Settings::the()->new_tab_page());
|
||||
VERIFY(url.has_value());
|
||||
auto& tab = new_tab_from_url(url.release_value(), Web::HTML::ActivateTab::Yes);
|
||||
tab.set_url_is_hidden(true);
|
||||
tab.focus_location_editor();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue