summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Caulier <[email protected]>2014-11-21 10:13:41 +0100
committerGilles Caulier <[email protected]>2014-11-21 10:13:41 +0100
commit6bcc7cb13089f90725145c38c52df5917d9158fc (patch)
tree9569282baf0b64038de728769eafdf4ea582cbc3
parent1287e90158396c172c5eb2c7a0dfe002a3114515 (diff)
introduce new libkexiv2 debug space
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/altlangstredit.cpp4
-rw-r--r--src/altlangstredit.h1
-rw-r--r--src/countryselector.cpp7
-rw-r--r--src/libkexiv2_debug.cpp22
-rw-r--r--src/libkexiv2_debug.h27
6 files changed, 58 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 00d3bac..ae7baf5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -33,6 +33,7 @@ set(kexiv2_LIB_SRCS kexiv2.cpp
altlangstredit.cpp
countryselector.cpp
subjectwidget.cpp
+ libkexiv2_debug.cpp
)
ecm_generate_headers(kexiv2_CamelCase_HEADERS
diff --git a/src/altlangstredit.cpp b/src/altlangstredit.cpp
index 2a2ad0b..f464d12 100644
--- a/src/altlangstredit.cpp
+++ b/src/altlangstredit.cpp
@@ -36,8 +36,8 @@
// KDE includes
-#include <KLocalizedString>
-#include <KCompletion/KComboBox>
+#include <klocalizedstring.h>
+#include <kcombobox.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <ktextedit.h>
diff --git a/src/altlangstredit.h b/src/altlangstredit.h
index 2eedf80..39e3dc1 100644
--- a/src/altlangstredit.h
+++ b/src/altlangstredit.h
@@ -110,6 +110,7 @@ private:
class Private;
Private* const d;
+
friend class Private;
};
diff --git a/src/countryselector.cpp b/src/countryselector.cpp
index e7337c3..5622591 100644
--- a/src/countryselector.cpp
+++ b/src/countryselector.cpp
@@ -28,12 +28,15 @@
// Qt includes
#include <QMap>
-#include <QDebug>
// KDE includes
#include <klocalizedstring.h>
+// Local includes
+
+#include "libkexiv2_debug.h"
+
namespace KExiv2Iface
{
@@ -348,7 +351,7 @@ void CountrySelector::setCountry(const QString& countryCode)
setCurrentIndex(id);
- qDebug() << count() << " :: " << id;
+ qCDebug(LIBKEXIV2_LOG) << count() << " :: " << id;
}
bool CountrySelector::country(QString& countryCode, QString& countryName) const
diff --git a/src/libkexiv2_debug.cpp b/src/libkexiv2_debug.cpp
new file mode 100644
index 0000000..3d1f66f
--- /dev/null
+++ b/src/libkexiv2_debug.cpp
@@ -0,0 +1,22 @@
+/* This file is part of the KDE project
+ Copyright (C) 2014 Laurent Montel <montel at kde dot 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 "libkexiv2_debug.h"
+
+Q_LOGGING_CATEGORY(LIBKEXIV2_LOG, "log_libkexiv2")
diff --git a/src/libkexiv2_debug.h b/src/libkexiv2_debug.h
new file mode 100644
index 0000000..227e007
--- /dev/null
+++ b/src/libkexiv2_debug.h
@@ -0,0 +1,27 @@
+/* This file is part of the KDE project
+ Copyright (C) 2014 Laurent Montel <montel at kde dot 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 LIBKEXIV2_DEBUG_H
+#define LIBKEXIV2_DEBUG_H
+
+#include <QLoggingCategory>
+
+Q_DECLARE_LOGGING_CATEGORY(LIBKEXIV2_LOG)
+
+#endif // LIBKEXIV2_DEBUG_H