summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-11-10 13:35:42 +0100
committerSamuel Rødal <sroedal@trolltech.com>2009-11-10 13:52:35 +0100
commit637d6b26d778189a767e28b80aa316cf327e67a2 (patch)
tree8ac632c593c4f2827d9a95bc6bba4d82467c24ff /tests/auto
parentdc551cdc3422631baab50860c1a46711e3079f18 (diff)
Improvements to graphics effects API after review round.
* Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index b40cf431ba..d21692431f 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -49,6 +49,7 @@
#include <QtGui/qstyleoption.h>
#include "../../shared/util.h"
+#include <private/qgraphicseffect_p.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -131,16 +132,16 @@ public:
int margin() const
{ return m_margin; }
- void draw(QPainter *painter, QGraphicsEffectSource *source)
+ void draw(QPainter *painter)
{
++numRepaints;
if (doNothingInDraw)
return;
- m_source = source;
+ m_source = source();
m_painter = painter;
- m_styleOption = source->styleOption();
+ m_styleOption = source()->styleOption();
m_opacity = painter->opacity();
- source->draw(painter);
+ drawSource(painter);
}
void sourceChanged(QGraphicsEffect::ChangeFlags flags)