summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <[email protected]>2017-05-01 17:01:57 +0200
committerLuigi Toscano <[email protected]>2017-05-01 17:32:59 +0200
commit748e52bc0b3348309084058dd932f989cbb328e1 (patch)
tree34e33b68317972067faec305133fec21bf57f3db
parenta03f3019b49e75379cbaddae52df801ed0fa9ccc (diff)
Final porting to categorized logging
- define the logging category using the ECM macro and bump the required dependencies (Frameworks/ECM 5.14 for the macro itself, Qt 5.4 for the default category level); - convert the really last leftovers of kDebug; - remove endl at the end of qC* calls.
-rw-r--r--CMakeLists.txt21
-rw-r--r--apps/KMixApp.cpp1
-rw-r--r--apps/kmix.cpp3
-rw-r--r--apps/kmixctrl.cpp1
-rw-r--r--apps/kmixd.cpp1
-rw-r--r--apps/main.cpp3
-rw-r--r--backends/mixer_alsa9.cpp1
-rw-r--r--backends/mixer_backend.cpp2
-rw-r--r--backends/mixer_backend.h2
-rw-r--r--backends/mixer_mpris2.cpp2
-rw-r--r--backends/mixer_oss4.cpp22
-rw-r--r--core/ControlManager.cpp2
-rw-r--r--core/MediaController.cpp2
-rw-r--r--core/kmixdebug.cpp24
-rw-r--r--core/kmixdebug.h29
-rw-r--r--core/kmixdevicemanager.cpp1
-rw-r--r--core/mixdevice.cpp3
-rw-r--r--core/mixer.cpp5
-rw-r--r--core/mixertoolbox.cpp1
-rw-r--r--core/mixset.cpp3
-rw-r--r--core/volume.cpp2
-rw-r--r--core/volume.h4
-rw-r--r--dbus/dbusmixerwrapper.cpp2
-rw-r--r--gui/dialogaddview.cpp3
-rw-r--r--gui/dialogchoosebackends.cpp1
-rw-r--r--gui/dialogselectmaster.cpp1
-rw-r--r--gui/dialogviewconfiguration.cpp1
-rw-r--r--gui/dialogviewconfiguration.h1
-rw-r--r--gui/guiprofile.cpp5
-rw-r--r--gui/guiprofile.h2
-rw-r--r--gui/kmixdockwidget.cpp3
-rw-r--r--gui/kmixerwidget.cpp1
-rw-r--r--gui/kmixtoolbox.cpp1
-rw-r--r--gui/ksmallslider.cpp2
-rw-r--r--gui/mdwenum.cpp3
-rw-r--r--gui/mdwslider.cpp3
-rw-r--r--gui/mdwswitch.cpp1
-rw-r--r--gui/mixdevicewidget.cpp1
-rw-r--r--gui/verticaltext.cpp1
-rw-r--r--gui/viewbase.cpp2
-rw-r--r--gui/viewdockareapopup.cpp3
-rw-r--r--gui/viewsliders.cpp1
-rw-r--r--gui/volumeslider.cpp5
43 files changed, 52 insertions, 126 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 961eb00..340197b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,10 @@ add_definitions( -DTRANSLATION_DOMAIN=\"kmix\" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-find_package(ECM 5.10.0 REQUIRED NO_MODULE)
+set (QT_MIN_VERSION "5.4.0")
+set (KF5_MIN_VERSION "5.14.0")
+
+find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
@@ -13,8 +16,9 @@ include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMPackageConfigHelpers)
include(ECMInstallIcons)
+include(ECMQtDeclareLoggingCategory)
-find_package(Qt5 5.2.0 REQUIRED NO_MODULE COMPONENTS
+find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS
Core
DBus
Gui
@@ -22,7 +26,7 @@ find_package(Qt5 5.2.0 REQUIRED NO_MODULE COMPONENTS
Xml
)
-find_package(KF5 REQUIRED COMPONENTS
+find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Completion
Config
ConfigWidgets
@@ -105,6 +109,11 @@ if (CANBERRA_FOUND)
endif (CANBERRA_FOUND)
+ecm_qt_declare_logging_category(kmix_debug_SRCS
+ HEADER kmix_debug.h
+ IDENTIFIER KMIX_LOG
+ CATEGORY_NAME org.kde.kmix)
+
####################################################################################################
########### definitions: DBUSADAPTOR ###############################################################
####################################################################################################
@@ -180,7 +189,7 @@ set(kmix_KDEINIT_SRCS ${kmix_adaptor_SRCS} ${kmix_backend_SRCS}
core/mixdevice.cpp
core/mixdevicecomposite.cpp
core/volume.cpp
- core/kmixdebug.cpp
+ ${kmix_debug_SRCS}
)
kf5_add_kdeinit_executable(kmix ${kmix_KDEINIT_SRCS})
@@ -237,7 +246,7 @@ install(TARGETS kmix ${INSTALL_TARGETS_DEFAULT_ARGS} )
core/volume.cpp
core/mixertoolbox.cpp
core/kmixdevicemanager.cpp
- core/kmixdebug.cpp
+ ${kmix_debug_SRCS}
)
#qt4_add_dbus_adaptor(kded_kmixd_SRCS org.kde.KMixD.xml kmixd.h Mixer)
@@ -300,7 +309,7 @@ set(kmixctrl_KDEINIT_SRCS ${kmix_adaptor_SRCS} ${kmix_backend_SRCS}
core/mixdevice.cpp
core/volume.cpp
core/mixertoolbox.cpp
- core/kmixdebug.cpp
+ ${kmix_debug_SRCS}
# There is no actual need for kmixdevicemanager.cpp (hotplug makes no sense in kmixctrl), but
# the dependency comes in via mixertoolbox.cpp
core/kmixdevicemanager.cpp
diff --git a/apps/KMixApp.cpp b/apps/KMixApp.cpp
index a074620..bc67108 100644
--- a/apps/KMixApp.cpp
+++ b/apps/KMixApp.cpp
@@ -22,7 +22,6 @@
#include "KMixApp.h"
#include <kcmdlineargs.h>
-#include <kdebug.h>
#include "apps/kmix.h"
#include "core/ControlManager.h"
diff --git a/apps/kmix.cpp b/apps/kmix.cpp
index fdccdbc..bcf4591 100644
--- a/apps/kmix.cpp
+++ b/apps/kmix.cpp
@@ -43,7 +43,6 @@
#include <kapplication.h>
#include <kstandardaction.h>
#include <khelpmenu.h>
-#include <kdebug.h>
#include <kxmlguifactory.h>
#include <kglobal.h>
#include <kactioncollection.h>
@@ -67,7 +66,7 @@
#include "gui/dialogaddview.h"
#include "gui/dialogselectmaster.h"
#include "dbus/dbusmixsetwrapper.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusPendingCall>
#include <QKeySequence>
diff --git a/apps/kmixctrl.cpp b/apps/kmixctrl.cpp
index 0682336..3cd563c 100644
--- a/apps/kmixctrl.cpp
+++ b/apps/kmixctrl.cpp
@@ -30,7 +30,6 @@
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kconfig.h>
-#include <kdebug.h>
#include "gui/kmixtoolbox.h"
#include "core/GlobalConfig.h"
diff --git a/apps/kmixd.cpp b/apps/kmixd.cpp
index 92948f6..cca9da2 100644
--- a/apps/kmixd.cpp
+++ b/apps/kmixd.cpp
@@ -30,7 +30,6 @@
#include <kconfig.h>
#include <kaction.h>
#include <kstandardaction.h>
-#include <kdebug.h>
#include <kxmlguifactory.h>
#include <kglobal.h>
#include <kactioncollection.h>
diff --git a/apps/main.cpp b/apps/main.cpp
index 9f196de..b2461c5 100644
--- a/apps/main.cpp
+++ b/apps/main.cpp
@@ -24,14 +24,13 @@
#include <k4aboutdata.h>
#include <KLocalizedString>
-#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include "KMixApp.h"
#include "core/version.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
static const char description[] =
I18N_NOOP("KMix - KDE's full featured mini mixer");
diff --git a/backends/mixer_alsa9.cpp b/backends/mixer_alsa9.cpp
index c917d3e..d85222b 100644
--- a/backends/mixer_alsa9.cpp
+++ b/backends/mixer_alsa9.cpp
@@ -30,7 +30,6 @@
#include "core/volume.h"
// KDE
-#include <kdebug.h>
#include <klocale.h>
// Qt
diff --git a/backends/mixer_backend.cpp b/backends/mixer_backend.cpp
index ec88f11..a20e1cd 100644
--- a/backends/mixer_backend.cpp
+++ b/backends/mixer_backend.cpp
@@ -257,7 +257,7 @@ shared_ptr<MixDevice> Mixer_Backend::recommendedMaster()
{
if ( !_mixer->isDynamic())
// This should never ever happen, as KMix does NOT accept soundcards without controls
- qCCritical(KMIX_LOG) << "Mixer_Backend::recommendedMaster(): returning invalid master. This is a bug in KMix. Please file a bug report stating how you produced this." << endl;
+ qCCritical(KMIX_LOG) << "Mixer_Backend::recommendedMaster(): returning invalid master. This is a bug in KMix. Please file a bug report stating how you produced this.";
}
// If we reach this code path, then obiously m_recommendedMaster == 0 (see above)
diff --git a/backends/mixer_backend.h b/backends/mixer_backend.h
index 65e9575..78e41d1 100644
--- a/backends/mixer_backend.h
+++ b/backends/mixer_backend.h
@@ -27,7 +27,7 @@
#include <QTimer>
#include "core/mixdevice.h"
#include "core/mixset.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
class Mixer;
diff --git a/backends/mixer_mpris2.cpp b/backends/mixer_mpris2.cpp
index 3cdc5a9..0dddd8c 100644
--- a/backends/mixer_mpris2.cpp
+++ b/backends/mixer_mpris2.cpp
@@ -23,7 +23,7 @@
#include "core/mixer.h"
#include "core/ControlManager.h"
#include "core/GlobalConfig.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
#include <QStringList>
#include <QDBusReply>
diff --git a/backends/mixer_oss4.cpp b/backends/mixer_oss4.cpp
index 8fee1b2..fa430e8 100644
--- a/backends/mixer_oss4.cpp
+++ b/backends/mixer_oss4.cpp
@@ -521,14 +521,14 @@ bool Mixer_OSS4::hasChangedControls()
minfo.dev = -1;
if ( wrapIoctl( ioctl(m_fd, SNDCTL_MIXERINFO, &minfo) ) < 0 )
{
- qCDebug(KMIX_LOG) << "Can't get mixerinfo from card!\n" << endl;
+ qCDebug(KMIX_LOG) << "Can't get mixerinfo from card!\n";
return false;
}
if (!minfo.enabled)
{
// Mixer is disabled. Probably disconnected USB device or card is unavailable;
- qCDebug(KMIX_LOG) << "Mixer for card is disabled!\n" << endl;
+ qCDebug(KMIX_LOG) << "Mixer for card is disabled!\n";
close();
return false;
}
@@ -616,7 +616,7 @@ int Mixer_OSS4::writeVolumeToHW(const QString& id, shared_ptr<MixDevice> md)
if ( wrapIoctl( ioctl(m_fd, SNDCTL_MIX_EXTINFO, &extinfo) ) < 0 )
{
//TO DO: more specific error handling
- kDebug ( 67100 ) << "failed to read info for control " << id2num(id) << endl;
+ qCDebug(KMIX_LOG) << "failed to read info for control " << id2num(id);
return Mixer::ERR_READ;
}
@@ -661,7 +661,7 @@ int Mixer_OSS4::writeVolumeToHW(const QString& id, shared_ptr<MixDevice> md)
if ( wrapIoctl ( ioctl (m_fd, SNDCTL_MIX_WRITE, &mv) ) < 0 )
{
- kDebug ( 67100 ) << "error writing to control" << extinfo.extname << endl;
+ qCDebug(KMIX_LOG) << "error writing to control" << extinfo.extname;
return Mixer::ERR_WRITE;
}
return 0;
@@ -678,7 +678,7 @@ void Mixer_OSS4::setEnumIdHW(const QString& id, unsigned int idx)
if ( wrapIoctl ( ioctl(m_fd, SNDCTL_MIX_EXTINFO, &extinfo) ) < 0 )
{
//TO DO: more specific error handling
- kDebug ( 67100 ) << "failed to read info for control " << id2num(id) << endl;
+ qCDebug(KMIX_LOG) << "failed to read info for control " << id2num(id);
return;
}
@@ -711,7 +711,7 @@ void Mixer_OSS4::setEnumIdHW(const QString& id, unsigned int idx)
if ( wrapIoctl ( ioctl (m_fd, SNDCTL_MIX_WRITE, &mv) ) < 0 )
{
/* Oops, can't write to mixer */
- kDebug ( 67100 ) << "error writing to control" << extinfo.extname << endl;
+ qCDebug(KMIX_LOG) << "error writing to control" << extinfo.extname;
}
}
@@ -753,28 +753,28 @@ int Mixer_OSS4::wrapIoctl(int ioctlRet)
{
case EIO:
{
- kDebug ( 67100 ) << "A hardware level error occurred" << endl;
+ qCDebug(KMIX_LOG) << "A hardware level error occurred";
break;
}
case EINVAL:
{
- kDebug ( 67100 ) << "Operation caused an EINVAL. You may have found a bug in kmix OSS4 module or in OSS4 itself" << endl;
+ qCDebug(KMIX_LOG) << "Operation caused an EINVAL. You may have found a bug in kmix OSS4 module or in OSS4 itself";
break;
}
case ENXIO:
{
- kDebug ( 67100 ) << "Operation index out of bounds or requested device does not exist - you likely found a bug in the kmix OSS4 module" << endl;
+ qCDebug(KMIX_LOG) << "Operation index out of bounds or requested device does not exist - you likely found a bug in the kmix OSS4 module";
break;
}
case EPERM:
case EACCES:
{
- kDebug ( 67100 ) << errorText ( Mixer::ERR_PERM ) << endl;
+ qCDebug(KMIX_LOG) << errorText ( Mixer::ERR_PERM );
break;
}
case ENODEV:
{
- kDebug ( 67100 ) << "kmix received an ENODEV error - are the OSS4 drivers loaded ?" << endl;
+ qCDebug(KMIX_LOG) << "kmix received an ENODEV error - are the OSS4 drivers loaded ?";
break;
}
case EPIPE:
diff --git a/core/ControlManager.cpp b/core/ControlManager.cpp
index edd4d06..1b99566 100644
--- a/core/ControlManager.cpp
+++ b/core/ControlManager.cpp
@@ -19,7 +19,7 @@
#include "ControlManager.h"
#include "core/GlobalConfig.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
#include <QMutableListIterator>
diff --git a/core/MediaController.cpp b/core/MediaController.cpp
index a98bedc..f474073 100644
--- a/core/MediaController.cpp
+++ b/core/MediaController.cpp
@@ -28,7 +28,7 @@
*/
#include "core/MediaController.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
//#include <phonon/audiooutput.h>
//#include <phonon/backendcapabilities.h>
diff --git a/core/kmixdebug.cpp b/core/kmixdebug.cpp
deleted file mode 100644
index 85e8ff9..0000000
--- a/core/kmixdebug.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * KMix -- KDE's full featured mini mixer
- * Copyright 2015 Alexander Potashev <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License or (at your option) version 3 or any later version
- * accepted by the membership of KDE e.V. (or its successor approved
- * by the membership of KDE e.V.), which shall act as a proxy
- * defined in Section 14 of version 3 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "kmixdebug.h"
-
-Q_LOGGING_CATEGORY(KMIX_LOG, "kmix")
diff --git a/core/kmixdebug.h b/core/kmixdebug.h
deleted file mode 100644
index 18deab7..0000000
--- a/core/kmixdebug.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * KMix -- KDE's full featured mini mixer
- * Copyright 2015 Alexander Potashev <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License or (at your option) version 3 or any later version
- * accepted by the membership of KDE e.V. (or its successor approved
- * by the membership of KDE e.V.), which shall act as a proxy
- * defined in Section 14 of version 3 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef KMIXDEBUG_H
-#define KMIXDEBUG_H
-
-#include <QtCore/QLoggingCategory>
-
-Q_DECLARE_LOGGING_CATEGORY(KMIX_LOG)
-
-#endif // KMIXDEBUG_H
diff --git a/core/kmixdevicemanager.cpp b/core/kmixdevicemanager.cpp
index ee11e97..e31fefe 100644
--- a/core/kmixdevicemanager.cpp
+++ b/core/kmixdevicemanager.cpp
@@ -19,7 +19,6 @@
*/
#include "core/kmixdevicemanager.h"
-#include <kdebug.h>
#ifdef __GNUC__
#warning KMix KF5 build does not support hotplugging yet
diff --git a/core/mixdevice.cpp b/core/mixdevice.cpp
index 7fc187e..3f609ce 100644
--- a/core/mixdevice.cpp
+++ b/core/mixdevice.cpp
@@ -23,7 +23,6 @@
#include <qregexp.h>
-#include <kdebug.h>
#include <klocale.h>
#include "core/ControlPool.h"
@@ -142,7 +141,7 @@ void MixDevice::init( Mixer* mixer, const QString& id, const QString& name, con
_moveDestinationMixSet = moveDestinationMixSet;
if ( _id.contains(' ') ) {
// The key is used in the config file. IdbusControlWrappert MUST NOT contain spaces
- qCCritical(KMIX_LOG) << "MixDevice::setId(\"" << id << "\") . Invalid key - it must not contain spaces" << endl;
+ qCCritical(KMIX_LOG) << "MixDevice::setId(\"" << id << "\") . Invalid key - it must not contain spaces";
_id.replace(' ', '_');
}
// qCDebug(KMIX_LOG) << "MixDevice::init() _id=" << _id;
diff --git a/core/mixer.cpp b/core/mixer.cpp
index 8b8ff44..268b191 100644
--- a/core/mixer.cpp
+++ b/core/mixer.cpp
@@ -25,7 +25,6 @@
#include <klocale.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <kdebug.h>
#include "backends/mixer_backend.h"
#include "backends/kmix-backends.cpp"
@@ -274,9 +273,9 @@ bool Mixer::openIfValid()
else
{
if ( !m_dynamic )
- qCCritical(KMIX_LOG) << "Mixer::open() no master detected." << endl;
+ qCCritical(KMIX_LOG) << "Mixer::open() no master detected.";
else
- qCDebug(KMIX_LOG) << "Mixer::open() no master detected." << endl;
+ qCDebug(KMIX_LOG) << "Mixer::open() no master detected.";
QString noMaster = "---no-master-detected---";
setLocalMasterMD(noMaster); // no master
}
diff --git a/core/mixertoolbox.cpp b/core/mixertoolbox.cpp
index 223a6a6..827ebe9 100644
--- a/core/mixertoolbox.cpp
+++ b/core/mixertoolbox.cpp
@@ -26,7 +26,6 @@
#include <QString>
#include <QStringBuilder>
-//#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
diff --git a/core/mixset.cpp b/core/mixset.cpp
index 3cde8b8..e033b33 100644
--- a/core/mixset.cpp
+++ b/core/mixset.cpp
@@ -23,10 +23,9 @@
//KMix
#include "mixset.h"
#include "core/mixdevice.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
// KDE
-#include <kdebug.h>
#include <kconfig.h>
#include <kconfiggroup.h>
diff --git a/core/volume.cpp b/core/volume.cpp
index 3f598f3..971c0c5 100644
--- a/core/volume.cpp
+++ b/core/volume.cpp
@@ -20,11 +20,11 @@
*/
#include "core/volume.h"
+#include "kmix_debug.h"
// for operator<<()
#include <iostream>
-#include <kdebug.h>
#include <klocalizedstring.h>
float Volume::VOLUME_STEP_DIVISOR = 20;
diff --git a/core/volume.h b/core/volume.h
index da50947..ccda479 100644
--- a/core/volume.h
+++ b/core/volume.h
@@ -23,9 +23,9 @@
#include <fstream>
-#include <kdebug.h>
-
+#include <QDebug>
#include <QList>
+#include <QMap>
class VolumeChannel;
diff --git a/dbus/dbusmixerwrapper.cpp b/dbus/dbusmixerwrapper.cpp
index 506a13b..cb965bf 100644
--- a/dbus/dbusmixerwrapper.cpp
+++ b/dbus/dbusmixerwrapper.cpp
@@ -26,7 +26,7 @@
#include "core/ControlManager.h"
#include "core/mixdevice.h"
#include "core/volume.h"
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
#include "dbus/dbusmixsetwrapper.h"
#include "mixeradaptor.h"
diff --git a/gui/dialogaddview.cpp b/gui/dialogaddview.cpp
index c7a1295..e4dec59 100644
--- a/gui/dialogaddview.cpp
+++ b/gui/dialogaddview.cpp
@@ -29,7 +29,6 @@
#include <QHBoxLayout>
#include <kcombobox.h>
-#include <kdebug.h>
#include <klocale.h>
#include "core/mixdevice.h"
@@ -235,7 +234,7 @@ void DialogAddView::apply()
if ( button != 0 ) {
QString viewName = button->objectName();
if ( mixer == 0 ) {
- qCCritical(KMIX_LOG) << "DialogAddView::createPage(): Invalid Mixer (mixer=0)" << endl;
+ qCCritical(KMIX_LOG) << "DialogAddView::createPage(): Invalid Mixer (mixer=0)";
return; // can not happen
}
else {
diff --git a/gui/dialogchoosebackends.cpp b/gui/dialogchoosebackends.cpp
index b80d8f6..beeb99c 100644
--- a/gui/dialogchoosebackends.cpp
+++ b/gui/dialogchoosebackends.cpp
@@ -30,7 +30,6 @@
#include <QHBoxLayout>
#include <kcombobox.h>
-#include <kdebug.h>
#include <klocale.h>
#include "core/ControlManager.h"
diff --git a/gui/dialogselectmaster.cpp b/gui/dialogselectmaster.cpp
index 2e6fdf7..a1a2ba5 100644
--- a/gui/dialogselectmaster.cpp
+++ b/gui/dialogselectmaster.cpp
@@ -26,7 +26,6 @@
#include <QListWidget>
#include <kcombobox.h>
-#include <kdebug.h>
#include <kiconloader.h>
#include <klocale.h>
diff --git a/gui/dialogviewconfiguration.cpp b/gui/dialogviewconfiguration.cpp
index 681997c..6545bb2 100644
--- a/gui/dialogviewconfiguration.cpp
+++ b/gui/dialogviewconfiguration.cpp
@@ -30,7 +30,6 @@
#include <QVBoxLayout>
#include <QGridLayout>
-#include <kdebug.h>
#include <kdialog.h>
#include <kicon.h>
#include <KIconLoader>
diff --git a/gui/dialogviewconfiguration.h b/gui/dialogviewconfiguration.h
index 6a690b9..c84059b 100644
--- a/gui/dialogviewconfiguration.h
+++ b/gui/dialogviewconfiguration.h
@@ -36,7 +36,6 @@ class QVBoxLayout;
#include <QMimeData>
// KDE
-#include <kdebug.h>
#include <kdialog.h>
// KMix
diff --git a/gui/guiprofile.cpp b/gui/guiprofile.cpp
index 36f5fd3..ba7b5fc 100644
--- a/gui/guiprofile.cpp
+++ b/gui/guiprofile.cpp
@@ -30,7 +30,6 @@
#include <utility>
// KDE
-#include <kdebug.h>
#include <kstandarddirs.h>
// KMix
@@ -367,7 +366,7 @@ bool GUIProfile::readProfile(const QString& ref_fileName)
} // Read OK
else {
// !! this error message about faulty profiles should probably be surrounded with i18n()
- qCCritical(KMIX_LOG) << "ERROR: The profile '" << ref_fileName<< "' contains errors, and is not used." << endl;
+ qCCritical(KMIX_LOG) << "ERROR: The profile '" << ref_fileName<< "' contains errors, and is not used.";
}
delete gpp;
delete xmlReader;
@@ -680,7 +679,7 @@ void ProfControl::setSubcontrols(QString sctls)
QStringListIterator qslIt(qsl);
while (qslIt.hasNext()) {
QString sctl = qslIt.next();
- //qCDebug(KMIX_LOG) << "setSubcontrols found: " << sctl.toLocal8Bit().constData() << endl;
+ //qCDebug(KMIX_LOG) << "setSubcontrols found: " << sctl.toLocal8Bit().constData();
if ( sctl == "pvolume" ) _useSubcontrolPlayback = true;
else if ( sctl == "cvolume" ) _useSubcontrolCapture = true;
else if ( sctl == "pswitch" ) _useSubcontrolPlaybackSwitch = true;
diff --git a/gui/guiprofile.h b/gui/guiprofile.h
index b5e8a4f..ddf747f 100644
--- a/gui/guiprofile.h
+++ b/gui/guiprofile.h
@@ -23,7 +23,7 @@
class Mixer;
-#include "core/kmixdebug.h"
+#include "kmix_debug.h"
#include <qxml.h>
#include <QColor>
diff --git a/gui/kmixdockwidget.cpp b/gui/kmixdockwidget.cpp
index 50bf8eb..fdc528b 100644
--- a/gui/kmixdockwidget.cpp
+++ b/gui/kmixdockwidget.cpp
@@ -26,7 +26,6 @@
#include <kaction.h>
#include <klocale.h>
#include <kmenu.h>
-#include <kdebug.h>
#include <kwindowsystem.h>
#include <kactioncollection.h>
#include <ktoggleaction.h>
@@ -417,7 +416,7 @@ void KMixDockWidget::contextMenuAboutToShow()
{
// Enable/Disable "Muted" menu item
KToggleAction *dockMuteAction = static_cast<KToggleAction*>(findAction("dock_mute"));
- qDebug() << "DOCK MUTE" << dockMuteAction;
+ qCDebug(KMIX_LOG) << "DOCK MUTE" << dockMuteAction;
if (dockMuteAction)
updateDockMuteAction(dockMuteAction);
}
diff --git a/gui/kmixerwidget.cpp b/gui/kmixerwidget.cpp
index 161a6a4..74fd0ef 100644
--- a/gui/kmixerwidget.cpp
+++ b/gui/kmixerwidget.cpp
@@ -31,7 +31,6 @@
// KDE
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
#include <kglobal.h>
#include <kicon.h>
#include <klocale.h>
diff --git a/gui/kmixtoolbox.cpp b/gui/kmixtoolbox.cpp
index 988c82e..60ed656 100644
--- a/gui/kmixtoolbox.cpp
+++ b/gui/kmixtoolbox.cpp
@@ -24,7 +24,6 @@
#include <QWidget>
#include <QString>
-//#include <kdebug.h>
#include <KComponentData>
#include <kglobal.h>
#include <kglobalaccel.h>
diff --git a/gui/ksmallslider.cpp b/gui/ksmallslider.cpp
index 0870c24..39e254b 100644
--- a/gui/ksmallslider.cpp
+++ b/gui/ksmallslider.cpp
@@ -24,8 +24,6 @@
// For INT_MAX
#include <limits.h>
-#include <kdebug.h>
-
#include <QWidget>
#include <qpainter.h>
#include <QColor>
diff --git a/gui/mdwenum.cpp b/gui/mdwenum.cpp
index ac8202c..0d8380d 100644
--- a/gui/mdwenum.cpp
+++ b/gui/mdwenum.cpp
@@ -30,7 +30,6 @@
#include <kactioncollection.h>
#include <kconfig.h>
#include <kcombobox.h>
-#include <kdebug.h>
#include <kglobalaccel.h>
#include <klocale.h>
#include <kmenu.h>
@@ -114,7 +113,7 @@ void MDWEnum::update()
_enumCombo->setCurrentIndex( m_mixdevice->enumId() );
}
else {
- qCCritical(KMIX_LOG) << "MDWEnum::update() enumID=" << m_mixdevice->enumId() << " is no Enum ... skipped" << endl;
+ qCCritical(KMIX_LOG) << "MDWEnum::update() enumID=" << m_mixdevice->enumId() << " is no Enum ... skipped";
}
}
diff --git a/gui/mdwslider.cpp b/gui/mdwslider.cpp
index 669eb24..7cab68c 100644
--- a/gui/mdwslider.cpp
+++ b/gui/mdwslider.cpp
@@ -27,7 +27,6 @@
#include <kaction.h>
#include <kmenu.h>
#include <kglobalaccel.h>
-#include <kdebug.h>
#include <kactioncollection.h>
#include <ktoggleaction.h>
@@ -743,7 +742,7 @@ void MDWSlider::setIcon( QString filename, QWidget* label )
}
else
{
- qCCritical(KMIX_LOG) << "Pixmap missing. filename=" << filename << endl;
+ qCCritical(KMIX_LOG) << "Pixmap missing. filename=" << filename;
}
}
diff --git a/gui/mdwswitch.cpp b/gui/mdwswitch.cpp
index e776243..2d9b4c0 100644
--- a/gui/mdwswitch.cpp
+++ b/gui/mdwswitch.cpp
@@ -29,7 +29,6 @@
//#include <kaction.h>
//#include <kmenu.h>
//#include <kglobalaccel.h>
-//#include <kdebug.h>
//#include <ktoggleaction.h>
//#include <kactioncollection.h>
//
diff --git a/gui/mixdevicewidget.cpp b/gui/mixdevicewidget.cpp
index efc4db9..f7d5e9b 100644
--- a/gui/mixdevicewidget.cpp
+++ b/gui/mixdevicewidget.cpp
@@ -29,7 +29,6 @@
#include <kmenu.h>
#include <kglobalaccel.h>
#include <kshortcutsdialog.h>
-#include <kdebug.h>
#include <qcursor.h>
#include <QMouseEvent>
diff --git a/gui/verticaltext.cpp b/gui/verticaltext.cpp
index 54913a9..048444c 100644
--- a/gui/verticaltext.cpp
+++ b/gui/verticaltext.cpp
@@ -21,7 +21,6 @@
#include "verticaltext.h"
#include <QPainter>
-#include <kdebug.h>
diff --git a/gui/viewbase.cpp b/gui/viewbase.cpp
index 68658e1..874a0da 100644
--- a/gui/viewbase.cpp
+++ b/gui/viewbase.cpp
@@ -362,7 +362,7 @@ void ViewBase::load(KConfig *config)
// Consult GuiProfile for visibility
mdwEnabled = findMdw(mdw->mixDevice()->id(), guiCompl) != 0; // Match GUI complexity
-// kWarning() << "---------- FIRST RUN: md=" << md->id() << ", guiVisibility=" << guiCompl.getId() << ", enabled=" << mdwEnabled;
+// qCWarning(KMIX_LOG) << "---------- FIRST RUN: md=" << md->id() << ", guiVisibility=" << guiCompl.getId() << ", enabled=" << mdwEnabled;
if (mdwEnabled)
{
diff --git a/gui/viewdockareapopup.cpp b/gui/viewdockareapopup.cpp
index 3f48a5e..9d07fee 100644
--- a/gui/viewdockareapopup.cpp
+++ b/gui/viewdockareapopup.cpp
@@ -32,7 +32,6 @@
// KDE
#include <kaction.h>
#include <kapplication.h>
-#include <kdebug.h>
#include <kdialog.h>
#include <kicon.h>
#include <klocale.h>
@@ -396,7 +395,7 @@ void ViewDockAreaPopup::constructionFinished()
_layoutMDW->activate();
//bool fnc = focusNextChild();
- //kWarning() << "fnc=" <<fnc;
+ //qCWarning(KMIX_LOG) << "fnc=" <<fnc;
// qCDebug(KMIX_LOG) << "F layout()=" << layout() << ", _layoutMDW=" << _layoutMDW;
}
diff --git a/gui/viewsliders.cpp b/gui/viewsliders.cpp
index 0602a0d..139b035 100644
--- a/gui/viewsliders.cpp
+++ b/gui/viewsliders.cpp
@@ -46,7 +46,6 @@
// KDE
-#include <kdebug.h>
#include <KIcon>
#include <KLocale>
diff --git a/gui/volumeslider.cpp b/gui/volumeslider.cpp
index af7da39..7db1a07 100644
--- a/gui/volumeslider.cpp
+++ b/gui/volumeslider.cpp
@@ -23,7 +23,6 @@
#include <QFontMetrics>
#include "volumeslider.h"
-#include <kdebug.h>
VolumeSlider::VolumeSlider(Qt::Orientation orientation, QWidget* parent) : QSlider(orientation, parent)
,m_orientation(orientation),m_tooltip(new QLabel(parent,Qt::ToolTip))
@@ -115,7 +114,7 @@ void VolumeSlider::mouseMoveEvent(QMouseEvent* event)
m_tooltip->move(mapToGlobal(sliderHandle.topLeft()).x(),mapToGlobal(sliderHandle.topLeft()).y()+height());
}
- //kDebug() << "Position is"<<mapToGlobal(sliderHandle.topLeft()).x()<<","<<mapToGlobal(sliderHandle.topLeft()).y();
- //kDebug() << "Volume is "<<percent;
+ //qCDebug(KMIX_LOG) << "Position is"<<mapToGlobal(sliderHandle.topLeft()).x()<<","<<mapToGlobal(sliderHandle.topLeft()).y();
+ //qCDebug(KMIX_LOG) << "Volume is "<<percent;
}