Skip to content

Truly independent web browser

Qt: Remove unused browser and session helpers

Shannon Boothd84d7a545e0f
diff --git a/UI/Qt/BrowserWindow.cpp b/UI/Qt/BrowserWindow.cpp
index 6c6e73e9afd..c9504aa0b8a 100644
--- a/UI/Qt/BrowserWindow.cpp
+++ b/UI/Qt/BrowserWindow.cpp
@@ -1322,11 +1322,6 @@ void BrowserWindow::request_to_close_tab(int index)
tab->request_close();
}
-void BrowserWindow::request_to_close_current_tab()
-{
- request_to_close_tab(m_tabs_container->current_index());
-}
-
int BrowserWindow::tab_index(Tab* tab)
{
return m_tabs_container->index_of(tab);
diff --git a/UI/Qt/BrowserWindow.h b/UI/Qt/BrowserWindow.h
index 58bf0eb953c..1405012ef20 100644
--- a/UI/Qt/BrowserWindow.h
+++ b/UI/Qt/BrowserWindow.h
@@ -252,7 +252,6 @@ public slots:
bool definitely_close_tab(int index);
void move_tab(int old_index, int new_index);
void request_to_close_tab(int index);
- void request_to_close_current_tab();
void open_next_tab();
void open_previous_tab();
void show_all_tabs();
diff --git a/UI/Qt/LocationEdit.cpp b/UI/Qt/LocationEdit.cpp
index 87d269ca59f..63fc5fd5504 100644
--- a/UI/Qt/LocationEdit.cpp
+++ b/UI/Qt/LocationEdit.cpp
@@ -1630,13 +1630,6 @@ int LocationEdit::serialized_url_position_for_display_position(int display_posit
return last_serialized_position;
}
-bool LocationEdit::text_matches_current_url() const
-{
- return m_url.has_value()
- && !m_url_is_hidden
- && (text() == serialized_url() || text() == display_url());
-}
-
// NB: The field never shows the address of the new tab page, so that it is empty there, ready to be typed in. A website
// chosen as the new tab page is shown, as on any other tab.
static bool is_new_tab_page(URL::URL const& url)
@@ -1683,13 +1676,6 @@ void LocationEdit::set_shows_host_only(bool shows_host_only)
}
}
-QString LocationEdit::current_query() const
-{
- if (m_omnibox.is_editing())
- return qstring_from_ak_string(m_omnibox.query());
- return text();
-}
-
void LocationEdit::set_suggestions_host(QWidget* host)
{
m_autocomplete->set_host(host);
diff --git a/UI/Qt/LocationEdit.h b/UI/Qt/LocationEdit.h
index 002d5aff5fb..14127873176 100644
--- a/UI/Qt/LocationEdit.h
+++ b/UI/Qt/LocationEdit.h
@@ -132,10 +132,8 @@ private:
void slide_site_settings_knobs(qreal travel);
void update_completion_title();
void highlight_location();
- bool text_matches_current_url() const;
QString serialized_url() const;
QString display_url() const;
- QString current_query() const;
void set_text_and_restart_editing(QString const& text);
WebView::Omnibox m_omnibox;
diff --git a/UI/Qt/SessionStore.cpp b/UI/Qt/SessionStore.cpp
index 6e7bf58dce8..c07eb7f864a 100644
--- a/UI/Qt/SessionStore.cpp
+++ b/UI/Qt/SessionStore.cpp
@@ -2313,14 +2313,6 @@ ErrorOr<Optional<ClosedSessionUnit>> SessionStore::take_closed_unit(SessionWindo
return Optional<ClosedSessionUnit> { move(result) };
}
-Optional<SessionStore::TabStateUpdate> SessionStore::cached_tab_state_for_testing(SessionTabId tab_id) const
-{
- auto const* tab = m_transient_storage.find_tab(tab_id);
- if (!tab)
- return {};
- return TabStateUpdate { .tab_id = tab_id, .history = tab->history, .url = tab->url };
-}
-
ErrorOr<void> SessionStore::remove_entries_accessed_since(UnixDateTime since)
{
auto closed_units = m_transient_storage.remove_closed_units_since(since);
diff --git a/UI/Qt/SessionStore.h b/UI/Qt/SessionStore.h
index f3f3119607a..0c8fb71d242 100644
--- a/UI/Qt/SessionStore.h
+++ b/UI/Qt/SessionStore.h
@@ -198,8 +198,6 @@ public:
void flush_dirty_state();
- Optional<TabStateUpdate> cached_tab_state_for_testing(SessionTabId) const;
-
// Fired when a flush completes a previously failed close.
Function<void()> on_closed_units_changed;