summaryrefslogtreecommitdiffstats
path: root/qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp
diff options
context:
space:
mode:
authorIndrajit Tapadar <indrajit.tapadar@digia.com>2013-02-12 11:06:09 +0100
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2013-02-13 08:38:57 +0100
commitb34896c550d16a826e994d31bb265d6b8d9b6a24 (patch)
treeea7979ff97f017bf03d0fbe6f7cc46c4d2119120 /qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp
parenteec6ad941af331d180a1f4eb77389faf17020649 (diff)
Fix compile errors for qtpropertybrowser.
The compilation of QPropertybrowser as a DLL failed on linux for Qt5, because of a couple of deprecated API's, QRect::intersect() is replaced with QRect::intersected() and qVariantValue() macro replaced with Qvariant::Value(). Change-Id: I24acefe8ec9c288691ae807f27d2bdab385629f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp')
-rw-r--r--qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp b/qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp
index ee50ca6..55aad15 100644
--- a/qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp
+++ b/qtpropertybrowser/examples/canvas_variant/qtcanvas.cpp
@@ -1010,7 +1010,7 @@ void QtCanvas::setAllChanged()
*/
void QtCanvas::setChanged(const QRect& area)
{
- QRect thearea = area.intersect(QRect(0, 0, width(), height()));
+ QRect thearea = area.intersected(QRect(0, 0, width(), height()));
int mx = (thearea.x()+thearea.width()+chunksize)/chunksize;
int my = (thearea.y()+thearea.height()+chunksize)/chunksize;
@@ -1037,7 +1037,7 @@ void QtCanvas::setChanged(const QRect& area)
*/
void QtCanvas::setUnchanged(const QRect& area)
{
- QRect thearea = area.intersect(QRect(0, 0, width(), height()));
+ QRect thearea = area.intersected(QRect(0, 0, width(), height()));
int mx = (thearea.x()+thearea.width()+chunksize)/chunksize;
int my = (thearea.y()+thearea.height()+chunksize)/chunksize;
@@ -1114,7 +1114,7 @@ void QtCanvas::drawArea(const QRect& clip, QPainter* painter, bool dbuf)
*/
void QtCanvas::drawCanvasArea(const QRect& inarea, QPainter* p, bool /*double_buffer*/)
{
- QRect area = inarea.intersect(QRect(0, 0, width(), height()));
+ QRect area = inarea.intersected(QRect(0, 0, width(), height()));
if (!p) return; // Nothing to do.
@@ -1996,7 +1996,7 @@ bool qt_testCollision(const QtCanvasSprite* s1, const QtCanvasSprite* s2)
QRect s1area = s1->boundingRectAdvanced();
- QRect ourarea = s1area.intersect(cyourarea);
+ QRect ourarea = s1area.intersected(cyourarea);
if (ourarea.isEmpty())
return false;
@@ -3567,7 +3567,7 @@ public:
{
QRect pixelbounds = pa.boundingRect();
int cs = canvas->chunkSize();
- QRect canvasbounds = pixelbounds.intersect(canvas->rect());
+ QRect canvasbounds = pixelbounds.intersected(canvas->rect());
bounds.setLeft(canvasbounds.left()/cs);
bounds.setRight(canvasbounds.right()/cs);
bounds.setTop(canvasbounds.top()/cs);