mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Follow project coding style. Issue #2192.
This commit is contained in:
parent
3a6a857371
commit
5774d27c7b
2 changed files with 41 additions and 41 deletions
|
@ -37,7 +37,7 @@ LineEdit::LineEdit(QWidget *parent)
|
||||||
clearButton->setToolTip(tr("Clear the text"));
|
clearButton->setToolTip(tr("Clear the text"));
|
||||||
clearButton->hide();
|
clearButton->hide();
|
||||||
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
||||||
connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateCloseButton(const QString&)));
|
connect(this, SIGNAL(textChanged(const QString &)), this, SLOT(updateCloseButton(const QString &)));
|
||||||
|
|
||||||
clearButtonSizeHintWidth = clearButton->sizeHint().width();
|
clearButtonSizeHintWidth = clearButton->sizeHint().width();
|
||||||
clearButtonSizeHintHeight = clearButton->sizeHint().height();
|
clearButtonSizeHintHeight = clearButton->sizeHint().height();
|
||||||
|
@ -65,7 +65,7 @@ void LineEdit::resizeEvent(QResizeEvent *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QBT_USES_QT5
|
#ifndef QBT_USES_QT5
|
||||||
void LineEdit::updateCloseButton(const QString& text)
|
void LineEdit::updateCloseButton(const QString &text)
|
||||||
{
|
{
|
||||||
clearButton->setVisible(!text.isEmpty());
|
clearButton->setVisible(!text.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue