diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-27 12:27:15 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-27 13:00:41 (GMT) |
commit | 1794e95cfb8ccb77bc90c3395ddb0636ae12e8ce (patch) | |
tree | 34cf67d101df049bf1df106a95563784b6c5529b | |
parent | b43b58fc1f56df12459fcfa2a586760ab78f9c89 (diff) | |
download | Qt-1794e95cfb8ccb77bc90c3395ddb0636ae12e8ce.zip Qt-1794e95cfb8ccb77bc90c3395ddb0636ae12e8ce.tar.gz Qt-1794e95cfb8ccb77bc90c3395ddb0636ae12e8ce.tar.bz2 |
Wrapped code using QT_BEGIN/END_NAMESPACE macros
26 files changed, 112 insertions, 33 deletions
diff --git a/src/3rdparty/phonon/mmf/TODO.txt b/src/3rdparty/phonon/mmf/TODO.txt index 49e8074..7f20793 100644 --- a/src/3rdparty/phonon/mmf/TODO.txt +++ b/src/3rdparty/phonon/mmf/TODO.txt @@ -12,9 +12,6 @@ The following items are in rough order of priority. - Dragging of other widgets on top of / underneath the video widget These will allow the video widget's moveEvent / resizeEvent implementations to be tested. -* Write / modify a test app which allows audio effects to be enabled / disabled. - - In the simplest case, this could just be a command-line app which allows effects to be specified using flags. - * On-target testing 1. Ensure that Phonon front- and back-end libraries are included in the SIS file. 2. Add musicplayer.exe and mediaplayer.exe to the FluidLauncher @@ -40,9 +37,6 @@ Compare video frame rate obtained using default S60 media player and Qt demo app * Implement MMF::Backend::disconnectNodes This should probably be left for now, particularly until audio effects have been implemented. This is because the node connection mechanism may need to be refactored slightly once we start building up longer graphs (e.g. MediaObject -> Effect -> Effect -> AudioOutput). -* Namespace macros -For consistency with other backends, the code should be wrapped in QT_BEGIN_NAMESPACE / QT_END_NAMESPACE macros. - * Fix code layout My editor was set to use tabs for indenting, rather than the Qt standard of 4 spaces. So we can either: 1. Do "s/\t/ /g" - which will just fix the indenting diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp index 7849d87..7883709 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp @@ -20,6 +20,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "defs.h" #include "utils.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -459,7 +461,5 @@ void MMF::AbstractMediaPlayer::tick() emit tick(currentTime()); } - - - +QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h index 7f53a2d..51935a3 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h @@ -26,6 +26,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. class RFile; +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -154,5 +156,7 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/abstractplayer.cpp b/src/3rdparty/phonon/mmf/abstractplayer.cpp index 9027f08..328ab37 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractplayer.cpp @@ -19,6 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "abstractplayer.h" #include "defs.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -96,3 +98,6 @@ void MMF::AbstractPlayer::videoOutputChanged() // Default behaviour is empty - overridden by VideoPlayer } + +QT_END_NAMESPACE + diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h index 1c9ef9b..399cd5d 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.h +++ b/src/3rdparty/phonon/mmf/abstractplayer.h @@ -30,6 +30,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. class RFile; +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -105,5 +107,7 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/audiooutput.cpp b/src/3rdparty/phonon/mmf/audiooutput.cpp index 82b2b82..099c899 100644 --- a/src/3rdparty/phonon/mmf/audiooutput.cpp +++ b/src/3rdparty/phonon/mmf/audiooutput.cpp @@ -23,6 +23,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "utils.h" #include "volumeobserver.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -92,3 +94,5 @@ void MMF::AudioOutput::setVolumeObserver(VolumeObserver* observer) } } + +QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/audiooutput.h b/src/3rdparty/phonon/mmf/audiooutput.h index 5ecfc0d..ab90c44 100644 --- a/src/3rdparty/phonon/mmf/audiooutput.h +++ b/src/3rdparty/phonon/mmf/audiooutput.h @@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <phonon/audiooutputinterface.h> +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -85,4 +87,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp index 41fedb4..50048c8 100644 --- a/src/3rdparty/phonon/mmf/audioplayer.cpp +++ b/src/3rdparty/phonon/mmf/audioplayer.cpp @@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "audioplayer.h" #include "utils.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -242,17 +244,5 @@ void MMF::AudioPlayer::MaloLoadingComplete() #endif // QT_PHONON_MMF_AUDIO_DRM - - - - - - - - - - - - - +QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/audioplayer.h b/src/3rdparty/phonon/mmf/audioplayer.h index 8d29547..cdb6cb9 100644 --- a/src/3rdparty/phonon/mmf/audioplayer.h +++ b/src/3rdparty/phonon/mmf/audioplayer.h @@ -34,6 +34,8 @@ typedef CMdaAudioPlayerUtility CPlayerType; typedef MMdaAudioPlayerCallback MPlayerObserverType; #endif +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -102,4 +104,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/backend.cpp b/src/3rdparty/phonon/mmf/backend.cpp index 010562e..236ef28 100644 --- a/src/3rdparty/phonon/mmf/backend.cpp +++ b/src/3rdparty/phonon/mmf/backend.cpp @@ -29,6 +29,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "utils.h" #include "videowidget.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -184,3 +186,5 @@ QStringList Backend::availableMimeTypes() const Q_EXPORT_PLUGIN2(phonon_mmf, Phonon::MMF::Backend); +QT_END_NAMESPACE + diff --git a/src/3rdparty/phonon/mmf/backend.h b/src/3rdparty/phonon/mmf/backend.h index 4fff204..b448187 100644 --- a/src/3rdparty/phonon/mmf/backend.h +++ b/src/3rdparty/phonon/mmf/backend.h @@ -22,6 +22,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <Phonon/MediaSource> #include <Phonon/BackendInterface> +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -49,4 +51,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/defs.h b/src/3rdparty/phonon/mmf/defs.h index 12b8785..37a25d1 100644 --- a/src/3rdparty/phonon/mmf/defs.h +++ b/src/3rdparty/phonon/mmf/defs.h @@ -36,6 +36,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #define PHONON_MMF_DEBUG_VIDEO_OUTPUT +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -52,4 +54,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif // PHONON_MMF_DEFS_H diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp index d9e836d..dc7f8d1 100644 --- a/src/3rdparty/phonon/mmf/dummyplayer.cpp +++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp @@ -18,6 +18,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "dummyplayer.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -132,6 +134,5 @@ void MMF::DummyPlayer::doSetTickInterval(qint32) } - - +QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h index 5846d88..12e3bd8 100644 --- a/src/3rdparty/phonon/mmf/dummyplayer.h +++ b/src/3rdparty/phonon/mmf/dummyplayer.h @@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "abstractplayer.h" +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -70,4 +72,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index 04b7dc7..91ed859 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -23,6 +23,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "utils.h" #include "videoplayer.h" +QT_BEGIN_NAMESPACE using namespace Phonon; using namespace Phonon::MMF; @@ -387,3 +388,5 @@ void MMF::MediaObject::setVideoOutput(VideoOutput* videoOutput) } +QT_END_NAMESPACE + diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h index 5bbca96..d9c32ce 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.h +++ b/src/3rdparty/phonon/mmf/mediaobject.h @@ -30,6 +30,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "defs.h" #include "volumeobserver.h" +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -122,4 +124,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/utils.cpp b/src/3rdparty/phonon/mmf/utils.cpp index 2655962..eb367f6 100644 --- a/src/3rdparty/phonon/mmf/utils.cpp +++ b/src/3rdparty/phonon/mmf/utils.cpp @@ -19,6 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "utils.h" #include <e32std.h> +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -65,3 +67,7 @@ MMF::MediaType MMF::Utils::mimeTypeToMediaType(const TDesC& mimeType) return result; } + + +QT_END_NAMESPACE + diff --git a/src/3rdparty/phonon/mmf/utils.h b/src/3rdparty/phonon/mmf/utils.h index 2df7e48..e2b5e59 100644 --- a/src/3rdparty/phonon/mmf/utils.h +++ b/src/3rdparty/phonon/mmf/utils.h @@ -24,6 +24,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "defs.h" +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -158,4 +160,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp index 171565b..6534b7b 100644 --- a/src/3rdparty/phonon/mmf/videooutput.cpp +++ b/src/3rdparty/phonon/mmf/videooutput.cpp @@ -24,6 +24,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QMoveEvent> #include <QResizeEvent> +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -87,12 +89,15 @@ void VideoOutput::dump() TRACE("maxSize %d %d", maximumWidth(), maximumHeight()); TRACE("sizeHint %d %d", sizeHint().width(), sizeHint().height()); - QWidget& parentWidget = *qobject_cast<QWidget*>(parent()); - TRACE("parent.isVisible %d", parentWidget.isVisible()); - TRACE("parent.pos %d %d", parentWidget.x(), parentWidget.y()); - TRACE("parent.size %d %d", parentWidget.size().width(), parentWidget.size().height()); - TRACE("parent.maxSize %d %d", parentWidget.maximumWidth(), parentWidget.maximumHeight()); - TRACE("parent.sizeHint %d %d", parentWidget.sizeHint().width(), parentWidget.sizeHint().height()); + QWidget* parentWidget = qobject_cast<QWidget*>(parent()); + if(parentWidget) + { + TRACE("parent.isVisible %d", parentWidget->isVisible()); + TRACE("parent.pos %d %d", parentWidget->x(), parentWidget->y()); + TRACE("parent.size %d %d", parentWidget->size().width(), parentWidget->size().height()); + TRACE("parent.maxSize %d %d", parentWidget->maximumWidth(), parentWidget->maximumHeight()); + TRACE("parent.sizeHint %d %d", parentWidget->sizeHint().width(), parentWidget->sizeHint().height()); + } TRACE_EXIT_0(); } @@ -214,4 +219,5 @@ void MMF::VideoOutput::moveEvent(QMoveEvent* event) //----------------------------------------------------------------------------- +QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/videooutput.h b/src/3rdparty/phonon/mmf/videooutput.h index 6d1e4a0..b8e22ca 100644 --- a/src/3rdparty/phonon/mmf/videooutput.h +++ b/src/3rdparty/phonon/mmf/videooutput.h @@ -22,6 +22,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QtGui/QWidget> #include "defs.h" +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -33,11 +35,10 @@ namespace Phonon Q_OBJECT public: - VideoOutput(QWidget* parent); + explicit VideoOutput(QWidget* parent); ~VideoOutput(); void setFrameSize(const QSize& size); - void setObserver(VideoOutputObserver* observer); protected: @@ -64,4 +65,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/videooutputobserver.h b/src/3rdparty/phonon/mmf/videooutputobserver.h index 30fb3e0..d38ff87 100644 --- a/src/3rdparty/phonon/mmf/videooutputobserver.h +++ b/src/3rdparty/phonon/mmf/videooutputobserver.h @@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QtGlobal> +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -37,4 +39,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp index 546f761..ba06379 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/videoplayer.cpp @@ -26,6 +26,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "videoplayer.h" #include "utils.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -408,3 +410,7 @@ void MMF::VideoPlayer::getNativeWindowSystemHandles() m_clipRect = m_windowRect; } + + +QT_END_NAMESPACE + diff --git a/src/3rdparty/phonon/mmf/videoplayer.h b/src/3rdparty/phonon/mmf/videoplayer.h index a6f069f..f8b1486 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.h +++ b/src/3rdparty/phonon/mmf/videoplayer.h @@ -25,6 +25,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "videooutput.h" #include "videooutputobserver.h" +QT_BEGIN_NAMESPACE namespace Phonon { @@ -105,4 +106,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp index 515f04e..ae94e5e 100644 --- a/src/3rdparty/phonon/mmf/videowidget.cpp +++ b/src/3rdparty/phonon/mmf/videowidget.cpp @@ -20,6 +20,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "videooutput.h" #include "videowidget.h" +QT_BEGIN_NAMESPACE + using namespace Phonon; using namespace Phonon::MMF; @@ -42,7 +44,8 @@ static const qreal DefaultSaturation = 1.0; //----------------------------------------------------------------------------- MMF::VideoWidget::VideoWidget(QWidget* parent) - : m_widget(new VideoOutput(parent)) + : QObject(parent) + , m_widget(new VideoOutput(parent)) , m_aspectRatio(DefaultAspectRatio) , m_brightness(DefaultBrightness) , m_scaleMode(DefaultScaleMode) @@ -158,3 +161,6 @@ VideoOutput& MMF::VideoWidget::videoOutput() return *static_cast<VideoOutput*>(widget()); } + +QT_END_NAMESPACE + diff --git a/src/3rdparty/phonon/mmf/videowidget.h b/src/3rdparty/phonon/mmf/videowidget.h index e8fc603..799121b 100644 --- a/src/3rdparty/phonon/mmf/videowidget.h +++ b/src/3rdparty/phonon/mmf/videowidget.h @@ -23,6 +23,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <phonon/videowidget.h> #include <phonon/videowidgetinterface.h> +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -70,4 +72,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif diff --git a/src/3rdparty/phonon/mmf/volumeobserver.h b/src/3rdparty/phonon/mmf/volumeobserver.h index 11ee960..d6717cba 100644 --- a/src/3rdparty/phonon/mmf/volumeobserver.h +++ b/src/3rdparty/phonon/mmf/volumeobserver.h @@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QtGlobal> +QT_BEGIN_NAMESPACE + namespace Phonon { namespace MMF @@ -37,4 +39,6 @@ namespace Phonon } } +QT_END_NAMESPACE + #endif |