summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-10-16 10:43:07 +0300
committerOrgad Shaneh <orgads@gmail.com>2015-10-16 08:26:48 +0000
commit72246866c3e1672d1718f7d134ad429e8f21aa0e (patch)
tree7712873003ee5e96b269c0d3b36fdda1a9140f88
parentbab7c80976f08ee6c809d65d866642ec9ce42be9 (diff)
downloadqt-creator-72246866c3e1672d1718f7d134ad429e8f21aa0e.tar.gz
SearchResultWidget: Style cleanup
* Use Qt5-style connect * Fix spacing around braces * Remove empty destructor Change-Id: I38373aaa45e84e8d8219aea2d672df0f817d8d65 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
-rw-r--r--src/plugins/coreplugin/find/searchresultwidget.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/coreplugin/find/searchresultwidget.cpp b/src/plugins/coreplugin/find/searchresultwidget.cpp
index 91184dd73f..52562c0bfc 100644
--- a/src/plugins/coreplugin/find/searchresultwidget.cpp
+++ b/src/plugins/coreplugin/find/searchresultwidget.cpp
@@ -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) :