diff options
author | Albert Astals Cid <aacid@kde.org> | 2015-11-19 00:33:10 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2015-11-30 19:05:37 +0000 |
commit | 5af6efc911f80b6d8dea4d29879cc9e76da492e6 (patch) | |
tree | 460a7120320af3c5ce00fd3a21bb0793210c9c64 /src/plugins | |
parent | 7733a5fccc39aa5141e5968eef3fa47bc62917d9 (diff) |
Call setLayoutDirection() in QGuiApplicationPrivate::init() if not called before
Without this patch, setLayoutDirection() is called only by LanguageChange
event handling, which triggers only upon installing, removing, or clearing
QTranslators.
This caused two problems:
* If the QTranslators are installed in a Q_COREAPP_STARTUP_FUNCTION the
event is lost since the QGuiApplication is still not there.
* If the application doesn't use QTranslators at all, i.e., uses gettext,
some other translation system, or because it has no messages at all,
setLayoutDirection() is never called and the layout direction is wrong.
The initialization of layout_direction has been changed from
Qt::LeftToRight to Qt::LayoutDirectionAuto but that has no
impact since QGuiApplication::layoutDirection will make sure
Qt::LeftToRight is returned if layout_direction has still not been set.
Change-Id: Ic60fe9a318c8afe1c503e3796ec54cfc687e7164
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/plugins')
0 files changed, 0 insertions, 0 deletions