Forward "_q_platform_*" QWidgets's properties to QWindow.

This way we can customize QPlatformWindow by using
dynamic "_q_platform_" properties in corresponding
QWindow.

Change-Id: I987b7a17d252541fe766af6aa37a6cffb67f1807
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
bb10
Tomasz Olszak 2014-01-08 21:58:16 +01:00 committed by The Qt Project
parent 7d012552b0
commit 041c4d9c0b
2 changed files with 7 additions and 0 deletions

View File

@ -8358,6 +8358,8 @@ bool QWidget::event(QEvent *event)
d->extra->customDpiY = value;
d->updateFont(d->data.fnt);
}
if (windowHandle() && !qstrncmp(propName, "_q_platform_", 12))
windowHandle()->setProperty(propName, property(propName));
// fall through
}
#endif

View File

@ -110,6 +110,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
win = topData()->window;
}
foreach (const QByteArray &propertyName, q->dynamicPropertyNames()) {
if (!qstrncmp(propertyName, "_q_platform_", 12))
win->setProperty(propertyName, q->property(propertyName));
}
win->setFlags(data.window_flags);
fixPosIncludesFrame();
if (q->testAttribute(Qt::WA_Moved)