Git commit 1d83b6d3c9beb38f6abfc2148a05a5296fe205e0 by Casian Andrei. Committed on 01/08/2014 at 07:25. Pushed by casianandrei into branch 'five'. Remove m_ prefix for attributes of privates M +0 -1 src/player_p.h M +15 -15 src/source.cpp M +8 -8 src/source_p.h M +70 -70 src/sourcecontrol.cpp M +11 -11 src/sourcecontrol_p.h http://commits.kde.org/phonon/1d83b6d3c9beb38f6abfc2148a05a5296fe205e0 diff --git a/src/player_p.h b/src/player_p.h index d63f9ab..b21e403 100644 --- a/src/player_p.h +++ b/src/player_p.h @@ -60,7 +60,6 @@ protected: = ~PlayerPrivate() {} = - // FIXME: need executive descision whether privates should use m_ pref= ix. qint32 tickInterval; // FIXME: why multimap? QMultiMap metaData; diff --git a/src/source.cpp b/src/source.cpp index 607e1bb..f32866e 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -53,11 +53,11 @@ Source::Source(const QUrl &url) QString path(QLatin1Char(':') + url.path()); = if (QFile::exists(path)) { - d->m_ioDevice =3D new QFile(path); - d->setStream(new IODeviceStream(d->m_ioDevice, d->m_ioDevi= ce)); + d->ioDevice =3D new QFile(path); + d->setStream(new IODeviceStream(d->ioDevice, d->ioDevice)); } } - d->m_url =3D url; + d->url =3D url; } } = @@ -67,8 +67,8 @@ Source::Source(DeviceType deviceType, const QByteArray &d= eviceName) if (deviceType =3D=3D NoDevice) { return; } - d->m_deviceType =3D deviceType; - d->m_deviceName =3D deviceName; + d->deviceType =3D deviceType; + d->deviceName =3D deviceName; } = Source::Source(AbstractMediaStream *stream) @@ -84,7 +84,7 @@ Source::Source(QIODevice *ioDevice) { if (ioDevice) { d->setStream(new IODeviceStream(ioDevice, ioDevice)); - d->m_ioDevice =3D ioDevice; + d->ioDevice =3D ioDevice; } } = @@ -96,10 +96,10 @@ SourcePrivate::~SourcePrivate() { //here we use deleteLater because this object //might be destroyed from another thread - if (m_stream) - m_stream->deleteLater(); - if (m_ioDevice) - m_ioDevice->deleteLater(); + if (stream) + stream->deleteLater(); + if (ioDevice) + ioDevice->deleteLater(); } = Source &Source::operator=3D(const Source &other) @@ -115,27 +115,27 @@ bool Source::operator=3D=3D(const Source &other) const = QUrl Source::url() const { - return d->m_url; + return d->url; } = Source::DeviceType Source::deviceType() const { - return d->m_deviceType; + return d->deviceType; } = QByteArray Source::deviceName() const { - return d->m_deviceName; + return d->deviceName; } = AbstractMediaStream *Source::stream() const { - return d->m_stream; + return d->stream; } = void SourcePrivate::setStream(AbstractMediaStream *s) { - m_stream =3D s; + stream =3D s; } = } // namespace Phonon diff --git a/src/source_p.h b/src/source_p.h index 9deb354..5cab678 100644 --- a/src/source_p.h +++ b/src/source_p.h @@ -34,9 +34,9 @@ class PHONON_EXPORT SourcePrivate : public QSharedData { public: SourcePrivate() - : m_deviceType(Source::NoDevice) - , m_stream(0) - , m_ioDevice(0) + : deviceType(Source::NoDevice) + , stream(0) + , ioDevice(0) { } = @@ -44,17 +44,17 @@ public: = void setStream(AbstractMediaStream *s); = - QUrl m_url; - Source::DeviceType m_deviceType; - QByteArray m_deviceName; + QUrl url; + Source::DeviceType deviceType; + QByteArray deviceName; = // The AbstractMediaStream(2) may be deleted at any time by the applic= ation. If that happens // stream will be 0 automatically, but streamEventQueue will stay vali= d as we hold a // reference to it. This is necessary to avoid a races when setting th= e MediaSource while // another thread deletes the AbstractMediaStream2. StreamInterface(2)= will then just get a // StreamEventQueue where nobody answers. - QPointer m_stream; - QIODevice *m_ioDevice; + QPointer stream; + QIODevice *ioDevice; }; = } // namespace Phonon diff --git a/src/sourcecontrol.cpp b/src/sourcecontrol.cpp index e49a62e..c1af73d 100644 --- a/src/sourcecontrol.cpp +++ b/src/sourcecontrol.cpp @@ -48,22 +48,22 @@ SourceControl::~SourceControl() bool SourceControl::isActive() const { P_D(const SourceControl); - if (!d->m_scInterface) + if (!d->scInterface) return false; - return d->m_scInterface->isActive(); + return d->scInterface->isActive(); } = Source SourceControl::source() const { P_D(const SourceControl); - return d->m_source; + return d->source; } = // private = SourceControlPrivate::SourceControlPrivate(Source &source) - : m_scInterface(0) - , m_source(source) + : scInterface(0) + , source(source) { = } @@ -92,189 +92,189 @@ VideoSourceControl::~VideoSourceControl() bool VideoSourceControl::supportsMenus() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->supportsMenus(); + return d->interface->supportsMenus(); } = QSet VideoSourceControl::availableMenus() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return QSet(); - return d->m_interface->availableMenus(); + return d->interface->availableMenus(); } = VideoSourceControl::Menu VideoSourceControl::currentMenu() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return RootMenu; - return d->m_interface->currentMenu(); + return d->interface->currentMenu(); } = void VideoSourceControl::setCurrentMenu(Menu menu) { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return; - d->m_interface->setCurrentMenu(menu); + d->interface->setCurrentMenu(menu); } = bool VideoSourceControl::supportsChapters() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->supportsChapters(); + return d->interface->supportsChapters(); } = int VideoSourceControl::chapterCount() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->chapterCount(); + return d->interface->chapterCount(); } = int VideoSourceControl::currentChapter() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->currentChapter(); + return d->interface->currentChapter(); } = void VideoSourceControl::setCurrentChapter(int chapterNumber) { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return; - d->m_interface->setCurrentChapter(chapterNumber); + d->interface->setCurrentChapter(chapterNumber); } = bool VideoSourceControl::supportsAngles() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->supportsAngles(); + return d->interface->supportsAngles(); } = int VideoSourceControl::angleCount() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->angleCount(); + return d->interface->angleCount(); } = int VideoSourceControl::currentAngle() { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->currentAngle(); + return d->interface->currentAngle(); } = void VideoSourceControl::setCurrentAngle(int angleNumber) { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return; - d->m_interface->setCurrentAngle(angleNumber); + d->interface->setCurrentAngle(angleNumber); } = bool VideoSourceControl::supportsTitles() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->supportsTitles(); + return d->interface->supportsTitles(); } = bool VideoSourceControl::isAutoplayingTitles() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->isAutoplayingTitles(); + return d->interface->isAutoplayingTitles(); } = void VideoSourceControl::setAutoplayTitles(bool enable) { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return; - d->m_interface->setAutoplayTitles(enable); + d->interface->setAutoplayTitles(enable); } = int VideoSourceControl::titleCount() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->titleCount(); + return d->interface->titleCount(); } = int VideoSourceControl::currentTitle() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->currentTitle(); + return d->interface->currentTitle(); } = void VideoSourceControl::setCurrentTitle(int titleNumber) { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return; - d->m_interface->setCurrentTitle(titleNumber); + d->interface->setCurrentTitle(titleNumber); } = bool VideoSourceControl::supportsAudioChannels() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->supportsAudioChannels(); + return d->interface->supportsAudioChannels(); } = int VideoSourceControl::audioChannelCount() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->audioChannelCount(); + return d->interface->audioChannelCount(); } = int VideoSourceControl::audioChannel() const { P_D(const VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->audioChannel(); + return d->interface->audioChannel(); } = void VideoSourceControl::setAudioChannel(int channelNumber) { P_D(VideoSourceControl); - if (!d->m_interface) + if (!d->interface) return; - return d->m_interface->setAudioChannel(channelNumber); + return d->interface->setAudioChannel(channelNumber); } = // private = VideoSourceControlPrivate::VideoSourceControlPrivate(Source &source) : SourceControlPrivate(source) - , m_currentMenu(VideoSourceControl::RootMenu) - , m_currentChapter(0) - , m_currentAngle(0) - , m_currentTitle(0) - , m_autoplayTitlesEnabled(false) - , m_audioChannel(0) + , currentMenu(VideoSourceControl::RootMenu) + , currentChapter(0) + , currentAngle(0) + , currentTitle(0) + , autoplayTitlesEnabled(false) + , audioChannel(0) { = } @@ -291,9 +291,9 @@ void VideoSourceControlPrivate::createBackendObject() = P_Q(VideoSourceControl); m_backendObject =3D Factory::createVideoSourceControl(q); - m_interface =3D qobject_cast(m_backendO= bject); - m_scInterface =3D static_cast(m_interface); - if (m_backendObject && m_interface) + interface =3D qobject_cast(m_backendObj= ect); + scInterface =3D static_cast(interface); + if (m_backendObject && interface) setupBackendObject(); } = @@ -354,40 +354,40 @@ AudioSourceControl::~AudioSourceControl() bool AudioSourceControl::supportsTracks() const { P_D(const AudioSourceControl); - if (!d->m_interface) + if (!d->interface) return false; - return d->m_interface->supportsTracks(); + return d->interface->supportsTracks(); } = int AudioSourceControl::trackCount() const { P_D(const AudioSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->trackCount(); + return d->interface->trackCount(); } = int AudioSourceControl::trackNumber() const { P_D(const AudioSourceControl); - if (!d->m_interface) + if (!d->interface) return -1; - return d->m_interface->trackNumber(); + return d->interface->trackNumber(); } = void AudioSourceControl::setTrackNumber(int trackNumber) { P_D(AudioSourceControl); - if (!d->m_interface) + if (!d->interface) return; - d->m_interface->setTrackNumber(trackNumber); + d->interface->setTrackNumber(trackNumber); } = // private = AudioSourceControlPrivate::AudioSourceControlPrivate(Source &source) : SourceControlPrivate(source) - , m_currentTrack(0) + , currentTrack(0) { = } @@ -404,9 +404,9 @@ void AudioSourceControlPrivate::createBackendObject() = P_Q(AudioSourceControl); m_backendObject =3D Factory::createAudioSourceControl(q); - m_interface =3D qobject_cast(m_backendO= bject); - m_scInterface =3D static_cast(m_interface); - if (m_backendObject && m_interface) + interface =3D qobject_cast(m_backendObj= ect); + scInterface =3D static_cast(interface); + if (m_backendObject && interface) setupBackendObject(); } = diff --git a/src/sourcecontrol_p.h b/src/sourcecontrol_p.h index 222b30e..b7bf743 100644 --- a/src/sourcecontrol_p.h +++ b/src/sourcecontrol_p.h @@ -38,9 +38,9 @@ public: explicit SourceControlPrivate(Source &source); virtual ~SourceControlPrivate(); = - SourceControlInterface *m_scInterface; + SourceControlInterface *scInterface; = - Source m_source; + Source source; = private: P_DECLARE_PUBLIC(SourceControl) @@ -53,14 +53,14 @@ public: explicit VideoSourceControlPrivate(Source &source); virtual ~VideoSourceControlPrivate(); = - VideoSourceControlInterface *m_interface; + VideoSourceControlInterface *interface; = - VideoSourceControl::Menu m_currentMenu; - int m_currentChapter; - int m_currentAngle; - int m_currentTitle; - bool m_autoplayTitlesEnabled; - int m_audioChannel; + VideoSourceControl::Menu currentMenu; + int currentChapter; + int currentAngle; + int currentTitle; + bool autoplayTitlesEnabled; + int audioChannel; = protected: virtual void createBackendObject() Q_DECL_OVERRIDE Q_DECL_FINAL; @@ -77,9 +77,9 @@ public: explicit AudioSourceControlPrivate(Source &source); virtual ~AudioSourceControlPrivate(); = - AudioSourceControlInterface *m_interface; + AudioSourceControlInterface *interface; = - int m_currentTrack; + int currentTrack; = protected: virtual void createBackendObject() Q_DECL_OVERRIDE Q_DECL_FINAL;