┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/phononwidget.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-02-09 19:21:58 +0100
committerPeter Penz <[email protected]>2011-02-09 19:24:27 +0100
commitd3496b12310d9fec0e52e537c341e87fcaa2f8b5 (patch)
tree590f58beeca31163e5b17950540601d8a5dec20e /src/panels/information/phononwidget.cpp
parentceba0f6f6a07babac230d1f136d16d34629b4cf3 (diff)
Coding style update for pointer comparison
Most developers seem to prefer if (ptr) ... if (!ptr) ... in comparison to if (ptr != 0) ... if (ptr == 0) ... Adjusted the Dolphin-code to use the "most-prefered style" to make contributors happy.
Diffstat (limited to 'src/panels/information/phononwidget.cpp')
-rw-r--r--src/panels/information/phononwidget.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp
index b6da339ea..5accf4d87 100644
--- a/src/panels/information/phononwidget.cpp
+++ b/src/panels/information/phononwidget.cpp
@@ -118,7 +118,7 @@ void PhononWidget::showEvent(QShowEvent *event)
return;
}
- if (m_topLayout == 0) {
+ if (!m_topLayout) {
m_topLayout = new QVBoxLayout(this);
m_topLayout->setMargin(0);
m_topLayout->setSpacing(KDialog::spacingHint());
@@ -185,7 +185,7 @@ void PhononWidget::play()
{
switch (m_mode) {
case Audio:
- if (m_audioMedia == 0) {
+ if (!m_audioMedia) {
m_audioMedia = Phonon::createPlayer(Phonon::MusicCategory, m_url);
m_audioMedia->setParent(this);
}
@@ -195,7 +195,7 @@ void PhononWidget::play()
break;
case Video:
- if (m_videoPlayer == 0) {
+ if (!m_videoPlayer) {
m_videoPlayer = new EmbeddedVideoPlayer(Phonon::VideoCategory, this);
m_topLayout->insertWidget(0, m_videoPlayer);
}
@@ -209,7 +209,7 @@ void PhononWidget::play()
break;
}
- Q_ASSERT(m_media != 0);
+ Q_ASSERT(m_media);
connect(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)),
this, SLOT(stateChanged(Phonon::State)));
m_seekSlider->setMediaObject(m_media);
@@ -219,7 +219,7 @@ void PhononWidget::play()
void PhononWidget::stop()
{
- if (m_media != 0) {
+ if (m_media) {
m_media->stop();
disconnect(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)),
this, SLOT(stateChanged(Phonon::State)));
@@ -229,14 +229,14 @@ void PhononWidget::stop()
m_playButton->show();
}
- if (m_videoPlayer != 0) {
+ if (m_videoPlayer) {
m_videoPlayer->hide();
}
}
void PhononWidget::applyVideoSize()
{
- if ((m_videoPlayer != 0) && m_videoSize.isValid()) {
+ if ((m_videoPlayer) && m_videoSize.isValid()) {
m_videoPlayer->setSizeHint(m_videoSize);
}
}