mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
Ladybird/Qt: Rename new_tab(StringView) to new_tab_from_content
Having an overload of new_tab with StringView and QString that each do very different things is uncomfortable, to say the least.
This commit is contained in:
parent
48ce8fb4e9
commit
a91680dd55
3 changed files with 3 additions and 3 deletions
|
@ -477,7 +477,7 @@ Tab& BrowserWindow::new_tab(QString const& url, Web::HTML::ActivateTab activate_
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tab& BrowserWindow::new_tab(StringView html, Web::HTML::ActivateTab activate_tab)
|
Tab& BrowserWindow::new_tab_from_content(StringView html, Web::HTML::ActivateTab activate_tab)
|
||||||
{
|
{
|
||||||
auto& tab = create_new_tab(activate_tab);
|
auto& tab = create_new_tab(activate_tab);
|
||||||
tab.load_html(html);
|
tab.load_html(html);
|
||||||
|
|
|
@ -74,7 +74,7 @@ public slots:
|
||||||
void tab_title_changed(int index, QString const&);
|
void tab_title_changed(int index, QString const&);
|
||||||
void tab_favicon_changed(int index, QIcon const& icon);
|
void tab_favicon_changed(int index, QIcon const& icon);
|
||||||
Tab& new_tab(QString const&, Web::HTML::ActivateTab);
|
Tab& new_tab(QString const&, Web::HTML::ActivateTab);
|
||||||
Tab& new_tab(StringView html, Web::HTML::ActivateTab);
|
Tab& new_tab_from_content(StringView html, Web::HTML::ActivateTab);
|
||||||
void activate_tab(int index);
|
void activate_tab(int index);
|
||||||
void close_tab(int index);
|
void close_tab(int index);
|
||||||
void close_current_tab();
|
void close_current_tab();
|
||||||
|
|
|
@ -251,7 +251,7 @@ Tab::Tab(BrowserWindow* window, WebContentOptions const& web_content_options, St
|
||||||
|
|
||||||
view().on_received_source = [this](auto const& url, auto const& source) {
|
view().on_received_source = [this](auto const& url, auto const& source) {
|
||||||
auto html = WebView::highlight_source(url, source);
|
auto html = WebView::highlight_source(url, source);
|
||||||
m_window->new_tab(html, Web::HTML::ActivateTab::Yes);
|
m_window->new_tab_from_content(html, Web::HTML::ActivateTab::Yes);
|
||||||
};
|
};
|
||||||
|
|
||||||
view().on_navigate_back = [this]() {
|
view().on_navigate_back = [this]() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue