diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-07-01 10:17:57 +0100 |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-07-01 10:28:48 +0100 |
commit | 47589ccc85c4aa2f40d7ceb5f0363b76b782198a (patch) | |
tree | 707c72b120f0e66995df1d4e1ffe38ba63fe620a /tests/auto | |
parent | 76274d40569f45cec50ad5df8646e09e40117007 (diff) | |
download | qt4-tools-47589ccc85c4aa2f40d7ceb5f0363b76b782198a.tar.gz |
Fix RVCT compile error in QGraphicsSceneIndex autotest
The test code used the 'using' keyword to try and change access control
of a base class method from protected to public.
With the RVCT 2.2 compiler, 'using' imports the function(s) from the base
class, but they retain their existing access control.
Used an inline public function to call the base class as a workaround
Reviewed-by: mread
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp index 6396e441e4..dba8a641b0 100644 --- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp +++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp @@ -224,7 +224,18 @@ void tst_QGraphicsSceneIndex::connectedToSceneRectChanged() { class MyScene : public QGraphicsScene - { public: using QGraphicsScene::receivers; }; + { + public: +#ifdef Q_CC_RVCT + //using keyword doesn't change visibility to public in RVCT2.2 compiler + inline int receivers(const char* signal) const + { + return QGraphicsScene::receivers(signal); + } +#else + using QGraphicsScene::receivers; +#endif + }; MyScene scene; // Uses QGraphicsSceneBspTreeIndex by default. QCOMPARE(scene.receivers(SIGNAL(sceneRectChanged(const QRectF&))), 1); |