Commit 701f8a34 authored by Michal Humpula's avatar Michal Humpula

migrate from KDebug to QLoggingCategory (kwrite)

REVIEW: 114488
parent 8a79e6b8
......@@ -27,6 +27,11 @@ Boston, MA 02110-1301, USA.
#include <KGlobal>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(LOG_KWRITE)
Q_LOGGING_CATEGORY(LOG_KWRITE, "kwrite")
KWriteApp *KWriteApp::s_self = 0;
KWriteApp::KWriteApp(const QCommandLineParser &args)
......@@ -182,7 +187,7 @@ KTextEditor::View *KWriteApp::activeView()
KTextEditor::Document *KWriteApp::createDocument()
{
// NOTE: not implemented
kWarning() << "WARNING: interface call not implemented";
qCWarning(LOG_KWRITE) << "WARNING: interface call not implemented";
return 0;
}
......@@ -190,7 +195,7 @@ bool KWriteApp::closeDocument(KTextEditor::Document *doc)
{
Q_UNUSED(doc)
// NOTE: not implemented
kWarning() << "WARNING: interface call not implemented";
qCWarning(LOG_KWRITE) << "WARNING: interface call not implemented";
return false;
}
......@@ -198,7 +203,7 @@ KTextEditor::View *KWriteApp::createView(KTextEditor::Document *doc)
{
Q_UNUSED(doc)
// NOTE: not implemented
kWarning() << "WARNING: interface call not implemented";
qCWarning(LOG_KWRITE) << "WARNING: interface call not implemented";
return 0;
}
......@@ -206,7 +211,7 @@ bool KWriteApp::closeView(KTextEditor::View *view)
{
Q_UNUSED(view)
// NOTE: not implemented
kWarning() << "WARNING: interface call not implemented";
qCWarning(LOG_KWRITE) << "WARNING: interface call not implemented";
return false;
}
//END KTextEditor::MdiContainer
......
......@@ -52,6 +52,7 @@
#include <kstringhandler.h>
#include <kxmlguifactory.h>
#include <QCommandLineParser>
#include <QLoggingCategory>
#ifdef KActivities_FOUND
#include <KActivities/ResourceInstance>
......@@ -644,6 +645,8 @@ void KWrite::modeChanged ( KTextEditor::Document *document )
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
QLoggingCategory::setFilterRules(QStringLiteral("kwrite = true"));
KAboutData aboutData ( QString ("kwrite"), QString(),
i18n("KWrite"),
KDE_VERSION_STRING,
......
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