diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-07-01 09:17:57 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-07-01 09:28:48 (GMT) |
commit | 47589ccc85c4aa2f40d7ceb5f0363b76b782198a (patch) | |
tree | 707c72b120f0e66995df1d4e1ffe38ba63fe620a | |
parent | 76274d40569f45cec50ad5df8646e09e40117007 (diff) | |
download | Qt-47589ccc85c4aa2f40d7ceb5f0363b76b782198a.zip Qt-47589ccc85c4aa2f40d7ceb5f0363b76b782198a.tar.gz Qt-47589ccc85c4aa2f40d7ceb5f0363b76b782198a.tar.bz2 |
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
-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 6396e44..dba8a64 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); |