summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-05 21:28:41 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-05 21:28:41 (GMT)
commit941b13d52d975069d10093a873cd3a55bb2fd7dd (patch)
treebb66b6379a551808e76de8c936e03bc9432613f5 /src/gui/painting
parent777bf47da36292ffd37ae48a19796aafeb4d922e (diff)
parent2bc5d161e6820d459f00ac687ed99830a731cb74 (diff)
downloadQt-941b13d52d975069d10093a873cd3a55bb2fd7dd.zip
Qt-941b13d52d975069d10093a873cd3a55bb2fd7dd.tar.gz
Qt-941b13d52d975069d10093a873cd3a55bb2fd7dd.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (49 commits) Fixed qt_x11_wait_for_window_manager Revert change 34f1758 on non-Synbian platforms Fixed QGifHandler::loopCount(). Fix tst_QAccessiblity failure. fix compile error when linuxinput keyboard driver is compiled as plugin Fixed the context menu test case in the qgraphicsscene autotest. fix regression from Qt 4.5 wrt missing text pixels in QTabBar Cleanup after "Changed qgraphicswidget autotest to use qWaitForWindowShown" Cleanup after "QGraphicsWidget is painted twice on the first show" Changed qgraphicswidget autotest to use qWaitForWindowShown. Improved QTest::qWaitForWindowShown on X11. Stabilize tst_QGraphicsWidget::initialShow2 (new test) Make sure we define S_IFDIR on Windows Fix copy/pasto Crash when closing any top-level widget on Symbian. Cache the sizes of the images in an animated GIF. Fix the QAbstractSlider autotest. Use OpenVG scissor on 90/180/270 rotations and simple clips. Optimize single-rect IntersectClip in OpenVG using the scissor QGraphicsWidget is painted twice on the first show. ...
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpainter.cpp4
-rw-r--r--src/gui/painting/qpathclipper.cpp6
-rw-r--r--src/gui/painting/qpathclipper_p.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index cde6a2d..bf12c6b 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -7509,7 +7509,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset)
return widgetPrivate->redirected(offset);
}
- if (*globalRedirectionAtomic() == 0)
+ if (!globalRedirectionAtomic() || *globalRedirectionAtomic() == 0)
return 0;
QMutexLocker locker(globalRedirectionsMutex());
@@ -7529,7 +7529,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset)
void qt_painter_removePaintDevice(QPaintDevice *dev)
{
- if (*globalRedirectionAtomic() == 0)
+ if (!globalRedirectionAtomic() || *globalRedirectionAtomic() == 0)
return;
QMutex *mutex = 0;
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 7997e77..bc81514 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -90,8 +90,6 @@ static QPointF normalize(const QPointF &p)
return p / qSqrt(p.x() * p.x() + p.y() * p.y());
}
-static bool pathToRect(const QPainterPath &path, QRectF *rect = 0);
-
struct QIntersection
{
qreal alphaA;
@@ -1660,7 +1658,7 @@ static bool fuzzyCompare(qreal a, qreal b)
return qFuzzyCompare(a, b);
}
-static bool pathToRect(const QPainterPath &path, QRectF *rect)
+bool QPathClipper::pathToRect(const QPainterPath &path, QRectF *rect)
{
if (path.elementCount() != 5)
return false;
@@ -1693,7 +1691,7 @@ static bool pathToRect(const QPainterPath &path, QRectF *rect)
return false;
if (rect)
- *rect = QRectF(QPointF(x1, y1), QPointF(x2, y2));
+ rect->setCoords(x1, y1, x2, y2);
return true;
}
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index 0d2c049..b900862 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -86,6 +86,8 @@ public:
bool intersect();
bool contains();
+ static bool pathToRect(const QPainterPath &path, QRectF *rect = 0);
+
private:
Q_DISABLE_COPY(QPathClipper)