Ladybird: Simplify the LocationEdit constructor

This commit is contained in:
Cameron Youell 2023-05-29 19:05:49 +10:00 committed by Sam Atkins
parent 0da5af0eff
commit c53d3e7aa4

View file

@ -18,13 +18,8 @@ LocationEdit::LocationEdit(QWidget* parent)
: QLineEdit(parent)
{
setPlaceholderText("Enter web address");
connect(this, &QLineEdit::returnPressed, this, [&] {
clearFocus();
});
connect(this, &QLineEdit::textChanged, this, [&] {
highlight_location();
});
connect(this, &QLineEdit::editingFinished, this, &LocationEdit::clearFocus);
connect(this, &QLineEdit::textChanged, this, &LocationEdit::highlight_location);
}
void LocationEdit::focusInEvent(QFocusEvent* event)