Ladybird: Simplify the LocationEdit
constructor
This commit is contained in:
parent
0da5af0eff
commit
c53d3e7aa4
Notes:
sideshowbarker
2024-07-17 02:35:27 +09:00
Author: https://github.com/cammo1123 Commit: https://github.com/SerenityOS/serenity/commit/c53d3e7aa4 Pull-request: https://github.com/SerenityOS/serenity/pull/19064 Reviewed-by: https://github.com/AtkinsSJ
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