From 412619441fab46fc79c695a23ccf9e38135bdfad Mon Sep 17 00:00:00 2001 From: ar Date: Mon, 03 May 2004 21:35:18 +0000 Subject: - convert qDebug to odebug --- (limited to 'noncore/apps/tinykate/libkate/document/katebuffer.cpp') diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp index 22a4917..4c15fd0 100644 --- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp +++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp @@ -22,24 +22,25 @@ #include "katebuffer.h" +#include "kdebug.h" -// Includes for reading file -#include -#include -#include -#include -#include +/* OPIE */ +#include +/* QT */ #include #include - #include #include -// - +/* STD */ +// Includes for reading file +#include +#include +#include +#include +#include #include -#include /** * Create an empty buffer. @@ -65,35 +66,35 @@ KWBuffer::clear() void KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) { - if (line) { - qDebug("insert File only supports insertion at line 0 == file opening"); - return; - } - clear(); - QFile iofile(file); - iofile.open(IO_ReadOnly); - QTextStream stream(&iofile); - stream.setCodec(codec); - QString qsl; - int count=0; - for (count=0;((qsl=stream.readLine())!=QString::null); count++) - { - if (count==0) - { - (*m_stringListIt)->append(qsl.unicode(),qsl.length()); - } - else - { - TextLine::Ptr tl=new TextLine(); - tl ->append(qsl.unicode(),qsl.length()); - m_stringListIt=m_stringList.append(tl); - } - } - if (count!=0) - { - m_stringListCurrent=count-1; - m_lineCount=count; - } + if (line) { + odebug << "insert File only supports insertion at line 0 == file opening" << oendl; + return; + } + clear(); + QFile iofile(file); + iofile.open(IO_ReadOnly); + QTextStream stream(&iofile); + stream.setCodec(codec); + QString qsl; + int count=0; + for (count=0;((qsl=stream.readLine())!=QString::null); count++) + { + if (count==0) + { + (*m_stringListIt)->append(qsl.unicode(),qsl.length()); + } + else + { + TextLine::Ptr tl=new TextLine(); + tl ->append(qsl.unicode(),qsl.length()); + m_stringListIt=m_stringList.append(tl); + } + } + if (count!=0) + { + m_stringListCurrent=count-1; + m_lineCount=count; + } } void @@ -121,9 +122,9 @@ KWBuffer::slotLoadFile() int KWBuffer::count() { - qDebug("m_stringList.count %d",m_stringList.count()); + odebug << "m_stringList.count " << m_stringList.count() << "" << oendl; return m_lineCount; -// return m_stringList.count(); +// return m_stringList.count(); // return m_totalLines; } @@ -148,9 +149,9 @@ void KWBuffer::seek(int i) TextLine::Ptr KWBuffer::line(int i) { - if (i>=m_stringList.count()) return 0; - seek(i); - return *m_stringListIt; + if (i>=m_stringList.count()) return 0; + seek(i); + return *m_stringListIt; } void -- cgit v0.9.0.2