mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Ladybird: Simplify the LocationEdit
constructor
This commit is contained in:
parent
0da5af0eff
commit
c53d3e7aa4
1 changed files with 2 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue