diff options
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 2 | ||||
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 6 | ||||
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qwidgetanimator.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/qwidgetanimator_p.h | 1 | ||||
-rw-r--r-- | tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp | 4 |
6 files changed, 11 insertions, 13 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index fb2dd77..686b56f 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1937,7 +1937,7 @@ void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook { signalHooks.insertMulti(key, hook); connect(hook.obj, SIGNAL(destroyed(QObject*)), SLOT(objectDestroyed(QObject*)), - Qt::DirectConnection); + Qt::ConnectionType(Qt::DirectConnection | Qt::UniqueConnection)); MatchRefCountHash::iterator it = matchRefCounts.find(hook.matchRule); diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 3856293..a3cbc0d 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -2113,6 +2113,12 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie if (vi < 0) vi = qMax(0, d->viewIndex(current)); + if (isRightToLeft()) { + if (cursorAction == MoveRight) + cursorAction = MoveLeft; + else if (cursorAction == MoveLeft) + cursorAction = MoveRight; + } switch (cursorAction) { case MoveNext: case MoveDown: diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index ae1d33a..32f259b 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3370,7 +3370,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q if (rule.hasPosition() && rule.position()->textAlignment != 0) { Qt::Alignment textAlignment = rule.position()->textAlignment; QRect textRect = button->rect; - uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic; + uint tf = Qt::TextShowMnemonic; + const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft; + tf |= (textAlignment & verticalAlignMask) ? (textAlignment & verticalAlignMask) : Qt::AlignVCenter; if (!styleHint(SH_UnderlineShortcut, button, w)) tf |= Qt::TextHideMnemonic; if (!button->icon.isNull()) { diff --git a/src/gui/widgets/qwidgetanimator.cpp b/src/gui/widgets/qwidgetanimator.cpp index f440961..4a7ae00 100644 --- a/src/gui/widgets/qwidgetanimator.cpp +++ b/src/gui/widgets/qwidgetanimator.cpp @@ -88,8 +88,6 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo const QRect final_geometry = _final_geometry.isValid() || widget->isWindow() ? _final_geometry : QRect(QPoint(-500 - widget->width(), -500 - widget->height()), widget->size()); - if (r == final_geometry) - return; //the widget is already where it should be #ifndef QT_NO_ANIMATION AnimationMap::const_iterator it = m_animation_map.constFind(widget); if (it != m_animation_map.constEnd() && (*it)->endValue().toRect() == final_geometry) @@ -114,9 +112,4 @@ bool QWidgetAnimator::animating() const return !m_animation_map.isEmpty(); } -bool QWidgetAnimator::animating(QWidget *widget) const -{ - return m_animation_map.contains(widget); -} - QT_END_NAMESPACE diff --git a/src/gui/widgets/qwidgetanimator_p.h b/src/gui/widgets/qwidgetanimator_p.h index 68d9344..095380f 100644 --- a/src/gui/widgets/qwidgetanimator_p.h +++ b/src/gui/widgets/qwidgetanimator_p.h @@ -70,7 +70,6 @@ public: QWidgetAnimator(QMainWindowLayout *layout); void animate(QWidget *widget, const QRect &final_geometry, bool animate); bool animating() const; - bool animating(QWidget *widget) const; void abort(QWidget *widget); diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 1c7a159..1a19162 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -1715,8 +1715,6 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout() QCOMPARE(widgets[item.index]->geometry(), item.rect); } - // ###: not supported yet -/* // Test mirrored mode widget->setLayoutDirection(Qt::RightToLeft); layout->activate(); @@ -1731,7 +1729,7 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout() QCOMPARE(widgets[item.index]->geometry(), mirroredRect); delete widgets[item.index]; } -*/ + delete widget; } |