diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-08-06 14:19:18 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-08-06 14:19:18 (GMT) |
commit | af44be42cfacb85ef783cdd051f5d106d25c6b50 (patch) | |
tree | af5c1fa48b837eab8636b734b70e1c8b97bf8d51 /tools/designer/src/lib/shared/actionprovider_p.h | |
parent | 443a7b6f3eb1191b20240b5068da386d669045fc (diff) | |
download | Qt-af44be42cfacb85ef783cdd051f5d106d25c6b50.zip Qt-af44be42cfacb85ef783cdd051f5d106d25c6b50.tar.gz Qt-af44be42cfacb85ef783cdd051f5d106d25c6b50.tar.bz2 |
Designer: Cannot edit menus in an RTL form when Designer uses LTR.
Use widget->layoutDirection() instead of QApplication::layoutDirection()
where applicable, which caused it to break for the case that Designer's
layoutDirection does not match that of a widget [property].
In addition, position the submenu correctly on the left side in the case
of RTL.
Reviewed-by: Jarek Kobus <jkobus@trolltech.com>
Task-number: 259238
Diffstat (limited to 'tools/designer/src/lib/shared/actionprovider_p.h')
-rw-r--r-- | tools/designer/src/lib/shared/actionprovider_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/designer/src/lib/shared/actionprovider_p.h b/tools/designer/src/lib/shared/actionprovider_p.h index b43dee9..5f9b7a0 100644 --- a/tools/designer/src/lib/shared/actionprovider_p.h +++ b/tools/designer/src/lib/shared/actionprovider_p.h @@ -86,7 +86,7 @@ template <class Widget> // actionGeometry() can be wrong sometimes; it returns a geometry that // stretches to the end of the toolbar/menu bar. So, check from the beginning // in the case of a horizontal right-to-left orientation. - const bool checkTopRight = orientation == Qt::Horizontal && QApplication::layoutDirection() == Qt::RightToLeft; + const bool checkTopRight = orientation == Qt::Horizontal && w->layoutDirection() == Qt::RightToLeft; const QPoint topRight = QPoint(w->rect().width(), 0); for (int index = 0; index < actionCount; ++index) { QRect g = w->actionGeometry(actions.at(index)); |