summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-27 18:28:12 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-27 18:28:12 +0100
commitce6990c3e742e0833df0561246554cf07a888efb (patch)
tree412380582040f5bb314eb90ae029b41a883aa439 /src/widgets/widgets
parent09e674849a40f5eb7e9f95fd2a952c621aec86d1 (diff)
parentfa9bde7d3a12ede956339c570f7b32f95d231e57 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qlineedit.cpp5
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 3db7781acc..5a504a880c 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -712,8 +712,11 @@ QSize QLineEdit::minimumSizeHint() const
ensurePolished();
QFontMetrics fm = fontMetrics();
int h = fm.height() + qMax(2*d->verticalMargin, fm.leading())
+ + d->topTextMargin + d->bottomTextMargin
+ d->topmargin + d->bottommargin;
- int w = fm.maxWidth() + d->leftmargin + d->rightmargin;
+ int w = fm.maxWidth()
+ + d->effectiveLeftTextMargin() + d->effectiveRightTextMargin()
+ + d->leftmargin + d->rightmargin;
QStyleOptionFrame opt;
initStyleOption(&opt);
return (style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(w, h).
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 982cc40b3d..871bf1eba1 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -2480,6 +2480,7 @@ void CloseButton::paintEvent(QPaintEvent *)
style()->drawPrimitive(QStyle::PE_IndicatorTabClose, &opt, &p, this);
}
+#ifndef QT_NO_ANIMATION
void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant &current)
{
priv->moveTab(priv->tabList.indexOf(*tab), current.toInt());
@@ -2489,6 +2490,7 @@ void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State
{
if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab));
}
+#endif
QT_END_NAMESPACE