UI/Qt: Do not perform search if query text is empty
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
ronak69 2024-09-19 12:38:31 +00:00 committed by Tim Ledbetter
parent d19b31529f
commit 276ad23b70
Notes: github-actions[bot] 2024-09-19 22:06:18 +00:00
2 changed files with 5 additions and 0 deletions

View file

@ -31,6 +31,9 @@ LocationEdit::LocationEdit(QWidget* parent)
}); });
connect(this, &QLineEdit::returnPressed, [&] { connect(this, &QLineEdit::returnPressed, [&] {
if (text().isEmpty())
return;
clearFocus(); clearFocus();
Optional<StringView> search_engine_url; Optional<StringView> search_engine_url;

View file

@ -823,6 +823,8 @@ void Tab::copy_link_url(URL::URL const& url)
void Tab::location_edit_return_pressed() void Tab::location_edit_return_pressed()
{ {
if (m_location_edit->text().isEmpty())
return;
navigate(m_location_edit->url()); navigate(m_location_edit->url());
} }