summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-09-17 13:51:06 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-23 12:39:26 (GMT)
commitc85d1764d713722f1bb1108087d41ff7904ab3cb (patch)
treef7c2cc12df6fa4c7b38a4fbfd8e383fe77405b79 /src/3rdparty/phonon/mmf
parentcabf0776a3e879aa80e4dc01fd470248c429d9b0 (diff)
downloadQt-c85d1764d713722f1bb1108087d41ff7904ab3cb.zip
Qt-c85d1764d713722f1bb1108087d41ff7904ab3cb.tar.gz
Qt-c85d1764d713722f1bb1108087d41ff7904ab3cb.tar.bz2
Removed temporary hacks used during initial development of video widget
Diffstat (limited to 'src/3rdparty/phonon/mmf')
-rw-r--r--src/3rdparty/phonon/mmf/defs.h14
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp10
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.h2
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.cpp14
4 files changed, 1 insertions, 39 deletions
diff --git a/src/3rdparty/phonon/mmf/defs.h b/src/3rdparty/phonon/mmf/defs.h
index d5301d2..348a40f 100644
--- a/src/3rdparty/phonon/mmf/defs.h
+++ b/src/3rdparty/phonon/mmf/defs.h
@@ -24,20 +24,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
// The following macros are for switching on / off various bits of code,
// in order to debug the current problems with video visibility.
-// If this is defined, then VideoOutput is essentially just a typedef for
-// QWidget. This is to allow us to test whether the QWidget function
-// overrides present in VideoOutput (e.g. sizeHint, paintEvent etc) may
-// be the cause of the visibility problems.
-//#define PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
-
-// Use hard-coded rectangle coordinates, rather than using CCoeControl
-// rect, i.e. QWidget::winId()->Rect()
-//#define PHONON_MMF_HARD_CODE_VIDEO_RECT
-
-// Hack to make the video invisible. This is used in order to debug
-// problems caused by the window-owning control change.
-//#define PHONON_MMF_HARD_CODE_VIDEO_RECT_TO_EMPTY
-
// Defining this macro causes VideoOutput::paintEvent to write transparent
// alpha values directly into the backing store, rather than using QPainter
//#define PHONON_MMF_DIRECT_WRITE_ALPHA
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index b1a2b4f..c2bd775 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -52,12 +52,10 @@ MMF::VideoOutput::VideoOutput(QWidget* parent)
TRACE_CONTEXT(VideoOutput::VideoOutput, EVideoInternal);
TRACE_ENTRY("parent 0x%08x", parent);
-#ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
setPalette(QPalette(Qt::black));
setAttribute(Qt::WA_OpaquePaintEvent, true);
setAttribute(Qt::WA_NoSystemBackground, true);
setAutoFillBackground(false);
-#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
dump();
@@ -74,9 +72,6 @@ MMF::VideoOutput::~VideoOutput()
void MMF::VideoOutput::setFrameSize(const QSize& frameSize)
{
-#ifdef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
- Q_UNUSED(frameSize);
-#else
TRACE_CONTEXT(VideoOutput::setFrameSize, EVideoInternal);
TRACE("oldSize %d %d newSize %d %d",
m_frameSize.width(), m_frameSize.height(),
@@ -86,7 +81,6 @@ void MMF::VideoOutput::setFrameSize(const QSize& frameSize)
m_frameSize = frameSize;
updateGeometry();
}
-#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
}
void MMF::VideoOutput::setObserver(VideoOutputObserver* observer)
@@ -102,8 +96,6 @@ void MMF::VideoOutput::setObserver(VideoOutputObserver* observer)
// QWidget
//-----------------------------------------------------------------------------
-#ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
-
QSize MMF::VideoOutput::sizeHint() const
{
// TODO: replace this with a more sensible default
@@ -208,8 +200,6 @@ void MMF::VideoOutput::moveEvent(QMoveEvent* event)
m_observer->videoOutputRegionChanged();
}
-#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
-
//-----------------------------------------------------------------------------
// Private functions
diff --git a/src/3rdparty/phonon/mmf/videooutput.h b/src/3rdparty/phonon/mmf/videooutput.h
index 298b4fe..5a7b9cd 100644
--- a/src/3rdparty/phonon/mmf/videooutput.h
+++ b/src/3rdparty/phonon/mmf/videooutput.h
@@ -44,13 +44,11 @@ public:
void setObserver(VideoOutputObserver* observer);
protected:
-#ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
// Override QWidget functions
QSize sizeHint() const;
void paintEvent(QPaintEvent* event);
void resizeEvent(QResizeEvent* event);
void moveEvent(QMoveEvent* event);
-#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
private:
void dump() const;
diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp
index 827c2a1..e2c0b7d 100644
--- a/src/3rdparty/phonon/mmf/videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer.cpp
@@ -415,24 +415,12 @@ void MMF::VideoPlayer::getNativeWindowSystemHandles()
dumper->dumpObject(output);
#endif
-#ifdef PHONON_MMF_HARD_CODE_VIDEO_RECT
- // HACK: why isn't control->Rect updated following a call to
- // updateGeometry on the parent widget?
- m_windowRect = TRect(0, 100, 320, 250);
- m_clipRect = m_windowRect;
-#else
m_windowRect = TRect(
control->DrawableWindow()->AbsPosition(),
control->DrawableWindow()->Size());
m_clipRect = m_windowRect;
-#endif
-
-#ifdef PHONON_MMF_HARD_CODE_VIDEO_RECT_TO_EMPTY
- m_windowRect = TRect(0, 0, 0, 0);
- m_clipRect = m_windowRect;
-#endif
-
+
TRACE("windowRect %d %d - %d %d",
m_windowRect.iTl.iX, m_windowRect.iTl.iY,
m_windowRect.iBr.iX, m_windowRect.iBr.iY);