Split some of the autotests into widget and non widget parts.

Since the tests are mostly not widget based.

Change-Id: Ic3fa4224b19f2a5c710fd4763b5e645252975c1c
Reviewed-on: http://codereview.qt-project.org/4174
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
Michael Goddard
2011-09-05 16:13:46 +10:00
committed by Qt by Nokia
parent 461a37b412
commit d690596868
30 changed files with 856 additions and 146 deletions

View File

@@ -55,7 +55,10 @@
#include "../qmultimedia_common/mockcameracontrol.h"
#include "../qmultimedia_common/mockvideosurface.h"
#include "../qmultimedia_common/mockvideorenderercontrol.h"
#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
#include "../qmultimedia_common/mockvideowindowcontrol.h"
#endif
class MockSimpleCameraService : public QMediaService
{
@@ -102,7 +105,9 @@ public:
mockImageProcessingControl = new MockImageProcessingControl(this);
mockImageEncoderControl = new MockImageEncoderControl(this);
rendererControl = new MockVideoRendererControl(this);
#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
windowControl = new MockVideoWindowControl(this);
#endif
rendererRef = 0;
windowRef = 0;
}
@@ -148,12 +153,15 @@ public:
rendererRef += 1;
return rendererControl;
}
} else if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
}
#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
if (windowRef == 0) {
windowRef += 1;
return windowControl;
}
}
#endif
return 0;
}
@@ -161,8 +169,10 @@ public:
{
if (control == rendererControl)
rendererRef -= 1;
else if (control == windowControl)
#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
if (control == windowControl)
windowRef -= 1;
#endif
}
MockCameraControl *mockControl;
@@ -176,7 +186,9 @@ public:
MockImageProcessingControl *mockImageProcessingControl;
MockImageEncoderControl *mockImageEncoderControl;
MockVideoRendererControl *rendererControl;
#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
MockVideoWindowControl *windowControl;
#endif
int rendererRef;
int windowRef;
};