Diffstat (limited to 'noncore/apps/tinykate/libkate/document/katedocument.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katedocument.cpp | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp index 0c742d7..6dc4fd2 100644 --- a/noncore/apps/tinykate/libkate/document/katedocument.cpp +++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp @@ -7,5 +7,5 @@ email : crossfire@babylon2k.de jowenn@kde.org - + ***************************************************************************/ @@ -40,18 +40,29 @@ #include "katedocument.h" +#include "kmessagebox.h" +#include "kglobal.h" +//#include "kcharsets.h" +#include "kdebug.h" +//#include "kinstance.h" -#include <qfileinfo.h> -#include <qdatetime.h> +#include "kglobalsettings.h" +//#include "kaction.h" +//#include "kstdaction.h" -#include <kmessagebox.h> -#include <qpe/config.h> -#include <qstring.h> +#include "../view/kateview.h" +#include "katebuffer.h" +#include "katetextline.h" -#include <sys/time.h> -#include <unistd.h> +#include "katecmd.h" -#include <stdio.h> +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/config.h> +/* QT */ +#include <qfileinfo.h> +#include <qdatetime.h> +#include <qstring.h> #include <qtimer.h> #include <qobject.h> @@ -63,19 +74,9 @@ #include <qtextstream.h> #include <qtextcodec.h> -#include <kglobal.h> -//#include <kcharsets.h> -#include <kdebug.h> -//#include <kinstance.h> - -#include <kglobalsettings.h> -//#include <kaction.h> -//#include <kstdaction.h> - -#include "../view/kateview.h" -#include "katebuffer.h" -#include "katetextline.h" - -#include "katecmd.h" +/* STD */ +#include <sys/time.h> +#include <unistd.h> +#include <stdio.h> KateAction::KateAction(Action a, PointStruc &cursor, int len, const QString &text) @@ -131,5 +132,5 @@ QStringList KateDocument::replaceWithList = QStringList(); uint KateDocument::uniqueID = 0; -QPtrDict<KateDocument::KateDocPrivate>* KateDocument::d_ptr = 0; +QPtrDict<KateDocument::KateDocPrivate>* KateDocument::d_ptr = 0; @@ -142,6 +143,6 @@ KateDocument::KateDocument(bool bSingleViewMode, bool bBrowserView, hlManager(HlManager::self ()) { - - d(this)->hlSetByUser = false; + + d(this)->hlSetByUser = false; PreHighlightedTill=0; RequestPreHighlightTill=0; @@ -153,5 +154,5 @@ KateDocument::KateDocument(bool bSingleViewMode, bool bBrowserView, // NOTE: QFont::CharSet doesn't provide all the charsets KDE supports - // (esp. it doesn't distinguish between UTF-8 and iso10646-1) + // (esp. it doesn't distinguish between UTF-8 and iso10646-1) myEncoding = QString::fromLatin1(QTextCodec::codecForLocale()->name()); @@ -293,5 +294,5 @@ void KateDocument::openURL(const QString &filename) { - m_file=filename; + m_file=filename; fileInfo->setFile (m_file); setMTime(); @@ -299,5 +300,5 @@ void KateDocument::openURL(const QString &filename) if (!fileInfo->exists() || !fileInfo->isReadable()) { - qDebug("File doesn't exit or couldn't be read"); + odebug << "File doesn't exit or couldn't be read" << oendl; return ; } @@ -306,5 +307,5 @@ void KateDocument::openURL(const QString &filename) #warning fixme // buffer->insertFile(0, m_file, KGlobal::charsets()->codecForName(myEncoding)); - qDebug("Telling buffer to open file"); + odebug << "Telling buffer to open file" << oendl; buffer->insertFile(0, m_file, QTextCodec::codecForLocale()); @@ -322,5 +323,5 @@ void KateDocument::openURL(const QString &filename) emit fileNameChanged(); - + return ; } @@ -328,5 +329,5 @@ void KateDocument::openURL(const QString &filename) bool KateDocument::saveFile() { - + QFile f( m_file ); if ( !f.open( IO_WriteOnly ) ) @@ -612,5 +613,5 @@ void KateDocument::readConfig() colors[0] = config->readColorEntry("Color Background", colors[0]); colors[1] = config->readColorEntry("Color Selected", colors[1]); - + // config->sync(); } @@ -684,5 +685,5 @@ void KateDocument::setHighlight(int n) { void KateDocument::makeAttribs() { - qDebug("KateDocument::makeAttribs()"); + odebug << "KateDocument::makeAttribs()" << oendl; m_numAttribs = hlManager->makeAttribs(m_highlight, m_attribs, maxAttribs); updateFontData(); @@ -1924,6 +1925,6 @@ void KateDocument::updateLines(int startLine, int endLine, int flags, int cursor } endCtx = textLine->getContext(); -// qDebug("DOHIGHLIGHT"); - +// odebug << "DOHIGHLIGHT" << oendl; + ctxNum = m_highlight->doHighlight(ctxNum,textLine); textLine->setContext(ctxNum); |