Commit 72246866 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

SearchResultWidget: Style cleanup

* Use Qt5-style connect
* Fix spacing around braces
* Remove empty destructor

Change-Id: I38373aaa45e84e8d8219aea2d672df0f817d8d65
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent bab7c809
......@@ -60,22 +60,23 @@ using namespace Utils;
namespace Core {
namespace Internal {
class WideEnoughLineEdit : public QLineEdit {
class WideEnoughLineEdit : public QLineEdit
{
Q_OBJECT
public:
WideEnoughLineEdit(QWidget *parent):QLineEdit(parent){
connect(this, SIGNAL(textChanged(QString)),
this, SLOT(updateGeometry()));
WideEnoughLineEdit(QWidget *parent) : QLineEdit(parent)
{
connect(this, &QLineEdit::textChanged, this, &QLineEdit::updateGeometry);
}
~WideEnoughLineEdit(){}
QSize sizeHint() const {
QSize sizeHint() const
{
QSize sh = QLineEdit::minimumSizeHint();
sh.rwidth() += qMax(25 * fontMetrics().width(QLatin1Char('x')),
fontMetrics().width(text()));
return sh;
}
public slots:
void updateGeometry() { QLineEdit::updateGeometry(); }
};
SearchResultWidget::SearchResultWidget(QWidget *parent) :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment