summaryrefslogtreecommitdiffstats
path: root/kate/part
diff options
context:
space:
mode:
Diffstat (limited to 'kate/part')
-rw-r--r--kate/part/kateautoindent.cpp6
-rw-r--r--kate/part/katebuffer.cpp16
-rw-r--r--kate/part/katecmds.cpp2
-rw-r--r--kate/part/katecmds.h2
-rw-r--r--kate/part/katedocument.cpp8
-rw-r--r--kate/part/katehighlight.cpp6
-rw-r--r--kate/part/katejscript.cpp2
-rw-r--r--kate/part/katerenderer.cpp14
-rw-r--r--kate/part/katetextline.cpp44
-rw-r--r--kate/part/katetextline.h6
-rw-r--r--kate/part/kateview.cpp4
-rw-r--r--kate/part/kateviewhelpers.cpp4
-rw-r--r--kate/part/kateviewinternal.cpp24
-rw-r--r--kate/part/test_regression.cpp8
14 files changed, 73 insertions, 73 deletions
diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp
index 16a1627a7..ed9a6169b 100644
--- a/kate/part/kateautoindent.cpp
+++ b/kate/part/kateautoindent.cpp
@@ -1411,7 +1411,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
uint pos, len = text.length();
bool seenOpen = false;
for(pos = 0; pos < len; ++pos) {
- int ch = text.at(pos).tqunicode();
+ int ch = text.at(pos).unicode();
switch(ch) {
case '<':
seenOpen = true;
@@ -1467,11 +1467,11 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
if(unclosedTag) {
// find the start of the next attribute, so we can align with it
do {
- lastCh = text.at(++attrCol).tqunicode();
+ lastCh = text.at(++attrCol).unicode();
}while(lastCh && lastCh != ' ' && lastCh != '\t');
while(lastCh == ' ' || lastCh == '\t') {
- lastCh = text.at(++attrCol).tqunicode();
+ lastCh = text.at(++attrCol).unicode();
}
attrCol = prevLine->cursorX(attrCol, tabWidth);
diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp
index 8a3ff0f03..1661c69df 100644
--- a/kate/part/katebuffer.cpp
+++ b/kate/part/katebuffer.cpp
@@ -172,10 +172,10 @@ class KateFileLoader
// should spaces be ignored at end of line?
inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; }
- // internal tqunicode data array
- inline const TQChar *tqunicode () const { return m_text.tqunicode(); }
+ // internal unicode data array
+ inline const TQChar *unicode () const { return m_text.unicode(); }
- // read a line, return length + offset in tqunicode data
+ // read a line, return length + offset in unicode data
void readLine (uint &offset, uint &length)
{
length = 0;
@@ -543,7 +543,7 @@ bool KateBuffer::canEncode ()
kdDebug(13020) << "ENC NAME: " << codec->name() << endl;
- // hardcode some tqunicode encodings which can encode all chars
+ // hardcode some unicode encodings which can encode all chars
if ((TQString(codec->name()) == "UTF-8") || (TQString(codec->name()) == "ISO-10646-UCS-2"))
return true;
@@ -1353,14 +1353,14 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
{
uint offset = 0, length = 0;
stream->readLine(offset, length);
- const TQChar *tqunicodeData = stream->tqunicode () + offset;
+ const TQChar *unicodeData = stream->unicode () + offset;
// strip spaces at end of line
if ( stream->removeTrailingSpaces() )
{
while (length > 0)
{
- if (tqunicodeData[length-1].isSpace())
+ if (unicodeData[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 *) tqunicodeData, sizeof(TQChar)*length);
+ memcpy(buf+pos, (char *) unicodeData, sizeof(TQChar)*length);
pos += sizeof(TQChar)*length;
}
else
{
KateTextLine::Ptr textLine = new KateTextLine ();
- textLine->insertText (0, length, tqunicodeData);
+ textLine->insertText (0, length, unicodeData);
m_stringList.push_back (textLine);
}
diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp
index b519994f7..c5feb5071 100644
--- a/kate/part/katecmds.cpp
+++ b/kate/part/katecmds.cpp
@@ -578,7 +578,7 @@ bool KateCommands::Character::exec (Kate::View *view, const TQString &_cmd, TQSt
view->insertText(TQString(buf));
}
else
- { // do the tqunicode thing
+ { // do the unicode thing
TQChar c(number);
view->insertText(TQString(&c, 1));
}
diff --git a/kate/part/katecmds.h b/kate/part/katecmds.h
index e55e2ac8b..55c8d807b 100644
--- a/kate/part/katecmds.h
+++ b/kate/part/katecmds.h
@@ -119,7 +119,7 @@ class SedReplace : public Kate::Command
};
/**
- * insert a tqunicode or ascii character
+ * insert a unicode or ascii character
* base 9+1: 1234
* hex: 0x1234 or x1234
* octal: 01231
diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp
index dda723891..0bb3d4ddf 100644
--- a/kate/part/katedocument.cpp
+++ b/kate/part/katedocument.cpp
@@ -1187,7 +1187,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str )
editAddUndo (KateUndoGroup::editInsertText, line, col, s.length(), s);
- l->insertText (col, s.length(), s.tqunicode());
+ l->insertText (col, s.length(), s.unicode());
// removeTrailingSpace(line); // ### nessecary?
m_buffer->changeLine(line);
@@ -1410,7 +1410,7 @@ bool KateDocument::editInsertLine ( uint line, const TQString &s )
removeTrailingSpace( line ); // old line
KateTextLine::Ptr tl = new KateTextLine();
- tl->insertText (0, s.length(), s.tqunicode(), 0);
+ tl->insertText (0, s.length(), s.unicode(), 0);
m_buffer->insertLine(line, tl);
m_buffer->changeLine(line);
@@ -2589,7 +2589,7 @@ bool KateDocument::saveFile()
//
if (!m_buffer->canEncode ()
&& (KMessageBox::warningContinueCancel(0,
- i18n("The selected encoding cannot encode every tqunicode character in this document. Do you really want to save it? There could be some data lost."),i18n("Possible Data Loss"),i18n("Save Nevertheless")) != KMessageBox::Continue))
+ i18n("The selected encoding cannot encode every unicode character in this document. Do you really want to save it? There could be some data lost."),i18n("Possible Data Loss"),i18n("Save Nevertheless")) != KMessageBox::Continue))
{
return false;
}
@@ -3227,7 +3227,7 @@ void KateDocument::del( KateView *view, const KateTextCursor& c )
void KateDocument::paste ( KateView* view )
{
- TQString s = TQApplication::tqclipboard()->text();
+ TQString s = TQApplication::clipboard()->text();
if (s.isEmpty())
return;
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 739ba78c8..17208412c 100644
--- a/kate/part/katehighlight.cpp
+++ b/kate/part/katehighlight.cpp
@@ -65,10 +65,10 @@ static const int KATE_DYNAMIC_CONTEXTS_RESET_DELAY = 30 * 1000;
inline bool kateInsideString (const TQString &str, TQChar ch)
{
- const TQChar *tqunicode = str.tqunicode();
+ const TQChar *unicode = str.unicode();
const uint len = str.length();
for (uint i=0; i < len; i++)
- if (tqunicode[i] == ch)
+ if (unicode[i] == ch)
return true;
return false;
@@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len)
if (wordLen < minLen) return 0;
- if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.tqunicode() + offset, wordLen).string()) )
+ if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.unicode() + offset, wordLen).string()) )
return offset2;
return 0;
diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp
index a9efac0e9..75f5fc513 100644
--- a/kate/part/katejscript.cpp
+++ b/kate/part/katejscript.cpp
@@ -62,7 +62,7 @@ UString::UString(const TQString &d)
{
unsigned int len = d.length();
UChar *dat = new UChar[len];
- memcpy(dat, d.tqunicode(), len * sizeof(UChar));
+ memcpy(dat, d.unicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len);
}
diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp
index ec1b84150..48b73d7e5 100644
--- a/kate/part/katerenderer.cpp
+++ b/kate/part/katerenderer.cpp
@@ -745,7 +745,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
KateFontStruct *fs = config()->fontStruct();
- const TQChar *tqunicode = textLine->text();
+ const TQChar *unicode = textLine->text();
const TQString &textString = textLine->string();
int x = 0;
@@ -763,7 +763,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
x += width;
- if (z < len && tqunicode[z] == TQChar('\t'))
+ if (z < len && unicode[z] == TQChar('\t'))
x -= x % width;
}
@@ -787,7 +787,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
*needWrap = false;
const uint len = textLine->length();
- const TQChar *tqunicode = textLine->text();
+ const TQChar *unicode = textLine->text();
const TQString &textString = textLine->string();
uint z = startcol;
@@ -800,10 +800,10 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
// How should tabs be treated when they word-wrap on a print-out?
// if startcol != 0, this messes up (then again, word wrapping messes up anyway)
- if (tqunicode[z] == TQChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x -= x % width;
- if (tqunicode[z].isSpace())
+ if (unicode[z].isSpace())
{
lastWhiteSpace = z+1;
lastWhiteSpaceX = x;
@@ -887,7 +887,7 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
if (!textLine) return 0;
const uint len = textLine->length();
- const TQChar *tqunicode = textLine->text();
+ const TQChar *unicode = textLine->text();
const TQString &textString = textLine->string();
x = oldX = 0;
@@ -906,7 +906,7 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
x += width;
- if (z < len && tqunicode[z] == TQChar('\t'))
+ if (z < len && unicode[z] == TQChar('\t'))
x -= x % width;
z++;
diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp
index dbb827003..6c701e1ed 100644
--- a/kate/part/katetextline.cpp
+++ b/kate/part/katetextline.cpp
@@ -110,11 +110,11 @@ void KateTextLine::truncate(uint newLen)
int KateTextLine::nextNonSpaceChar(uint pos) const
{
const uint len = m_text.length();
- const TQChar *tqunicode = m_text.tqunicode();
+ const TQChar *unicode = m_text.unicode();
for(uint i = pos; i < len; i++)
{
- if(!tqunicode[i].isSpace())
+ if(!unicode[i].isSpace())
return i;
}
@@ -128,11 +128,11 @@ int KateTextLine::previousNonSpaceChar(uint pos) const
if (pos >= (uint)len)
pos = len - 1;
- const TQChar *tqunicode = m_text.tqunicode();
+ const TQChar *unicode = m_text.unicode();
for(int i = pos; i >= 0; i--)
{
- if(!tqunicode[i].isSpace())
+ if(!unicode[i].isSpace())
return i;
}
@@ -152,20 +152,20 @@ int KateTextLine::lastChar() const
const TQChar *KateTextLine::firstNonSpace() const
{
int first = firstChar();
- return (first > -1) ? ((TQChar*)m_text.tqunicode())+first : m_text.tqunicode();
+ return (first > -1) ? ((TQChar*)m_text.unicode())+first : m_text.unicode();
}
uint KateTextLine::indentDepth (uint tabwidth) const
{
uint d = 0;
const uint len = m_text.length();
- const TQChar *tqunicode = m_text.tqunicode();
+ const TQChar *unicode = m_text.unicode();
for(uint i = 0; i < len; i++)
{
- if(tqunicode[i].isSpace())
+ if(unicode[i].isSpace())
{
- if (tqunicode[i] == TQChar('\t'))
+ if (unicode[i] == TQChar('\t'))
d += tabwidth - (d % tabwidth);
else
d++;
@@ -189,11 +189,11 @@ bool KateTextLine::stringAtPos(uint pos, const TQString& match) const
// overflow again which (pos+matchlen > len) does not catch; see bugs #129263 and #129580
Q_ASSERT(pos < len);
- const TQChar *tqunicode = m_text.tqunicode();
- const TQChar *matchUnicode = match.tqunicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++)
- if (tqunicode[i+pos] != matchUnicode[i])
+ if (unicode[i+pos] != matchUnicode[i])
return false;
return true;
@@ -206,11 +206,11 @@ bool KateTextLine::startingWith(const TQString& match) const
if (matchlen > m_text.length())
return false;
- const TQChar *tqunicode = m_text.tqunicode();
- const TQChar *matchUnicode = match.tqunicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++)
- if (tqunicode[i] != matchUnicode[i])
+ if (unicode[i] != matchUnicode[i])
return false;
return true;
@@ -223,12 +223,12 @@ bool KateTextLine::endingWith(const TQString& match) const
if (matchlen > m_text.length())
return false;
- const TQChar *tqunicode = m_text.tqunicode();
- const TQChar *matchUnicode = match.tqunicode();
+ const TQChar *unicode = m_text.unicode();
+ const TQChar *matchUnicode = match.unicode();
uint start = m_text.length() - matchlen;
for (uint i=0; i < matchlen; i++)
- if (tqunicode[start+i] != matchUnicode[i])
+ if (unicode[start+i] != matchUnicode[i])
return false;
return true;
@@ -239,11 +239,11 @@ int KateTextLine::cursorX(uint pos, uint tabChars) const
uint x = 0;
const uint n = kMin (pos, (uint)m_text.length());
- const TQChar *tqunicode = m_text.tqunicode();
+ const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < n; z++)
{
- if (tqunicode[z] == TQChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars);
else
x++;
@@ -257,11 +257,11 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const
{
uint x = 0;
const uint len = m_text.length();
- const TQChar *tqunicode = m_text.tqunicode();
+ const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < len; z++)
{
- if (tqunicode[z] == TQChar('\t'))
+ if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars);
else
x++;
@@ -346,7 +346,7 @@ char *KateTextLine::dump (char *buf, bool withHighlighting) const
memcpy(buf, &l, sizeof(uint));
buf += sizeof(uint);
- memcpy(buf, (char *) m_text.tqunicode(), sizeof(TQChar)*l);
+ memcpy(buf, (char *) m_text.unicode(), sizeof(TQChar)*l);
buf += sizeof(TQChar) * l;
if (!withHighlighting)
diff --git a/kate/part/katetextline.h b/kate/part/katetextline.h
index 84df82908..3922d04d0 100644
--- a/kate/part/katetextline.h
+++ b/kate/part/katetextline.h
@@ -145,10 +145,10 @@ class KateTextLine : public KShared
inline TQChar getChar (uint pos) const { return m_text[pos]; }
/**
- * Gets the text as a tqunicode representation
+ * Gets the text as a unicode representation
* @return text of this line as TQChar array
*/
- inline const TQChar *text() const { return m_text.tqunicode(); }
+ inline const TQChar *text() const { return m_text.unicode(); }
/**
* Highlighting array
@@ -419,7 +419,7 @@ class KateTextLine : public KShared
*/
private:
/**
- * text of line as tqunicode
+ * text of line as unicode
*/
TQString m_text;
diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp
index 669d954b1..ab4c2f54e 100644
--- a/kate/part/kateview.cpp
+++ b/kate/part/kateview.cpp
@@ -1613,7 +1613,7 @@ void KateView::copy() const
if (!hasSelection())
return;
- TQApplication::tqclipboard()->setText(selection ());
+ TQApplication::clipboard()->setText(selection ());
}
void KateView::copyHTML()
@@ -1629,7 +1629,7 @@ void KateView::copyHTML()
drag->addDragObject( htmltextdrag);
drag->addDragObject( new TQTextDrag( selection()));
- TQApplication::tqclipboard()->setData(drag);
+ TQApplication::clipboard()->setData(drag);
}
TQString KateView::selectionAsHtml()
diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp
index 2b717d5cd..f858ae908 100644
--- a/kate/part/kateviewhelpers.cpp
+++ b/kate/part/kateviewhelpers.cpp
@@ -795,10 +795,10 @@ int KateIconBorder::lineNumberWidth() const
int width = m_lineNumbersOn ? ((int)log10((double)(m_view->doc()->numLines())) + 1) * m_maxCharWidth + 4 : 0;
if (m_view->dynWordWrap() && m_dynWrapIndicatorsOn) {
- width = kMax(tqstyle().scrollBarExtent().width() + 4, width);
+ width = kMax(style().scrollBarExtent().width() + 4, width);
if (m_cachedLNWidth != width || m_oldBackgroundColor != m_view->renderer()->config()->iconBarColor()) {
- int w = tqstyle().scrollBarExtent().width();
+ int w = style().scrollBarExtent().width();
int h = m_view->renderer()->config()->fontMetrics()->height();
TQSize newSize(w, h);
diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp
index 464bb1c27..d93f81a86 100644
--- a/kate/part/kateviewinternal.cpp
+++ b/kate/part/kateviewinternal.cpp
@@ -106,7 +106,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
// bottom corner box
m_dummy = new TQWidget(m_view);
- m_dummy->setFixedHeight(tqstyle().scrollBarExtent().width());
+ m_dummy->setFixedHeight(style().scrollBarExtent().width());
if (m_view->dynWordWrap())
m_dummy->hide();
@@ -425,7 +425,7 @@ void KateViewInternal::scrollPos(KateTextCursor& c, bool force, bool calledExter
updateView(false, viewLinesScrolled);
int scrollHeight = -(viewLinesScrolled * (int)m_view->renderer()->fontHeight());
- int scrollbarWidth = tqstyle().scrollBarExtent().width();
+ int scrollbarWidth = style().scrollBarExtent().width();
//
// updates are for working around the scrollbar leaving blocks in the view
@@ -2649,9 +2649,9 @@ void KateViewInternal::keyReleaseEvent( TQKeyEvent* e )
if (m_selChangedByUser)
{
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
m_selChangedByUser = false;
}
@@ -2711,9 +2711,9 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e )
m_view->selectLine( cursor );
}
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Keep the line at the select anchor selected during further
// mouse selection
@@ -2889,9 +2889,9 @@ void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e)
// Move cursor to end (or beginning) of selected word
if (m_view->hasSelection())
{
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Shift+DC before the "cached" word should move the cursor to the
// beginning of the selection, not the end
@@ -2933,9 +2933,9 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e )
if (m_selChangedByUser)
{
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
// Set cursor to edge of selection... which edge depends on what
// "direction" the selection was made in
if ( m_view->selectStart < selectAnchor )
@@ -2961,9 +2961,9 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e )
if( m_doc->isReadWrite() )
{
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
m_view->paste ();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
}
e->accept ();
diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp
index 258c5a913..9e56bcbe9 100644
--- a/kate/part/test_regression.cpp
+++ b/kate/part/test_regression.cpp
@@ -871,8 +871,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
pos++;
int newpos = absBase.find('/', pos);
if (newpos == -1) newpos = absBase.length();
- TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos);
- TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos);
+ TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
+ TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
// kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl;
// kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl;
// kdDebug() << "pos: " << pos << " newpos: " << newpos << endl;
@@ -886,8 +886,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
TQString rel;
{
- TQConstString relBase(absBase.tqunicode() + basepos, absBase.length() - basepos);
- TQConstString relPath(absPath.tqunicode() + pathpos, absPath.length() - pathpos);
+ TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
+ TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
// generate as many .. as there are path elements in relBase
if (relBase.string().length() > 0) {
for (int i = relBase.string().contains('/'); i > 0; --i)