From 104adfdb63ec3bfe0afafea5278c45ebb873065d Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Thu, 15 Oct 2009 11:31:11 +0200 Subject: sed -i -e 's/if(/if (/g' `find -name "*.cpp" -or -name "*.h" -or -name "*.pro"` --- src/3rdparty/phonon/mmf/audioplayer.cpp | 4 ++-- src/3rdparty/phonon/mmf/mmf_videoplayer.cpp | 28 +++++++++++----------- .../phonon/mmf/mmfphonondebug/objectdump.cpp | 22 ++++++++--------- .../mmf/mmfphonondebug/objectdump_symbian.cpp | 16 ++++++------- src/3rdparty/phonon/mmf/utils.cpp | 4 ++-- src/3rdparty/phonon/mmf/utils.h | 14 +++++------ src/3rdparty/phonon/mmf/videooutput.cpp | 2 +- 7 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp index ceaf305..1d259a8 100644 --- a/src/3rdparty/phonon/mmf/audioplayer.cpp +++ b/src/3rdparty/phonon/mmf/audioplayer.cpp @@ -213,8 +213,8 @@ void MMF::AudioPlayer::MapcPlayComplete(TInt aError) } /* - if(aError == KErrNone) { - if(m_nextSource.type() == MediaSource::Empty) { + if (aError == KErrNone) { + if (m_nextSource.type() == MediaSource::Empty) { emit finished(); } else { setSource(m_nextSource); diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp index 53bbb77..c05afae 100644 --- a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp @@ -70,7 +70,7 @@ void MMF::VideoPlayer::construct() TRACE_CONTEXT(VideoPlayer::VideoPlayer, EVideoApi); TRACE_ENTRY_0(); - if(m_videoOutput) + if (m_videoOutput) m_videoOutput->setObserver(this); const TInt priority = 0; @@ -122,7 +122,7 @@ void MMF::VideoPlayer::doPlay() TRACE_CONTEXT(VideoPlayer::doPlay, EVideoApi); // See comment in updateMmfOutput - if(m_mmfOutputChangePending) { + if (m_mmfOutputChangePending) { TRACE_0("MMF output change pending - pushing now"); updateMmfOutput(); } @@ -151,7 +151,7 @@ void MMF::VideoPlayer::doSeek(qint64 ms) TRACE_CONTEXT(VideoPlayer::doSeek, EVideoApi); bool wasPlaying = false; - if(state() == PlayingState) { + if (state() == PlayingState) { // The call to SetPositionL does not have any effect if playback is // ongoing, so we pause before seeking. doPause(); @@ -160,8 +160,8 @@ void MMF::VideoPlayer::doSeek(qint64 ms) TRAPD(err, m_player->SetPositionL(TTimeIntervalMicroSeconds(ms * 1000))); - if(KErrNone == err) { - if(wasPlaying) + if (KErrNone == err) { + if (wasPlaying) doPlay(); } else { @@ -251,11 +251,11 @@ void MMF::VideoPlayer::MvpuoPrepareComplete(TInt aError) if (KErrNone == err) { maxVolumeChanged(m_player->MaxVolume()); - if(m_videoOutput) + if (m_videoOutput) m_videoOutput->setFrameSize(m_frameSize); // See comment in updateMmfOutput - if(m_mmfOutputChangePending) { + if (m_mmfOutputChangePending) { TRACE_0("MMF output change pending - pushing now"); updateMmfOutput(); } @@ -330,8 +330,8 @@ void MMF::VideoPlayer::videoOutputRegionChanged() const bool changed = getNativeWindowSystemHandles(); // See comment in updateMmfOutput - if(changed) { - if(state() == LoadingState) + if (changed) { + if (state() == LoadingState) m_mmfOutputChangePending = true; else updateMmfOutput(); @@ -367,7 +367,7 @@ void getDsaRegion(RWsSession &session, const RWindowBase &window) ao.SetActive(); dsa.Close(); ao.Cancel(); - if(region) { + if (region) { qDebug() << "Phonon::MMF::getDsaRegion count" << region->Count(); for(int i=0; iCount(); ++i) { const TRect& rect = region->RectangleList()[i]; @@ -425,7 +425,7 @@ void MMF::VideoPlayer::videoOutputChanged() TRACE_CONTEXT(VideoPlayer::videoOutputChanged, EVideoInternal); TRACE_ENTRY_0(); - if(m_videoOutput) { + if (m_videoOutput) { m_videoOutput->setObserver(this); m_videoOutput->setFrameSize(m_frameSize); } @@ -442,7 +442,7 @@ bool MMF::VideoPlayer::getNativeWindowSystemHandles() CCoeControl *control = 0; - if(m_videoOutput) + if (m_videoOutput) // Create native window control = m_videoOutput->winId(); else @@ -450,7 +450,7 @@ bool MMF::VideoPlayer::getNativeWindowSystemHandles() control = QApplication::activeWindow()->effectiveWinId(); #ifndef QT_NO_DEBUG - if(m_videoOutput) { + if (m_videoOutput) { QScopedPointer dumper(new ObjectDump::QDumper); dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs ObjectDump::addDefaultAnnotators(*dumper); @@ -478,7 +478,7 @@ bool MMF::VideoPlayer::getNativeWindowSystemHandles() bool changed = false; - if(window != m_window || rect != m_rect) { + if (window != m_window || rect != m_rect) { m_window = window; m_rect = rect; changed = true; diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp index c5d066e..2629d74 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp @@ -55,10 +55,10 @@ QList QAnnotatorBasic::annotation(const QObject& object) stream << ' '; stream << object.metaObject()->className(); - if(object.objectName() != "") + if (object.objectName() != "") stream << " \"" << object.objectName() << '"'; - if(object.isWidgetType()) + if (object.isWidgetType()) stream << " isWidget"; stream.flush(); @@ -71,14 +71,14 @@ QList QAnnotatorWidget::annotation(const QObject& object) QList result; const QWidget* widget = qobject_cast(&object); - if(widget) { + if (widget) { QByteArray array; QTextStream stream(&array); stream << "widget: "; - if(widget->isVisible()) + if (widget->isVisible()) stream << "visible "; else stream << "invisible "; @@ -288,7 +288,7 @@ void QVisitorPrivate::visitNode(const QObject& object) m_hash.insert(&object, node); // Insert node into internal tree - if(nodeParent) + if (nodeParent) { nodeParent->m_children.append(nodePtr.take()); } @@ -330,18 +330,18 @@ QByteArray QVisitorPrivate::branchBuffer QTextStream stream(&buffer); for (int i=0; i::const_iterator begin = node.m_annotation.begin(), end = node.m_annotation.end(); - if(begin == end) { + if (begin == end) { // No annotations - just dump the object pointer const bool isNodeLine = true; QByteArray buffer = branchBuffer(branches, isNodeLine, isLastChild); diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp index 2fceb62..8d582a7 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp @@ -35,11 +35,11 @@ QList QAnnotatorWidget::annotation(const QObject& object) QList result; const QWidget* widget = qobject_cast(&object); - if(widget) { + if (widget) { const QWExtra* extra = qt_widget_private(const_cast(widget))->extraData(); - if(extra) { + if (extra) { QByteArray array; QTextStream stream(&array); @@ -61,10 +61,10 @@ QList QAnnotatorControl::annotation(const QObject& object) QList result; const QWidget* widget = qobject_cast(&object); - if(widget) { + if (widget) { const CCoeControl* control = widget->effectiveWinId(); - if(control) { + if (control) { QByteArray array; QTextStream stream(&array); @@ -72,7 +72,7 @@ QList QAnnotatorControl::annotation(const QObject& object) stream << "control: " << control << ' '; stream << "parent " << control->Parent() << ' '; - if(control->IsVisible()) + if (control->IsVisible()) stream << "visible "; else stream << "invisible "; @@ -80,7 +80,7 @@ QList QAnnotatorControl::annotation(const QObject& object) stream << control->Position().iX << ',' << control->Position().iY << ' '; stream << control->Size().iWidth << 'x' << control->Size().iHeight; - if(control->OwnsWindow()) + if (control->OwnsWindow()) stream << " ownsWindow "; stream.flush(); @@ -96,12 +96,12 @@ QList QAnnotatorWindow::annotation(const QObject& object) QList result; const QWidget* widget = qobject_cast(&object); - if(widget) { + if (widget) { const CCoeControl* control = widget->effectiveWinId(); RDrawableWindow *window = 0; - if(control && (window = control->DrawableWindow())) { + if (control && (window = control->DrawableWindow())) { QByteArray array; QTextStream stream(&array); diff --git a/src/3rdparty/phonon/mmf/utils.cpp b/src/3rdparty/phonon/mmf/utils.cpp index 607f938..bc1c424 100644 --- a/src/3rdparty/phonon/mmf/utils.cpp +++ b/src/3rdparty/phonon/mmf/utils.cpp @@ -111,7 +111,7 @@ QColor MMF::Utils::getScreenPixel(const QPoint& pos) TScreenInfo info; TRAPD(err, getScreenInfoL(info)); QColor pixel; - if(err == KErrNone and pos.x() < info.width and pos.y() < info.height) + if (err == KErrNone and pos.x() < info.width and pos.y() < info.height) { const int bytesPerPixel = info.bpp / 8; Q_ASSERT(bytesPerPixel >= 3); @@ -129,7 +129,7 @@ QColor MMF::Utils::getScreenPixel(const QPoint& pos) pixel.setGreen(*ptr++); pixel.setRed(*ptr++); - if(bytesPerPixel == 4) + if (bytesPerPixel == 4) pixel.setAlpha(*ptr++); } return pixel; diff --git a/src/3rdparty/phonon/mmf/utils.h b/src/3rdparty/phonon/mmf/utils.h index 727abb0..7e363e8 100644 --- a/src/3rdparty/phonon/mmf/utils.h +++ b/src/3rdparty/phonon/mmf/utils.h @@ -140,14 +140,14 @@ public: // Macros available for use by implementation code #ifndef QT_NO_DEBUG #define TRACE_CONTEXT(_fn, _cat) const ::Phonon::MMF::TTraceContext _tc((TText*)L ## #_fn, (TUint)this, _cat); -#define TRACE_ENTRY_0() { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "+ Phonon::MMF::%s [0x%08x]"), _tc.iFunction, _tc.iAddr); } -#define TRACE_ENTRY(string, args...) { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "+ Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, args); } -#define TRACE_EXIT_0() { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "- Phonon::MMF::%s [0x%08x]"), _tc.iFunction, _tc.iAddr); } -#define TRACE_EXIT(string, args...) { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "- Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, args); } -#define TRACE_RETURN(string, result) { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "r Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, result); } return result; +#define TRACE_ENTRY_0() { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "+ Phonon::MMF::%s [0x%08x]"), _tc.iFunction, _tc.iAddr); } +#define TRACE_ENTRY(string, args...) { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "+ Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, args); } +#define TRACE_EXIT_0() { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "- Phonon::MMF::%s [0x%08x]"), _tc.iFunction, _tc.iAddr); } +#define TRACE_EXIT(string, args...) { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "- Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, args); } +#define TRACE_RETURN(string, result) { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## "r Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, result); } return result; #define TRACE_PANIC(code) { _TRACE_PRINT(_TRACE_TEXT(L ## "! Phonon::MMF::%s [0x%08x] panic %d"), _tc.iFunction, _tc.iAddr, code); } Utils::panic(code); -#define TRACE_0(string) { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## " Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr); } -#define TRACE(string, args...) { if(_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## " Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, args); } +#define TRACE_0(string) { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## " Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr); } +#define TRACE(string, args...) { if (_tc.Enabled()) _TRACE_PRINT(_TRACE_TEXT(L ## " Phonon::MMF::%s [0x%08x] " L ## string), _tc.iFunction, _tc.iAddr, args); } #else #define TRACE_CONTEXT(_fn, _cat) #define TRACE_ENTRY_0() diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp index 13d00f5..9c1118c 100644 --- a/src/3rdparty/phonon/mmf/videooutput.cpp +++ b/src/3rdparty/phonon/mmf/videooutput.cpp @@ -150,7 +150,7 @@ bool MMF::VideoOutput::event(QEvent* event) { TRACE_CONTEXT(VideoOutput::event, EVideoInternal); - if(event->type() == QEvent::WinIdChange) { + if (event->type() == QEvent::WinIdChange) { TRACE_0("WinIdChange"); videoOutputRegionChanged(); return true; -- cgit v0.12