summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qitemeditorfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qitemeditorfactory.cpp')
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index 2d49dd4421..8ed2ee5f28 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -570,11 +570,9 @@ void QExpandingLineEdit::changeEvent(QEvent *e)
void QExpandingLineEdit::updateMinimumWidth()
{
- int left, right;
- getTextMargins(&left, 0, &right, 0);
- int width = left + right + 4 /*horizontalMargin in qlineedit.cpp*/;
- getContentsMargins(&left, 0, &right, 0);
- width += left + right;
+ const QMargins tm = textMargins();
+ const QMargins cm = contentsMargins();
+ const int width = tm.left() + tm.right() + cm.left() + cm.right() + 4 /*horizontalMargin in qlineedit.cpp*/;
QStyleOptionFrame opt;
initStyleOption(&opt);