mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 04:37:22 +00:00
UI/Qt: Migrate to LibWebView's autocomplete engine
As a result, we now no longer depend on Qt::Network.
This commit is contained in:
parent
a87c264088
commit
60dd5cc4ef
Notes:
github-actions[bot]
2025-04-02 12:53:43 +00:00
Author: https://github.com/trflynn89
Commit: 60dd5cc4ef
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4156
13 changed files with 100 additions and 371 deletions
|
@ -8,12 +8,13 @@
|
|||
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <LibWebView/Settings.h>
|
||||
#include <UI/Qt/AutoComplete.h>
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
namespace Ladybird {
|
||||
|
||||
class Autocomplete;
|
||||
|
||||
class LocationEdit final
|
||||
: public QLineEdit
|
||||
, public WebView::SettingsObserver {
|
||||
|
@ -22,8 +23,8 @@ class LocationEdit final
|
|||
public:
|
||||
explicit LocationEdit(QWidget*);
|
||||
|
||||
URL::URL url() const { return m_url; }
|
||||
void set_url(URL::URL const&);
|
||||
URL::URL const& url() const { return m_url; }
|
||||
void set_url(URL::URL);
|
||||
|
||||
bool url_is_hidden() const { return m_url_is_hidden; }
|
||||
void set_url_is_hidden(bool url_is_hidden) { m_url_is_hidden = url_is_hidden; }
|
||||
|
@ -36,7 +37,8 @@ private:
|
|||
|
||||
void update_placeholder();
|
||||
void highlight_location();
|
||||
AK::OwnPtr<AutoComplete> m_autocomplete;
|
||||
|
||||
Autocomplete* m_autocomplete { nullptr };
|
||||
|
||||
URL::URL m_url;
|
||||
bool m_url_is_hidden { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue