[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [phonon/five] phonon: Change pDebug to qDebug
From:       Casian Andrei <skeletk13 () gmail ! com>
Date:       2014-01-18 19:23:20
Message-ID: E1W4bUG-0007J4-Dd () scm ! kde ! org
[Download RAW message or body]

Git commit 69d1be6ac27f9d2cb40b739a15ec45b92fbb0023 by Casian Andrei.
Committed on 18/01/2014 at 18:32.
Pushed by casianandrei into branch 'five'.

Change pDebug to qDebug

M  +8    -8    phonon/factory.cpp
M  +0    -10   phonon/phononnamespace_p.h
M  +2    -2    phonon/player.cpp
M  +2    -2    phonon/videowidget.cpp
M  +1    -1    phonon/volumeslider.cpp

http://commits.kde.org/phonon/69d1be6ac27f9d2cb40b739a15ec45b92fbb0023

diff --git a/phonon/factory.cpp b/phonon/factory.cpp
index 56b04fe..6b38220 100644
--- a/phonon/factory.cpp
+++ b/phonon/factory.cpp
@@ -60,7 +60,7 @@ static inline void ensureLibraryPathSet()
 
 bool FactoryPrivate::createBackend()
 {
-    pDebug() << Q_FUNC_INFO << "Phonon" << PHONON_VERSION_STR << "trying to create backend...";
+    qDebug() << Q_FUNC_INFO << "Phonon" << PHONON_VERSION_STR << "trying to create backend...";
 #ifndef QT_NO_LIBRARY
     Q_ASSERT(backendObject == 0);
 
@@ -80,14 +80,14 @@ bool FactoryPrivate::createBackend()
             const QString libPath = paths.at(i) + suffix;
             const QDir dir(libPath);
             if (!dir.exists()) {
-                pDebug() << Q_FUNC_INFO << dir.absolutePath() << "does not exist";
+                qDebug() << Q_FUNC_INFO << dir.absolutePath() << "does not exist";
                 continue;
             }
 
             QStringList plugins(dir.entryList(QDir::Files));
 
             if (!backendEnv.isEmpty()) {
-                pDebug() << "trying to load:" << backendEnv << "as first choice";
+                qDebug() << "trying to load:" << backendEnv << "as first choice";
                 const int backendIndex = plugins.indexOf(QRegExp(backendEnv + ".*"));
                 if (backendIndex != -1)
                     plugins.move(backendIndex, 0);
@@ -96,11 +96,11 @@ bool FactoryPrivate::createBackend()
             foreach (const QString &plugin, plugins) {
                 QPluginLoader pluginLoader(libPath + plugin);
                 if (!pluginLoader.load()) {
-                    pDebug() << Q_FUNC_INFO << "  load failed:"
+                    qDebug() << Q_FUNC_INFO << "  load failed:"
                              << pluginLoader.errorString();
                     continue;
                 }
-                pDebug() << pluginLoader.instance();
+                qDebug() << pluginLoader.instance();
                 backendObject = pluginLoader.instance();
                 if (backendObject) {
                     break;
@@ -115,12 +115,12 @@ bool FactoryPrivate::createBackend()
             }
         }
         if (!backendObject) {
-            pWarning() << Q_FUNC_INFO << "phonon backend plugin could not be loaded";
+            qWarning() << Q_FUNC_INFO << "phonon backend plugin could not be loaded";
             return false;
         }
     }
 
-    pDebug() << Q_FUNC_INFO
+    qDebug() << Q_FUNC_INFO
              << "Phonon backend"
              << backendObject->property("backendName").toString()
              << "version"
@@ -129,7 +129,7 @@ bool FactoryPrivate::createBackend()
 
     return true;
 #else //QT_NO_LIBRARY
-    pWarning() << Q_FUNC_INFO << "Trying to use Phonon with QT_NO_LIBRARY defined. "
+    qWarning() << Q_FUNC_INFO << "Trying to use Phonon with QT_NO_LIBRARY defined. "
                                  "That is currently not supported";
     return false;
 #endif
diff --git a/phonon/phononnamespace_p.h b/phonon/phononnamespace_p.h
index 15431f5..463e337 100644
--- a/phonon/phononnamespace_p.h
+++ b/phonon/phononnamespace_p.h
@@ -32,14 +32,4 @@
 Q_DECLARE_METATYPE(QList<int>)
 #endif
 
-#if defined(QT_NO_DEBUG)
-#define pDebug if (true) {} else qDebug
-#else
-#warning debug always on
-#define pDebug /*if (qgetenv("PHONON_DEBUG").isEmpty()) {} else*/ qDebug
-#endif
-#define pWarning() qDebug() << "WARNING:"
-#define pError() qDebug() << "ERROR:"
-#define pFatal(message) qDebug() << "FATAL ERROR:" << message; ::abort()
-
 #endif // PHONONNAMESPACE_P_H
diff --git a/phonon/player.cpp b/phonon/player.cpp
index d44106c..200f5ad 100644
--- a/phonon/player.cpp
+++ b/phonon/player.cpp
@@ -209,7 +209,7 @@ void Player::setSource(const Source &newSource)
         return;
     }
 
-    pDebug() << Q_FUNC_INFO << newSource.url() << newSource.deviceName();
+    qDebug() << Q_FUNC_INFO << newSource.url() << newSource.deviceName();
 
     // first call stop as that often is the expected state for setting a new URL
     stop();
@@ -286,7 +286,7 @@ void PlayerPrivate::setupBackendObject()
     const State backendState = interface->state();
     if (state != backendState) {
 #warning do we really want this? ... shouldnt we force the frontend state on the backend instead?
-        pDebug() << "emitting a state change because the backend object has been created";
+        qDebug() << "emitting a state change because the backend object has been created";
         emit q->stateChanged(backendState, state);
         state = backendState;
     }
diff --git a/phonon/videowidget.cpp b/phonon/videowidget.cpp
index 4078d30..8387edc 100644
--- a/phonon/videowidget.cpp
+++ b/phonon/videowidget.cpp
@@ -169,7 +169,7 @@ QImage VideoWidget::snapshot() const {
 
 void VideoWidget::setFullScreen(bool newFullScreen)
 {
-    pDebug() << Q_FUNC_INFO << newFullScreen;
+    qDebug() << Q_FUNC_INFO << newFullScreen;
     P_D(VideoWidget);
     // TODO: disable screensaver? or should we leave that responsibility to the
     // application?
@@ -216,7 +216,7 @@ void VideoWidgetPrivate::setupBackendObject()
     P_Q(VideoWidget);
     Q_ASSERT(m_backendObject);
     //AbstractVideoOutputPrivate::setupBackendObject();
-    pDebug() << "calling setAspectRatio on the backend " << aspectRatio;
+    qDebug() << "calling setAspectRatio on the backend " << aspectRatio;
     interface->setAspectRatio(aspectRatio);
     interface->setScaleMode(scaleMode);
 
diff --git a/phonon/volumeslider.cpp b/phonon/volumeslider.cpp
index 10783af..f3bed9e 100644
--- a/phonon/volumeslider.cpp
+++ b/phonon/volumeslider.cpp
@@ -98,7 +98,7 @@ QSize VolumeSlider::iconSize() const
 
 void VolumeSlider::setIconSize(const QSize &iconSize)
 {
-    pDebug() << Q_FUNC_INFO << iconSize;
+    qDebug() << Q_FUNC_INFO << iconSize;
     k_ptr->muteButton.setIconSize(iconSize);
 }
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic