diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-05-23 11:15:21 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-05-23 09:20:18 +0000 |
commit | bac9cc5b55294655ba08f424f402d21f46c00c15 (patch) | |
tree | b8274925e1d844816ca82ac722fe4cd083bd8e9a /src/controls | |
parent | 3e7f217b9e858b34b11bb641cabce275fdc96d1d (diff) |
Fix Control::mirroredChanged() emission
It was emitted only when LayoutMirroring.enabled changed, but
it also needs to be emitted when layoutDirection changes...
Change-Id: I9424fdf232c11669780c9abace5c162a0df69dbe
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls')
-rw-r--r-- | src/controls/qquickcontrol.cpp | 6 | ||||
-rw-r--r-- | src/controls/qquickprogressbar.cpp | 1 | ||||
-rw-r--r-- | src/controls/qquickslider.cpp | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/controls/qquickcontrol.cpp b/src/controls/qquickcontrol.cpp index 44da18c6..26e68b9f 100644 --- a/src/controls/qquickcontrol.cpp +++ b/src/controls/qquickcontrol.cpp @@ -60,8 +60,6 @@ void QQuickControlPrivate::mirrorChange() { Q_Q(QQuickControl); q->mirrorChange(); - emit q->effectiveLayoutDirectionChanged(); - emit q->mirroredChanged(); } qreal QQuickControlPrivate::getContentWidth() const @@ -316,7 +314,7 @@ void QQuickControl::setLayoutDirection(Qt::LayoutDirection direction) if (d->layoutDirection != direction) { d->layoutDirection = direction; emit layoutDirectionChanged(); - emit effectiveLayoutDirectionChanged(); + mirrorChange(); } } @@ -370,6 +368,8 @@ void QQuickControl::geometryChanged(const QRectF &newGeometry, const QRectF &old void QQuickControl::mirrorChange() { + emit effectiveLayoutDirectionChanged(); + emit mirroredChanged(); } void QQuickControl::paddingChange() diff --git a/src/controls/qquickprogressbar.cpp b/src/controls/qquickprogressbar.cpp index 41fe8920..b6df343e 100644 --- a/src/controls/qquickprogressbar.cpp +++ b/src/controls/qquickprogressbar.cpp @@ -145,6 +145,7 @@ void QQuickProgressBar::setIndicator(QQuickItem *indicator) void QQuickProgressBar::mirrorChange() { + QQuickControl::mirrorChange(); emit visualPositionChanged(); } diff --git a/src/controls/qquickslider.cpp b/src/controls/qquickslider.cpp index 1959140e..3f60fc95 100644 --- a/src/controls/qquickslider.cpp +++ b/src/controls/qquickslider.cpp @@ -412,6 +412,7 @@ void QQuickSlider::mouseUngrabEvent() void QQuickSlider::mirrorChange() { + QQuickControl::mirrorChange(); emit visualPositionChanged(); } |