Fix compilation of QtOpenGL.

This commit is contained in:
Samuel Rødal 2011-05-04 13:14:33 +02:00
parent f838dcc050
commit 9631f6314c
2 changed files with 4 additions and 4 deletions

View File

@ -2357,8 +2357,8 @@ void QGL2PaintEngineExPrivate::systemStateChanged()
if (systemClip.isEmpty()) {
useSystemClip = false;
} else {
if (q->paintDevice()->devType() == QInternal::Widget && currentClipWidget) {
QWidgetPrivate *widgetPrivate = qt_widget_private(currentClipWidget->window());
if (q->paintDevice()->devType() == QInternal::Widget && currentClipDevice) {
QWidgetPrivate *widgetPrivate = qt_widget_private(static_cast<QWidget *>(currentClipDevice)->window());
useSystemClip = widgetPrivate->extra && widgetPrivate->extra->inRenderWithPainter;
} else {
useSystemClip = true;

View File

@ -2358,8 +2358,8 @@ void QOpenGLPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOpe
} else {
#ifndef Q_WS_QWS
// Only use the system clip if we're currently rendering a widget with a GL painter.
if (d->currentClipWidget) {
QWidgetPrivate *widgetPrivate = qt_widget_private(d->currentClipWidget->window());
if (d->currentClipDevice) {
QWidgetPrivate *widgetPrivate = qt_widget_private(static_cast<QWidget *>(d->currentClipDevice)->window());
d->use_system_clip = widgetPrivate->extra && widgetPrivate->extra->inRenderWithPainter;
}
#endif