Move notification of layout change up from QApplication to QGuiApplication.
QGuiApplication-using things (like QtQuick) need to know about this, too -- this makes QGuiApplication::setLayoutDirection actually work. Task-number: QTBUG-21573 Change-Id: I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
parent
7009843ae3
commit
2f284d3632
@ -2548,6 +2548,11 @@ void QGuiApplication::setFont(const QFont &font)
|
||||
|
||||
void QGuiApplicationPrivate::notifyLayoutDirectionChange()
|
||||
{
|
||||
const QWindowList list = QGuiApplication::topLevelWindows();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QEvent ev(QEvent::ApplicationLayoutDirectionChange);
|
||||
QCoreApplication::sendEvent(list.at(i), &ev);
|
||||
}
|
||||
}
|
||||
|
||||
void QGuiApplicationPrivate::notifyActiveWindowChange(QWindow *)
|
||||
|
@ -1888,16 +1888,6 @@ bool QApplication::event(QEvent *e)
|
||||
\obsolete
|
||||
*/
|
||||
|
||||
void QApplicationPrivate::notifyLayoutDirectionChange()
|
||||
{
|
||||
QWidgetList list = QApplication::topLevelWidgets();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QWidget *w = list.at(i);
|
||||
QEvent ev(QEvent::ApplicationLayoutDirectionChange);
|
||||
QCoreApplication::sendEvent(w, &ev);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void QApplication::setActiveWindow(QWidget* active)
|
||||
|
||||
|
@ -116,7 +116,6 @@ public:
|
||||
QApplicationPrivate(int &argc, char **argv, int flags);
|
||||
~QApplicationPrivate();
|
||||
|
||||
virtual void notifyLayoutDirectionChange();
|
||||
virtual void notifyActiveWindowChange(QWindow *);
|
||||
|
||||
virtual bool shouldQuit();
|
||||
|
Loading…
Reference in New Issue
Block a user