Commit 0614e9c7 authored by Luigi Toscano's avatar Luigi Toscano

Use ecm_qt_declare_logging_category and clean includes

- define the logging categories using the specific ECM macro;
- remove the kdebug.h includes.
parent f3004651
......@@ -16,6 +16,7 @@ include(KDECMakeSettings NO_POLICY_SCOPE)
include(FeatureSummary)
include(ECMInstallIcons)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Gui Svg Network Test Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Completion GlobalAccel
......@@ -25,7 +26,7 @@ find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
find_package(Taglib 1.6 REQUIRED)
include_directories( ${PHONON_INCLUDES} ${KDE4_INCLUDES} ${QT_INCLUDES} )
include_directories(${CMAKE_BINARY_DIR} ${PHONON_INCLUDES} ${KDE4_INCLUDES} ${QT_INCLUDES} )
add_subdirectory( doc )
add_subdirectory( tests )
......@@ -91,7 +92,6 @@ set(juk_SRCS ${tunepimp_SRCS}
webimagefetcher.cpp
historyplaylist.cpp
juk.cpp
juk_debug.cpp
keydialog.cpp
lyricswidget.cpp
main.cpp
......@@ -132,6 +132,9 @@ set(juk_SRCS ${tunepimp_SRCS}
ktrm.cpp
viewmode.cpp )
ecm_qt_declare_logging_category(juk_SRCS HEADER juk_debug.h
IDENTIFIER JUK_LOG CATEGORY_NAME org.kde.juk)
qt5_add_dbus_adaptor( juk_SRCS org.kde.juk.collection.xml
dbuscollectionproxy.h DBusCollectionProxy )
qt5_add_dbus_adaptor( juk_SRCS org.kde.juk.player.xml playermanager.h PlayerManager)
......
......@@ -17,7 +17,6 @@
#include "actioncollection.h"
#include <kactioncollection.h>
#include <kdebug.h>
#include "juk.h"
#include "juk_debug.h"
......
......@@ -23,7 +23,6 @@
#include <kmessagebox.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
#include <ktoggleaction.h>
#include <kglobal.h>
......
......@@ -18,7 +18,6 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <kmenu.h>
#include <kconfig.h>
#include <kconfiggroup.h>
......
......@@ -19,7 +19,6 @@
#include <kglobal.h>
#include <kapplication.h>
#include <kdebug.h>
#include <QRegExp>
#include <QLabel>
......
......@@ -28,7 +28,6 @@
#include <QByteArray>
#include <QMap>
#include <kdebug.h>
#include <ktemporaryfile.h>
#include <kdemacros.h>
#include <kurl.h>
......
......@@ -16,7 +16,6 @@
#include "coverproxy.h"
#include <kdebug.h>
#include <kio/job.h>
#include "covermanager.h"
......
......@@ -22,7 +22,6 @@
#include <QtDBus/QDBusConnection>
#include <KTemporaryFile>
#include <kdebug.h>
#include "collectionadaptor.h"
#include "playlistcollection.h"
......
......@@ -24,7 +24,7 @@
#include <kfiledialog.h>
#include <klocale.h>
#include <kdebug.h>
#include "juk_debug.h"
////////////////////////////////////////////////////////////////////////////////
// public methods
......
......@@ -16,8 +16,6 @@
#include "filehandle.h"
#include <kdebug.h>
#include <QFileInfo>
#include <limits.h>
......
......@@ -20,7 +20,6 @@
#include <algorithm>
#include <kdebug.h>
#include <kurl.h>
#include <kurlrequester.h>
#include <kiconloader.h>
......
......@@ -17,9 +17,9 @@
#include "filerenameroptions.h"
#include <klocale.h>
#include <kdebug.h>
#include <knuminput.h>
#include "juk_debug.h"
FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
const TagRenamerOptions &options) :
......
......@@ -23,7 +23,8 @@
#include <klocale.h>
#include <kglobal.h>
#include <kdebug.h>
#include "juk_debug.h"
////////////////////////////////////////////////////////////////////////////////
// HistoryPlayList public members
......
......@@ -18,7 +18,6 @@
#include "juk.h"
#include <kstatusbar.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kactioncollection.h>
......
/* This file is part of the KDE project
Copyright (C) 2015 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "juk_debug.h"
Q_LOGGING_CATEGORY(JUK_LOG, "org.kde.juk")
/* This file is part of the KDE project
Copyright (C) 2015 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef JUK_DEBUG_H
#define JUK_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(JUK_LOG)
#endif
......@@ -26,7 +26,6 @@
#include <kprotocolmanager.h>
#include <kurl.h>
#include <kdebug.h>
#include <kio/job.h>
#include <QCoreApplication>
......@@ -46,6 +45,8 @@
#include <fixx11h.h>
#endif
#include "juk_debug.h"
class KTRMLookup;
extern "C"
......
......@@ -23,14 +23,13 @@
#include <KActionCollection>
#include <KToggleAction>
#include <KConfigGroup>
#include <QDebug>
#include "juk_debug.h"
#include <QIcon>
#include <kglobal.h>
#include "lyricswidget.h"
#include "tag.h"
#include "actioncollection.h"
#include "juk_debug.h"
LyricsWidget::LyricsWidget(QWidget* parent): QTextBrowser(parent),
......
......@@ -17,7 +17,6 @@
#include "mediafiles.h"
#include <kfiledialog.h>
#include <kdebug.h>
#include <klocale.h>
#include <kurl.h>
#include <kio/netaccess.h>
......@@ -26,8 +25,6 @@
#include <QWidget>
#include <QtCore/QFile>
#include "juk_debug.h"
#include <taglib.h>
#include <taglib_config.h>
#include <tag.h>
......@@ -51,6 +48,8 @@
#include <mp4file.h>
#endif
#include "juk_debug.h"
namespace MediaFiles {
static QStringList savedMimeTypes;
......
......@@ -23,11 +23,11 @@
#include "tag.h"
#include "collectionlist.h"
#include "tagtransactionmanager.h"
#include "juk_debug.h"
#include <kxmlguiwindow.h>
#include <kstatusbar.h>
#include <klocale.h>
#include <kdebug.h>
#include <QList>
#include <QFileInfo>
......
......@@ -19,7 +19,6 @@
#include <kiconloader.h>
#include <klocale.h>
#include <kdebug.h>
#include <krandom.h>
#include <kglobalsettings.h>
#include <kio/netaccess.h>
......
......@@ -18,7 +18,6 @@
#include "playermanager.h"
#include <kdebug.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kactioncollection.h>
......
......@@ -24,7 +24,6 @@
#include <kiconloader.h>
#include <klineedit.h>
#include <klocale.h>
#include <kdebug.h>
#include <kfiledialog.h>
#include <kglobalsettings.h>
#include <kurl.h>
......@@ -1168,7 +1167,7 @@ QMimeData* Playlist::mimeData(const QList<QTreeWidgetItem *> items) const
bool Playlist::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action)
{
qDebug() << index;
qCDebug(JUK_LOG) << index;
return true;
}
......
......@@ -19,7 +19,6 @@
#define PLAYLIST_H
#include <kglobalsettings.h>
#include <kdebug.h>
#include <QVector>
#include <QEvent>
......@@ -32,6 +31,7 @@
#include "tagguesser.h"
#include "playlistinterface.h"
#include "filehandle.h"
#include "juk_debug.h"
class KMenu;
class KActionMenu;
......
......@@ -22,7 +22,6 @@
#include <kmenu.h>
#include <QAction>
#include <kactioncollection.h>
#include <kdebug.h>
#include <ktoggleaction.h>
#include <kselectaction.h>
#include <kconfiggroup.h>
......
......@@ -17,7 +17,6 @@
#include "playlistitem.h"
#include <config-juk.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <QPixmap>
......@@ -30,6 +29,7 @@
#include "coverinfo.h"
#include "covermanager.h"
#include "tagtransactionmanager.h"
#include "juk_debug.h"
PlaylistItemList PlaylistItem::m_playingItems; // static
......
......@@ -17,8 +17,6 @@
#ifndef JUK_PLAYLISTITEM_H
#define JUK_PLAYLISTITEM_H
#include <kdebug.h>
#include <QExplicitlySharedDataPointer>
#include <QVector>
#include <QPixmap>
......@@ -27,6 +25,7 @@
#include "tagguesser.h"
#include "filehandle.h"
#include "juk_debug.h"
class Playlist;
class PlaylistItem;
......
......@@ -20,7 +20,7 @@
#include "collectionlist.h"
#include "juk-exception.h"
#include <kdebug.h>
#include "juk_debug.h"
////////////////////////////////////////////////////////////////////////////////
// public methods
......
......@@ -21,7 +21,6 @@
#include <QAction>
#include <kglobal.h>
#include <kactioncollection.h>
#include <kdebug.h>
#include <ktoggleaction.h>
#include <kconfiggroup.h>
#include <kacceleratormanager.h>
......
......@@ -17,9 +17,8 @@
#include "scrobbleconfigdlg.h"
#include "scrobbler.h"
#include <QDebug>
#include "juk_debug.h"
#include <KLineEdit>
#include <QPushButton>
#include <KLocalizedString>
......@@ -31,7 +30,6 @@
#include <QFormLayout>
ScrobbleConfigDlg::ScrobbleConfigDlg(QWidget* parent, Qt::WindowFlags f)
: KDialog(parent, f)
, m_wallet(0)
......
......@@ -27,11 +27,10 @@
#include <kglobal.h>
#include <kconfiggroup.h>
#include <QDebug>
#include "juk_debug.h"
#include <KSharedConfig>
#include "tag.h"
#include "juk_debug.h"
Scrobbler::Scrobbler(QObject* parent)
: QObject(parent)
......
......@@ -17,8 +17,6 @@
#include "searchplaylist.h"
#include "juk-exception.h"
#include <kdebug.h>
#include <QHash>
#include "playlistitem.h"
......
......@@ -19,12 +19,12 @@
#include "collectionlist.h"
#include "actioncollection.h"
#include "searchadaptor.h"
#include "juk_debug.h"
#include <klocale.h>
#include <klineedit.h>
#include <kiconloader.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <QAction>
#include <QLabel>
......
......@@ -20,7 +20,6 @@
#include <klocale.h>
#include <kiconloader.h>
#include <kactioncollection.h>
#include <kdebug.h>
#include <QMouseEvent>
#include <QWheelEvent>
......@@ -31,6 +30,7 @@
#include "slider.h"
#include "playermanager.h"
#include "juk.h"
#include "juk_debug.h"
TrackPositionAction::TrackPositionAction(const QString &text, QObject *parent) :
QAction(text, parent)
......
......@@ -15,8 +15,7 @@
*/
#include "sortedstringlist.h"
#include <kdebug.h>
#include "juk_debug.h"
class SortedStringList::Node
{
......
......@@ -15,12 +15,12 @@
*/
#include "splashscreen.h"
#include "juk_debug.h"
#include <kapplication.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <QPixmap>
#include <QLabel>
......
......@@ -20,7 +20,6 @@
#include <kiconloader.h>
#include <ksqueezedtextlabel.h>
#include <klocale.h>
#include <kdebug.h>
#include <QMouseEvent>
#include <QLabel>
......@@ -33,6 +32,7 @@
#include "playlistinterface.h"
#include "actioncollection.h"
#include "tag.h"
#include "juk_debug.h"
using namespace ActionCollection;
......
......@@ -17,12 +17,11 @@
*/
#include "svghandler.h"
#include "juk_debug.h"
#include <KColorScheme>
#include <KColorUtils>
#include <KStandardDirs>
#include <QDebug>
#include "juk_debug.h"
#include <QHash>
#include <QPainter>
......
......@@ -21,7 +21,6 @@
#include <klocale.h>
#include <kiconloader.h>
#include <QAction>
#include <kdebug.h>
#include <kactioncollection.h>
#include <kactionmenu.h>
#include <kvbox.h>
......@@ -44,6 +43,7 @@
#include "actioncollection.h"
#include "playermanager.h"
#include "coverinfo.h"
#include "juk_debug.h"
using namespace ActionCollection;
......
......@@ -17,7 +17,6 @@
#include "tag.h"
#include <kdebug.h>
#include <klocale.h>
#include <QtCore/QFile>
......
......@@ -20,6 +20,7 @@
#include "tag.h"
#include "actioncollection.h"
#include "tagtransactionmanager.h"
#include "juk_debug.h"
#include <QAction>
#include <kactioncollection.h>
......@@ -32,7 +33,6 @@
#include <kmessagebox.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <QIcon>
#include <ktoggleaction.h>
......
......@@ -15,10 +15,10 @@
*/
#include "tagguesser.h"
#include "juk_debug.h"
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kmacroexpander.h>
#include <qhash.h>
......
......@@ -16,7 +16,6 @@
#include "tagrenameroptions.h"
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <kconfig.h>
......
......@@ -16,7 +16,6 @@
#include "tagtransactionmanager.h"
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <QAction>
......
......@@ -18,7 +18,6 @@
#include <QAction>
#include <kapplication.h>
#include <kdebug.h>
#include <krandom.h>
#include <ktoggleaction.h>
......
......@@ -17,7 +17,6 @@
#include "treeviewitemplaylist.h"
#include <kapplication.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <klocale.h>
......
......@@ -17,7 +17,6 @@
#include "upcomingplaylist.h"
#include "juk-exception.h"
#include <kdebug.h>
#include <kapplication.h>
#include <QAction>
......@@ -26,6 +25,7 @@
#include "tracksequencemanager.h"
#include "collectionlist.h"
#include "actioncollection.h"
#include "juk_debug.h"
using namespace ActionCollection;
......
......@@ -18,7 +18,6 @@
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <QPixmap>
#include <QPainter>
......
......@@ -23,8 +23,6 @@
#include <KLocale>
#include <KInputDialog>
#include <KUrl>
#include <QDebug>
#include "juk_debug.h"
#include <KIO/Job>
#include <QPushButton>
#include <KDialog>
......@@ -33,6 +31,7 @@
#include "filehandle.h"
#include "tag.h"
#include "juk.h"
#include "juk_debug.h"
#include <QPixmap>
#include <QDomDocument>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment