diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kate/part/katebuffer.cpp | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/part/katebuffer.cpp')
-rw-r--r-- | kate/part/katebuffer.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp index 74a9ba59e..33fac3325 100644 --- a/kate/part/katebuffer.cpp +++ b/kate/part/katebuffer.cpp @@ -46,7 +46,7 @@ * loader block size, load 256 kb at once per default * if file size is smaller, fall back to file size */ -static const Q_ULONG KATE_FILE_LOADER_BS = 256 * 1024; +static const TQ_ULONG KATE_FILE_LOADER_BS = 256 * 1024; /** * KATE_AVG_BLOCK_SIZE is in characters ! @@ -54,8 +54,8 @@ static const Q_ULONG KATE_FILE_LOADER_BS = 256 * 1024; * block will max contain around BLOCK_SIZE chars or * BLOCK_LINES lines (after load, later that won't be tracked) */ -static const Q_ULONG KATE_AVG_BLOCK_SIZE = 2048 * 80; -static const Q_ULONG KATE_MAX_BLOCK_LINES = 2048; +static const TQ_ULONG KATE_AVG_BLOCK_SIZE = 2048 * 80; +static const TQ_ULONG KATE_MAX_BLOCK_LINES = 2048; /** * hl will look at the next KATE_HL_LOOKAHEAD lines @@ -172,10 +172,10 @@ class KateFileLoader // should spaces be ignored at end of line? inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; } - // internal unicode data array - inline const TQChar *unicode () const { return m_text.unicode(); } + // internal tqunicode data array + inline const TQChar *tqunicode () const { return m_text.tqunicode(); } - // read a line, return length + offset in unicode data + // read a line, return length + offset in tqunicode data void readLine (uint &offset, uint &length) { length = 0; @@ -402,7 +402,7 @@ void KateBuffer::editEnd () KateBufBlock *buf2 = 0; bool needContinue = false; - while ((buf2 = findBlock(editTagLineStart))) + while ((buf2 = tqfindBlock(editTagLineStart))) { needContinue = doHighlight (buf2, (editTagLineStart > buf2->startLine()) ? editTagLineStart : buf2->startLine(), @@ -543,7 +543,7 @@ bool KateBuffer::canEncode () kdDebug(13020) << "ENC NAME: " << codec->name() << endl; - // hardcode some unicode encodings which can encode all chars + // hardcode some tqunicode encodings which can encode all chars if ((TQString(codec->name()) == "UTF-8") || (TQString(codec->name()) == "ISO-10646-UCS-2")) return true; @@ -618,7 +618,7 @@ KateTextLine::Ptr KateBuffer::line_internal (KateBufBlock *buf, uint i) { // update hl until this line + max KATE_HL_LOOKAHEAD KateBufBlock *buf2 = 0; - while ((i >= m_lineHighlighted) && (buf2 = findBlock(m_lineHighlighted))) + while ((i >= m_lineHighlighted) && (buf2 = tqfindBlock(m_lineHighlighted))) { uint end = kMin(i + KATE_HL_LOOKAHEAD, buf2->endLine()); @@ -637,7 +637,7 @@ KateTextLine::Ptr KateBuffer::line_internal (KateBufBlock *buf, uint i) return buf->line (i - buf->startLine()); } -KateBufBlock *KateBuffer::findBlock_internal (uint i, uint *index) +KateBufBlock *KateBuffer::tqfindBlock_internal (uint i, uint *index) { uint lastLine = m_blocks[m_lastInSyncBlock]->endLine (); @@ -701,7 +701,7 @@ KateBufBlock *KateBuffer::findBlock_internal (uint i, uint *index) void KateBuffer::changeLine(uint i) { - KateBufBlock *buf = findBlock(i); + KateBufBlock *buf = tqfindBlock(i); if (!buf) return; @@ -725,9 +725,9 @@ void KateBuffer::insertLine(uint i, KateTextLine::Ptr line) uint index = 0; KateBufBlock *buf; if (i == m_lines) - buf = findBlock(i-1, &index); + buf = tqfindBlock(i-1, &index); else - buf = findBlock(i, &index); + buf = tqfindBlock(i, &index); if (!buf) return; @@ -772,7 +772,7 @@ void KateBuffer::insertLine(uint i, KateTextLine::Ptr line) void KateBuffer::removeLine(uint i) { uint index = 0; - KateBufBlock *buf = findBlock(i, &index); + KateBufBlock *buf = tqfindBlock(i, &index); if (!buf) return; @@ -849,7 +849,7 @@ void KateBuffer::setTabWidth (uint w) m_tabWidth = w; if (m_highlight && m_highlight->foldingIndentationSensitive()) - invalidateHighlighting(); + tqinvalidateHighlighting(); } } @@ -860,12 +860,12 @@ void KateBuffer::setHighlight(uint hlMode) // aha, hl will change if (h != m_highlight) { - bool invalidate = !h->noHighlighting(); + bool tqinvalidate = !h->noHighlighting(); if (m_highlight) { m_highlight->release(); - invalidate = true; + tqinvalidate = true; } h->use(); @@ -880,8 +880,8 @@ void KateBuffer::setHighlight(uint hlMode) m_highlight = h; - if (invalidate) - invalidateHighlighting(); + if (tqinvalidate) + tqinvalidateHighlighting(); // inform the document that the hl was really changed // needed to update attributes and more ;) @@ -889,7 +889,7 @@ void KateBuffer::setHighlight(uint hlMode) } } -void KateBuffer::invalidateHighlighting() +void KateBuffer::tqinvalidateHighlighting() { m_lineHighlightedMax = 0; m_lineHighlighted = 0; @@ -906,7 +906,7 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line, uint line=blk->startLine()+current_line; if (line==0) return; line--; - blk=findBlock(line); + blk=tqfindBlock(line); if (!blk) { kdDebug(13020)<<"updatePreviousNotEmptyLine: block not found, this must not happen"<<endl; return; @@ -949,7 +949,7 @@ void KateBuffer::addIndentBasedFoldingInformation(TQMemArray<uint> &foldingList, } } -bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, bool invalidate) +bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, bool tqinvalidate) { // no hl around, no stuff to do if (!m_highlight) @@ -971,13 +971,13 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b //kdDebug (13020) << "HL UNTIL LINE: " << m_lineHighlighted << " MAX: " << m_lineHighlightedMax << endl; //kdDebug (13020) << "HL DYN COUNT: " << KateHlManager::self()->countDynamicCtxs() << " MAX: " << m_maxDynamicContexts << endl; - // see if there are too many dynamic contexts; if yes, invalidate HL of all documents + // see if there are too many dynamic contexts; if yes, tqinvalidate HL of all documents if (KateHlManager::self()->countDynamicCtxs() >= m_maxDynamicContexts) { { if (KateHlManager::self()->resetDynamicCtxs()) { - kdDebug (13020) << "HL invalidated - too many dynamic contexts ( >= " << m_maxDynamicContexts << ")" << endl; + kdDebug (13020) << "HL tqinvalidated - too many dynamic contexts ( >= " << m_maxDynamicContexts << ")" << endl; // avoid recursive invalidation KateHlManager::self()->setForceNoDCReset(true); @@ -988,7 +988,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b // doHighlight *shall* do his work. After invalidation, some highlight has // been recalculated, but *maybe not* until endLine ! So we shall force it manually... KateBufBlock *buf = 0; - while ((endLine > m_lineHighlighted) && (buf = findBlock(m_lineHighlighted))) + while ((endLine > m_lineHighlighted) && (buf = tqfindBlock(m_lineHighlighted))) { uint end = kMin(endLine, buf->endLine()); @@ -1240,7 +1240,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b buf->markDirty (); // tag the changed lines ! - if (invalidate) + if (tqinvalidate) emit tagLines (startLine, current_line + buf->startLine()); // emit that we have changed the folding @@ -1353,14 +1353,14 @@ void KateBufBlock::fillBlock (KateFileLoader *stream) { uint offset = 0, length = 0; stream->readLine(offset, length); - const TQChar *unicodeData = stream->unicode () + offset; + const TQChar *tqunicodeData = stream->tqunicode () + offset; // strip spaces at end of line if ( stream->removeTrailingSpaces() ) { while (length > 0) { - if (unicodeData[length-1].isSpace()) + if (tqunicodeData[length-1].isSpace()) --length; else break; @@ -1391,13 +1391,13 @@ void KateBufBlock::fillBlock (KateFileLoader *stream) memcpy(buf+pos, (char *) &length, sizeof(uint)); pos += sizeof(uint); - memcpy(buf+pos, (char *) unicodeData, sizeof(TQChar)*length); + memcpy(buf+pos, (char *) tqunicodeData, sizeof(TQChar)*length); pos += sizeof(TQChar)*length; } else { KateTextLine::Ptr textLine = new KateTextLine (); - textLine->insertText (0, length, unicodeData); + textLine->insertText (0, length, tqunicodeData); m_stringList.push_back (textLine); } @@ -1657,4 +1657,4 @@ void KateBufBlockList::removeInternal (KateBufBlock *buf) //END KateBufBlockList -// kate: space-indent on; indent-width 2; replace-tabs on; +// kate: space-indent on; indent-width 2; tqreplace-tabs on; |