mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00: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)
|
: QLineEdit(parent)
|
||||||
{
|
{
|
||||||
setPlaceholderText("Enter web address");
|
setPlaceholderText("Enter web address");
|
||||||
connect(this, &QLineEdit::returnPressed, this, [&] {
|
connect(this, &QLineEdit::editingFinished, this, &LocationEdit::clearFocus);
|
||||||
clearFocus();
|
connect(this, &QLineEdit::textChanged, this, &LocationEdit::highlight_location);
|
||||||
});
|
|
||||||
|
|
||||||
connect(this, &QLineEdit::textChanged, this, [&] {
|
|
||||||
highlight_location();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocationEdit::focusInEvent(QFocusEvent* event)
|
void LocationEdit::focusInEvent(QFocusEvent* event)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue