Commit d8b350c6 authored by Michal Humpula's avatar Michal Humpula

migrate from KDebug to QLoggingCategory (ktexteditor)

REVIEW: 114489
parent 5016261b
......@@ -68,7 +68,6 @@ Range CodeCompletionModelControllerInterface3::completionRange(View* view, const
if (findWordEnd.indexIn(text.mid(end.column())) >= 0)
end.setColumn(end.column() + findWordEnd.cap(1).length());
//kDebug()<<"returning:"<<Range(start,end);
return Range(start, end);
}
......@@ -89,8 +88,6 @@ QString CodeCompletionModelControllerInterface3::filterString(View* view, const
bool CodeCompletionModelControllerInterface3::shouldAbortCompletion(View* view, const Range &range, const QString &currentCompletion)
{
//kDebug()<<view->cursorPosition();
//kDebug()<<range;
if(view->cursorPosition() < range.start() || view->cursorPosition() > range.end())
return true; //Always abort when the completion-range has been left
//Do not abort completions when the text has been empty already before and a newline has been entered
......
......@@ -25,7 +25,7 @@
#define KDELIBS_KTEXTEDITOR_CURSOR_H
#include <ktexteditor/ktexteditor_export.h>
#include <kdebug.h>
#include <QDebug>
namespace KTextEditor
{
......@@ -300,7 +300,7 @@ class KTEXTEDITOR_EXPORT Cursor
{ return !(c1 > c2); }
/**
* kDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
*/
inline friend QDebug operator<< (QDebug s, const Cursor& cursor) {
if (&cursor)
......
......@@ -26,6 +26,8 @@
#include <ktexteditor/cursor.h>
#include <ktexteditor/document.h>
#include <QDebug>
namespace KTextEditor {
/**
......@@ -357,7 +359,7 @@ class KTEXTEDITOR_EXPORT DocumentCursor
{ return !(c1 > c2); }
/**
* kDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* @param s debug stream
* @param cursor cursor to print
* @return debug stream
......@@ -371,7 +373,7 @@ class KTEXTEDITOR_EXPORT DocumentCursor
}
/**
* kDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* @param s debug stream
* @param cursor cursor to print
* @return debug stream
......
......@@ -53,7 +53,6 @@
#include <kparts/factory.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kdebug.h>
using namespace KTextEditor;
......@@ -114,7 +113,7 @@ Plugin *KTextEditor::createPlugin ( KService::Ptr service, QObject *parent )
QString error;
Plugin* plugin = service->createInstance<KTextEditor::Plugin>(parent, QVariantList(), &error);
if (!plugin)
kWarning() << error;
qWarning() << error; // TODO: would be nice to have a qCWarning here, but it seems like overkill
return plugin;
}
#endif
......
......@@ -24,11 +24,12 @@
#ifndef KDELIBS_KTEXTEDITOR_MOVINGCURSOR_H
#define KDELIBS_KTEXTEDITOR_MOVINGCURSOR_H
#include <kdebug.h>
#include <ktexteditor/ktexteditor_export.h>
#include <ktexteditor/cursor.h>
#include <ktexteditor/document.h>
#include <QDebug>
namespace KTextEditor
{
......@@ -344,7 +345,7 @@ class KTEXTEDITOR_EXPORT MovingCursor
{ return !(c1 > c2); }
/**
* kDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* @param s debug stream
* @param cursor cursor to print
* @return debug stream
......@@ -358,7 +359,7 @@ class KTEXTEDITOR_EXPORT MovingCursor
}
/**
* kDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
* @param s debug stream
* @param cursor cursor to print
* @return debug stream
......
......@@ -29,6 +29,8 @@
#include <ktexteditor/range.h>
#include <ktexteditor/movingcursor.h>
#include <QDebug>
// TODO: KDE5, maybe add
// - void MoivingRange::setBlockMode(bool enableBlockMode);
// - bool MoivingRange::blockMode() const;
......@@ -349,7 +351,7 @@ class KTEXTEDITOR_EXPORT MovingRange
operator const Range () const { return Range (start().toCursor(), end().toCursor()); }
/**
* kDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
* @param s debug stream
* @param cursor range to print
* @return debug stream
......@@ -363,7 +365,7 @@ class KTEXTEDITOR_EXPORT MovingRange
}
/**
* kDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
* @param s debug stream
* @param range range to print
* @return debug stream
......
......@@ -27,6 +27,7 @@
#include <ktexteditor/ktexteditor_export.h>
#include <ktexteditor/cursor.h>
#include <QDebug>
namespace KTextEditor
{
......@@ -575,7 +576,7 @@ class KTEXTEDITOR_EXPORT Range
{ return r1.end() < r2.start(); }
/**
* kDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
* qDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
*/
inline friend QDebug operator<< (QDebug s, const Range& range) {
if (&range)
......
......@@ -30,8 +30,6 @@
#include <klibrary.h>
#include <KLocalizedString>
#include <kdebug.h>
#define DUMMY_VALUE "!KTE:TEMPLATEHANDLER_DUMMY_VALUE!"
using namespace KTextEditor;
......@@ -235,12 +233,9 @@ bool TemplateInterface::KTE_INTERNAL_setupIntialValues(const QString& templateSt
}
}
kDebug()<<"-----------------------------------";
for (QMap<QString,QString>::iterator it=enhancedInitValues.begin();it!=enhancedInitValues.end();++it) {
kDebug()<<"key:"<<it.key()<<" init value:"<<it.value();
if (it.value()==DUMMY_VALUE) it.value()="";
}
kDebug()<<"-----------------------------------";
if (!expandMacros( enhancedInitValues, dynamic_cast<QWidget*>(this) ) ) return false;
*initialValues=enhancedInitValues;
return true;
......
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