diff options
author | Debao Zhang <dbzhang800@gmail.com> | 2012-03-23 18:19:27 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-28 11:22:11 +0200 |
commit | d2b1c2ef1f1fea3200d8dee5c58fe79649fd13bb (patch) | |
tree | 2508abaa6383ff619546eb6afb4514c146ac92ed /src/gui | |
parent | 5e80eb7917c5b4d319766a3cf5122391f54c40a7 (diff) |
Remove WA_PaintOutsidePaintEvent
WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code
to Qt 4 under X11 platform. and it has been broken now.
Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index eafbe87b31..2752fbd573 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -970,10 +970,7 @@ void QPainterPrivate::updateState(QPainterState *newState) \warning When the paintdevice is a widget, QPainter can only be used inside a paintEvent() function or in a function called by - paintEvent(); that is unless the Qt::WA_PaintOutsidePaintEvent - widget attribute is set. On Mac OS X and Windows, you can only - paint in a paintEvent() function regardless of this attribute's - setting. + paintEvent(). \tableofcontents @@ -1760,25 +1757,6 @@ bool QPainter::begin(QPaintDevice *pd) d->engine->state = d->state; switch (pd->devType()) { -#if 0 - // is this needed any more?? - case QInternal::Widget: - { - const QWidget *widget = static_cast<const QWidget *>(pd); - Q_ASSERT(widget); - - const bool paintOutsidePaintEvent = widget->testAttribute(Qt::WA_PaintOutsidePaintEvent); - const bool inPaintEvent = widget->testAttribute(Qt::WA_WState_InPaintEvent); - - // Adjust offset for alien widgets painting outside the paint event. - if (!inPaintEvent && paintOutsidePaintEvent && !widget->internalWinId() - && widget->testAttribute(Qt::WA_WState_Created)) { - const QPoint offset = widget->mapTo(widget->nativeParentWidget(), QPoint()); - d->state->redirectionMatrix.translate(offset.x(), offset.y()); - } - break; - } -#endif case QInternal::Pixmap: { QPixmap *pm = static_cast<QPixmap *>(pd); |