[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim] /: Port to qCDebug
From: Montel Laurent <montel () kde ! org>
Date: 2015-03-09 21:01:06
Message-ID: E1YV4nS-0001Tx-IP () scm ! kde ! org
[Download RAW message or body]
Git commit 2a39e2469a00d8c64aac31db93f9045b8e59db4a by Montel Laurent.
Committed on 09/03/2015 at 21:00.
Pushed by mlaurent into branch 'master'.
Port to qCDebug
M +1 -0 agents/mailfilteragent/CMakeLists.txt
M +1 -1 agents/mailfilteragent/filterlogdialog.cpp
M +3 -3 agents/mailfilteragent/filtermanager.cpp
M +5 -5 agents/mailfilteragent/mailfilteragent.cpp
C +3 -2 agents/mailfilteragent/mailfilteragent_debug.cpp [from: \
agents/sendlateragent/sendlateragent_debug.cpp - 089% similarity] C +4 -4 \
agents/mailfilteragent/mailfilteragent_debug.h [from: \
agents/sendlateragent/sendlateragent_debug.h - 088% similarity] M +1 -0 \
agents/notesagent/CMakeLists.txt C +3 -2 \
agents/notesagent/notesagent_debug.cpp [from: \
agents/sendlateragent/sendlateragent_debug.cpp - 090% similarity] C +4 -4 \
agents/notesagent/notesagent_debug.h [from: \
agents/sendlateragent/sendlateragent_debug.h - 088% similarity] M +5 -5 \
agents/notesagent/notesagentalarmdialog.cpp M +2 -2 \
agents/notesagent/notesagentnotedialog.cpp M +2 -2 \
agents/sendlateragent/sendlateragent.cpp M +1 -0 \
agents/sendlateragent/sendlateragent_debug.cpp M +1 -1 \
agents/sendlateragent/sendlateragent_debug.h M +7 -7 \
agents/sendlateragent/sendlaterutil.cpp M +1 -0 \
grantleeeditor/contactthemeeditor/CMakeLists.txt M +4 -4 \
grantleeeditor/contactthemeeditor/contacteditorpage.cpp C +3 -2 \
grantleeeditor/contactthemeeditor/contactthemeeditor_debug.cpp [from: \
agents/sendlateragent/sendlateragent_debug.cpp - 089% similarity] C +4 -4 \
grantleeeditor/contactthemeeditor/contactthemeeditor_debug.h [from: \
agents/sendlateragent/sendlateragent_debug.h - 087% similarity] M +1 -0 \
grantleeeditor/headerthemeeditor/CMakeLists.txt C +3 -2 \
grantleeeditor/headerthemeeditor/headerthemeeditor_debug.cpp [from: \
agents/sendlateragent/sendlateragent_debug.cpp - 089% similarity] C +4 -4 \
grantleeeditor/headerthemeeditor/headerthemeeditor_debug.h [from: \
agents/sendlateragent/sendlateragent_debug.h - 087% similarity] M +5 -5 \
grantleeeditor/headerthemeeditor/themeeditorpage.cpp M +2 -1 \
kontact/plugins/knotes/CMakeLists.txt M +1 -1 \
kontact/plugins/knotes/kcmknotessummary.cpp C +3 -2 \
kontact/plugins/knotes/knotes_kontact_plugin_debug.cpp [from: \
agents/sendlateragent/sendlateragent_debug.cpp - 088% similarity] C +4 -4 \
kontact/plugins/knotes/knotes_kontact_plugin_debug.h [from: \
agents/sendlateragent/sendlateragent_debug.h - 086% similarity] M +7 -6 \
kontact/plugins/knotes/knotes_part.cpp M +3 -3 \
kontact/plugins/knotes/knotes_plugin.cpp M +1 -1 \
kontact/plugins/knotes/knoteseditdialog.cpp M +5 -5 \
kontact/plugins/knotes/knotesiconview.cpp M +1 -0 ktnef/CMakeLists.txt
M +2 -2 ktnef/attachpropertydialog.cpp
C +3 -2 ktnef/ktnef_debug.cpp [from: \
agents/sendlateragent/sendlateragent_debug.cpp - 090% similarity] C +4 -4 \
ktnef/ktnef_debug.h [from: agents/sendlateragent/sendlateragent_debug.h - 088% \
similarity] M +4 -4 ktnef/ktnefmain.cpp
M +35 -35 ktnef/qwmf.cpp
http://commits.kde.org/kdepim/2a39e2469a00d8c64aac31db93f9045b8e59db4a
diff --git a/agents/mailfilteragent/CMakeLists.txt \
b/agents/mailfilteragent/CMakeLists.txt index d46b260..75b8de7 100644
--- a/agents/mailfilteragent/CMakeLists.txt
+++ b/agents/mailfilteragent/CMakeLists.txt
@@ -15,6 +15,7 @@ set(akonadi_mailfilter_agent_SRCS
filterlogdialog.cpp
filtermanager.cpp
mailfilteragent.cpp
+ mailfilteragent_debug.cpp
)
qt5_add_dbus_adaptor(akonadi_mailfilter_agent_SRCS \
org.freedesktop.Akonadi.MailFilterAgent.xml mailfilteragent.h \
MailFilterAgent)
diff --git a/agents/mailfilteragent/filterlogdialog.cpp \
b/agents/mailfilteragent/filterlogdialog.cpp index 7331b5d..24e6a24 100644
--- a/agents/mailfilteragent/filterlogdialog.cpp
+++ b/agents/mailfilteragent/filterlogdialog.cpp
@@ -33,7 +33,7 @@
#include "pimcommon/texteditor/plaintexteditor/plaintexteditorwidget.h"
#include "pimcommon/texteditor/plaintexteditor/plaintexteditor.h"
-#include <qdebug.h>
+#include "mailfilteragent_debug.h"
#include <QFileDialog>
#include <KLocalizedString>
#include <kmessagebox.h>
diff --git a/agents/mailfilteragent/filtermanager.cpp \
b/agents/mailfilteragent/filtermanager.cpp index ca3551a..bebbec3 100644
--- a/agents/mailfilteragent/filtermanager.cpp
+++ b/agents/mailfilteragent/filtermanager.cpp
@@ -31,7 +31,7 @@
#include <Akonadi/KMime/MessageParts>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <qdebug.h>
+#include "mailfilteragent_debug.h"
#include <KLocalizedString>
#include <KNotification>
#include <QIcon>
@@ -479,7 +479,7 @@ bool FilterManager::processContextItem(ItemContext context)
bool FilterManager::process(const QList< MailFilter * > &mailFilters, const \
Akonadi::Item &item, bool needsFullPayload, FilterManager::FilterSet set, bool \
account, const QString &accountId) {
if (set == NoSet) {
- qDebug() << "FilterManager: process() called with not filter set selected";
+ qCDebug(MAILFILTERAGENT_LOG) << "FilterManager: process() called with not \
filter set selected"; return false;
}
@@ -570,7 +570,7 @@ MailCommon::SearchRule::RequiredPart \
FilterManager::requiredPart(const QString & void FilterManager::dump() const
{
foreach (const MailCommon::MailFilter *filter, d->mFilters) {
- qDebug() << filter->asString();
+ qCDebug(MAILFILTERAGENT_LOG) << filter->asString();
}
}
#endif
diff --git a/agents/mailfilteragent/mailfilteragent.cpp \
b/agents/mailfilteragent/mailfilteragent.cpp index aa92c86..7966adb 100644
--- a/agents/mailfilteragent/mailfilteragent.cpp
+++ b/agents/mailfilteragent/mailfilteragent.cpp
@@ -37,7 +37,7 @@
#include <mailcommon/kernel/mailkernel.h>
#include <KLocalizedString>
#include <QIcon>
-#include <QDebug>
+#include "mailfilteragent_debug.h"
#include <KIconLoader>
#include <KMime/Message>
#include <KNotification>
@@ -142,7 +142,7 @@ void MailFilterAgent::initializeCollections()
void MailFilterAgent::initialCollectionFetchingDone(KJob *job)
{
if (job->error()) {
- qWarning() << job->errorString();
+ qCWarning(MAILFILTERAGENT_LOG) << job->errorString();
return; //TODO: proper error handling
}
@@ -169,7 +169,7 @@ void MailFilterAgent::itemAdded(const Akonadi::Item &item, const \
Akonadi::Collec
* for the mimetype of the item here.
*/
if (item.mimeType() != KMime::Message::mimeType()) {
- qDebug() << "MailFilterAgent::itemAdded called for a non-message item!";
+ qCDebug(MAILFILTERAGENT_LOG) << "MailFilterAgent::itemAdded called for a \
non-message item!"; return;
}
@@ -195,7 +195,7 @@ void MailFilterAgent::itemAdded(const Akonadi::Item &item, const \
Akonadi::Collec void MailFilterAgent::itemsReceiviedForFiltering(const \
Akonadi::Item::List &items) {
if (items.isEmpty()) {
- qDebug() << "MailFilterAgent::itemsReceiviedForFiltering items is empty!";
+ qCDebug(MAILFILTERAGENT_LOG) << "MailFilterAgent::itemsReceiviedForFiltering \
items is empty!"; return;
}
@@ -204,7 +204,7 @@ void MailFilterAgent::itemsReceiviedForFiltering(const \
Akonadi::Item::List &item
* happens when item no longer exists etc, and queue compression didn't happen \
yet
*/
if (!item.hasPayload()) {
- qDebug() << "MailFilterAgent::itemsReceiviedForFiltering item has no \
payload!"; + qCDebug(MAILFILTERAGENT_LOG) << \
"MailFilterAgent::itemsReceiviedForFiltering item has no payload!"; return;
}
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp \
b/agents/mailfilteragent/mailfilteragent_debug.cpp similarity index 89%
copy from agents/sendlateragent/sendlateragent_debug.cpp
copy to agents/mailfilteragent/mailfilteragent_debug.cpp
index 6ccd78c..007a244 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/agents/mailfilteragent/mailfilteragent_debug.cpp
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "sendlateragent_debug.h"
-Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+#include "mailfilteragent_debug.h"
+Q_LOGGING_CATEGORY(MAILFILTERAGENT_LOG, "log_mailfilteragent")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h \
b/agents/mailfilteragent/mailfilteragent_debug.h similarity index 88%
copy from agents/sendlateragent/sendlateragent_debug.h
copy to agents/mailfilteragent/mailfilteragent_debug.h
index 6c0b4a1..a1bf22a 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/agents/mailfilteragent/mailfilteragent_debug.h
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef SENDLATERAGENT_DEBUG_H
-#define SENDLATERAGENT_DEBUG_H
+#ifndef MAILFILTERAGENT_DEBUG_H
+#define MAILFILTERAGENT_DEBUG_H
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
+Q_DECLARE_LOGGING_CATEGORY(MAILFILTERAGENT_LOG)
-#endif
+#endif
diff --git a/agents/notesagent/CMakeLists.txt b/agents/notesagent/CMakeLists.txt
index 2802dc5..d1c10cf 100644
--- a/agents/notesagent/CMakeLists.txt
+++ b/agents/notesagent/CMakeLists.txt
@@ -3,6 +3,7 @@ project(notesagent)
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_notes_agent\")
set(notesagent_SRCS
+ notesagent_debug.cpp
notesagent.cpp
notesmanager.cpp
notesagentsettingsdialog.cpp
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp \
b/agents/notesagent/notesagent_debug.cpp similarity index 90%
copy from agents/sendlateragent/sendlateragent_debug.cpp
copy to agents/notesagent/notesagent_debug.cpp
index 6ccd78c..63005a7 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/agents/notesagent/notesagent_debug.cpp
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "sendlateragent_debug.h"
-Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+#include "notesagent_debug.h"
+Q_LOGGING_CATEGORY(NOTESAGENT_LOG, "log_notesagentagent")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h \
b/agents/notesagent/notesagent_debug.h similarity index 88%
copy from agents/sendlateragent/sendlateragent_debug.h
copy to agents/notesagent/notesagent_debug.h
index 6c0b4a1..545872e 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/agents/notesagent/notesagent_debug.h
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef SENDLATERAGENT_DEBUG_H
-#define SENDLATERAGENT_DEBUG_H
+#ifndef NOTESAGENT_DEBUG_H
+#define NOTESAGENT_DEBUG_H
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
+Q_DECLARE_LOGGING_CATEGORY(NOTESAGENT_LOG)
-#endif
+#endif
diff --git a/agents/notesagent/notesagentalarmdialog.cpp \
b/agents/notesagent/notesagentalarmdialog.cpp index 36b941b..96d798d 100644
--- a/agents/notesagent/notesagentalarmdialog.cpp
+++ b/agents/notesagent/notesagentalarmdialog.cpp
@@ -20,7 +20,7 @@
#include "noteshared/widget/notelistwidget.h"
#include "noteshared/attributes/notealarmattribute.h"
#include "noteshared/alarms/notealarmdialog.h"
-
+#include "notesagent_debug.h"
#include <KMime/KMimeMessage>
#include <ItemFetchJob>
@@ -171,7 +171,7 @@ void NotesAgentAlarmDialog::slotRemoveAlarm()
void NotesAgentAlarmDialog::slotFetchItem(KJob *job)
{
if (job->error()) {
- qDebug() << "fetch item failed " << job->errorString();
+ qCDebug(NOTESAGENT_LOG) << "fetch item failed " << job->errorString();
return;
}
Akonadi::ItemFetchJob *itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
@@ -187,7 +187,7 @@ void NotesAgentAlarmDialog::slotFetchItem(KJob *job)
void NotesAgentAlarmDialog::slotModifyItem(KJob *job)
{
if (job->error()) {
- qDebug() << "modify item failed " << job->errorString();
+ qCDebug(NOTESAGENT_LOG) << "modify item failed " << job->errorString();
return;
}
}
@@ -207,7 +207,7 @@ void NotesAgentAlarmDialog::slotModifyAlarm()
void NotesAgentAlarmDialog::slotFetchAlarmItem(KJob *job)
{
if (job->error()) {
- qDebug() << "fetch item failed " << job->errorString();
+ qCDebug(NOTESAGENT_LOG) << "fetch item failed " << job->errorString();
return;
}
Akonadi::ItemFetchJob *itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
@@ -218,7 +218,7 @@ void NotesAgentAlarmDialog::slotFetchAlarmItem(KJob *job)
if (attr) {
KMime::Message::Ptr noteMessage = item.payload<KMime::Message::Ptr>();
if (!noteMessage) {
- qDebug() << "Error this note doesn't have payload ";
+ qCDebug(NOTESAGENT_LOG) << "Error this note doesn't have payload ";
KMessageBox::error(this, i18n("Error during fetch alarm info."), \
i18n("Alarm")); return;
}
diff --git a/agents/notesagent/notesagentnotedialog.cpp \
b/agents/notesagent/notesagentnotedialog.cpp index 5be4461..d7929b5 100644
--- a/agents/notesagent/notesagentnotedialog.cpp
+++ b/agents/notesagent/notesagentnotedialog.cpp
@@ -16,7 +16,7 @@
*/
#include "notesagentnotedialog.h"
-
+#include "notesagent_debug.h"
#include <ItemFetchJob>
#include <ItemFetchScope>
#include "noteshared/attributes/notedisplayattribute.h"
@@ -78,7 +78,7 @@ void NotesAgentNoteDialog::setNoteId(Akonadi::Item::Id id)
void NotesAgentNoteDialog::slotFetchItem(KJob *job)
{
if (job->error()) {
- qDebug() << "fetch item failed " << job->errorString();
+ qCDebug(NOTESAGENT_LOG) << "fetch item failed " << job->errorString();
return;
}
Akonadi::ItemFetchJob *itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
diff --git a/agents/sendlateragent/sendlateragent.cpp \
b/agents/sendlateragent/sendlateragent.cpp index 363a892..ae9edfc 100644
--- a/agents/sendlateragent/sendlateragent.cpp
+++ b/agents/sendlateragent/sendlateragent.cpp
@@ -23,7 +23,7 @@
#include "sendlateragentadaptor.h"
#include "sendlateragentsettings.h"
#include "sendlaterremovemessagejob.h"
-
+#include "sendlateragent_debug.h"
#include <Akonadi/KMime/SpecialMailCollections>
#include <AgentInstance>
#include <AgentManager>
@@ -97,7 +97,7 @@ void SendLaterAgent::doSetOnline(bool online)
void SendLaterAgent::reload()
{
- qDebug() << " void SendLaterAgent::reload()";
+ qCDebug(SENDLATERAGENT_LOG) << " void SendLaterAgent::reload()";
if (SendLaterAgentSettings::enabled()) {
mManager->load(true);
}
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp \
b/agents/sendlateragent/sendlateragent_debug.cpp index 6ccd78c..457deed 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/agents/sendlateragent/sendlateragent_debug.cpp
@@ -20,3 +20,4 @@
#include "sendlateragent_debug.h"
Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h \
b/agents/sendlateragent/sendlateragent_debug.h index 6c0b4a1..f318de2 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/agents/sendlateragent/sendlateragent_debug.h
@@ -23,5 +23,5 @@
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
-#endif
+#endif
diff --git a/agents/sendlateragent/sendlaterutil.cpp \
b/agents/sendlateragent/sendlaterutil.cpp index 58a1a2e..a648b41 100644
--- a/agents/sendlateragent/sendlaterutil.cpp
+++ b/agents/sendlateragent/sendlaterutil.cpp
@@ -18,7 +18,7 @@
#include "sendlaterutil.h"
#include "sendlaterinfo.h"
#include "sendlateragentsettings.h"
-
+#include "sendlateragent_debug.h"
#include <KConfigGroup>
#include <QDBusInterface>
@@ -38,15 +38,15 @@ bool \
SendLater::SendLaterUtil::compareSendLaterInfo(SendLater::SendLaterInfo *le void \
SendLater::SendLaterUtil::changeRecurrentDate(SendLater::SendLaterInfo *info) {
if (info && info->isRecurrence()) {
- qDebug() << "BEFORE SendLater::SendLaterUtil::changeRecurrentDate " << \
info->dateTime().toString(); + qCDebug(SENDLATERAGENT_LOG) << "BEFORE \
SendLater::SendLaterUtil::changeRecurrentDate " << info->dateTime().toString(); \
QDateTime newInfoDateTime = info->dateTime(); newInfoDateTime = \
updateRecurence(info, newInfoDateTime);
- qDebug() << " QDateTime::currentDateTime()" << \
QDateTime::currentDateTime().toString(); + qCDebug(SENDLATERAGENT_LOG) << " \
QDateTime::currentDateTime()" << QDateTime::currentDateTime().toString(); while \
(newInfoDateTime <= QDateTime::currentDateTime()) { newInfoDateTime = \
updateRecurence(info, newInfoDateTime); }
info->setDateTime(newInfoDateTime);
- qDebug() << "AFTER SendLater::SendLaterUtil::changeRecurrentDate " << \
info->dateTime().toString() << " info" << info << "New date" << newInfoDateTime; + \
qCDebug(SENDLATERAGENT_LOG) << "AFTER SendLater::SendLaterUtil::changeRecurrentDate " \
<< info->dateTime().toString() << " info" << info << "New date" << newInfoDateTime; \
writeSendLaterInfo(defaultConfig(), info, true); }
}
@@ -93,7 +93,7 @@ void \
SendLater::SendLaterUtil::writeSendLaterInfo(KSharedConfig::Ptr config, Sen \
info->writeConfig(group); config->sync();
config->reparseConfiguration();
- qDebug() << " reparse config";
+ qCDebug(SENDLATERAGENT_LOG) << " reparse config";
if (forceReload) {
reload();
}
@@ -118,12 +118,12 @@ bool SendLater::SendLaterUtil::sentLaterAgentEnabled()
void SendLater::SendLaterUtil::reload()
{
- qDebug() << " void SendLater::SendLaterUtil::reload()";
+ qCDebug(SENDLATERAGENT_LOG) << " void SendLater::SendLaterUtil::reload()";
QDBusInterface interface(QStringLiteral("org.freedesktop.Akonadi.Agent.akonadi_sendlater_agent"), \
QStringLiteral("/SendLaterAgent")); if (interface.isValid()) {
interface.call(QStringLiteral("reload"));
} else {
- qDebug() << " Can not reload list";
+ qCDebug(SENDLATERAGENT_LOG) << " Can not reload list";
}
}
diff --git a/grantleeeditor/contactthemeeditor/CMakeLists.txt \
b/grantleeeditor/contactthemeeditor/CMakeLists.txt index 9aab8c6..3173862 100644
--- a/grantleeeditor/contactthemeeditor/CMakeLists.txt
+++ b/grantleeeditor/contactthemeeditor/CMakeLists.txt
@@ -11,6 +11,7 @@ include_directories(
set(contactthemeeditor_SRCS
main.cpp
+ contactthemeeditor_debug.cpp
defaultcompletion.cpp
contactdefaulttemplate.cpp
contacteditorwidget.cpp
diff --git a/grantleeeditor/contactthemeeditor/contacteditorpage.cpp \
b/grantleeeditor/contactthemeeditor/contacteditorpage.cpp index 7bf9e16..fa0d70b \
100644
--- a/grantleeeditor/contactthemeeditor/contacteditorpage.cpp
+++ b/grantleeeditor/contactthemeeditor/contacteditorpage.cpp
@@ -29,14 +29,14 @@
#include <QInputDialog>
#include <KZip>
#include <QTemporaryDir>
-#include <QDebug>
+#include "contactthemeeditor_debug.h"
#include <KMessageBox>
#include <QUrl>
#include <QHBoxLayout>
#include <QDir>
#include <QPointer>
-#include <QDebug>
+#include "contactthemeeditor_debug.h"
#include <QFileDialog>
ContactEditorPage::ContactEditorPage(const QString &projectDir, const QString \
&themeName, QWidget *parent) @@ -189,7 +189,7 @@ void \
ContactEditorPage::uploadTheme() }
createZip(themename, zip);
zip->close();
- //qDebug()<< "zipFilename"<<zipFileName;
+ //qCDebug(CONTACTTHEMEEDITOR_LOG)<< "zipFilename"<<zipFileName;
QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QLatin1String("kaddressbook_themes.knsrc"), this); \
dialog->setUploadFile(QUrl::fromLocalFile(zipFileName)); @@ -200,7 +200,7 @@ void \
ContactEditorPage::uploadTheme() dialog->exec();
delete dialog;
} else {
- qDebug() << " We can't open in zip write mode";
+ qCDebug(CONTACTTHEMEEDITOR_LOG) << " We can't open in zip write mode";
}
delete zip;
}
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp \
b/grantleeeditor/contactthemeeditor/contactthemeeditor_debug.cpp similarity index 89%
copy from agents/sendlateragent/sendlateragent_debug.cpp
copy to grantleeeditor/contactthemeeditor/contactthemeeditor_debug.cpp
index 6ccd78c..8051af7 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/grantleeeditor/contactthemeeditor/contactthemeeditor_debug.cpp
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "sendlateragent_debug.h"
-Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+#include "contactthemeeditor_debug.h"
+Q_LOGGING_CATEGORY(CONTACTTHEMEEDITOR_LOG, "log_contactthemeeditor")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h \
b/grantleeeditor/contactthemeeditor/contactthemeeditor_debug.h similarity index 87%
copy from agents/sendlateragent/sendlateragent_debug.h
copy to grantleeeditor/contactthemeeditor/contactthemeeditor_debug.h
index 6c0b4a1..a5c1779 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/grantleeeditor/contactthemeeditor/contactthemeeditor_debug.h
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef SENDLATERAGENT_DEBUG_H
-#define SENDLATERAGENT_DEBUG_H
+#ifndef CONTACTTHEMEEDITOR_DEBUG_H
+#define CONTACTTHEMEEDITOR_DEBUG_H
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
+Q_DECLARE_LOGGING_CATEGORY(CONTACTTHEMEEDITOR_LOG)
-#endif
+#endif
diff --git a/grantleeeditor/headerthemeeditor/CMakeLists.txt \
b/grantleeeditor/headerthemeeditor/CMakeLists.txt index 71959b3..b06db34 100644
--- a/grantleeeditor/headerthemeeditor/CMakeLists.txt
+++ b/grantleeeditor/headerthemeeditor/CMakeLists.txt
@@ -12,6 +12,7 @@ include_directories(
set(headerthemeeditor_SRCS
main.cpp
+ headerthemeeditor_debug.cpp
themeeditormainwindow.cpp
themeeditorpage.cpp
previewwidget.cpp
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp \
b/grantleeeditor/headerthemeeditor/headerthemeeditor_debug.cpp similarity index 89%
copy from agents/sendlateragent/sendlateragent_debug.cpp
copy to grantleeeditor/headerthemeeditor/headerthemeeditor_debug.cpp
index 6ccd78c..389291e 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/grantleeeditor/headerthemeeditor/headerthemeeditor_debug.cpp
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "sendlateragent_debug.h"
-Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+#include "headerthemeeditor_debug.h"
+Q_LOGGING_CATEGORY(HEADERTHEMEEDITOR_LOG, "log_headerthemeeditor")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h \
b/grantleeeditor/headerthemeeditor/headerthemeeditor_debug.h similarity index 87%
copy from agents/sendlateragent/sendlateragent_debug.h
copy to grantleeeditor/headerthemeeditor/headerthemeeditor_debug.h
index 6c0b4a1..ba5f574 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/grantleeeditor/headerthemeeditor/headerthemeeditor_debug.h
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef SENDLATERAGENT_DEBUG_H
-#define SENDLATERAGENT_DEBUG_H
+#ifndef HEADERTHEMEEDITOR_DEBUG_H
+#define HEADERTHEMEEDITOR_DEBUG_H
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
+Q_DECLARE_LOGGING_CATEGORY(HEADERTHEMEEDITOR_LOG)
-#endif
+#endif
diff --git a/grantleeeditor/headerthemeeditor/themeeditorpage.cpp \
b/grantleeeditor/headerthemeeditor/themeeditorpage.cpp index 6c72bc2..d62ffdb 100644
--- a/grantleeeditor/headerthemeeditor/themeeditorpage.cpp
+++ b/grantleeeditor/headerthemeeditor/themeeditorpage.cpp
@@ -29,14 +29,14 @@
#include <QInputDialog>
#include <KZip>
#include <QTemporaryDir>
-#include <QDebug>
+#include "headerthemeeditor_debug.h"
#include <KMessageBox>
#include <QUrl>
#include <QHBoxLayout>
#include <QDir>
#include <QPointer>
-#include <QDebug>
+#include "headerthemeeditor_debug.h"
#include <QFileDialog>
ThemeEditorPage::ThemeEditorPage(const QString &projectDir, const QString \
&themeName, QWidget *parent) @@ -193,7 +193,7 @@ void ThemeEditorPage::uploadTheme()
KZip *zip = new KZip(zipFileName);
if (zip->open(QIODevice::WriteOnly)) {
const QString previewFileName = tmp.path() + QDir::separator() + themename + \
QLatin1String("_preview.png");
- //qDebug()<<" previewFileName"<<previewFileName;
+ //qCDebug(HEADERTHEMEEDITOR_LOG)<<" previewFileName"<<previewFileName;
QStringList lst;
lst << previewFileName;
mEditorPage->preview()->createScreenShot(lst);
@@ -207,7 +207,7 @@ void ThemeEditorPage::uploadTheme()
createZip(themename, zip);
zip->close();
- //qDebug()<< "zipFilename"<<zipFileName;
+ //qCDebug(HEADERTHEMEEDITOR_LOG)<< "zipFilename"<<zipFileName;
QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QLatin1String("messageviewer_header_themes.knsrc"), this); \
dialog->setUploadFile(QUrl::fromLocalFile(zipFileName)); @@ -218,7 +218,7 @@ void \
ThemeEditorPage::uploadTheme() dialog->exec();
delete dialog;
} else {
- qDebug() << " We can't open in zip write mode";
+ qCDebug(HEADERTHEMEEDITOR_LOG) << " We can't open in zip write mode";
}
delete zip;
}
diff --git a/kontact/plugins/knotes/CMakeLists.txt \
b/kontact/plugins/knotes/CMakeLists.txt index 08aa55d..7623ebd 100644
--- a/kontact/plugins/knotes/CMakeLists.txt
+++ b/kontact/plugins/knotes/CMakeLists.txt
@@ -6,7 +6,8 @@ include_directories(
${Grantlee_INCLUDE_DIRS}
)
-set(kontact_knotesplugin_PART_SRCS
+set(kontact_knotesplugin_PART_SRCS
+ knotes_kontact_plugin_debug.cpp
knotes_plugin.cpp
knotes_part.cpp
summarywidget.cpp
diff --git a/kontact/plugins/knotes/kcmknotessummary.cpp \
b/kontact/plugins/knotes/kcmknotessummary.cpp index fb1402b..9897ef5 100644
--- a/kontact/plugins/knotes/kcmknotessummary.cpp
+++ b/kontact/plugins/knotes/kcmknotessummary.cpp
@@ -26,7 +26,7 @@
#include <KAboutData>
#include <KAcceleratorManager>
#include <KCheckableProxyModel>
-#include <QDebug>
+#include "knotes_kontact_plugin_debug.h"
#include <QDialog>
#include <KLocalizedString>
#include <QLineEdit>
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp \
b/kontact/plugins/knotes/knotes_kontact_plugin_debug.cpp similarity index 88%
copy from agents/sendlateragent/sendlateragent_debug.cpp
copy to kontact/plugins/knotes/knotes_kontact_plugin_debug.cpp
index 6ccd78c..9ac8936 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/kontact/plugins/knotes/knotes_kontact_plugin_debug.cpp
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "sendlateragent_debug.h"
-Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+#include "knotes_kontact_plugin_debug.h"
+Q_LOGGING_CATEGORY(KNOTES_KONTACT_PLUGIN_LOG, "log_knoteskontactplugin")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h \
b/kontact/plugins/knotes/knotes_kontact_plugin_debug.h similarity index 86%
copy from agents/sendlateragent/sendlateragent_debug.h
copy to kontact/plugins/knotes/knotes_kontact_plugin_debug.h
index 6c0b4a1..2489ae0 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/kontact/plugins/knotes/knotes_kontact_plugin_debug.h
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef SENDLATERAGENT_DEBUG_H
-#define SENDLATERAGENT_DEBUG_H
+#ifndef KNOTES_KONTACT_PLUGIN_DEBUG_H
+#define KNOTES_KONTACT_PLUGIN_DEBUG_H
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
+Q_DECLARE_LOGGING_CATEGORY(KNOTES_KONTACT_PLUGIN_LOG)
-#endif
+#endif
diff --git a/kontact/plugins/knotes/knotes_part.cpp \
b/kontact/plugins/knotes/knotes_part.cpp index 1e81c5f..b178827 100644
--- a/kontact/plugins/knotes/knotes_part.cpp
+++ b/kontact/plugins/knotes/knotes_part.cpp
@@ -22,6 +22,7 @@
*/
#include "knotes_part.h"
+#include "knotes_kontact_plugin_debug.h"
#include "notesharedglobalconfig.h"
#include "noteshared/noteutils.h"
#include "knoteseditdialog.h"
@@ -363,7 +364,7 @@ void KNotesPart::newNote(const QString &name, const QString \
&text) void KNotesPart::slotNoteCreationFinished(KJob *job)
{
if (job->error()) {
- qWarning() << job->errorString();
+ qCWarning(KNOTES_KONTACT_PLUGIN_LOG) << job->errorString();
NoteShared::NoteSharedGlobalConfig::self()->setDefaultFolder(-1);
NoteShared::NoteSharedGlobalConfig::self()->save();
KMessageBox::error(widget(), i18n("Note was not created."), i18n("Create new \
note")); @@ -486,7 +487,7 @@ void KNotesPart::killSelectedNotes()
void KNotesPart::slotDeleteNotesFinished(KJob *job)
{
if (job->error()) {
- qDebug() << " problem during delete job note:" << job->errorString();
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " problem during delete job note:" << \
job->errorString(); }
}
@@ -718,9 +719,9 @@ void KNotesPart::slotSetAlarm()
void KNotesPart::slotNoteSaved(KJob *job)
{
- qDebug() << " void KNote::slotNoteSaved(KJob *job)";
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " void KNote::slotNoteSaved(KJob *job)";
if (job->error()) {
- qDebug() << " problem during save note:" << job->errorString();
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " problem during save note:" << \
job->errorString(); }
}
@@ -829,7 +830,7 @@ void KNotesPart::slotSelectNote(Akonadi::Item::Id id)
void KNotesPart::slotCollectionChanged(const Akonadi::Collection &col, const \
QSet<QByteArray> &set) {
if (set.contains("showfoldernotesattribute")) {
- //qDebug()<<" collection Changed "<<set<<" col "<<col;
+ //qCDebug(KNOTES_KONTACT_PLUGIN_LOG)<<" collection Changed "<<set<<" col \
"<<col; if (col.hasAttribute<NoteShared::ShowFolderNotesAttribute>()) {
fetchNotesFromCollection(col);
} else {
@@ -859,7 +860,7 @@ void KNotesPart::fetchNotesFromCollection(const \
Akonadi::Collection &col) void KNotesPart::slotItemFetchFinished(KJob *job)
{
if (job->error()) {
- qDebug() << "Error occurred during item fetch:" << job->errorString();
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << "Error occurred during item fetch:" << \
job->errorString(); return;
}
diff --git a/kontact/plugins/knotes/knotes_plugin.cpp \
b/kontact/plugins/knotes/knotes_plugin.cpp index fa5e60b..924790f 100644
--- a/kontact/plugins/knotes/knotes_plugin.cpp
+++ b/kontact/plugins/knotes/knotes_plugin.cpp
@@ -42,7 +42,7 @@ using namespace KCalCore;
#include <KCmdLineArgs>
#include <QAction>
#include <KActionCollection>
-#include <QDebug>
+#include "knotes_kontact_plugin_debug.h"
#include <QIcon>
#include <KLocalizedString>
#include <KMessageBox>
@@ -210,7 +210,7 @@ void KNotesPlugin::processDropEvent(QDropEvent *event)
return;
}
- qWarning() << QStringLiteral("Cannot handle drop events of type \
'%1'.").arg(event->mimeData()->formats().join(QLatin1Char(';'))); + \
qCWarning(KNOTES_KONTACT_PLUGIN_LOG) << QStringLiteral("Cannot handle drop events of \
type '%1'.").arg(event->mimeData()->formats().join(QLatin1Char(';'))); }
void KNotesPlugin::shortcutChanged()
@@ -237,7 +237,7 @@ void KNotesUniqueAppHandler::loadCommandLineOptions()
int KNotesUniqueAppHandler::newInstance()
{
- qDebug() ;
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) ;
// Ensure part is loaded
(void)plugin()->part();
return KontactInterface::UniqueAppHandler::newInstance();
diff --git a/kontact/plugins/knotes/knoteseditdialog.cpp \
b/kontact/plugins/knotes/knoteseditdialog.cpp index d09bbd6..8f0d257 100644
--- a/kontact/plugins/knotes/knoteseditdialog.cpp
+++ b/kontact/plugins/knotes/knoteseditdialog.cpp
@@ -32,7 +32,7 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
-#include <QDebug>
+#include "knotes_kontact_plugin_debug.h"
#include <KSharedConfig>
#include <KConfigGroup>
#include <QDialogButtonBox>
diff --git a/kontact/plugins/knotes/knotesiconview.cpp \
b/kontact/plugins/knotes/knotesiconview.cpp index 0107322..693075e 100644
--- a/kontact/plugins/knotes/knotesiconview.cpp
+++ b/kontact/plugins/knotes/knotesiconview.cpp
@@ -36,7 +36,7 @@
#include <QPixmap>
#include <QMouseEvent>
#include <QListWidgetItem>
-#include <QDebug>
+#include "knotes_kontact_plugin_debug.h"
#include <QToolTip>
//#define DEBUG_SAVE_NOTE 1
@@ -165,7 +165,7 @@ void KNotesIconViewItem::setReadOnly(bool b, bool save)
if (save) {
Akonadi::ItemModifyJob *job = new Akonadi::ItemModifyJob(mItem);
#ifdef DEBUG_SAVE_NOTE
- qDebug() << " KNotesIconViewItem::setReadOnly savenote";
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " KNotesIconViewItem::setReadOnly \
savenote"; #endif
connect(job, &Akonadi::ItemModifyJob::result, this, \
&KNotesIconViewItem::slotNoteSaved); }
@@ -180,9 +180,9 @@ void KNotesIconViewItem::setDisplayDefaultValue()
void KNotesIconViewItem::slotNoteSaved(KJob *job)
{
- qDebug() << " void KNotesIconViewItem::slotNoteSaved(KJob *job)";
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " void \
KNotesIconViewItem::slotNoteSaved(KJob *job)"; if (job->error()) {
- qDebug() << " problem during save note:" << job->errorString();
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " problem during save note:" << \
job->errorString(); }
}
@@ -303,7 +303,7 @@ void KNotesIconViewItem::saveNoteContent(const QString &subject, \
const QString & mItem.setPayload(message);
Akonadi::ItemModifyJob *job = new Akonadi::ItemModifyJob(mItem);
#ifdef DEBUG_SAVE_NOTE
- qDebug() << " KNotesIconViewItem::saveNoteContent savenote";
+ qCDebug(KNOTES_KONTACT_PLUGIN_LOG) << " KNotesIconViewItem::saveNoteContent \
savenote"; #endif
connect(job, &Akonadi::ItemModifyJob::result, this, \
&KNotesIconViewItem::slotNoteSaved); }
diff --git a/ktnef/CMakeLists.txt b/ktnef/CMakeLists.txt
index 997c055..fba2fc7 100644
--- a/ktnef/CMakeLists.txt
+++ b/ktnef/CMakeLists.txt
@@ -10,6 +10,7 @@ add_definitions( -DQT_NO_CAST_TO_ASCII )
add_subdirectory(pics)
set(ktnef_SRCS
+ ktnef_debug.cpp
attachpropertydialog.cpp
ktnefmain.cpp
ktnefview.cpp
diff --git a/ktnef/attachpropertydialog.cpp b/ktnef/attachpropertydialog.cpp
index 033af64..b75eb91 100644
--- a/ktnef/attachpropertydialog.cpp
+++ b/ktnef/attachpropertydialog.cpp
@@ -22,7 +22,7 @@
#include <KTNEF/KTNEFPropertySet>
#include <KTNEF/KTNEFDefs>
-#include <QDebug>
+#include "ktnef_debug.h"
#include <KLocalizedString>
#include <KMessageBox>
@@ -129,7 +129,7 @@ void AttachPropertyDialog::formatProperties(const QMap<int, \
KTNEFProperty *> &pr } else if (item) {
newItem = new QTreeWidgetItem(item, QStringList((*it)->keyString()));
} else {
- qWarning() << "formatProperties() called with no listview and no item";
+ qCWarning(KTNEFAPPS_LOG) << "formatProperties() called with no listview \
and no item"; return;
}
diff --git a/agents/sendlateragent/sendlateragent_debug.cpp b/ktnef/ktnef_debug.cpp
similarity index 90%
copy from agents/sendlateragent/sendlateragent_debug.cpp
copy to ktnef/ktnef_debug.cpp
index 6ccd78c..8f9141b 100644
--- a/agents/sendlateragent/sendlateragent_debug.cpp
+++ b/ktnef/ktnef_debug.cpp
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include "sendlateragent_debug.h"
-Q_LOGGING_CATEGORY(SENDLATERAGENT_LOG, "log_sendlateragent")
+#include "ktnef_debug.h"
+Q_LOGGING_CATEGORY(KTNEFAPPS_LOG, "log_ktnefapps")
+
diff --git a/agents/sendlateragent/sendlateragent_debug.h b/ktnef/ktnef_debug.h
similarity index 88%
copy from agents/sendlateragent/sendlateragent_debug.h
copy to ktnef/ktnef_debug.h
index 6c0b4a1..0465a3c 100644
--- a/agents/sendlateragent/sendlateragent_debug.h
+++ b/ktnef/ktnef_debug.h
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef SENDLATERAGENT_DEBUG_H
-#define SENDLATERAGENT_DEBUG_H
+#ifndef KTNEF_DEBUG_H
+#define KTNEF_DEBUG_H
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(SENDLATERAGENT_LOG)
+Q_DECLARE_LOGGING_CATEGORY(KTNEFAPPS_LOG)
-#endif
+#endif
diff --git a/ktnef/ktnefmain.cpp b/ktnef/ktnefmain.cpp
index fac0337..4fb15f9 100644
--- a/ktnef/ktnefmain.cpp
+++ b/ktnef/ktnefmain.cpp
@@ -28,7 +28,7 @@
#include <kservice.h>
#include <QAction>
#include <KActionCollection>
-#include <QDebug>
+#include "ktnef_debug.h"
#include <KEditToolBar>
#include <KLocalizedString>
#include <QMenu>
@@ -247,12 +247,12 @@ void KTNEFMain::viewFile()
QString mimename(attach->mimeTag());
if (mimename.isEmpty() || mimename == \
QLatin1String("application/octet-stream")) {
- qDebug() << "No mime type found in attachment object, trying to \
guess..."; + qCDebug(KTNEFAPPS_LOG) << "No mime type found in attachment \
object, trying to guess..."; QMimeDatabase db;
db.mimeTypeForFile(url.path(), QMimeDatabase::MatchExtension).name();
- qDebug() << "Detected mime type: " << mimename;
+ qCDebug(KTNEFAPPS_LOG) << "Detected mime type: " << mimename;
} else {
- qDebug() << "Mime type from attachment object: " << mimename;
+ qCDebug(KTNEFAPPS_LOG) << "Mime type from attachment object: " << \
mimename; }
KRun::runUrl(url, mimename, this, true);
diff --git a/ktnef/qwmf.cpp b/ktnef/qwmf.cpp
index b04fde8..1a14dfa 100644
--- a/ktnef/qwmf.cpp
+++ b/ktnef/qwmf.cpp
@@ -30,7 +30,7 @@
#include <QFile>
#include <QPolygon>
-#include <qdebug.h>
+#include "ktnef_debug.h"
bool qwmfDebug = false;
@@ -144,12 +144,12 @@ bool QWinMetaFile::load(const QString &filename)
QFile file(filename);
if (!file.exists()) {
- qDebug() << "File" << QFile::encodeName(filename) << " does not exist";
+ qCDebug(KTNEFAPPS_LOG) << "File" << QFile::encodeName(filename) << " does \
not exist"; return false;
}
if (!file.open(QIODevice::ReadOnly)) {
- qDebug() << "Cannot open file" << QFile::encodeName(filename);
+ qCDebug(KTNEFAPPS_LOG) << "Cannot open file" << QFile::encodeName(filename);
return false;
}
@@ -209,12 +209,12 @@ bool QWinMetaFile::load(QBuffer &buffer)
mBBox.setBottom(pheader.bbox.bottom);
mHeaderBoundingBox = mBBox;
if (QWMF_DEBUG) {
- qDebug() << endl << "-------------------------------------------------";
- qDebug() << "WMF Placeable Header (" << \
static_cast<int>(sizeof(pheader)) << "):";
- qDebug() << " bbox=(" << mBBox.left() << ";" << mBBox.top() << ";" << \
mBBox.width() + qCDebug(KTNEFAPPS_LOG) << endl << \
"-------------------------------------------------"; + \
qCDebug(KTNEFAPPS_LOG) << "WMF Placeable Header (" << \
static_cast<int>(sizeof(pheader)) << "):"; + qCDebug(KTNEFAPPS_LOG) << " \
bbox=(" << mBBox.left() << ";" << mBBox.top() << ";" << mBBox.width() << "; " << \
mBBox.height() << ")" << endl;
- qDebug() << " inch=" << pheader.inch;
- qDebug() << " checksum=" << pheader.checksum << "("
+ qCDebug(KTNEFAPPS_LOG) << " inch=" << pheader.inch;
+ qCDebug(KTNEFAPPS_LOG) << " checksum=" << pheader.checksum << "("
<< (pheader.checksum == checksum ? "ok" : "wrong") << " )" << \
endl; }
} else {
@@ -250,16 +250,16 @@ bool QWinMetaFile::load(QBuffer &buffer)
st >> eheader.szlMillimeters.height;
if (QWMF_DEBUG) {
- qDebug() << endl << "-------------------------------------------------";
- qDebug() << "WMF Extended Header:";
- qDebug() << " iType=" << eheader.iType;
- qDebug() << " nSize=" << eheader.nSize;
- qDebug() << " rclBounds=(" << eheader.rclBounds.left << ";" << \
eheader.rclBounds.top << ";" + qCDebug(KTNEFAPPS_LOG) << endl << \
"-------------------------------------------------"; + \
qCDebug(KTNEFAPPS_LOG) << "WMF Extended Header:"; + qCDebug(KTNEFAPPS_LOG) \
<< " iType=" << eheader.iType; + qCDebug(KTNEFAPPS_LOG) << " nSize=" << \
eheader.nSize; + qCDebug(KTNEFAPPS_LOG) << " rclBounds=(" << \
eheader.rclBounds.left << ";" << eheader.rclBounds.top << ";"
<< eheader.rclBounds.right << "; " << eheader.rclBounds.bottom \
<< ")" << endl;
- qDebug() << " rclFrame=(" << eheader.rclFrame.left << ";" << \
eheader.rclFrame.top << ";" + qCDebug(KTNEFAPPS_LOG) << " rclFrame=(" << \
eheader.rclFrame.left << ";" << eheader.rclFrame.top << ";"
<< eheader.rclFrame.right << "; " << eheader.rclFrame.bottom << \
")" << endl;
- qDebug() << " nBytes=" << eheader.nBytes;
- qDebug() << "\nNOT YET IMPLEMENTED, SORRY.";
+ qCDebug(KTNEFAPPS_LOG) << " nBytes=" << eheader.nBytes;
+ qCDebug(KTNEFAPPS_LOG) << "\nNOT YET IMPLEMENTED, SORRY.";
}
} else { // no, not enhanced
//----- Read as standard metafile header
@@ -272,7 +272,7 @@ bool QWinMetaFile::load(QBuffer &buffer)
st >> header.mtMaxRecord;
st >> header.mtNoParameters;
if (QWMF_DEBUG) {
- qDebug() << "WMF Header:" << "mtSize=" << header.mtSize;
+ qCDebug(KTNEFAPPS_LOG) << "WMF Header:" << "mtSize=" << header.mtSize;
}
}
@@ -315,17 +315,17 @@ bool QWinMetaFile::load(QBuffer &buffer)
}
if (i < rdSize) {
- qDebug() << "WMF : file truncated !";
+ qCDebug(KTNEFAPPS_LOG) << "WMF : file truncated !";
return false;
}
}
//----- Test records validities
mValid = (rdFunc == 0) && (mBBox.width() != 0) && (mBBox.height() != 0);
if (!mValid) {
- qDebug() << "WMF : incorrect file format !";
+ qCDebug(KTNEFAPPS_LOG) << "WMF : incorrect file format !";
}
} else {
- qDebug() << "WMF Header : incorrect header !";
+ qCDebug(KTNEFAPPS_LOG) << "WMF Header : incorrect header !";
}
buffer.close();
@@ -361,7 +361,7 @@ bool QWinMetaFile::paint(QPaintDevice *aTarget, bool absolute)
mPainter.begin(aTarget);
if (QWMF_DEBUG) {
- qDebug() << "Bounding box :" << mBBox.left()
+ qCDebug(KTNEFAPPS_LOG) << "Bounding box :" << mBBox.left()
<< " " << mBBox.top() << " " << mBBox.right() << " " << \
mBBox.bottom() << endl; }
@@ -390,7 +390,7 @@ bool QWinMetaFile::paint(QPaintDevice *aTarget, bool absolute)
str += param;
str += QLatin1Char(' ');
}
- qDebug() << str;
+ qCDebug(KTNEFAPPS_LOG) << str;
}
}
/*
@@ -398,7 +398,7 @@ bool QWinMetaFile::paint(QPaintDevice *aTarget, bool absolute)
// because actually QPicture::boundingBox() != mBBox()
mWindowsCoord += 1;
if ( mWindowsCoord == 2 ) {
- qDebug() <<"DRAW ANGLES";
+ qCDebug(KTNEFAPPS_LOG) <<"DRAW ANGLES";
mPainter.setPen( Qt::white );
mPainter.drawPoint( mBBox.left(), mBBox.top() );
mPainter.drawPoint( mBBox.right(), mBBox.bottom() );
@@ -808,7 +808,7 @@ void QWinMetaFile::dibBitBlt(long num, short *parm)
mPainter.restore();
}
} else {
- qDebug() << "QWinMetaFile::dibBitBlt without image: not implemented";
+ qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile::dibBitBlt without image: not \
implemented"; }
}
@@ -904,7 +904,7 @@ void QWinMetaFile::createEmptyObject(long, short *)
// allocation of an empty object (to keep object counting in sync)
WinObjPenHandle *handle = new WinObjPenHandle;
addHandle(handle);
- qDebug() << "QWinMetaFile: unimplemented createObject";
+ qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile: unimplemented createObject";
}
//-----------------------------------------------------------------------------
@@ -938,13 +938,13 @@ void QWinMetaFile::createBrushIndirect(long, short *parm)
if (arg >= 0 && arg < 5) {
style = hatchedStyleTab[ arg ];
} else {
- qDebug() << "QWinMetaFile::createBrushIndirect: invalid hatched brush" \
<< arg; + qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile::createBrushIndirect: \
invalid hatched brush" << arg; style = Qt::SolidPattern;
}
} else if (arg >= 0 && arg < 9) {
style = styleTab[ arg ];
} else {
- qDebug() << "QWinMetaFile::createBrushIndirect: invalid brush" << arg;
+ qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile::createBrushIndirect: invalid brush" \
<< arg; style = Qt::SolidPattern;
}
handle->brush.setStyle(style);
@@ -964,7 +964,7 @@ void QWinMetaFile::createPenIndirect(long, short *parm)
if (parm[ 0 ] >= 0 && parm[ 0 ] < 6) {
style = styleTab[ parm[ 0 ] ];
} else {
- qDebug() << "QWinMetaFile::createPenIndirect: invalid pen" << parm[ 0 ];
+ qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile::createPenIndirect: invalid pen" << \
parm[ 0 ]; style = Qt::SolidLine;
}
@@ -979,10 +979,10 @@ void QWinMetaFile::createPenIndirect(long, short *parm)
QRect devRec;
devRec = mPainter.transformed( mBBox );
width = ( parm[ 0 ] * devRec.width() ) / mBBox.width() ;
- qDebug() <<"CreatePenIndirect:";
- qDebug() <<" log coord. :" << mBBox.width() <<"" << mBBox.height();
- qDebug() <<" log. pen :" << parm[ 1 ] <<"" << parm[ 2 ];
- qDebug() <<" dev. pen :" << width;
+ qCDebug(KTNEFAPPS_LOG) <<"CreatePenIndirect:";
+ qCDebug(KTNEFAPPS_LOG) <<" log coord. :" << mBBox.width() <<"" << \
mBBox.height(); + qCDebug(KTNEFAPPS_LOG) <<" log. pen :" << parm[ 1 ] <<"" \
<< parm[ 2 ]; + qCDebug(KTNEFAPPS_LOG) <<" dev. pen :" << width;
handle->pen.setWidth( width );
*/
}
@@ -1016,7 +1016,7 @@ void QWinMetaFile::noop(long, short *)
void QWinMetaFile::end(long, short *)
{
// end of file :
-// qDebug() <<"END bbox=(" << mBBox.left() <<";" << mBBox.top() <<";" << \
mBBox.width() <<";" << mBBox.height() <<")"; +// qCDebug(KTNEFAPPS_LOG) <<"END \
bbox=(" << mBBox.left() <<";" << mBBox.top() <<";" << mBBox.width() <<";" << \
mBBox.height() <<")"; }
//-----------------------------------------------------------------------------
@@ -1125,7 +1125,7 @@ void QWinMetaFile::addHandle(WinObjHandle *handle)
if (idx < MAX_OBJHANDLE) {
mObjHandleTab[ idx ] = handle;
} else {
- qDebug() << "QWinMetaFile error: handle table full !";
+ qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile error: handle table full !";
}
}
@@ -1235,7 +1235,7 @@ bool QWinMetaFile::dibToBmp(QImage &bmp, const char *dib, long \
size) bmpHeader->bmSize = sizeBmp;
if (!bmp.loadFromData((const uchar *)bmpHeader, pattern.size(), "BMP")) {
- qDebug() << "QWinMetaFile::dibToBmp: invalid bitmap";
+ qCDebug(KTNEFAPPS_LOG) << "QWinMetaFile::dibToBmp: invalid bitmap";
return false;
} else {
// if ( bmp.save("/home/software/kde-cvs/qt/examples/wmf/test.bmp", "BMP") )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic