diff options
author | Maks Naumov <maksqwe1@ukr.net> | 2014-09-02 22:53:35 +0300 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-03 13:30:12 +0200 |
commit | 7af329fdf2ab25c38858fed8bb33e4fa0200766f (patch) | |
tree | 55eb5f54d4e0661c7d6aaafa520789c750e2900c /src/widgets/widgets/qlineedit.cpp | |
parent | 4dae1a685c3d78fa0601e8490117e9a62336c398 (diff) |
Widgets: remove pointless assignments
Assignment of a value was two times successively for same variable while
the variable itself is not used between these assignments.
Change-Id: I3c457e3af0505d32a64f6c8576b458cd15a951e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index b6b7ffb1a2..461be744ff 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1877,14 +1877,12 @@ void QLineEdit::paintEvent(QPaintEvent *) { Q_D(QLineEdit); QPainter p(this); - - QRect r = rect(); QPalette pal = palette(); QStyleOptionFrameV2 panel; initStyleOption(&panel); style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, &p, this); - r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this); + QRect r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this); r.setX(r.x() + d->effectiveLeftTextMargin()); r.setY(r.y() + d->topTextMargin); r.setRight(r.right() - d->effectiveRightTextMargin()); |