summaryrefslogtreecommitdiffstats
path: root/kate/part
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kate/part
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/part')
-rw-r--r--kate/part/.kateconfig2
-rw-r--r--kate/part/configure.in.in2
-rw-r--r--kate/part/katearbitraryhighlight.cpp6
-rw-r--r--kate/part/katearbitraryhighlight.h4
-rw-r--r--kate/part/kateattribute.cpp2
-rw-r--r--kate/part/kateattribute.h2
-rw-r--r--kate/part/kateautoindent.cpp134
-rw-r--r--kate/part/kateautoindent.h14
-rw-r--r--kate/part/katebookmarks.cpp8
-rw-r--r--kate/part/katebookmarks.h4
-rw-r--r--kate/part/katebuffer.cpp62
-rw-r--r--kate/part/katebuffer.h24
-rw-r--r--kate/part/katecmds.cpp80
-rw-r--r--kate/part/katecmds.h30
-rw-r--r--kate/part/katecodecompletion.cpp20
-rw-r--r--kate/part/katecodecompletion.h8
-rw-r--r--kate/part/katecodefoldinghelpers.cpp82
-rw-r--r--kate/part/katecodefoldinghelpers.h16
-rw-r--r--kate/part/kateconfig.cpp4
-rw-r--r--kate/part/kateconfig.h2
-rw-r--r--kate/part/katecursor.cpp2
-rw-r--r--kate/part/katecursor.h6
-rw-r--r--kate/part/katedialogs.cpp60
-rw-r--r--kate/part/katedialogs.h4
-rw-r--r--kate/part/katedocument.cpp88
-rw-r--r--kate/part/katedocument.h10
-rw-r--r--kate/part/katedocumenthelpers.cpp2
-rw-r--r--kate/part/katefactory.cpp12
-rw-r--r--kate/part/katefactory.h6
-rw-r--r--kate/part/katefiletype.cpp32
-rw-r--r--kate/part/katefont.cpp2
-rw-r--r--kate/part/katehighlight.cpp74
-rw-r--r--kate/part/katehighlight.h12
-rw-r--r--kate/part/katejscript.cpp4
-rw-r--r--kate/part/katejscript.h6
-rw-r--r--kate/part/katelinerange.cpp2
-rw-r--r--kate/part/kateluaindentscript.cpp4
-rw-r--r--kate/part/kateluaindentscript.h2
-rw-r--r--kate/part/kateprinter.cpp18
-rw-r--r--kate/part/katerenderer.cpp22
-rw-r--r--kate/part/kateschema.cpp76
-rw-r--r--kate/part/kateschema.h6
-rw-r--r--kate/part/katesearch.cpp296
-rw-r--r--kate/part/katesearch.h66
-rw-r--r--kate/part/katespell.cpp6
-rw-r--r--kate/part/katespell.h4
-rw-r--r--kate/part/katesupercursor.cpp4
-rw-r--r--kate/part/katesupercursor.h8
-rw-r--r--kate/part/katesyntaxdocument.cpp4
-rw-r--r--kate/part/katesyntaxdocument.h4
-rw-r--r--kate/part/katetemplatehandler.cpp4
-rw-r--r--kate/part/katetextline.cpp54
-rw-r--r--kate/part/katetextline.h16
-rw-r--r--kate/part/kateundo.cpp2
-rw-r--r--kate/part/kateundo.h4
-rw-r--r--kate/part/kateview.cpp68
-rw-r--r--kate/part/kateview.h26
-rw-r--r--kate/part/kateviewhelpers.cpp14
-rw-r--r--kate/part/kateviewhelpers.h4
-rw-r--r--kate/part/kateviewinternal.cpp18
-rw-r--r--kate/part/kateviewinternal.h12
-rw-r--r--kate/part/test_regression.cpp44
-rw-r--r--kate/part/test_regression.h4
63 files changed, 809 insertions, 809 deletions
diff --git a/kate/part/.kateconfig b/kate/part/.kateconfig
index 46471127e..5b0885abe 100644
--- a/kate/part/.kateconfig
+++ b/kate/part/.kateconfig
@@ -1 +1 @@
-kate: space-indent on; indent-width 2; tqreplace-tabs on;
+kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/configure.in.in b/kate/part/configure.in.in
index 204825d34..faf0717e9 100644
--- a/kate/part/configure.in.in
+++ b/kate/part/configure.in.in
@@ -55,7 +55,7 @@ dnl Based on the lua check used by yzis-M3
)
- dnl tqfind the libs name
+ dnl find the libs name
if test -z "$LUALIBH_FOUND" -o -z "$LUAH_FOUND"; then
LUA_LIBS=""
else
diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp
index a86f26a77..a9a4fe37c 100644
--- a/kate/part/katearbitraryhighlight.cpp
+++ b/kate/part/katearbitraryhighlight.cpp
@@ -90,7 +90,7 @@ void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateVi
}
void KateArbitraryHighlight::slotRangeListDeleted(TQObject* obj) {
- int id=m_docHLs.tqfindRef(static_cast<KateSuperRangeList*>(obj));
+ int id=m_docHLs.findRef(static_cast<KateSuperRangeList*>(obj));
if (id>=0) m_docHLs.take(id);
for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
@@ -152,11 +152,11 @@ KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range)
{
for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it)
for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next())
- if (l->tqcontains(range))
+ if (l->contains(range))
return it.key();
// This must belong to a document-global highlight
return 0L;
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katearbitraryhighlight.h b/kate/part/katearbitraryhighlight.h
index ef6e214a8..4dd5a362b 100644
--- a/kate/part/katearbitraryhighlight.h
+++ b/kate/part/katearbitraryhighlight.h
@@ -57,7 +57,7 @@ public:
* - identical highlight for whole list
* - signals for view movement
*/
-class KateArbitraryHighlight : public TQObject
+class KateArbitraryHighlight : public QObject
{
Q_OBJECT
@@ -84,4 +84,4 @@ private:
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateattribute.cpp b/kate/part/kateattribute.cpp
index 068d0d571..9ed6349f6 100644
--- a/kate/part/kateattribute.cpp
+++ b/kate/part/kateattribute.cpp
@@ -265,4 +265,4 @@ bool operator !=(const KateAttribute& h1, const KateAttribute& h2)
return !(h1 == h2);
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateattribute.h b/kate/part/kateattribute.h
index 7960f06b1..a54279b24 100644
--- a/kate/part/kateattribute.h
+++ b/kate/part/kateattribute.h
@@ -144,4 +144,4 @@ private:
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp
index e2deea691..ed9a6169b 100644
--- a/kate/part/kateautoindent.cpp
+++ b/kate/part/kateautoindent.cpp
@@ -170,7 +170,7 @@ void KateViewIndentationAction::slotAboutToShow()
popupMenu()->clear ();
for (uint z=0; z<modes.size(); ++z)
- popupMenu()->insertItem ( '&' + KateAutoIndent::modeDescription(z).tqreplace('&', "&&"), this, TQT_SLOT(setMode(int)), 0, z);
+ popupMenu()->insertItem ( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&"), this, TQT_SLOT(setMode(int)), 0, z);
popupMenu()->setItemChecked (doc->config()->indentationMode(), true);
}
@@ -224,55 +224,55 @@ void KateNormalIndent::updateConfig ()
for (uint i=0; i<items.count(); i++)
{
TQString name = items.at(i)->name;
- if (name.tqfind("Comment") != -1 && commentAttrib == 255)
+ if (name.find("Comment") != -1 && commentAttrib == 255)
{
commentAttrib = i;
}
- else if (name.tqfind("Region Marker") != -1 && regionAttrib == 255)
+ else if (name.find("Region Marker") != -1 && regionAttrib == 255)
{
regionAttrib = i;
}
- else if (name.tqfind("Symbol") != -1 && symbolAttrib == 255)
+ else if (name.find("Symbol") != -1 && symbolAttrib == 255)
{
symbolAttrib = i;
}
- else if (name.tqfind("Alert") != -1)
+ else if (name.find("Alert") != -1)
{
alertAttrib = i;
}
- else if (name.tqfind("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255)
+ else if (name.find("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255)
{
doxyCommentAttrib = i;
}
- else if (name.tqfind("Tags") != -1 && tagAttrib == 255)
+ else if (name.find("Tags") != -1 && tagAttrib == 255)
{
tagAttrib = i;
}
- else if (name.tqfind("Word") != -1 && wordAttrib == 255)
+ else if (name.find("Word") != -1 && wordAttrib == 255)
{
wordAttrib = i;
}
- else if (name.tqfind("Keyword") != -1 && keywordAttrib == 255)
+ else if (name.find("Keyword") != -1 && keywordAttrib == 255)
{
keywordAttrib = i;
}
- else if (name.tqfind("Normal") != -1 && normalAttrib == 255)
+ else if (name.find("Normal") != -1 && normalAttrib == 255)
{
normalAttrib = i;
}
- else if (name.tqfind("Extensions") != -1 && extensionAttrib == 255)
+ else if (name.find("Extensions") != -1 && extensionAttrib == 255)
{
extensionAttrib = i;
}
- else if (name.tqfind("Preprocessor") != -1 && preprocessorAttrib == 255)
+ else if (name.find("Preprocessor") != -1 && preprocessorAttrib == 255)
{
preprocessorAttrib = i;
}
- else if (name.tqfind("String") != -1 && stringAttrib == 255)
+ else if (name.find("String") != -1 && stringAttrib == 255)
{
stringAttrib = i;
}
- else if (name.tqfind("Char") != -1 && charAttrib == 255)
+ else if (name.find("Char") != -1 && charAttrib == 255)
{
charAttrib = i;
}
@@ -287,7 +287,7 @@ bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &en
pos = doc->plainKateTextLine(begin.line())->firstChar();
- // Iterate one-by-one tqfinding opening and closing chars
+ // Iterate one-by-one finding opening and closing chars
// Assume that open and close are 'Symbol' characters
while (begin < end)
{
@@ -449,11 +449,11 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
if (first == '}')
{
- indent = tqfindOpeningBrace(line);
+ indent = findOpeningBrace(line);
}
else if (first == ')')
{
- indent = tqfindOpeningParen(line);
+ indent = findOpeningParen(line);
}
else if (first == '{')
{
@@ -465,7 +465,7 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
else if (first == ':')
{
// Initialization lists (handle c++ and c#)
- int pos = tqfindOpeningBrace(line);
+ int pos = findOpeningBrace(line);
if (pos == 0)
indent = indentWidth;
else
@@ -483,7 +483,7 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
textLine->stringAtPos (firstChar, "Q_SLOTS") ||
textLine->stringAtPos (firstChar, "slots"))
{
- indent = tqfindOpeningBrace(line) + indentWidth;
+ indent = findOpeningBrace(line) + indentWidth;
}
}
else if (first == '*')
@@ -493,7 +493,7 @@ void KateCSmartIndent::processLine (KateDocCursor &line)
int lineEnd = textLine->lastChar();
if (lineEnd > 0 && textLine->getChar(lineEnd - 1) == '*')
{
- indent = tqfindOpeningComment(line);
+ indent = findOpeningComment(line);
if (textLine->attribute(firstChar) == doxyCommentAttrib)
indent++;
}
@@ -583,7 +583,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
if (last <= 0 || !(justAfterDoxygen = textLine->stringAtPos(last-1, "*/")))
insideDoxygen = true;
if (justAfterDoxygen)
- justAfterDoxygen &= textLine->string().tqfind("/**") < 0;
+ justAfterDoxygen &= textLine->string().find("/**") < 0;
while (textLine->attribute(first) != doxyCommentAttrib && first <= textLine->lastChar())
first++;
if (textLine->stringAtPos(first, "//"))
@@ -595,7 +595,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
{
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
- int indent = tqfindOpeningComment(begin);
+ int indent = findOpeningComment(begin);
TQString filler = tabString (indent);
bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
@@ -618,7 +618,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin)
{
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
- int indent = tqfindOpeningComment(begin);
+ int indent = findOpeningComment(begin);
TQString filler = tabString (indent);
doc->removeText (begin.line(), 0, begin.line(), first);
@@ -700,7 +700,7 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter,
{
const TQString txt = line->string(0,curCol);
// do we have any significant preceding colon?
- for (int pos = 0; (pos = txt.tqfind(':', pos)) >= 0; pos++) {
+ for (int pos = 0; (pos = txt.find(':', pos)) >= 0; pos++) {
if (line->attribute(pos) == indenter.symbolAttrib)
// yes, it has already contributed to this line's indentation, don't
// indent again
@@ -722,7 +722,7 @@ void KateCSmartIndent::processChar(TQChar c)
static const TQString triggers("}{)/:#n");
static const TQString firstTriggers("}{)/:#");
static const TQString lastTriggers(":n");
- if (triggers.tqfind(c) < 0)
+ if (triggers.find(c) < 0)
return;
KateView *view = doc->activeView();
@@ -748,7 +748,7 @@ void KateCSmartIndent::processChar(TQChar c)
if (c == 'n')
{
- if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::tqfromLatin1("regio"))
+ if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::fromLatin1("regio"))
return;
}
@@ -775,8 +775,8 @@ void KateCSmartIndent::processChar(TQChar c)
// of the line
const TQChar lastChar = textLine->getChar(textLine->lastChar());
int pos;
- if (((c == firstChar && firstTriggers.tqfind(firstChar) >= 0)
- || (c == lastChar && lastTriggers.tqfind(lastChar) >= 0))
+ if (((c == firstChar && firstTriggers.find(firstChar) >= 0)
+ || (c == lastChar && lastTriggers.find(lastChar) >= 0))
&& (c != ':' || colonPermitsReindent(*this, textLine, curCol)))
processLine(begin);
}
@@ -1094,12 +1094,12 @@ uint KateCSmartIndent::calcContinue(KateDocCursor &start, KateDocCursor &end)
return 0;
}
-uint KateCSmartIndent::tqfindOpeningBrace(KateDocCursor &start)
+uint KateCSmartIndent::findOpeningBrace(KateDocCursor &start)
{
KateDocCursor cur = start;
int count = 1;
- // Move backwards 1 by 1 and tqfind the opening brace
+ // Move backwards 1 by 1 and find the opening brace
// Return the indent of that line
while (cur.moveBackward(1))
{
@@ -1142,12 +1142,12 @@ bool KateCSmartIndent::firstOpeningBrace(KateDocCursor &start)
return true;
}
-uint KateCSmartIndent::tqfindOpeningParen(KateDocCursor &start)
+uint KateCSmartIndent::findOpeningParen(KateDocCursor &start)
{
KateDocCursor cur = start;
int count = 1;
- // Move backwards 1 by 1 and tqfind the opening (
+ // Move backwards 1 by 1 and find the opening (
// Return the indent of that line
while (cur.moveBackward(1))
{
@@ -1167,7 +1167,7 @@ uint KateCSmartIndent::tqfindOpeningParen(KateDocCursor &start)
return 0;
}
-uint KateCSmartIndent::tqfindOpeningComment(KateDocCursor &start)
+uint KateCSmartIndent::findOpeningComment(KateDocCursor &start)
{
KateDocCursor cur = start;
@@ -1176,7 +1176,7 @@ uint KateCSmartIndent::tqfindOpeningComment(KateDocCursor &start)
{
KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line());
- int pos = textLine->string().tqfind("/*", false);
+ int pos = textLine->string().find("/*", false);
if (pos >= 0)
{
KateDocCursor temp(cur.line(), pos, doc);
@@ -1322,7 +1322,7 @@ level; for each element that is closed, it is decreased by one.
We also have a special case of opening an element on one line and then
entering attributes on the following lines, in which case we would like
-to see the following tqlayout:
+to see the following layout:
<elem attr="..."
blah="..." />
@@ -1359,7 +1359,7 @@ void KateXmlIndent::processChar (TQChar c)
// only alter lines that start with a close element
KateView *view = doc->activeView();
TQString text = doc->plainKateTextLine(view->cursorLine())->string();
- if(text.tqfind(startsWithCloseTag) == -1) return;
+ if(text.find(startsWithCloseTag) == -1) return;
// process it
processLine(view->cursorLine());
@@ -1404,14 +1404,14 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
// <a>
// </a> <!-- indentation *already* decreased -->
// requires that we discount the </a> from the number of closed tags
- if(text.tqfind(startsWithCloseTag) != -1) ++numTags;
+ if(text.find(startsWithCloseTag) != -1) ++numTags;
// count the number of open and close tags
int lastCh = 0;
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;
@@ -1443,12 +1443,12 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
prevIndent = 0;
for(uint backLine = line; backLine; ) {
- // tqfind first line with an open tag
+ // find first line with an open tag
KateTextLine::Ptr x = doc->plainKateTextLine(--backLine);
- if(x->string().tqfind('<') == -1) continue;
+ if(x->string().find('<') == -1) continue;
// recalculate the indent
- if(x->string().tqfind(unclosedDoctype) != -1) --numTags;
+ if(x->string().find(unclosedDoctype) != -1) --numTags;
getLineInfo(backLine, prevIndent, numTags, attrCol, unclosedTag);
break;
}
@@ -1465,13 +1465,13 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
}
if(unclosedTag) {
- // tqfind the start of the next attribute, so we can align with it
+ // 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);
@@ -1499,7 +1499,7 @@ uint KateXmlIndent::processLine (uint line)
if(indent < 0) indent = 0;
// unindent lines that start with a close tag
- if(kateLine->string().tqfind(startsWithCloseTag) != -1) {
+ if(kateLine->string().find(startsWithCloseTag) != -1) {
indent -= indentWidth;
}
if(indent < 0) indent = 0;
@@ -1597,7 +1597,7 @@ static TQString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool
return text;
}
-TQString KateCSAndSIndent::tqfindOpeningCommentIndentation(const KateDocCursor &start)
+TQString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &start)
{
KateDocCursor cur = start;
@@ -1606,14 +1606,14 @@ TQString KateCSAndSIndent::tqfindOpeningCommentIndentation(const KateDocCursor &
{
KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line());
- int pos = textLine->string().tqfindRev("/*");
+ int pos = textLine->string().findRev("/*");
// FIXME: /* inside /* is possible. This screws up in that case...
if (pos >= 0)
return initialWhitespace(textLine, pos);
} while (cur.gotoPreviousLine());
// should never happen.
- kdWarning( 13030 ) << " in a comment, but can't tqfind the start of it" << endl;
+ kdWarning( 13030 ) << " in a comment, but can't find the start of it" << endl;
return TQString::null;
}
@@ -1636,13 +1636,13 @@ bool KateCSAndSIndent::handleDoxygen (KateDocCursor &begin)
// note that we do need to check the start of the line, or lines ending with, say, @brief aren't
// recognised.
if ( !(textLine->attribute(textLine->lastChar()) == doxyCommentAttrib && !textLine->endingWith("*/")) &&
- !(textLine->attribute(textLine->firstChar()) == doxyCommentAttrib && !textLine->string().tqcontains("*/")) )
+ !(textLine->attribute(textLine->firstChar()) == doxyCommentAttrib && !textLine->string().contains("*/")) )
return false;
// our line is inside a doxygen comment. align the *'s and then maybe insert one too ...
textLine = doc->plainKateTextLine(begin.line());
first = textLine->firstChar();
- TQString indent = tqfindOpeningCommentIndentation(begin);
+ TQString indent = findOpeningCommentIndentation(begin);
bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
@@ -1758,9 +1758,9 @@ int KateCSAndSIndent::lastNonCommentChar( const KateDocCursor &line )
KateTextLine::Ptr textLine = doc->plainKateTextLine( line.line() );
TQString str = textLine->string();
- // tqfind a possible start-of-comment
- int p = -2; // so the first tqfind starts at position 0
- do p = str.tqfind( "//", p + 2 );
+ // find a possible start-of-comment
+ int p = -2; // so the first find starts at position 0
+ do p = str.find( "//", p + 2 );
while ( p >= 0 && textLine->attribute(p) != commentAttrib && textLine->attribute(p) != doxyCommentAttrib );
// no // found? use whole string
@@ -1917,8 +1917,8 @@ TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
// if the line starts with # (but isn't a c# region thingy), no indentation at all.
if( currLineFirst >= 0 && currLine->getChar(currLineFirst) == '#' )
{
- if( !currLine->stringAtPos( currLineFirst+1, TQString::tqfromLatin1("region") ) &&
- !currLine->stringAtPos( currLineFirst+1, TQString::tqfromLatin1("endregion") ) )
+ if( !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("region") ) &&
+ !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("endregion") ) )
return TQString::null;
}
@@ -1974,10 +1974,10 @@ TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
{
#define ARRLEN( array ) ( sizeof(array)/sizeof(array[0]) )
for( uint n = 0; n < ARRLEN(scopeKeywords); ++n )
- if( textLine->stringAtPos(pos, TQString::tqfromLatin1(scopeKeywords[n]) ) )
+ if( textLine->stringAtPos(pos, TQString::fromLatin1(scopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, false );
for( uint n = 0; n < ARRLEN(blockScopeKeywords); ++n )
- if( textLine->stringAtPos(pos, TQString::tqfromLatin1(blockScopeKeywords[n]) ) )
+ if( textLine->stringAtPos(pos, TQString::fromLatin1(blockScopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, true );
#undef ARRLEN
}
@@ -2070,7 +2070,7 @@ TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor,
// beginning 'namespace'. that's 99% of usage, I'd guess.
{
if( braceFirst >= 0 && braceLine->attribute(braceFirst) == keywordAttrib &&
- braceLine->stringAtPos( braceFirst, TQString::tqfromLatin1( "namespace" ) ) )
+ braceLine->stringAtPos( braceFirst, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
if( braceCursor.line() > 0 )
@@ -2078,7 +2078,7 @@ TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor,
KateTextLine::Ptr prevLine = doc->plainKateTextLine(braceCursor.line() - 1);
int firstPrev = prevLine->firstChar();
if( firstPrev >= 0 && prevLine->attribute(firstPrev) == keywordAttrib &&
- prevLine->stringAtPos( firstPrev, TQString::tqfromLatin1( "namespace" ) ) )
+ prevLine->stringAtPos( firstPrev, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
}
}
@@ -2112,7 +2112,7 @@ void KateCSAndSIndent::processChar(TQChar c)
{
// 'n' trigger is for c# regions.
static const TQString triggers("}{)]/:;#n");
- if (triggers.tqfind(c) == -1)
+ if (triggers.find(c) == -1)
return;
// for historic reasons, processChar doesn't get a cursor
@@ -2194,7 +2194,7 @@ void KateVarIndent::processNewline ( KateDocCursor &begin, bool /*needContinue*/
void KateVarIndent::processChar ( TQChar c )
{
// process line if the c is in our list, and we are not in comment text
- if ( d->triggers.tqcontains( c ) )
+ if ( d->triggers.contains( c ) )
{
KateTextLine::Ptr ln = doc->plainKateTextLine( doc->activeView()->cursorLine() );
if ( ln->attribute( doc->activeView()->cursorColumn()-1 ) == commentAttrib )
@@ -2211,7 +2211,7 @@ void KateVarIndent::processLine ( KateDocCursor &line )
{
TQString indent; // store the indent string here
- // tqfind the first line with content that is not starting with comment text,
+ // find the first line with content that is not starting with comment text,
// and take the position from that
int ln = line.line();
int pos = -1;
@@ -2372,9 +2372,9 @@ void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &va
{
d->couples = 0;
TQStringList l = TQStringList::split( " ", val );
- if ( l.tqcontains("parens") ) d->couples |= Parens;
- if ( l.tqcontains("braces") ) d->couples |= Braces;
- if ( l.tqcontains("brackets") ) d->couples |= Brackets;
+ if ( l.contains("parens") ) d->couples |= Parens;
+ if ( l.contains("braces") ) d->couples |= Braces;
+ if ( l.contains("brackets") ) d->couples |= Brackets;
}
else if ( var == "var-indent-couple-attribute" )
{
@@ -2427,7 +2427,7 @@ bool KateVarIndent::hasRelevantOpening( const KateDocCursor &end ) const
else if (close = ']' ) opener = '[';
else return false;
- //Move backwards 1 by 1 and tqfind the opening partner
+ //Move backwards 1 by 1 and find the opening partner
while (cur.moveBackward(1))
{
if (cur.currentAttrib() == d->coupleAttrib)
@@ -2540,4 +2540,4 @@ void ScriptIndentConfigPage::apply ()
}
//END ScriptIndentConfigPage
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h
index ead48d672..7ff1a93d2 100644
--- a/kate/part/kateautoindent.h
+++ b/kate/part/kateautoindent.h
@@ -67,7 +67,7 @@ class IndenterConfigPage : public QWidget
* This baseclass is a real dummy, does nothing beside remembering the document it belongs too,
* only to have the object around
*/
-class KateAutoIndent : public TQObject
+class KateAutoIndent : public QObject
{
Q_OBJECT
@@ -321,7 +321,7 @@ protected:
TQString tabString(uint length) const;
uint tabWidth; //!< The number of characters simulated for a tab
- uint indentWidth; //!< The number of characters used when tabs are tqreplaced by spaces
+ uint indentWidth; //!< The number of characters used when tabs are replaced by spaces
public:
// Attributes that we should skip over or otherwise know about
@@ -366,9 +366,9 @@ class KateCSmartIndent : public KateNormalIndent
private:
uint calcIndent (KateDocCursor &begin, bool needContinue);
uint calcContinue (KateDocCursor &begin, KateDocCursor &end);
- uint tqfindOpeningBrace (KateDocCursor &start);
- uint tqfindOpeningParen (KateDocCursor &start);
- uint tqfindOpeningComment (KateDocCursor &start);
+ uint findOpeningBrace (KateDocCursor &start);
+ uint findOpeningParen (KateDocCursor &start);
+ uint findOpeningComment (KateDocCursor &start);
bool firstOpeningBrace (KateDocCursor &start);
bool handleDoxygen (KateDocCursor &begin);
@@ -459,7 +459,7 @@ class KateCSAndSIndent : public KateNormalIndent
TQString calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos);
bool handleDoxygen (KateDocCursor &begin);
- TQString tqfindOpeningCommentIndentation (const KateDocCursor &start);
+ TQString findOpeningCommentIndentation (const KateDocCursor &start);
TQString indentString;
};
@@ -578,4 +578,4 @@ class ScriptIndentConfigPage : public IndenterConfigPage
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp
index 40ae5470c..ac1ee73d9 100644
--- a/kate/part/katebookmarks.cpp
+++ b/kate/part/katebookmarks.cpp
@@ -169,14 +169,14 @@ void KateBookmarks::insertBookmarks( TQPopupMenu& menu )
TQString bText = KStringHandler::rEmSqueeze
( m_view->getDoc()->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
- bText.tqreplace(re, "&&"); // kill undesired accellerators!
- bText.tqreplace('\t', ' '); // kill tabs, as they are interpreted as shortcuts
+ bText.replace(re, "&&"); // kill undesired accellerators!
+ bText.replace('\t', ' '); // kill tabs, as they are interpreted as shortcuts
if ( m_sorting == Position )
{
sortArray[i] = (*it)->line;
ssort( sortArray, i );
- idx = sortArray.tqfind( (*it)->line ) + 3;
+ idx = sortArray.find( (*it)->line ) + 3;
}
menu.insertItem(
@@ -284,4 +284,4 @@ void KateBookmarks::marksChanged ()
m_bookmarkClear->setEnabled( !m_view->getDoc()->marks().isEmpty() );
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katebookmarks.h b/kate/part/katebookmarks.h
index c4cdf1e1f..88e90ae4f 100644
--- a/kate/part/katebookmarks.h
+++ b/kate/part/katebookmarks.h
@@ -35,7 +35,7 @@ class KActionCollection;
class TQPopupMenu;
class TQMenuData;
-class KateBookmarks : public TQObject
+class KateBookmarks : public QObject
{
Q_OBJECT
@@ -82,5 +82,5 @@ class KateBookmarks : public TQObject
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
// vim: noet ts=2
diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp
index 33fac3325..74a9ba59e 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 TQ_ULONG KATE_FILE_LOADER_BS = 256 * 1024;
+static const Q_ULONG KATE_FILE_LOADER_BS = 256 * 1024;
/**
* KATE_AVG_BLOCK_SIZE is in characters !
@@ -54,8 +54,8 @@ static const TQ_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 TQ_ULONG KATE_AVG_BLOCK_SIZE = 2048 * 80;
-static const TQ_ULONG KATE_MAX_BLOCK_LINES = 2048;
+static const Q_ULONG KATE_AVG_BLOCK_SIZE = 2048 * 80;
+static const Q_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 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;
@@ -402,7 +402,7 @@ void KateBuffer::editEnd ()
KateBufBlock *buf2 = 0;
bool needContinue = false;
- while ((buf2 = tqfindBlock(editTagLineStart)))
+ while ((buf2 = findBlock(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 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;
@@ -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 = tqfindBlock(m_lineHighlighted)))
+ while ((i >= m_lineHighlighted) && (buf2 = findBlock(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::tqfindBlock_internal (uint i, uint *index)
+KateBufBlock *KateBuffer::findBlock_internal (uint i, uint *index)
{
uint lastLine = m_blocks[m_lastInSyncBlock]->endLine ();
@@ -701,7 +701,7 @@ KateBufBlock *KateBuffer::tqfindBlock_internal (uint i, uint *index)
void KateBuffer::changeLine(uint i)
{
- KateBufBlock *buf = tqfindBlock(i);
+ KateBufBlock *buf = findBlock(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 = tqfindBlock(i-1, &index);
+ buf = findBlock(i-1, &index);
else
- buf = tqfindBlock(i, &index);
+ buf = findBlock(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 = tqfindBlock(i, &index);
+ KateBufBlock *buf = findBlock(i, &index);
if (!buf)
return;
@@ -849,7 +849,7 @@ void KateBuffer::setTabWidth (uint w)
m_tabWidth = w;
if (m_highlight && m_highlight->foldingIndentationSensitive())
- tqinvalidateHighlighting();
+ invalidateHighlighting();
}
}
@@ -860,12 +860,12 @@ void KateBuffer::setHighlight(uint hlMode)
// aha, hl will change
if (h != m_highlight)
{
- bool tqinvalidate = !h->noHighlighting();
+ bool invalidate = !h->noHighlighting();
if (m_highlight)
{
m_highlight->release();
- tqinvalidate = true;
+ invalidate = true;
}
h->use();
@@ -880,8 +880,8 @@ void KateBuffer::setHighlight(uint hlMode)
m_highlight = h;
- if (tqinvalidate)
- tqinvalidateHighlighting();
+ if (invalidate)
+ invalidateHighlighting();
// 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::tqinvalidateHighlighting()
+void KateBuffer::invalidateHighlighting()
{
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=tqfindBlock(line);
+ blk=findBlock(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 tqinvalidate)
+bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, bool invalidate)
{
// 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, tqinvalidate HL of all documents
+ // see if there are too many dynamic contexts; if yes, invalidate HL of all documents
if (KateHlManager::self()->countDynamicCtxs() >= m_maxDynamicContexts)
{
{
if (KateHlManager::self()->resetDynamicCtxs())
{
- kdDebug (13020) << "HL tqinvalidated - too many dynamic contexts ( >= " << m_maxDynamicContexts << ")" << endl;
+ kdDebug (13020) << "HL invalidated - 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 = tqfindBlock(m_lineHighlighted)))
+ while ((endLine > m_lineHighlighted) && (buf = findBlock(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 (tqinvalidate)
+ if (invalidate)
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 *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);
}
@@ -1657,4 +1657,4 @@ void KateBufBlockList::removeInternal (KateBufBlock *buf)
//END KateBufBlockList
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katebuffer.h b/kate/part/katebuffer.h
index 0f6672f0b..602571c53 100644
--- a/kate/part/katebuffer.h
+++ b/kate/part/katebuffer.h
@@ -40,7 +40,7 @@ class KateFileLoader;
class TQTextCodec;
/**
- * The KateBufBlock class tqcontains an amount of data representing
+ * The KateBufBlock class contains an amount of data representing
* a certain number of lines.
*
* @author Waldo Bastian <bastian@kde.org>
@@ -116,7 +116,7 @@ class KateBufBlock
void removeLine(uint i);
/**
- * mark this block as dirty, will tqinvalidate the swap data
+ * mark this block as dirty, will invalidate the swap data
* insert/removeLine will mark the block dirty itself
*/
void markDirty ();
@@ -338,7 +338,7 @@ class KateBufBlockList
* @author Waldo Bastian <bastian@kde.org>
* @author Christoph Cullmann <cullmann@kde.org>
*/
-class KateBuffer : public TQObject
+class KateBuffer : public QObject
{
Q_OBJECT
@@ -487,7 +487,7 @@ class KateBuffer : public TQObject
*/
inline KateTextLine::Ptr line(uint i)
{
- KateBufBlock *buf = tqfindBlock(i);
+ KateBufBlock *buf = findBlock(i);
if (!buf)
return 0;
@@ -511,7 +511,7 @@ class KateBuffer : public TQObject
*/
inline KateTextLine::Ptr plainLine(uint i)
{
- KateBufBlock *buf = tqfindBlock(i);
+ KateBufBlock *buf = findBlock(i);
if (!buf)
return 0;
@@ -529,7 +529,7 @@ class KateBuffer : public TQObject
* index pointer gets filled with index of block in m_blocks
* index only valid if returned block != 0 !
*/
- KateBufBlock *tqfindBlock (uint i, uint *index = 0)
+ KateBufBlock *findBlock (uint i, uint *index = 0)
{
// out of range !
if (i >= m_lines)
@@ -543,10 +543,10 @@ class KateBuffer : public TQObject
return m_blocks[m_lastFoundBlock];
}
- return tqfindBlock_internal (i, index);
+ return findBlock_internal (i, index);
}
- KateBufBlock *tqfindBlock_internal (uint i, uint *index = 0);
+ KateBufBlock *findBlock_internal (uint i, uint *index = 0);
public:
/**
@@ -591,7 +591,7 @@ class KateBuffer : public TQObject
/**
* Invalidate highlighting of whole buffer.
*/
- void tqinvalidateHighlighting();
+ void invalidateHighlighting();
KateCodeFoldingTree *foldingTree () { return &m_regionTree; };
@@ -611,7 +611,7 @@ class KateBuffer : public TQObject
* @returns true when the highlighting in the next block needs to be updated,
* false otherwise.
*/
- bool doHighlight (KateBufBlock *buf, uint from, uint to, bool tqinvalidate);
+ bool doHighlight (KateBufBlock *buf, uint from, uint to, bool invalidate);
signals:
/**
@@ -648,7 +648,7 @@ class KateBuffer : public TQObject
uint m_lastInSyncBlock;
/**
- * last block found by tqfindBlock, there to make searching faster
+ * last block found by findBlock, there to make searching faster
*/
uint m_lastFoundBlock;
@@ -706,4 +706,4 @@ class KateBuffer : public TQObject
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp
index 060a8c63c..b64b5414e 100644
--- a/kate/part/katecmds.cpp
+++ b/kate/part/katecmds.cpp
@@ -74,14 +74,14 @@ TQStringList KateCommands::CoreCommands::cmds()
TQStringList l;
l << "indent" << "unindent" << "cleanindent"
<< "comment" << "uncomment" << "goto" << "kill-line"
- << "set-tab-width" << "set-tqreplace-tabs" << "set-show-tabs"
+ << "set-tab-width" << "set-replace-tabs" << "set-show-tabs"
<< "set-remove-trailing-space"
<< "set-indent-spaces" << "set-indent-width" << "set-mixed-indent"
<< "set-indent-mode" << "set-auto-indent"
<< "set-line-numbers" << "set-folding-markers" << "set-icon-border"
<< "set-wrap-cursor"
<< "set-word-wrap" << "set-word-wrap-column"
- << "set-tqreplace-tabs-save" << "set-remove-trailing-space-save"
+ << "set-replace-tabs-save" << "set-remove-trailing-space-save"
<< "set-highlight" << "run-myself" << "set-show-indent";
return l;
}
@@ -175,7 +175,7 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
cmd == "set-word-wrap-column" ||
cmd == "goto" )
{
- // tqfind a integer value > 0
+ // find a integer value > 0
if ( ! args.count() )
KCC_ERR( i18n("Missing argument. Usage: %1 <value>").arg( cmd ) );
bool ok;
@@ -217,14 +217,14 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
else if ( cmd == "set-icon-border" ||
cmd == "set-folding-markers" ||
cmd == "set-line-numbers" ||
- cmd == "set-tqreplace-tabs" ||
+ cmd == "set-replace-tabs" ||
cmd == "set-remove-trailing-space" ||
cmd == "set-show-tabs" ||
cmd == "set-indent-spaces" ||
cmd == "set-mixed-indent" ||
cmd == "set-word-wrap" ||
cmd == "set-wrap-cursor" ||
- cmd == "set-tqreplace-tabs-save" ||
+ cmd == "set-replace-tabs-save" ||
cmd == "set-remove-trailing-space-save" ||
cmd == "set-show-indent" )
{
@@ -241,7 +241,7 @@ bool KateCommands::CoreCommands::exec(Kate::View *view,
v->setLineNumbersOn( enable );
else if ( cmd == "set-show-indent" )
v->renderer()->setShowIndentLines( enable );
- else if ( cmd == "set-tqreplace-tabs" )
+ else if ( cmd == "set-replace-tabs" )
setDocFlag( KateDocumentConfig::cfReplaceTabsDyn, enable, v->doc() );
else if ( cmd == "set-remove-trailing-space" )
setDocFlag( KateDocumentConfig::cfRemoveTrailingDyn, enable, v->doc() );
@@ -298,14 +298,14 @@ KCompletion *KateCommands::CoreCommands::completionObject( const TQString &cmd,
//END CoreCommands
//BEGIN SedReplace
-static void tqreplace(TQString &s, const TQString &needle, const TQString &with)
+static void replace(TQString &s, const TQString &needle, const TQString &with)
{
int pos=0;
while (1)
{
- pos=s.tqfind(needle, pos);
+ pos=s.find(needle, pos);
if (pos==-1) break;
- s.tqreplace(pos, needle.length(), with);
+ s.replace(pos, needle.length(), with);
pos+=with.length();
}
@@ -341,16 +341,16 @@ static int backslashString(const TQString &haystack, const TQString &needle, int
// exchange "\t" for the actual tab character, for example
static void exchangeAbbrevs(TQString &str)
{
- // the format is (tqfindtqreplace)*[nullzero]
+ // the format is (findreplace)*[nullzero]
const char *magic="a\x07t\tn\n";
while (*magic)
{
int index=0;
- char tqreplace=magic[1];
+ char replace=magic[1];
while ((index=backslashString(str, TQChar(*magic), index))!=-1)
{
- str.tqreplace(index, 2, TQChar(tqreplace));
+ str.replace(index, 2, TQChar(replace));
index++;
}
magic++;
@@ -359,7 +359,7 @@ static void exchangeAbbrevs(TQString &str)
}
int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
- const TQString &tqfind, const TQString &repOld, const TQString &delim,
+ const TQString &find, const TQString &repOld, const TQString &delim,
bool noCase, bool repeat,
uint startcol, int endcol )
{
@@ -369,14 +369,14 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
// HANDLING "\n"s in PATTERN
// * Create a list of patterns, splitting PATTERN on (unescaped) "\n"
// * insert $s and ^s to match line ends/beginnings
- // * When matching patterhs after the first one, tqreplace \N with the captured
+ // * When matching patterhs after the first one, replace \N with the captured
// text.
// * If all patterns in the list match sequentiel lines, there is a match, so
// * remove line/start to line + patterns.count()-1/patterns.last.length
// * handle capatures by putting them in one list.
// * the existing insertion is fine, including the line calculation.
- TQStringList patterns = TQStringList::split( TQRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), tqfind, true );
+ TQStringList patterns = TQStringList::split( TQRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true );
if ( patterns.count() > 1 )
{
@@ -407,7 +407,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
TQString rep=repOld;
- // now set the backreferences in the tqreplacement
+ // now set the backreferences in the replacement
TQStringList backrefs=matcher.capturedTexts();
int refnum=1;
@@ -425,7 +425,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
index=backslashString(rep, number, index);
if (index>=0)
{
- rep.tqreplace(index, 2, *i);
+ rep.replace(index, 2, *i);
index+=(*i).length();
}
}
@@ -433,16 +433,16 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
refnum++;
}
- tqreplace(rep, "\\\\", "\\");
- tqreplace(rep, "\\" + delim, delim);
+ replace(rep, "\\\\", "\\");
+ replace(rep, "\\" + delim, delim);
doc->removeText( line, startcol, line, startcol + len );
doc->insertText( line, startcol, rep );
- // TODO if tqreplace tqcontains \n,
+ // TODO if replace contains \n,
// change the line number and
// check for text that needs be searched behind the last inserted newline.
- int lns = rep.tqcontains('\n');
+ int lns = rep.contains('\n');
if ( lns )
{
line += lns;
@@ -451,8 +451,8 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
{
// if ( endcol >= startcol + len )
endcol -= (startcol + len);
- uint sc = rep.length() - rep.tqfindRev('\n') - 1;
- matches += sedMagic( doc, line, tqfind, repOld, delim, noCase, repeat, sc, endcol );
+ uint sc = rep.length() - rep.findRev('\n') - 1;
+ matches += sedMagic( doc, line, find, repOld, delim, noCase, repeat, sc, endcol );
}
}
@@ -486,16 +486,16 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const TQString &cmd, TQSt
TQRegExp splitter( TQString("^[$%]?s\\s*") + d + "((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d +"((?:[^\\\\\\" + d + "]|\\\\.)*)\\" + d + "[ig]{0,2}$" );
if (splitter.search(cmd)<0) return false;
- TQString tqfind=splitter.cap(1);
- kdDebug(13025)<< "SedReplace: tqfind=" << tqfind.latin1() <<endl;
+ TQString find=splitter.cap(1);
+ kdDebug(13025)<< "SedReplace: find=" << find.latin1() <<endl;
- TQString tqreplace=splitter.cap(2);
- exchangeAbbrevs(tqreplace);
- kdDebug(13025)<< "SedReplace: tqreplace=" << tqreplace.latin1() <<endl;
+ TQString replace=splitter.cap(2);
+ exchangeAbbrevs(replace);
+ kdDebug(13025)<< "SedReplace: replace=" << replace.latin1() <<endl;
- if ( tqfind.tqcontains("\\n") )
+ if ( find.contains("\\n") )
{
- msg = i18n("Sorry, but Kate is not able to tqreplace newlines, yet");
+ msg = i18n("Sorry, but Kate is not able to replace newlines, yet");
return false;
}
@@ -511,7 +511,7 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const TQString &cmd, TQSt
uint numLines=doc->numLines();
for (int line=0; (uint)line < numLines; line++)
{
- res += sedMagic( doc, line, tqfind, tqreplace, d, !noCase, repeat );
+ res += sedMagic( doc, line, find, replace, d, !noCase, repeat );
if ( ! repeat && res ) break;
}
}
@@ -524,7 +524,7 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const TQString &cmd, TQSt
if ( startline == doc->selEndLine() )
endcol = doc->selEndCol();
- res += sedMagic( doc, startline, tqfind, tqreplace, d, !noCase, repeat, startcol, endcol );
+ res += sedMagic( doc, startline, find, replace, d, !noCase, repeat, startcol, endcol );
/*if ( startcol )*/ startcol = 0;
@@ -534,10 +534,10 @@ bool KateCommands::SedReplace::exec (Kate::View *view, const TQString &cmd, TQSt
else // just this line
{
int line=view->cursorLine();
- res += sedMagic(doc, line, tqfind, tqreplace, d, !noCase, repeat);
+ res += sedMagic(doc, line, find, replace, d, !noCase, repeat);
}
- msg = i18n("1 tqreplacement done", "%n tqreplacements done",res );
+ msg = i18n("1 replacement done", "%n replacements done",res );
doc->editEnd();
@@ -562,7 +562,7 @@ bool KateCommands::Character::exec (Kate::View *view, const TQString &_cmd, TQSt
int base=10;
if (cmd[0]=='x' || cmd.left(2)=="0x")
{
- cmd.tqreplace(TQRegExp("^0?x"), "");
+ cmd.replace(TQRegExp("^0?x"), "");
base=16;
}
else if (cmd[0]=='0')
@@ -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));
}
@@ -593,13 +593,13 @@ bool KateCommands::Date::exec (Kate::View *view, const TQString &cmd, TQString &
if (cmd.left(4) != "date")
return false;
- if (TQDateTime::tqcurrentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
- view->insertText(TQDateTime::tqcurrentDateTime().toString(cmd.mid(5, cmd.length()-5)));
+ if (TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
+ view->insertText(TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
else
- view->insertText(TQDateTime::tqcurrentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
+ view->insertText(TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
return true;
}
//END Date
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecmds.h b/kate/part/katecmds.h
index fad54e85a..55c8d807b 100644
--- a/kate/part/katecmds.h
+++ b/kate/part/katecmds.h
@@ -64,11 +64,11 @@ class CoreCommands : public Kate::Command, public Kate::CommandExtension
/**
* -- Charles Samuels <charles@kde.org>
- * Support vim/sed tqfind and tqreplace
- * s/search/tqreplace/ tqfind search, tqreplace with tqreplace on this line
- * %s/search/tqreplace/ do the same to the whole file
- * s/search/tqreplace/i do the S. and R., but case insensitively
- * $s/search/tqreplace/ do the search are tqreplacement to the selection only
+ * Support vim/sed find and replace
+ * s/search/replace/ find search, replace with replace on this line
+ * %s/search/replace/ do the same to the whole file
+ * s/search/replace/i do the S. and R., but case insensitively
+ * $s/search/replace/ do the search are replacement to the selection only
*
* $s/// is currently unsupported
**/
@@ -94,17 +94,17 @@ class SedReplace : public Kate::Command
private:
/**
- * Searches one line and does the tqreplacement in the document.
- * If @p tqreplace tqcontains any newline characters, the reamaining part of the
+ * Searches one line and does the replacement in the document.
+ * If @p replace contains any newline characters, the reamaining part of the
* line is searched, and the @p line set to the last line number searched.
- * @return the number of tqreplacements performed.
+ * @return the number of replacements performed.
* @param doc a pointer to the document to work on
* @param line the number of the line to search. This may be changed by the
* function, if newlines are inserted.
- * @param tqfind A regular expression pattern to use for searching
- * @param tqreplace a template for tqreplacement. Backspaced integers are
- * tqreplaced with captured texts from the regular expression.
- * @param delim the delimiter character from the command. In the tqreplacement
+ * @param find A regular expression pattern to use for searching
+ * @param replace a template for replacement. Backspaced integers are
+ * replaced with captured texts from the regular expression.
+ * @param delim the delimiter character from the command. In the replacement
* text backsplashes preceeding this character are removed.
* @param nocase parameter for matching the reqular expression.
* @param repeat If false, the search is stopped after the first match.
@@ -113,13 +113,13 @@ class SedReplace : public Kate::Command
* If it is -1, the whole line is used.
*/
static int sedMagic(KateDocument *doc, int &line,
- const TQString &tqfind, const TQString &tqreplace, const TQString &delim,
+ const TQString &find, const TQString &replace, const TQString &delim,
bool noCase, bool repeat,
uint startcol=0, int endcol=-1);
};
/**
- * insert a tqunicode or ascii character
+ * insert a unicode or ascii character
* base 9+1: 1234
* hex: 0x1234 or x1234
* octal: 01231
@@ -175,4 +175,4 @@ class Date : public Kate::Command
} // namespace KateCommands
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp
index 6fecd4c9e..cee99f9d4 100644
--- a/kate/part/katecodecompletion.cpp
+++ b/kate/part/katecodecompletion.cpp
@@ -47,7 +47,7 @@
/**
* This class is used as the codecompletion listbox. It can be resized according to its contents,
- * therfor the needed size is provided by tqsizeHint();
+ * therfor the needed size is provided by sizeHint();
*@short Listbox showing codecompletion
*@author Jonas B. Jacobi <j.jacobi@gmx.de>
*/
@@ -61,7 +61,7 @@ class KateCCListBox : public QListBox
{
}
- TQSize tqsizeHint() const
+ TQSize sizeHint() const
{
int count = this->count();
int height = 20;
@@ -124,7 +124,7 @@ KateCodeCompletion::KateCodeCompletion( KateView* view )
m_completionListBox->installEventFilter( this );
- m_completionPopup->resize(m_completionListBox->tqsizeHint() + TQSize(2,2));
+ m_completionPopup->resize(m_completionListBox->sizeHint() + TQSize(2,2));
m_completionPopup->installEventFilter( this );
m_completionPopup->setFocusProxy( m_view->m_viewInternal );
@@ -305,7 +305,7 @@ void KateCodeCompletion::updateBox( bool )
}
kdDebug(13035)<<"KateCodeCompletion::updateBox: Resizing widget"<<endl;
- m_completionPopup->resize(m_completionListBox->tqsizeHint() + TQSize(2,2));
+ m_completionPopup->resize(m_completionListBox->sizeHint() + TQSize(2,2));
TQPoint p = m_view->mapToGlobal( m_view->cursorCoordinates() );
int x = p.x();
int y = p.y() ;
@@ -384,7 +384,7 @@ void KateCodeCompletion::showComment()
m_completionListBox->ensureCurrentVisible();
finalPoint.setY(
- m_completionListBox->viewport()->mapToGlobal(m_completionListBox->tqitemRect(
+ m_completionListBox->viewport()->mapToGlobal(m_completionListBox->itemRect(
m_completionListBox->item(m_completionListBox->currentItem())).topLeft()).y());
m_commentLabel->move(finalPoint);
@@ -398,8 +398,8 @@ KateArgHint::KateArgHint( KateView* parent, const char* name )
setPaletteForegroundColor( Qt::black );
labelDict.setAutoDelete( true );
- tqlayout = new TQVBoxLayout( this, 1, 2 );
- tqlayout->setAutoAdd( true );
+ layout = new TQVBoxLayout( this, 1, 2 );
+ layout->setAutoAdd( true );
editorView = parent;
m_markCurrentFunction = true;
@@ -460,8 +460,8 @@ void KateArgHint::cursorPositionChanged( KateView* view, int line, int col )
TQRegExp chrconst_rx( "'[^']*'" );
text = text
- .tqreplace( strconst_rx, "\"\"" )
- .tqreplace( chrconst_rx, "''" );
+ .replace( strconst_rx, "\"\"" )
+ .replace( chrconst_rx, "''" );
int index = 0;
while( index < (int)text.length() ){
@@ -563,4 +563,4 @@ void KateArgHint::adjustSize( )
move( screen.x() + screen.width() - width(), y() );
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecodecompletion.h b/kate/part/katecodecompletion.h
index 52fd6c70f..34d620599 100644
--- a/kate/part/katecodecompletion.h
+++ b/kate/part/katecodecompletion.h
@@ -57,14 +57,14 @@ class KateCodeCompletionCommentLabel : public QLabel
setAutoMask( false );
setFrameStyle( TQFrame::Plain | TQFrame::Box );
setLineWidth( 1 );
- tqsetAlignment( AlignAuto | AlignTop );
+ setAlignment( AlignAuto | AlignTop );
polish();
setText(text);
adjustSize();
}
};
-class KateCodeCompletion : public TQObject
+class KateCodeCompletion : public QObject
{
Q_OBJECT
@@ -156,9 +156,9 @@ class KateArgHint: public QFrame
int m_currentCol;
KateView* editorView;
TQIntDict<TQLabel> labelDict;
- TQLayout* tqlayout;
+ TQLayout* layout;
};
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp
index 78db2ad15..91b4da88a 100644
--- a/kate/part/katecodefoldinghelpers.cpp
+++ b/kate/part/katecodefoldinghelpers.cpp
@@ -217,10 +217,10 @@ void KateCodeFoldingTree::getLineInfo(KateLineInfo *info, unsigned int line)
{
KateCodeFoldingNode *node = m_root.child(i);
- if ((node->startLineRel<=line) && (line<=node->startLineRel+node->endLineRel)) // we found a node, which tqcontains the given line -> do a complete lookup
+ if ((node->startLineRel<=line) && (line<=node->startLineRel+node->endLineRel)) // we found a node, which contains the given line -> do a complete lookup
{
info->topLevel = false; //we are definitly not toplevel
- tqfindAllNodesOpenedOrClosedAt(line); //lookup all nodes, which start or and at the given line
+ findAllNodesOpenedOrClosedAt(line); //lookup all nodes, which start or and at the given line
for ( KateCodeFoldingNode *node = nodesForLine.first(); node; node = nodesForLine.next() )
{
@@ -253,7 +253,7 @@ void KateCodeFoldingTree::getLineInfo(KateLineInfo *info, unsigned int line)
}
-KateCodeFoldingNode *KateCodeFoldingTree::tqfindNodeForLine(unsigned int line)
+KateCodeFoldingNode *KateCodeFoldingTree::findNodeForLine(unsigned int line)
{
if (m_root.noChildren()) // does we have child list + nodes ?
return &m_root;
@@ -266,7 +266,7 @@ KateCodeFoldingNode *KateCodeFoldingTree::tqfindNodeForLine(unsigned int line)
if ((node->startLineRel<=line) && (line<=node->startLineRel+node->endLineRel))
{
// a region surounds the line, look in the next deeper hierarchy step
- return tqfindNodeForLineDescending(node,line,0);
+ return findNodeForLineDescending(node,line,0);
}
}
@@ -274,7 +274,7 @@ KateCodeFoldingNode *KateCodeFoldingTree::tqfindNodeForLine(unsigned int line)
}
-KateCodeFoldingNode *KateCodeFoldingTree::tqfindNodeForLineDescending ( KateCodeFoldingNode *node,
+KateCodeFoldingNode *KateCodeFoldingTree::findNodeForLineDescending ( KateCodeFoldingNode *node,
unsigned int line, unsigned int offset, bool oneStepOnly )
{
if (node->noChildren())
@@ -289,22 +289,22 @@ KateCodeFoldingNode *KateCodeFoldingTree::tqfindNodeForLineDescending ( KateCode
if ((subNode->startLineRel+offset<=line) && (line<=subNode->endLineRel+subNode->startLineRel+offset)) //warning fix me for invalid ends
{
- // a subnode tqcontains the line.
+ // a subnode contains the line.
// if oneStepOnly is true, we don't want to search for the deepest node, just return the found one
if (oneStepOnly)
return subNode;
else
- return tqfindNodeForLineDescending (subNode,line,offset); // look into the next deeper hierarchy step
+ return findNodeForLineDescending (subNode,line,offset); // look into the next deeper hierarchy step
}
}
return node; // the current node has no sub nodes, or the line couldn'te be found within a subregion
}
-KateCodeFoldingNode *KateCodeFoldingTree::tqfindNodeForPosition(unsigned int line, unsigned int column)
+KateCodeFoldingNode *KateCodeFoldingTree::findNodeForPosition(unsigned int line, unsigned int column)
{
- KateCodeFoldingNode *node=tqfindNodeForLine(line);
+ KateCodeFoldingNode *node=findNodeForLine(line);
if (node==&m_root) return &m_root;
@@ -395,11 +395,11 @@ void KateCodeFoldingTree::updateLine(unsigned int line,
something_changed = false;
- tqfindAndMarkAllNodesforRemovalOpenedOrClosedAt(line);
+ findAndMarkAllNodesforRemovalOpenedOrClosedAt(line);
if (regionChanges->isEmpty())
{
- // KateCodeFoldingNode *node=tqfindNodeForLine(line);
+ // KateCodeFoldingNode *node=findNodeForLine(line);
// if (node->type!=0)
// if (getStartLine(node)+node->endLineRel==line) removeEnding(node,line);
}
@@ -421,7 +421,7 @@ void KateCodeFoldingTree::updateLine(unsigned int line,
regionChanges->resize (regionChanges->size()-2);
int insertPos=-1;
- KateCodeFoldingNode *node = tqfindNodeForLine(line);
+ KateCodeFoldingNode *node = findNodeForLine(line);
if (data<0)
{
@@ -445,7 +445,7 @@ void KateCodeFoldingTree::updateLine(unsigned int line,
if ((getStartLine(node)==line) && (node->type!=0))
{
- insertPos=node->parentNode->tqfindChild(node);
+ insertPos=node->parentNode->findChild(node);
node = node->parentNode;
}
else
@@ -467,7 +467,7 @@ void KateCodeFoldingTree::updateLine(unsigned int line,
{
if (correctEndings(data,node,line,charPos,insertPos))
{
- insertPos=node->parentNode->tqfindChild(node)+1;
+ insertPos=node->parentNode->findChild(node)+1;
node=node->parentNode;
}
else
@@ -484,7 +484,7 @@ void KateCodeFoldingTree::updateLine(unsigned int line,
something_changed = true;
node->appendChild(newNode);
addOpening(newNode, data, regionChanges, line,charPos);
- insertPos = node->tqfindChild(newNode)+1;
+ insertPos = node->findChild(newNode)+1;
}
else
{
@@ -538,7 +538,7 @@ bool KateCodeFoldingTree::removeOpening(KateCodeFoldingNode *node,unsigned int l
}
KateCodeFoldingNode *parent = node->parentNode;
- int mypos = parent->tqfindChild(node);
+ int mypos = parent->findChild(node);
if (mypos > -1)
{
@@ -553,7 +553,7 @@ bool KateCodeFoldingTree::removeOpening(KateCodeFoldingNode *node,unsigned int l
}
// remove the node
- //mypos = parent->tqfindChild(node);
+ //mypos = parent->findChild(node);
bool endLineValid = node->endLineValid;
int endLineRel = node->endLineRel;
uint endCol=node->endCol;
@@ -583,7 +583,7 @@ bool KateCodeFoldingTree::removeEnding(KateCodeFoldingNode *node,unsigned int /*
if (node->type < 0)
{
// removes + deletes
- int i = parent->tqfindChild (node);
+ int i = parent->findChild (node);
if (i >= 0)
{
KateCodeFoldingNode *child = parent->takeChild(i);
@@ -594,7 +594,7 @@ bool KateCodeFoldingTree::removeEnding(KateCodeFoldingNode *node,unsigned int /*
return true;
}
- int mypos = parent->tqfindChild(node);
+ int mypos = parent->findChild(node);
int count = parent->childCount();
for (int i=mypos+1; i<count; i++)
@@ -681,7 +681,7 @@ bool KateCodeFoldingTree::correctEndings(signed char data, KateCodeFoldingNode *
else
node->insertChild(insertPos,newNode);
- // tqfind correct position
+ // find correct position
return false;
}
else
@@ -728,7 +728,7 @@ bool KateCodeFoldingTree::correctEndings(signed char data, KateCodeFoldingNode *
if (node->parentNode)
{
- correctEndings(data,node->parentNode,bakEndLine, bakEndCol,node->parentNode->tqfindChild(node)+1); // ????
+ correctEndings(data,node->parentNode,bakEndLine, bakEndCol,node->parentNode->findChild(node)+1); // ????
}
else
{
@@ -742,7 +742,7 @@ bool KateCodeFoldingTree::correctEndings(signed char data, KateCodeFoldingNode *
void KateCodeFoldingTree::moveSubNodesUp(KateCodeFoldingNode *node)
{
- int mypos = node->parentNode->tqfindChild(node);
+ int mypos = node->parentNode->findChild(node);
int removepos=-1;
int count = node->childCount();
for (int i=0; i<count; i++)
@@ -805,7 +805,7 @@ void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType
if (!node->endLineValid)
{
- int current = parent->tqfindChild(node);
+ int current = parent->findChild(node);
int count = parent->childCount()-(current+1);
node->endLineRel = parent->endLineRel - node->startLineRel;
@@ -1007,7 +1007,7 @@ void KateCodeFoldingTree::addOpening_further_iterations(KateCodeFoldingNode *nod
{
something_changed = true;
KateCodeFoldingNode *newNode = new KateCodeFoldingNode(node, data, line-startLine);
- node->insertChild(current, newNode); //tqfind the correct position later
+ node->insertChild(current, newNode); //find the correct position later
}
addOpening(node->child(current), data, list, line,charPos);
@@ -1040,10 +1040,10 @@ void KateCodeFoldingTree::lineHasBeenRemoved(unsigned int line)
#endif
//line ++;
- tqfindAndMarkAllNodesforRemovalOpenedOrClosedAt(line); //It's an ugly solution
+ findAndMarkAllNodesforRemovalOpenedOrClosedAt(line); //It's an ugly solution
cleanupUnneededNodes(line); //It's an ugly solution
- KateCodeFoldingNode *node = tqfindNodeForLine(line);
+ KateCodeFoldingNode *node = findNodeForLine(line);
//????? if (node->endLineValid)
{
int startLine = getStartLine(node);
@@ -1083,7 +1083,7 @@ void KateCodeFoldingTree::decrementBy1(KateCodeFoldingNode *node, KateCodeFoldin
node->endLineValid = false;
node->endLineRel--;
- for (uint i=node->tqfindChild(after)+1; i < node->childCount(); ++i)
+ for (uint i=node->findChild(after)+1; i < node->childCount(); ++i)
node->child(i)->startLineRel--;
if (node->parentNode)
@@ -1103,10 +1103,10 @@ void KateCodeFoldingTree::lineHasBeenInserted(unsigned int line)
kdDebug(13000)<<TQString("KateCodeFoldingTree::lineHasBeenInserted: %1").arg(line)<<endl;
#endif
-// tqfindAndMarkAllNodesforRemovalOpenedOrClosedAt(line);
+// findAndMarkAllNodesforRemovalOpenedOrClosedAt(line);
// cleanupUnneededNodes(line);
- KateCodeFoldingNode *node = tqfindNodeForLine(line);
+ KateCodeFoldingNode *node = findNodeForLine(line);
// ???????? if (node->endLineValid)
{
int startLine=getStartLine(node);
@@ -1140,7 +1140,7 @@ void KateCodeFoldingTree::incrementBy1(KateCodeFoldingNode *node, KateCodeFoldin
{
node->endLineRel++;
- for (uint i=node->tqfindChild(after)+1; i < node->childCount(); ++i)
+ for (uint i=node->findChild(after)+1; i < node->childCount(); ++i)
node->child(i)->startLineRel++;
if (node->parentNode)
@@ -1148,14 +1148,14 @@ void KateCodeFoldingTree::incrementBy1(KateCodeFoldingNode *node, KateCodeFoldin
}
-void KateCodeFoldingTree::tqfindAndMarkAllNodesforRemovalOpenedOrClosedAt(unsigned int line)
+void KateCodeFoldingTree::findAndMarkAllNodesforRemovalOpenedOrClosedAt(unsigned int line)
{
#ifdef __GNUC__
#warning "FIXME: make this multiple region changes per line save";
#endif
// return;
markedForDeleting.clear();
- KateCodeFoldingNode *node = tqfindNodeForLine(line);
+ KateCodeFoldingNode *node = findNodeForLine(line);
if (node->type == 0)
return;
@@ -1186,7 +1186,7 @@ void KateCodeFoldingTree::addNodeToRemoveList(KateCodeFoldingNode *node,unsigned
}
if ((startLine+node->endLineRel==line) || ((node->endLineValid==false) && (node->deleteOpening)))
{
- int myPos=node->parentNode->tqfindChild(node); // this has to be implemented nicely
+ int myPos=node->parentNode->findChild(node); // this has to be implemented nicely
if ((int)node->parentNode->childCount()>myPos+1)
addNodeToRemoveList(node->parentNode->child(myPos+1),line);
add=true;
@@ -1199,10 +1199,10 @@ void KateCodeFoldingTree::addNodeToRemoveList(KateCodeFoldingNode *node,unsigned
}
-void KateCodeFoldingTree::tqfindAllNodesOpenedOrClosedAt(unsigned int line)
+void KateCodeFoldingTree::findAllNodesOpenedOrClosedAt(unsigned int line)
{
nodesForLine.clear();
- KateCodeFoldingNode *node = tqfindNodeForLine(line);
+ KateCodeFoldingNode *node = findNodeForLine(line);
if (node->type == 0)
return;
@@ -1214,7 +1214,7 @@ void KateCodeFoldingTree::tqfindAllNodesOpenedOrClosedAt(unsigned int line)
while (node->parentNode)
{
- addNodeToFoundList(node->parentNode, line, node->parentNode->tqfindChild(node));
+ addNodeToFoundList(node->parentNode, line, node->parentNode->findChild(node));
node = node->parentNode;
}
#if JW_DEBUG
@@ -1272,7 +1272,7 @@ void KateCodeFoldingTree::cleanupUnneededNodes(unsigned int line)
#endif
if (node->endLineValid) // just delete it, it has been opened and closed on this line
{
- int f = node->parentNode->tqfindChild (node);
+ int f = node->parentNode->findChild (node);
if (f >= 0)
delete node->parentNode->takeChild(f);
@@ -1332,7 +1332,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line)
hiddenLinesCountCacheValid = false;
kdDebug(13000)<<TQString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line)<<endl;
- tqfindAllNodesOpenedOrClosedAt(line);
+ findAllNodesOpenedOrClosedAt(line);
for (int i=0; i<(int)nodesForLine.count(); i++)
{
KateCodeFoldingNode *node=nodesForLine.at(i);
@@ -1417,7 +1417,7 @@ bool KateCodeFoldingTree::existsOpeningAtLineAfter(unsigned int line, KateCodeFo
KateCodeFoldingNode *tmp2;
unsigned int startLine=getStartLine(tmp);
- if ((tmp2 = tmp->child(tmp->tqfindChild(node) + 1))
+ if ((tmp2 = tmp->child(tmp->findChild(node) + 1))
&& ((tmp2->startLineRel + startLine) == line))
return true;
@@ -1650,7 +1650,7 @@ void KateCodeFoldingTree::ensureVisible( uint line )
kdDebug(13000)<<"line "<<line<<" is really hidden ->show block"<<endl;
// it looks like we really have to ensure visibility
- KateCodeFoldingNode *n = tqfindNodeForLine( line );
+ KateCodeFoldingNode *n = findNodeForLine( line );
do {
if ( ! n->visible )
toggleRegionVisibility( getStartLine( n ) );
@@ -1659,4 +1659,4 @@ void KateCodeFoldingTree::ensureVisible( uint line )
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecodefoldinghelpers.h b/kate/part/katecodefoldinghelpers.h
index 37f90b732..bea6a096c 100644
--- a/kate/part/katecodefoldinghelpers.h
+++ b/kate/part/katecodefoldinghelpers.h
@@ -79,7 +79,7 @@ class KateCodeFoldingNode
inline KateCodeFoldingNode *child (uint index) const { return m_children[index]; }
- inline int tqfindChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.tqfind (node, start); }
+ inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.find (node, start); }
inline void appendChild (KateCodeFoldingNode *node) { m_children.resize(m_children.size()+1); m_children[m_children.size()-1] = node; }
@@ -113,7 +113,7 @@ class KateCodeFoldingNode
TQMemArray<KateCodeFoldingNode*> m_children;
};
-class KateCodeFoldingTree : public TQObject
+class KateCodeFoldingTree : public QObject
{
friend class KateCodeFoldingNode;
@@ -123,7 +123,7 @@ class KateCodeFoldingTree : public TQObject
KateCodeFoldingTree (KateBuffer *buffer);
~KateCodeFoldingTree ();
- KateCodeFoldingNode *tqfindNodeForLine (unsigned int line);
+ KateCodeFoldingNode *findNodeForLine (unsigned int line);
unsigned int getRealLine (unsigned int virtualLine);
unsigned int getVirtualLine (unsigned int realLine);
@@ -141,7 +141,7 @@ class KateCodeFoldingTree : public TQObject
void fixRoot (int endLRel);
void clear ();
- KateCodeFoldingNode *tqfindNodeForPosition(unsigned int line, unsigned int column);
+ KateCodeFoldingNode *findNodeForPosition(unsigned int line, unsigned int column);
private:
KateCodeFoldingNode m_root;
@@ -161,7 +161,7 @@ class KateCodeFoldingTree : public TQObject
static bool trueVal;
- KateCodeFoldingNode *tqfindNodeForLineDescending (KateCodeFoldingNode *, unsigned int, unsigned int, bool oneStepOnly=false);
+ KateCodeFoldingNode *findNodeForLineDescending (KateCodeFoldingNode *, unsigned int, unsigned int, bool oneStepOnly=false);
bool correctEndings (signed char data, KateCodeFoldingNode *node, unsigned int line, unsigned int endCol, int insertPos);
@@ -185,8 +185,8 @@ class KateCodeFoldingTree : public TQObject
*/
bool removeOpening (KateCodeFoldingNode *node,unsigned int line);
- void tqfindAndMarkAllNodesforRemovalOpenedOrClosedAt (unsigned int line);
- void tqfindAllNodesOpenedOrClosedAt (unsigned int line);
+ void findAndMarkAllNodesforRemovalOpenedOrClosedAt (unsigned int line);
+ void findAllNodesOpenedOrClosedAt (unsigned int line);
void addNodeToFoundList (KateCodeFoldingNode *node,unsigned int line,int childpos);
void addNodeToRemoveList (KateCodeFoldingNode *node,unsigned int line);
@@ -219,4 +219,4 @@ class KateCodeFoldingTree : public TQObject
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp
index 807254889..4b3c2f52b 100644
--- a/kate/part/kateconfig.cpp
+++ b/kate/part/kateconfig.cpp
@@ -422,7 +422,7 @@ TQTextCodec *KateDocumentConfig::codec ()
if (m_encodingSet || isGlobal())
{
if (m_encoding.isEmpty() && isGlobal())
- return KGlobal::charsets()->codecForName (TQString::tqfromLatin1(KGlobal::locale()->encoding()));
+ return KGlobal::charsets()->codecForName (TQString::fromLatin1(KGlobal::locale()->encoding()));
else if (m_encoding.isEmpty())
return s_global->codec ();
else
@@ -1426,4 +1426,4 @@ void KateRendererConfig::setShowIndentationLines (bool on)
//END
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateconfig.h b/kate/part/kateconfig.h
index a98afd991..56d094cd0 100644
--- a/kate/part/kateconfig.h
+++ b/kate/part/kateconfig.h
@@ -534,4 +534,4 @@ class KateRendererConfig : public KateConfig
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecursor.cpp b/kate/part/katecursor.cpp
index 2c1b0115c..dcd7c38bf 100644
--- a/kate/part/katecursor.cpp
+++ b/kate/part/katecursor.cpp
@@ -189,4 +189,4 @@ bool KateDocCursor::previousNonSpaceChar()
return false;
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katecursor.h b/kate/part/katecursor.h
index 3672262e4..c155abba4 100644
--- a/kate/part/katecursor.h
+++ b/kate/part/katecursor.h
@@ -61,7 +61,7 @@ class KateTextCursor
}
#ifndef Q_WS_WIN //not needed
- friend void tqSwap(KateTextCursor & c1, KateTextCursor & c2) {
+ friend void qSwap(KateTextCursor & c1, KateTextCursor & c2) {
KateTextCursor tmp = c1;
c1 = c2;
c2 = tmp;
@@ -200,7 +200,7 @@ class KateTextRange : public KateRange
inline void normalize() {
if( m_start > m_end )
- tqSwap(m_start, m_end);
+ qSwap(m_start, m_end);
}
protected:
@@ -247,4 +247,4 @@ class KateBracketRange : public KateTextRange
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp
index b50e30697..d3a481856 100644
--- a/kate/part/katedialogs.cpp
+++ b/kate/part/katedialogs.cpp
@@ -147,7 +147,7 @@ const int KateIndentConfigTab::flags[] = {
KateIndentConfigTab::KateIndentConfigTab(TQWidget *parent)
: KateConfigPage(parent)
{
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
int configFlags = KateDocumentConfig::global()->configFlags();
TQVGroupBox *gbAuto = new TQVGroupBox(i18n("Automatic Indentation"), this);
@@ -195,14 +195,14 @@ KateIndentConfigTab::KateIndentConfigTab(TQWidget *parent)
opt[6]->setChecked(configFlags & flags[6]);
opt[7]->setChecked(configFlags & flags[7]);
- tqlayout->addWidget(gbAuto);
- tqlayout->addWidget(gbSpaces);
- tqlayout->addWidget(opt[1]);
- tqlayout->addWidget(opt[2]);
- tqlayout->addWidget(keys);
- tqlayout->addWidget(m_tabs, 0);
+ layout->addWidget(gbAuto);
+ layout->addWidget(gbSpaces);
+ layout->addWidget(opt[1]);
+ layout->addWidget(opt[2]);
+ layout->addWidget(keys);
+ layout->addWidget(m_tabs, 0);
- tqlayout->addStretch();
+ layout->addStretch();
// What is this? help
TQWhatsThis::add(opt[0], i18n(
@@ -352,7 +352,7 @@ KateSelectConfigTab::KateSelectConfigTab(TQWidget *parent)
{
int configFlags = KateDocumentConfig::global()->configFlags();
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
TQVGroupBox *gbCursor = new TQVGroupBox(i18n("Text Cursor Movement"), this);
@@ -373,18 +373,18 @@ KateSelectConfigTab::KateSelectConfigTab(TQWidget *parent)
e4->setLabel(i18n("Autocenter cursor (lines):"), AlignVCenter);
connect(e4, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged()));
- tqlayout->addWidget(gbCursor);
+ layout->addWidget(gbCursor);
TQRadioButton *rb1, *rb2;
m_tabs = new TQButtonGroup( 1, Qt::Horizontal, i18n("Selection Mode"), this );
- tqlayout->add (m_tabs);
+ layout->add (m_tabs);
m_tabs->setRadioButtonExclusive( true );
m_tabs->insert( rb1=new TQRadioButton( i18n("&Normal"), m_tabs ), 0 );
m_tabs->insert( rb2=new TQRadioButton( i18n("&Persistent"), m_tabs ), 1 );
- tqlayout->addStretch();
+ layout->addStretch();
TQWhatsThis::add(rb1, i18n(
"Selections will be overwritten by typed text and will be lost on "
@@ -712,7 +712,7 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(TQWidget *parent)
"you to set a maximum width of the screen, as a percentage, after which "
"dynamically wrapped lines will no longer be vertically aligned. For "
"example, at 50%, lines whose indentation levels are deeper than 50% of "
- "the width of the screen will not have vertical tqalignment applied to "
+ "the width of the screen will not have vertical alignment applied to "
"subsequent wrapped lines.</p>"));
TQWhatsThis::add(m_line,i18n(
"If this option is checked, every new view will display line numbers "
@@ -850,10 +850,10 @@ KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
: KateConfigPage( parent )
{
int configFlags = KateDocumentConfig::global()->configFlags();
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
TQVGroupBox *gbEnc = new TQVGroupBox(i18n("File Format"), this);
- tqlayout->addWidget( gbEnc );
+ layout->addWidget( gbEnc );
TQHBox *e5Layout = new TQHBox(gbEnc);
TQLabel *e5Label = new TQLabel(i18n("&Encoding:"), e5Layout);
@@ -872,7 +872,7 @@ KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
m_eol->insertItem (i18n("Macintosh"));
TQVGroupBox *gbMem = new TQVGroupBox(i18n("Memory Usage"), this);
- tqlayout->addWidget( gbMem );
+ layout->addWidget( gbMem );
e5Layout = new TQHBox(gbMem);
e5Layout->setSpacing (32);
@@ -883,13 +883,13 @@ KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
blockCountLabel->setBuddy(blockCount);
TQVGroupBox *gbWhiteSpace = new TQVGroupBox(i18n("Automatic Cleanups on Load/Save"), this);
- tqlayout->addWidget( gbWhiteSpace );
+ layout->addWidget( gbWhiteSpace );
removeSpaces = new TQCheckBox(i18n("Re&move trailing spaces"), gbWhiteSpace);
removeSpaces->setChecked(configFlags & KateDocument::cfRemoveSpaces);
TQVGroupBox *dirConfigBox = new TQVGroupBox(i18n("Folder Config File"), this);
- tqlayout->addWidget( dirConfigBox );
+ layout->addWidget( dirConfigBox );
dirSearchDepth = new KIntNumInput(KateDocumentConfig::global()->searchDirConfigDepth(), dirConfigBox);
dirSearchDepth->setRange(-1, 64, 1, false);
@@ -897,7 +897,7 @@ KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
dirSearchDepth->setLabel(i18n("Se&arch depth for config file:"), AlignVCenter);
TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Backup on Save"), this );
- tqlayout->addWidget( gb );
+ layout->addWidget( gb );
cbLocalFiles = new TQCheckBox( i18n("&Local files"), gb );
cbRemoteFiles = new TQCheckBox( i18n("&Remote files"), gb );
@@ -911,7 +911,7 @@ KateSaveConfigTab::KateSaveConfigTab( TQWidget *parent )
leBuSuffix = new TQLineEdit( hbBuSuffix );
lBuSuffix->setBuddy( leBuSuffix );
- tqlayout->addStretch();
+ layout->addStretch();
TQWhatsThis::add(removeSpaces, i18n(
"The editor will automatically eliminate extra spaces at the ends of "
@@ -1257,11 +1257,11 @@ KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
, hlData (0)
, m_doc (doc)
{
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
TQHBox *hbHl = new TQHBox( this );
- tqlayout->add (hbHl);
+ layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
TQLabel *lHl = new TQLabel( i18n("H&ighlight:"), hbHl );
@@ -1278,7 +1278,7 @@ KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
}
TQGroupBox *gbInfo = new TQGroupBox( 1, Qt::Horizontal, i18n("Information"), this );
- tqlayout->add (gbInfo);
+ layout->add (gbInfo);
// author
TQHBox *hb1 = new TQHBox( gbInfo);
@@ -1292,7 +1292,7 @@ KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
license = new TQLabel (hb2);
TQGroupBox *gbProps = new TQGroupBox( 1, Qt::Horizontal, i18n("Properties"), this );
- tqlayout->add (gbProps);
+ layout->add (gbProps);
// file & mime types
TQHBox *hbFE = new TQHBox( gbProps);
@@ -1317,9 +1317,9 @@ KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
// download/new buttons
TQHBox *hbBtns = new TQHBox( this );
- tqlayout->add (hbBtns);
+ layout->add (hbBtns);
- ((TQBoxLayout*)hbBtns->tqlayout())->addStretch(1); // hmm.
+ ((TQBoxLayout*)hbBtns->layout())->addStretch(1); // hmm.
hbBtns->setSpacing( KDialog::spacingHint() );
TQPushButton *btnDl = new TQPushButton(i18n("Do&wnload..."), hbBtns);
connect( btnDl, TQT_SIGNAL(clicked()), this, TQT_SLOT(hlDownload()) );
@@ -1346,7 +1346,7 @@ KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
"Click this button to download new or updated syntax highlight "
"descriptions from the Kate website.") );
- tqlayout->addStretch ();
+ layout->addStretch ();
connect( wildcards, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
connect( mimetypes, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) );
@@ -1388,10 +1388,10 @@ void KateHlConfigPage::hlChanged(int z)
return;
}
- if ( !hlDataDict.tqfind( z ) )
+ if ( !hlDataDict.find( z ) )
hlDataDict.insert( z, hl->getData() );
- hlData = hlDataDict.tqfind( z );
+ hlData = hlDataDict.find( z );
wildcards->setText(hlData->wildcards);
mimetypes->setText(hlData->mimetypes);
priority->setValue(hlData->priority);
@@ -1737,4 +1737,4 @@ void KateModOnHdPrompt::slotUser1()
//END KateModOnHdPrompt
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h
index e38c6c986..aa6f21f6d 100644
--- a/kate/part/katedialogs.h
+++ b/kate/part/katedialogs.h
@@ -253,7 +253,7 @@ class KateSaveConfigTab : public KateConfigPage
protected:
KComboBox *m_encoding, *m_eol;
TQCheckBox *cbLocalFiles, *cbRemoteFiles;
- TQCheckBox *tqreplaceTabs, *removeSpaces, *allowEolDetection;
+ TQCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
TQLineEdit *leBuPrefix;
TQLineEdit *leBuSuffix;
KIntNumInput *dirSearchDepth;
@@ -371,7 +371,7 @@ class KateModOnHdPrompt : public KDialogBase
{
Q_OBJECT
public:
- enum tqStatus {
+ enum Status {
Reload=1, // 0 is KDialogBase::Cancel
Save,
Overwrite,
diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp
index 77baa7bf0..fe5e22b1d 100644
--- a/kate/part/katedocument.cpp
+++ b/kate/part/katedocument.cpp
@@ -91,7 +91,7 @@ class KatePartPluginItem
// KateDocument Constructor
//
KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
- bool bReadOnly, TQWidget *tqparentWidget,
+ bool bReadOnly, TQWidget *parentWidget,
const char *widgetName, TQObject *parent, const char *name)
: Kate::Document(parent, name),
m_plugins (KateFactory::self()->plugins().count()),
@@ -214,7 +214,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
// if single view mode, like in the konqui embedding, create a default view ;)
if ( m_bSingleViewMode )
{
- KTextEditor::View *view = createView( tqparentWidget, widgetName );
+ KTextEditor::View *view = createView( parentWidget, widgetName );
insertChildClient( view );
view->show();
setWidget( view );
@@ -700,7 +700,7 @@ bool KateDocument::insertText( uint line, uint col, const TQString &s, bool bloc
TQString buf;
- bool tqreplacetabs = ( config()->configFlags() & KateDocumentConfig::cfReplaceTabsDyn && ! m_isInUndo );
+ bool replacetabs = ( config()->configFlags() & KateDocumentConfig::cfReplaceTabsDyn && ! m_isInUndo );
uint tw = config()->tabWidth();
uint insertPosExpanded = insertPos;
KateTextLine::Ptr l = m_buffer->line( line );
@@ -734,7 +734,7 @@ bool KateDocument::insertText( uint line, uint col, const TQString &s, bool bloc
}
else
{
- if ( tqreplacetabs && ch == '\t' )
+ if ( replacetabs && ch == '\t' )
{
uint tr = tw - ( insertPosExpanded+buf.length() )%tw;
for ( uint i=0; i < tr; i++ )
@@ -1092,7 +1092,7 @@ bool KateDocument::wrapText (uint startLine, uint endLine)
// Scan backwards looking for a place to break the line
// We are not interested in breaking at the first char
// of the line (if it is a space), but we are at the second
- // anders: if we can't tqfind a space, try breaking on a word
+ // anders: if we can't find a space, try breaking on a word
// boundry, using KateHighlight::canBreakAt().
// This could be a priority (setting) in the hl/filetype/document
int z = 0;
@@ -1176,10 +1176,10 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str )
uint tw = config()->tabWidth();
int pos = 0;
uint l = 0;
- while ( (pos = s.tqfind('\t')) > -1 )
+ while ( (pos = s.find('\t')) > -1 )
{
l = tw - ( (col + pos)%tw );
- s.tqreplace( pos, 1, TQString().fill( ' ', l ) );
+ s.replace( pos, 1, TQString().fill( ' ', l ) );
}
}
@@ -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);
@@ -1568,7 +1568,7 @@ void KateDocument::updateModified()
lastRedoGroupWhenSavedIsLastUndo BIT 7
lastRedoGroupWhenSavedIsLastRedo BIT 8
- If you tqfind a new pattern, please add it to the patterns array
+ If you find a new pattern, please add it to the patterns array
*/
unsigned char currentPattern = 0;
@@ -1833,7 +1833,7 @@ bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, co
uint KateDocument::hlMode ()
{
- return KateHlManager::self()->tqfindHl(highlight());
+ return KateHlManager::self()->findHl(highlight());
}
bool KateDocument::setHlMode (uint mode)
@@ -2050,7 +2050,7 @@ void KateDocument::clearMark( uint line )
emit marksChanged();
delete mark;
tagLines( line, line );
- tqrepaintViews(true);
+ repaintViews(true);
}
void KateDocument::addMark( uint line, uint markType )
@@ -2087,7 +2087,7 @@ void KateDocument::addMark( uint line, uint markType )
emit marksChanged();
tagLines( line, line );
- tqrepaintViews(true);
+ repaintViews(true);
}
void KateDocument::removeMark( uint line, uint markType )
@@ -2119,7 +2119,7 @@ void KateDocument::removeMark( uint line, uint markType )
emit marksChanged();
tagLines( line, line );
- tqrepaintViews(true);
+ repaintViews(true);
}
TQPtrList<KTextEditor::Mark> KateDocument::marks()
@@ -2146,17 +2146,17 @@ void KateDocument::clearMarks()
m_marks.clear();
emit marksChanged();
- tqrepaintViews(true);
+ repaintViews(true);
}
void KateDocument::setPixmap( MarkInterface::MarkTypes type, const TQPixmap& pixmap )
{
- m_markPixmaps.tqreplace( type, new TQPixmap( pixmap ) );
+ m_markPixmaps.replace( type, new TQPixmap( pixmap ) );
}
void KateDocument::setDescription( MarkInterface::MarkTypes type, const TQString& description )
{
- m_markDescriptions.tqreplace( type, new TQString( description ) );
+ m_markDescriptions.replace( type, new TQString( description ) );
}
TQPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type )
@@ -2254,7 +2254,7 @@ KMimeType::Ptr KateDocument::mimeTypeForContent()
buf.resize( bufpos );
int accuracy = 0;
- return KMimeType::tqfindByContent( buf, &accuracy );
+ return KMimeType::findByContent( buf, &accuracy );
}
//END KTextEditor::DocumentInfoInterface
@@ -2316,7 +2316,7 @@ bool KateDocument::openURL( const KURL &url )
w = m_views.first();
if (w)
- m_job->setWindow (w->tqtopLevelWidget());
+ m_job->setWindow (w->topLevelWidget());
emit started( m_job );
@@ -2395,7 +2395,7 @@ bool KateDocument::openFile(KIO::Job * job)
// service type magic to get encoding right
//
TQString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace();
- int pos = serviceType.tqfind(';');
+ int pos = serviceType.find(';');
if (pos != -1)
setEncoding (serviceType.mid(pos+1));
@@ -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;
}
@@ -2872,7 +2872,7 @@ void KateDocument::makeAttribs(bool needInvalidate)
m_views.at(z)->renderer()->updateAttributes ();
if (needInvalidate)
- m_buffer->tqinvalidateHighlighting();
+ m_buffer->invalidateHighlighting();
tagAll ();
}
@@ -2934,7 +2934,7 @@ void KateDocument::removeSuperCursor(KateSuperCursor *cursor, bool privateC) {
bool KateDocument::ownedView(KateView *view) {
// do we own the given view?
- return (m_views.tqcontainsRef(view) > 0);
+ return (m_views.containsRef(view) > 0);
}
bool KateDocument::isLastView(int numViews) {
@@ -3195,7 +3195,7 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c )
if (!textLine)
return;
- if (config()->wordWrap() && textLine->endingWith(TQString::tqfromLatin1(" ")))
+ if (config()->wordWrap() && textLine->endingWith(TQString::fromLatin1(" ")))
{
// gg: in hard wordwrap mode, backspace must also eat the trailing space
removeText (line-1, textLine->length()-1, line, 0);
@@ -3232,7 +3232,7 @@ void KateDocument::paste ( KateView* view )
if (s.isEmpty())
return;
- uint lines = s.tqcontains (TQChar ('\n'));
+ uint lines = s.contains (TQChar ('\n'));
m_undoDontMerge = true;
@@ -3399,11 +3399,11 @@ void KateDocument::optimizeLeadingSpace(uint line, int flags, int change)
}
}
- //kdDebug(13020) << "tqreplace With Op: " << line << " " << first_char << " " << space << endl;
- tqreplaceWithOptimizedSpace(line, first_char, space, flags);
+ //kdDebug(13020) << "replace With Op: " << line << " " << first_char << " " << space << endl;
+ replaceWithOptimizedSpace(line, first_char, space, flags);
}
-void KateDocument::tqreplaceWithOptimizedSpace(uint line, uint upto_column, uint space, int flags)
+void KateDocument::replaceWithOptimizedSpace(uint line, uint upto_column, uint space, int flags)
{
uint length;
TQString new_space;
@@ -3908,7 +3908,7 @@ void KateDocument::comment( KateView *v, uint line,uint column, int change)
kdDebug(13020)<<"easy approach for uncommenting did not work, trying harder (folding tree)"<<endl;
int commentRegion=(highlight()->commentRegion(startAttrib));
if (commentRegion){
- KateCodeFoldingNode *n=foldingTree()->tqfindNodeForPosition(line,column);
+ KateCodeFoldingNode *n=foldingTree()->findNodeForPosition(line,column);
if (n) {
KateTextCursor start,end;
if ((n->nodeType()==commentRegion) && n->getBegin(foldingTree(), &start) && n->getEnd(foldingTree(), &end)) {
@@ -4112,10 +4112,10 @@ void KateDocument::tagLines(KateTextCursor start, KateTextCursor end)
m_views.at(z)->tagLines(start, end, true);
}
-void KateDocument::tqrepaintViews(bool paintOnlyDirty)
+void KateDocument::repaintViews(bool paintOnlyDirty)
{
for (uint z = 0; z < m_views.count(); z++)
- m_views.at(z)->tqrepaintText(paintOnlyDirty);
+ m_views.at(z)->repaintText(paintOnlyDirty);
}
void KateDocument::tagAll()
@@ -4157,7 +4157,7 @@ void KateDocument::newBracketMark( const KateTextCursor& cursor, KateBracketRang
bm.start() = cursor;
- if( !tqfindMatchingBracket( bm.start(), bm.end(), maxLines ) )
+ if( !findMatchingBracket( bm.start(), bm.end(), maxLines ) )
return;
bm.setValid(true);
@@ -4168,7 +4168,7 @@ void KateDocument::newBracketMark( const KateTextCursor& cursor, KateBracketRang
bm.setIndentMin(kMin(indentStart, indentEnd));
}
-bool KateDocument::tqfindMatchingBracket( KateTextCursor& start, KateTextCursor& end, int maxLines )
+bool KateDocument::findMatchingBracket( KateTextCursor& start, KateTextCursor& end, int maxLines )
{
KateTextLine::Ptr textLine = m_buffer->plainLine( start.line() );
if( !textLine )
@@ -4634,7 +4634,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
{
// simple check first, no regex
// no kate inside, no vars, simple...
- if (t.tqfind("kate") < 0)
+ if (t.find("kate") < 0)
return;
// found vars, if any
@@ -4672,7 +4672,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
TQStringList types (TQStringList::split(';', kvLineMime.cap(1)));
// no matching type found
- if (!types.tqcontains (mimeType ()))
+ if (!types.contains (mimeType ()))
return;
s = kvLineMime.cap(2);
@@ -4708,7 +4708,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
// only apply view & renderer config stuff
if (onlyViewAndRenderer)
{
- if ( vvl.tqcontains( var ) ) // FIXME define above
+ if ( vvl.contains( var ) ) // FIXME define above
setViewVariable( var, val );
}
else
@@ -4722,7 +4722,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
// FIXME should this be optimized to only a few calls? how?
else if ( var == "backspace-indents" && checkBoolValue( val, &state ) )
m_config->setConfigFlags( KateDocumentConfig::cfBackspaceIndents, state );
- else if ( var == "tqreplace-tabs" && checkBoolValue( val, &state ) )
+ else if ( var == "replace-tabs" && checkBoolValue( val, &state ) )
m_config->setConfigFlags( KateDocumentConfig::cfReplaceTabsDyn, state );
else if ( var == "remove-trailing-space" && checkBoolValue( val, &state ) )
m_config->setConfigFlags( KateDocumentConfig::cfRemoveTrailingDyn, state );
@@ -4744,7 +4744,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
m_config->setConfigFlags( KateDocumentConfig::cfSpaceIndent, state );
else if ( var == "smart-home" && checkBoolValue( val, &state ) )
m_config->setConfigFlags( KateDocumentConfig::cfSmartHome, state );
- else if ( var == "tqreplace-trailing-space-save" && checkBoolValue( val, &state ) )
+ else if ( var == "replace-trailing-space-save" && checkBoolValue( val, &state ) )
m_config->setConfigFlags( KateDocumentConfig::cfRemoveSpaces, state );
else if ( var == "auto-insert-doxygen" && checkBoolValue( val, &state) )
m_config->setConfigFlags( KateDocumentConfig::cfDoxygenAutoTyping, state);
@@ -4773,7 +4773,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
{
TQStringList l;
l << "unix" << "dos" << "mac";
- if ( (n = l.tqfindIndex( val.lower() )) != -1 )
+ if ( (n = l.findIndex( val.lower() )) != -1 )
m_config->setEol( n );
}
else if ( var == "encoding" )
@@ -4791,7 +4791,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer )
}
// VIEW SETTINGS
- else if ( vvl.tqcontains( var ) )
+ else if ( vvl.contains( var ) )
setViewVariable( var, val );
else
{
@@ -4862,14 +4862,14 @@ bool KateDocument::checkBoolValue( TQString val, bool *result )
val = val.stripWhiteSpace().lower();
TQStringList l;
l << "1" << "on" << "true";
- if ( l.tqcontains( val ) )
+ if ( l.contains( val ) )
{
*result = true;
return true;
}
l.clear();
l << "0" << "off" << "false";
- if ( l.tqcontains( val ) )
+ if ( l.contains( val ) )
{
*result = false;
return true;
@@ -4893,7 +4893,7 @@ bool KateDocument::checkColorValue( TQString val, TQColor &c )
// KTextEditor::variable
TQString KateDocument::variable( const TQString &name ) const
{
- if ( m_storedVariables.tqcontains( name ) )
+ if ( m_storedVariables.contains( name ) )
return m_storedVariables[ name ];
return "";
@@ -5172,4 +5172,4 @@ bool KateDocument::toggleBlockSelectionMode ()
//END DEPRECATED STUFF
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h
index ec1de9f9c..46e9e87f8 100644
--- a/kate/part/katedocument.h
+++ b/kate/part/katedocument.h
@@ -91,7 +91,7 @@ class KateDocument : public Kate::Document,
public:
KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false,
- TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject * = 0, const char * = 0);
+ TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject * = 0, const char * = 0);
~KateDocument ();
bool closeURL();
@@ -608,7 +608,7 @@ class KateDocument : public Kate::Document,
void setConfigFlags (uint flags);
// Repaint all of all of the views
- void tqrepaintViews(bool paintOnlyDirty = true);
+ void repaintViews(bool paintOnlyDirty = true);
inline KateHighlighting *highlight () { return m_buffer->highlight(); }
@@ -671,7 +671,7 @@ class KateDocument : public Kate::Document,
private:
void optimizeLeadingSpace( uint line, int flags, int change );
- void tqreplaceWithOptimizedSpace( uint line, uint upto_column, uint space, int flags );
+ void replaceWithOptimizedSpace( uint line, uint upto_column, uint space, int flags );
bool removeStringFromBegining(int line, TQString &str);
bool removeStringFromEnd(int line, TQString &str);
@@ -749,7 +749,7 @@ class KateDocument : public Kate::Document,
void tagAll();
void newBracketMark( const KateTextCursor& start, KateBracketRange& bm, int maxLines = -1 );
- bool tqfindMatchingBracket( KateTextCursor& start, KateTextCursor& end, int maxLines = -1 );
+ bool findMatchingBracket( KateTextCursor& start, KateTextCursor& end, int maxLines = -1 );
private:
void guiActivateEvent( KParts::GUIActivateEvent *ev );
@@ -1069,5 +1069,5 @@ class KateDocument : public Kate::Document,
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katedocumenthelpers.cpp b/kate/part/katedocumenthelpers.cpp
index a4c41c45d..370be7684 100644
--- a/kate/part/katedocumenthelpers.cpp
+++ b/kate/part/katedocumenthelpers.cpp
@@ -53,4 +53,4 @@ void KateBrowserExtension::slotSelectionChanged()
emit enableAction( "copy", m_doc->activeView()->hasSelection() );
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp
index 1fbe67015..64bde8718 100644
--- a/kate/part/katefactory.cpp
+++ b/kate/part/katefactory.cpp
@@ -48,7 +48,7 @@ class KateFactoryPublic : public KParts::Factory
public:
/**
* reimplemented create object method
- * @param tqparentWidget parent widget
+ * @param parentWidget parent widget
* @param widgetName widget name
* @param parent TQObject parent
* @param name object name
@@ -56,9 +56,9 @@ class KateFactoryPublic : public KParts::Factory
* @param args additional arguments
* @return constructed part object
*/
- KParts::Part *createPartObject ( TQWidget *tqparentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args )
+ KParts::Part *createPartObject ( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *classname, const TQStringList &args )
{
- return KateFactory::self()->createPartObject (tqparentWidget, widgetName, parent, name, classname, args);
+ return KateFactory::self()->createPartObject (parentWidget, widgetName, parent, name, classname, args);
}
};
@@ -206,14 +206,14 @@ KateFactory *KateFactory::self ()
return s_self;
}
-KParts::Part *KateFactory::createPartObject ( TQWidget *tqparentWidget, const char *widgetName, TQObject *parent, const char *name, const char *_classname, const TQStringList & )
+KParts::Part *KateFactory::createPartObject ( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *_classname, const TQStringList & )
{
TQCString classname( _classname );
bool bWantSingleView = ( classname != "KTextEditor::Document" && classname != "Kate::Document" );
bool bWantBrowserView = ( classname == "Browser/View" );
bool bWantReadOnly = (bWantBrowserView || ( classname == "KParts::ReadOnlyPart" ));
- KParts::ReadWritePart *part = new KateDocument (bWantSingleView, bWantBrowserView, bWantReadOnly, tqparentWidget, widgetName, parent, name);
+ KParts::ReadWritePart *part = new KateDocument (bWantSingleView, bWantBrowserView, bWantReadOnly, parentWidget, widgetName, parent, name);
part->setReadWrite( !bWantReadOnly );
return part;
@@ -273,4 +273,4 @@ KateIndentScript KateFactory::indentScript (const TQString &scriptname)
return result;
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katefactory.h b/kate/part/katefactory.h
index 1b37b20e2..0fd939ce3 100644
--- a/kate/part/katefactory.h
+++ b/kate/part/katefactory.h
@@ -71,7 +71,7 @@ class KateFactory
/**
* reimplemented create object method
- * @param tqparentWidget parent widget
+ * @param parentWidget parent widget
* @param widgetName widget name
* @param parent TQObject parent
* @param name object name
@@ -79,7 +79,7 @@ class KateFactory
* @param args additional arguments
* @return constructed part object
*/
- KParts::Part *createPartObject ( TQWidget *tqparentWidget, const char *widgetName,
+ KParts::Part *createPartObject ( TQWidget *parentWidget, const char *widgetName,
TQObject *parent, const char *name, const char *classname,
const TQStringList &args );
@@ -309,4 +309,4 @@ class KateFactory
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp
index 269e9972b..11d5e9a46 100644
--- a/kate/part/katefiletype.cpp
+++ b/kate/part/katefiletype.cpp
@@ -126,7 +126,7 @@ void KateFileTypeManager::save (TQPtrList<KateFileType> *v)
for (uint z=0; z < g.count(); z++)
{
- if (newg.tqfindIndex (g[z]) == -1)
+ if (newg.findIndex (g[z]) == -1)
config.deleteGroup (g[z]);
}
@@ -187,7 +187,7 @@ int KateFileTypeManager::fileType (KateDocument *doc)
for (uint z=0; z < m_types.count(); z++)
{
- if (m_types.at(z)->mimetypes.tqfindIndex (mt->name()) > -1)
+ if (m_types.at(z)->mimetypes.findIndex (mt->name()) > -1)
types.append (m_types.at(z));
}
@@ -264,11 +264,11 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
m_types.setAutoDelete (true);
m_lastType = 0;
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
TQHBox *hbHl = new TQHBox( this );
- tqlayout->add (hbHl);
+ layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
TQLabel *lHl = new TQLabel( i18n("&Filetype:"), hbHl );
typeCombo = new TQComboBox( false, hbHl );
@@ -283,7 +283,7 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
connect( btndel, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteType()) );
gbProps = new TQGroupBox( 2, Qt::Horizontal, i18n("Properties"), this );
- tqlayout->add (gbProps);
+ layout->add (gbProps);
// file & mime types
TQLabel *lname = new TQLabel( i18n("N&ame:"), gbProps );
@@ -318,7 +318,7 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
priority = new KIntNumInput( gbProps );
lprio->setBuddy( priority );
- tqlayout->addStretch();
+ layout->addStretch();
reload();
@@ -341,12 +341,12 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
"configuration option, such as highlight, indent-mode, encoding, etc.</p>"
"<p>For a full list of known variables, see the manual.</p>") );
TQWhatsThis::add( wildcards, i18n(
- "The wildcards tqmask allows you to select files by filename. A typical "
- "tqmask uses an asterisk and the file extension, for example "
+ "The wildcards mask allows you to select files by filename. A typical "
+ "mask uses an asterisk and the file extension, for example "
"<code>*.txt; *.text</code>. The string is a semicolon-separated list "
- "of tqmasks.") );
+ "of masks.") );
TQWhatsThis::add( mimetypes, i18n(
- "The mime type tqmask allows you to select files by mimetype. The string is "
+ "The mime type mask allows you to select files by mimetype. The string is "
"a semicolon-separated list of mimetypes, for example "
"<code>text/plain; text/english</code>.") );
TQWhatsThis::add( btnMTW, i18n(
@@ -539,9 +539,9 @@ void KateViewFileTypeAction::slotAboutToShow()
TQString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name;
TQString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section;
- if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) )
+ if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) )
{
- if (subMenusName.tqcontains(hlSection) < 1)
+ if (subMenusName.contains(hlSection) < 1)
{
subMenusName << hlSection;
TQPopupMenu *menu = new TQPopupMenu ();
@@ -549,11 +549,11 @@ void KateViewFileTypeAction::slotAboutToShow()
popupMenu()->insertItem (hlSection, menu);
}
- int m = subMenusName.tqfindIndex (hlSection);
+ int m = subMenusName.findIndex (hlSection);
names << hlName;
subMenus.at(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1);
}
- else if (names.tqcontains(hlName) < 1)
+ else if (names.contains(hlName) < 1)
{
names << hlName;
popupMenu()->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1);
@@ -576,7 +576,7 @@ void KateViewFileTypeAction::slotAboutToShow()
const KateFileType *t = 0;
if ((t = KateFactory::self()->fileTypeManager()->fileType (doc->fileType())))
{
- int i = subMenusName.tqfindIndex (t->section);
+ int i = subMenusName.findIndex (t->section);
if (i >= 0 && subMenus.at(i))
subMenus.at(i)->setItemChecked (doc->fileType()+1, true);
else
@@ -593,4 +593,4 @@ void KateViewFileTypeAction::setType (int mode)
doc->updateFileType(mode-1, true);
}
//END KateViewFileTypeAction
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katefont.cpp b/kate/part/katefont.cpp
index 26a86196c..361ce5cce 100644
--- a/kate/part/katefont.cpp
+++ b/kate/part/katefont.cpp
@@ -124,4 +124,4 @@ void KateFontStruct::setFont (const TQFont & font)
updateFontData ();
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 20270bdfd..50c941c15 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;
@@ -445,17 +445,17 @@ void KateHlItem::dynamicSubstitute(TQString &str, const TQStringList *args)
{
char c = str[i + 1].latin1();
if (c == '%')
- str.tqreplace(i, 1, "");
+ str.replace(i, 1, "");
else if (c >= '0' && c <= '9')
{
if ((uint)(c - '0') < args->size())
{
- str.tqreplace(i, 2, (*args)[c - '0']);
+ str.replace(i, 2, (*args)[c - '0']);
i += ((*args)[c - '0']).length() - 1;
}
else
{
- str.tqreplace(i, 2, "");
+ str.replace(i, 2, "");
--i;
}
}
@@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len)
if (wordLen < minLen) return 0;
- if ( dict[wordLen] && dict[wordLen]->tqfind(TQConstString(text.tqunicode() + offset, wordLen).string()) )
+ if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.unicode() + offset, wordLen).string()) )
return offset2;
return 0;
@@ -968,7 +968,7 @@ KateHlItem *KateHlRegExpr::clone(const TQStringList *args)
for (TQStringList::Iterator it = escArgs.begin(); it != escArgs.end(); ++it)
{
- (*it).tqreplace(TQRegExp("(\\W)"), "\\\\1");
+ (*it).replace(TQRegExp("(\\W)"), "\\\\1");
}
dynamicSubstitute(regexp, &escArgs);
@@ -1035,7 +1035,7 @@ static int checkEscapedChar(const TQString& text, int offset, int& len)
offset++; // eat the x
len--;
// these for loops can probably be
- // tqreplaced with something else but
+ // replaced with something else but
// for right now they work
// check for hexdigits
for (i = 0; (len > 0) && (i < 2) && (text[offset] >= '0' && text[offset] <= '9' || (text[offset] & 0xdf) >= 'A' && (text[offset] & 0xdf) <= 'F'); i++)
@@ -1293,7 +1293,7 @@ int KateHighlighting::makeDynamicContext(KateHlContext *model, const TQStringLis
QPair<KateHlContext *, TQString> key(model, args->front());
short value;
- if (dynamicCtxs.tqcontains(key))
+ if (dynamicCtxs.contains(key))
value = dynamicCtxs[key];
else
{
@@ -1367,7 +1367,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
}
else
{
- // There does an old context stack exist -> tqfind the context at the line start
+ // There does an old context stack exist -> find the context at the line start
ctxNum = ctx[ctx.size()-1]; //context ID of the last character in the previous line
//kdDebug(13010) << "\t\tctxNum = " << ctxNum << " contextList[ctxNum] = " << contextList[ctxNum] << endl; // ellis
@@ -1931,12 +1931,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
if (!beginRegionStr.isEmpty())
{
- regionId = RegionList->tqfindIndex(beginRegionStr);
+ regionId = RegionList->findIndex(beginRegionStr);
if (regionId==-1) // if the region name doesn't already exist, add it to the list
{
(*RegionList)<<beginRegionStr;
- regionId = RegionList->tqfindIndex(beginRegionStr);
+ regionId = RegionList->findIndex(beginRegionStr);
}
regionId++;
@@ -1946,12 +1946,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
if (!endRegionStr.isEmpty())
{
- regionId2 = RegionList->tqfindIndex(endRegionStr);
+ regionId2 = RegionList->findIndex(endRegionStr);
if (regionId2==-1) // if the region name doesn't already exist, add it to the list
{
(*RegionList)<<endRegionStr;
- regionId2 = RegionList->tqfindIndex(endRegionStr);
+ regionId2 = RegionList->findIndex(endRegionStr);
}
regionId2 = -regionId2 - 1;
@@ -2030,7 +2030,7 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
m_additionalData[ buildIdentifier ]->deliminator);
//Get the entries for the keyword lookup list
- keyword->addList(KateHlManager::self()->syntax->tqfinddata("highlighting",stringdata));
+ keyword->addList(KateHlManager::self()->syntax->finddata("highlighting",stringdata));
tmpItem=keyword;
}
else if (dataname=="Float") tmpItem= (new KateHlFloat(attr,context,regionId,regionId2));
@@ -2072,7 +2072,7 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
TQString KateHighlighting::hlKeyForAttrib( int i ) const
{
- // tqfind entry. This is faster than TQMap::tqfind. m_hlIndex always has an entry
+ // find entry. This is faster than TQMap::find. m_hlIndex always has an entry
// for key '0' (it is "none"), so the result is always valid.
int k = 0;
TQMap<int,TQString>::const_iterator it = m_hlIndex.constEnd();
@@ -2088,14 +2088,14 @@ TQString KateHighlighting::hlKeyForAttrib( int i ) const
bool KateHighlighting::isInWord( TQChar c, int attrib ) const
{
- return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.tqfind(c) < 0
+ return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0
&& !c.isSpace() && c != '"' && c != '\'';
}
bool KateHighlighting::canBreakAt( TQChar c, int attrib ) const
{
static const TQString& sq = KGlobal::staticQString("\"'");
- return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.tqfind(c) != -1) && (sq.tqfind(c) == -1);
+ return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.find(c) != -1) && (sq.find(c) == -1);
}
signed char KateHighlighting::commentRegion(int attr) const {
@@ -2206,7 +2206,7 @@ void KateHighlighting::readGlobalKeywordConfig()
// remove any weakDelimitars (if any) from the default list and store this list.
for (uint s=0; s < weakDeliminator.length(); s++)
{
- int f = deliminator.tqfind (weakDeliminator[s]);
+ int f = deliminator.find (weakDeliminator[s]);
if (f > -1)
deliminator.remove (f, 1);
@@ -2365,20 +2365,20 @@ int KateHighlighting::getIdFromString(TQStringList *ContextNameList, TQString tm
}
}
- else if ( tmpLineEndContext.tqcontains("##"))
+ else if ( tmpLineEndContext.contains("##"))
{
- int o = tmpLineEndContext.tqfind("##");
+ int o = tmpLineEndContext.find("##");
// FIXME at least with 'foo##bar'-style contexts the rules are picked up
// but the default attribute is not
TQString tmp=tmpLineEndContext.mid(o+2);
- if (!embeddedHls.tqcontains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo());
+ if (!embeddedHls.contains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo());
unres=tmp+':'+tmpLineEndContext.left(o);
context=0;
}
else
{
- context=ContextNameList->tqfindIndex(buildPrefix+tmpLineEndContext);
+ context=ContextNameList->findIndex(buildPrefix+tmpLineEndContext);
if (context==-1)
{
context=tmpLineEndContext.toInt();
@@ -2476,8 +2476,8 @@ void KateHighlighting::makeContextList()
if (incCtx.endsWith(":")) {
kdDebug(13010)<<"Looking up context0 for ruleset "<<incCtx<<endl;
incCtx = incCtx.left(incCtx.length()-1);
- //try to tqfind the context0 id for a given unresolvedReference
- KateEmbeddedHlInfos::const_iterator hlIt=embeddedHls.tqfind(incCtx);
+ //try to find the context0 id for a given unresolvedReference
+ KateEmbeddedHlInfos::const_iterator hlIt=embeddedHls.find(incCtx);
if (hlIt!=embeddedHls.end())
*(unresIt.key())=hlIt.data().context0;
}
@@ -2564,7 +2564,7 @@ void KateHighlighting::handleKateHlIncludeRulesRecursive(KateHlIncludeRules::ite
KateHlIncludeRules::iterator it1=it;
int ctx=(*it1)->ctx;
- // tqfind the last entry for the given context in the KateHlIncludeRules list
+ // find the last entry for the given context in the KateHlIncludeRules list
// this is need if one context includes more than one. This saves us from
// updating all insert positions:
// eg: context 0:
@@ -2765,7 +2765,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0)
// only context refernces of type Name, ##Name, and Subname##Name are allowed
if (incCtx.startsWith("##") || (!incCtx.startsWith("#")))
{
- int incCtxi = incCtx.tqfind("##");
+ int incCtxi = incCtx.find("##");
//#stay, #pop is not interesting here
if (incCtxi >= 0)
{
@@ -2777,7 +2777,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0)
KateHlIncludeRule *ir=new KateHlIncludeRule(i,m_contexts[i]->items.count(),incCtxN,includeAttrib);
//use the same way to determine cross hl file references as other items do
- if (!embeddedHls.tqcontains(incSet))
+ if (!embeddedHls.contains(incSet))
embeddedHls.insert(incSet,KateEmbeddedHlInfo());
else
kdDebug(13010)<<"Skipping embeddedHls.insert for "<<incCtxN<<endl;
@@ -2850,7 +2850,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0)
//BEGIN Resolve multiline region if possible
if (!m_additionalData[ ident ]->multiLineRegion.isEmpty()) {
- long commentregionid=RegionList.tqfindIndex( m_additionalData[ ident ]->multiLineRegion );
+ long commentregionid=RegionList.findIndex( m_additionalData[ ident ]->multiLineRegion );
if (-1==commentregionid) {
errorsAndWarnings+=i18n(
"<B>%1</B>: Specified multiline comment region (%2) could not be resolved<BR>"
@@ -3086,7 +3086,7 @@ int KateHlManager::realWildcardFind(const TQString &fileName)
if (highlight->priority() > pri)
{
pri = highlight->priority();
- hl = hlList.tqfindRef (highlight);
+ hl = hlList.findRef (highlight);
}
}
return hl;
@@ -3124,7 +3124,7 @@ int KateHlManager::mimeFind( KateDocument *doc )
if (highlight->priority() > pri)
{
pri = highlight->priority();
- hl = hlList.tqfindRef (highlight);
+ hl = hlList.findRef (highlight);
}
}
@@ -3421,9 +3421,9 @@ void KateViewHighlightAction::slotAboutToShow()
if (!KateHlManager::self()->hlHidden(z))
{
- if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) )
+ if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) )
{
- if (subMenusName.tqcontains(hlSection) < 1)
+ if (subMenusName.contains(hlSection) < 1)
{
subMenusName << hlSection;
TQPopupMenu *menu = new TQPopupMenu ();
@@ -3431,11 +3431,11 @@ void KateViewHighlightAction::slotAboutToShow()
popupMenu()->insertItem ( '&' + hlSection, menu);
}
- int m = subMenusName.tqfindIndex (hlSection);
+ int m = subMenusName.findIndex (hlSection);
names << hlName;
subMenus.at(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z);
}
- else if (names.tqcontains(hlName) < 1)
+ else if (names.contains(hlName) < 1)
{
names << hlName;
popupMenu()->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z);
@@ -3454,7 +3454,7 @@ void KateViewHighlightAction::slotAboutToShow()
}
popupMenu()->setItemChecked (0, false);
- int i = subMenusName.tqfindIndex (KateHlManager::self()->hlSection(doc->hlMode()));
+ int i = subMenusName.findIndex (KateHlManager::self()->hlSection(doc->hlMode()));
if (i >= 0 && subMenus.at(i))
subMenus.at(i)->setItemChecked (doc->hlMode(), true);
else
@@ -3470,4 +3470,4 @@ void KateViewHighlightAction::setHl (int mode)
}
//END KateViewHighlightAction
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h
index c8867e2bb..b42fccb62 100644
--- a/kate/part/katehighlight.h
+++ b/kate/part/katehighlight.h
@@ -213,7 +213,7 @@ class KateHighlighting
inline bool noHighlighting () const { return noHl; };
- // be carefull: all documents hl should be tqinvalidated after calling this method!
+ // be carefull: all documents hl should be invalidated after calling this method!
void dropDynamicContexts();
TQString indentation () { return m_indentation; }
@@ -299,7 +299,7 @@ class KateHighlighting
* When a highlight is added, a instance of this class is appended to
* m_additionalData, and the current position in the attrib and context
* arrays are stored in the indexes for look up. You can then use
- * hlKeyForAttrib or hlKeyForContext to tqfind the relevant instance of this
+ * hlKeyForAttrib or hlKeyForContext to find the relevant instance of this
* class from m_additionalData.
*
* If you need to add a property to a highlight, add it here.
@@ -338,7 +338,7 @@ class KateHighlighting
inline bool allowsFolding(){return folding;}
};
-class KateHlManager : public TQObject
+class KateHlManager : public QObject
{
Q_OBJECT
@@ -357,7 +357,7 @@ class KateHlManager : public TQObject
int detectHighlighting (class KateDocument *doc);
- int tqfindHl(KateHighlighting *h) {return hlList.tqfind(h);}
+ int findHl(KateHighlighting *h) {return hlList.find(h);}
TQString identifierForName(const TQString&);
// methodes to get the default style count + names
@@ -377,7 +377,7 @@ class KateHlManager : public TQObject
uint countDynamicCtxs() { return dynamicCtxsCount; };
void setForceNoDCReset(bool b) { forceNoDCReset = b; };
- // be carefull: all documents hl should be tqinvalidated after having successfully called this method!
+ // be carefull: all documents hl should be invalidated after having successfully called this method!
bool resetDynamicCtxs();
signals:
@@ -435,4 +435,4 @@ class KateViewHighlightAction: public Kate::ActionMenu
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp
index dc597a990..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);
}
@@ -1166,4 +1166,4 @@ void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath,
f.close();
}
//END
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katejscript.h b/kate/part/katejscript.h
index b439e7754..98b2ad85e 100644
--- a/kate/part/katejscript.h
+++ b/kate/part/katejscript.h
@@ -64,7 +64,7 @@ class KateJScript
/**
* creates a JS wrapper object for given KateDocument
- * @param exec execution state, to tqfind out interpreter to use
+ * @param exec execution state, to find out interpreter to use
* @param doc document object to wrap
* @return new js wrapper object
*/
@@ -72,7 +72,7 @@ class KateJScript
/**
* creates a JS wrapper object for given KateView
- * @param exec execution state, to tqfind out interpreter to use
+ * @param exec execution state, to find out interpreter to use
* @param view view object to wrap
* @return new js wrapper object
*/
@@ -230,4 +230,4 @@ class KateIndentJScriptManager: public KateIndentScriptManagerAbstract
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katelinerange.cpp b/kate/part/katelinerange.cpp
index 212aaf921..7500b4e8a 100644
--- a/kate/part/katelinerange.cpp
+++ b/kate/part/katelinerange.cpp
@@ -72,4 +72,4 @@ bool operator<= (const KateLineRange& r, const KateTextCursor& c)
return r.line < c.line() || r.startCol <= c.col();
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp
index f414b4d6d..dbc7d1fa4 100644
--- a/kate/part/kateluaindentscript.cpp
+++ b/kate/part/kateluaindentscript.cpp
@@ -367,7 +367,7 @@ void KateLUAIndentScriptManager::collectScripts (bool force)
if (!m_scripts.isEmpty())
return;
- kdDebug()<<"================================================="<<endl<<"Trying to tqfind Lua scripts"<<endl
+ kdDebug()<<"================================================="<<endl<<"Trying to find Lua scripts"<<endl
<<"================================================="<<endl;
// We'll store the scripts list in this config
@@ -525,4 +525,4 @@ void KateLUAIndentScriptManager::parseScriptHeader(const TQString &filePath,
//END
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateluaindentscript.h b/kate/part/kateluaindentscript.h
index 4b1de0429..a03a85574 100644
--- a/kate/part/kateluaindentscript.h
+++ b/kate/part/kateluaindentscript.h
@@ -66,4 +66,4 @@ class KateLUAIndentScriptManager: public KateIndentScriptManagerAbstract
#endif
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp
index f7869afef..e0dbdc728 100644
--- a/kate/part/kateprinter.cpp
+++ b/kate/part/kateprinter.cpp
@@ -184,7 +184,7 @@ bool KatePrinter::print (KateDocument *doc)
// This retrieves all tags, ued or not, but
// none of theese operations should be expensive,
// and searcing each tag in the format strings is avoided.
- TQDateTime dt = TQDateTime::tqcurrentDateTime();
+ TQDateTime dt = TQDateTime::currentDateTime();
TQMap<TQString,TQString> tags;
KUser u (KUser::UseRealUserID);
@@ -221,7 +221,7 @@ bool KatePrinter::print (KateDocument *doc)
while ( pos > -1 )
{
rep = tags[reTags.cap( 1 )];
- headerTags.tqreplace( (uint)pos, 2, rep );
+ headerTags.replace( (uint)pos, 2, rep );
pos += rep.length();
pos = reTags.search( headerTags, pos );
}
@@ -248,7 +248,7 @@ bool KatePrinter::print (KateDocument *doc)
while ( pos > -1 )
{
rep = tags[reTags.cap( 1 )];
- footerTags.tqreplace( (uint)pos, 2, rep );
+ footerTags.replace( (uint)pos, 2, rep );
pos += rep.length();
pos = reTags.search( footerTags, pos );
}
@@ -339,7 +339,7 @@ bool KatePrinter::print (KateDocument *doc)
// now that we know the vertical amount of space needed,
// it is possible to calculate the total number of pages
- // if needed, that is if any header/footer tag tqcontains "%P".
+ // if needed, that is if any header/footer tag contains "%P".
if ( headerTagList.grep("%P").count() || footerTagList.grep("%P").count() )
{
kdDebug(13020)<<"'%P' found! calculating number of pages..."<<endl;
@@ -378,9 +378,9 @@ bool KatePrinter::print (KateDocument *doc)
TQString re("%P");
TQStringList::Iterator it;
for ( it=headerTagList.begin(); it!=headerTagList.end(); ++it )
- (*it).tqreplace( re, TQString( "%1" ).arg( _pages ) );
+ (*it).replace( re, TQString( "%1" ).arg( _pages ) );
for ( it=footerTagList.begin(); it!=footerTagList.end(); ++it )
- (*it).tqreplace( re, TQString( "%1" ).arg( _pages ) );
+ (*it).replace( re, TQString( "%1" ).arg( _pages ) );
}
} // end prepare block
@@ -425,7 +425,7 @@ bool KatePrinter::print (KateDocument *doc)
for (int i=0; i<3; i++)
{
s = headerTagList[i];
- if (s.tqfind("%p") != -1) s.tqreplace("%p", TQString::number(currentPage));
+ if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage));
paint.drawText(marg, 0, headerWidth-(marg*2), headerHeight, align, s);
align = valign|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight);
}
@@ -453,7 +453,7 @@ bool KatePrinter::print (KateDocument *doc)
for (int i=0; i<3; i++)
{
s = footerTagList[i];
- if (s.tqfind("%p") != -1) s.tqreplace("%p", TQString::number(currentPage));
+ if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage));
paint.drawText(marg, maxHeight+innerMargin, headerWidth-(marg*2), footerHeight, align, s);
align = Qt::AlignVCenter|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight);
}
@@ -1002,4 +1002,4 @@ void KatePrintLayout::setOptions( const TQMap<TQString,TQString>& opts )
#include "kateprinter.moc"
#endif //!Q_WS_WIN
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp
index c5c6992c7..265a98282 100644
--- a/kate/part/katerenderer.cpp
+++ b/kate/part/katerenderer.cpp
@@ -537,13 +537,13 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i
if (isIMSel && !isTab)
{
// input method selection
- fillColor = m_view->tqcolorGroup().color(TQColorGroup::Foreground);
+ fillColor = m_view->colorGroup().color(TQColorGroup::Foreground);
}
else if (isIMEdit && !isTab)
{
// XIM support
// input method edit area
- const TQColorGroup& cg = m_view->tqcolorGroup();
+ const TQColorGroup& cg = m_view->colorGroup();
int h1, s1, v1, h2, s2, v2;
cg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );
cg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 );
@@ -576,7 +576,7 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i
if (isIMSel && paintBackground && !isTab)
{
paint.save();
- paint.setPen( m_view->tqcolorGroup().color( TQColorGroup::BrightText ) );
+ paint.setPen( m_view->colorGroup().color( TQColorGroup::BrightText ) );
}
// Draw indentation markers.
@@ -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++;
@@ -1029,4 +1029,4 @@ uint KateRenderer::spaceWidth()
return attribute(0)->width(*config()->fontStruct(), TQChar(' '), m_tabWidth);
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp
index 9bd0738d9..6e73a9f75 100644
--- a/kate/part/kateschema.cpp
+++ b/kate/part/kateschema.cpp
@@ -244,7 +244,7 @@ uint KateSchemaManager::number (const TQString &name)
return 1;
int i;
- if ((i = m_schemas.tqfindIndex(name)) > -1)
+ if ((i = m_schemas.findIndex(name)) > -1)
return i;
return 0;
@@ -281,19 +281,19 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( TQWidget *parent, const char
b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Normal text:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_back = new KColorButton(b);
b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Selected text:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_selected = new KColorButton(b);
b = new TQHBox (gbTextArea);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Current line:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_current = new KColorButton(b);
// Markers from kdelibs/interfaces/ktextinterface/markinterface.h
@@ -319,31 +319,31 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( TQWidget *parent, const char
b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Left border background:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_iconborder = new KColorButton(b);
b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Line numbers:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_linenumber = new KColorButton(b);
b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Bracket highlight:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_bracket = new KColorButton(b);
b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Word wrap markers:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_wwmarker = new KColorButton(b);
b = new TQHBox (gbBorder);
b->setSpacing(KDialog::spacingHint());
label = new TQLabel( i18n("Tab markers:"), b);
- label->tqsetAlignment( AlignLeft|AlignVCenter);
+ label->setAlignment( AlignLeft|AlignVCenter);
m_tmarker = new KColorButton(b);
blay->addWidget(gbBorder);
@@ -351,7 +351,7 @@ KateSchemaConfigColorTab::KateSchemaConfigColorTab( TQWidget *parent, const char
blay->addStretch();
// connect signal changed(); changed is emitted by a ColorButton change!
- connect( this, TQT_SIGNAL( changed() ), parent->tqparentWidget(), TQT_SLOT( slotChanged() ) );
+ connect( this, TQT_SIGNAL( changed() ), parent->parentWidget(), TQT_SLOT( slotChanged() ) );
// TQWhatsThis help
TQWhatsThis::add(m_back, i18n("<p>Sets the background color of the editing area.</p>"));
@@ -416,7 +416,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema )
m_linenumber->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) );
// If we havent this schema, read in from config file
- if ( ! m_schemas.tqcontains( newSchema ) )
+ if ( ! m_schemas.contains( newSchema ) )
{
// fallback defaults
TQColor tmp0 (KGlobalSettings::baseColor());
@@ -545,7 +545,7 @@ KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char *
m_fontchooser->enableColumn(KFontChooser::StyleList, false);
grid->addWidget( m_fontchooser, 0, 0);
- connect (this, TQT_SIGNAL( changed()), parent->tqparentWidget(), TQT_SLOT (slotChanged()));
+ connect (this, TQT_SIGNAL( changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
m_schema = -1;
}
@@ -599,7 +599,7 @@ KateSchemaConfigFontColorTab::KateSchemaConfigFontColorTab( TQWidget *parent, co
m_defaultStyles = new KateStyleListView( this, false );
grid->addWidget( m_defaultStyles, 0, 0);
- connect (m_defaultStyles, TQT_SIGNAL (changed()), parent->tqparentWidget(), TQT_SLOT (slotChanged()));
+ connect (m_defaultStyles, TQT_SIGNAL (changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
TQWhatsThis::add( m_defaultStyles, i18n(
"This list displays the default styles for the current schema and "
@@ -679,11 +679,11 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( TQWidget *parent, co
m_hlDict.setAutoDelete (true);
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
// hl chooser
TQHBox *hbHl = new TQHBox( this );
- tqlayout->add (hbHl);
+ layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
TQLabel *lHl = new TQLabel( i18n("H&ighlight:"), hbHl );
@@ -702,7 +702,7 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( TQWidget *parent, co
// styles listview
m_styles = new KateStyleListView( this, true );
- tqlayout->addWidget (m_styles, 999);
+ layout->addWidget (m_styles, 999);
hlCombo->setCurrentItem ( hl );
hlChanged ( hl );
@@ -716,7 +716,7 @@ KateSchemaConfigHighlightTab::KateSchemaConfigHighlightTab( TQWidget *parent, co
"to edit from the popup menu.<p>You can unset the Background and Selected "
"Background colors from the context menu when appropriate.") );
- connect (m_styles, TQT_SIGNAL (changed()), parent->tqparentWidget(), TQT_SLOT (slotChanged()));
+ connect (m_styles, TQT_SIGNAL (changed()), parent->parentWidget(), TQT_SLOT (slotChanged()));
}
KateSchemaConfigHighlightTab::~KateSchemaConfigHighlightTab()
@@ -746,7 +746,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
m_hlDict[m_schema]->setAutoDelete (true);
}
- if (!m_hlDict[m_schema]->tqfind(m_hl))
+ if (!m_hlDict[m_schema]->find(m_hl))
{
kdDebug(13030) << "NEW HL, create list" << endl;
@@ -775,20 +775,20 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
m_styles->viewport()->setPalette( p );
TQDict<KateStyleListCaption> prefixes;
- for ( KateHlItemData *itemData = m_hlDict[m_schema]->tqfind(m_hl)->last();
+ for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last();
itemData != 0L;
- itemData = m_hlDict[m_schema]->tqfind(m_hl)->prev())
+ itemData = m_hlDict[m_schema]->find(m_hl)->prev())
{
kdDebug(13030) << "insert items " << itemData->name << endl;
// All stylenames have their language mode prefixed, e.g. HTML:Comment
// split them and put them into nice substructures.
- int c = itemData->name.tqfind(':');
+ int c = itemData->name.find(':');
if ( c > 0 ) {
TQString prefix = itemData->name.left(c);
TQString name = itemData->name.mid(c+1);
- KateStyleListCaption *parent = prefixes.tqfind( prefix );
+ KateStyleListCaption *parent = prefixes.find( prefix );
if ( ! parent )
{
parent = new KateStyleListCaption( m_styles, prefix );
@@ -826,10 +826,10 @@ KateSchemaConfigPage::KateSchemaConfigPage( TQWidget *parent, KateDocument *doc
: KateConfigPage( parent ),
m_lastSchema (-1)
{
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
TQHBox *hbHl = new TQHBox( this );
- tqlayout->add (hbHl);
+ layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
TQLabel *lHl = new TQLabel( i18n("&Schema:"), hbHl );
schemaCombo = new TQComboBox( false, hbHl );
@@ -845,7 +845,7 @@ KateSchemaConfigPage::KateSchemaConfigPage( TQWidget *parent, KateDocument *doc
m_tabWidget = new TQTabWidget ( this );
m_tabWidget->setMargin (KDialog::marginHint());
- tqlayout->add (m_tabWidget);
+ layout->add (m_tabWidget);
connect (m_tabWidget, TQT_SIGNAL (currentChanged (TQWidget *)), this, TQT_SLOT (newCurrentPage (TQWidget *)));
@@ -863,7 +863,7 @@ KateSchemaConfigPage::KateSchemaConfigPage( TQWidget *parent, KateDocument *doc
m_tabWidget->addTab (m_highlightTab, i18n("Highlighting Text Styles"));
hbHl = new TQHBox( this );
- tqlayout->add (hbHl);
+ layout->add (hbHl);
hbHl->setSpacing( KDialog::spacingHint() );
lHl = new TQLabel( i18n("&Default schema for %1:").arg(KApplication::kApplication()->aboutData()->programName ()), hbHl );
defaultSchemaCombo = new TQComboBox( false, hbHl );
@@ -969,7 +969,7 @@ void KateSchemaConfigPage::newSchema ()
// soft update, no load from disk
KateFactory::self()->schemaManager()->update (false);
- int i = KateFactory::self()->schemaManager()->list ().tqfindIndex (t);
+ int i = KateFactory::self()->schemaManager()->list ().findIndex (t);
update ();
if (i > -1)
@@ -1021,7 +1021,7 @@ void KateViewSchemaAction::slotAboutToShow()
{
TQString hlName = KateFactory::self()->schemaManager()->list().operator[](z);
- if (names.tqcontains(hlName) < 1)
+ if (names.contains(hlName) < 1)
{
names << hlName;
popupMenu()->insertItem ( hlName, this, TQT_SLOT(setSchema(int)), 0, z+1);
@@ -1088,9 +1088,9 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &glob
TQPixmap scl(16,16);
scl.fill( i->style()->selectedTextColor() );
TQPixmap bgcl(16,16);
- bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->tqcolorGroup().base() );
+ bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->colorGroup().base() );
TQPixmap sbgcl(16,16);
- sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->tqcolorGroup().base() );
+ sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->colorGroup().base() );
if ( showtitle )
m.insertTitle( i->contextName(), KateStyleListItem::ContextName );
@@ -1156,7 +1156,7 @@ void KateStyleListView::slotMousePressed(int btn, TQListViewItem* i, const TQPoi
if ( dynamic_cast<KateStyleListItem*>(i) ) {
if ( btn == Qt::LeftButton && c > 0 ) {
// map pos to item/column and call KateStyleListItem::activate(col, pos)
- ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, tqitemRect(i).top() ) );
+ ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, itemRect(i).top() ) );
}
}
}
@@ -1321,7 +1321,7 @@ void KateStyleListItem::activate( int column, const TQPoint &localPos )
default:
return;
}
- if ( !TQRect( x, 0, w, BoxSize ).tqcontains( localPos ) )
+ if ( !TQRect( x, 0, w, BoxSize ).contains( localPos ) )
changeProperty( (Property)column );
}
@@ -1357,7 +1357,7 @@ void KateStyleListItem::toggleDefStyle()
delete is;
is = new KateAttribute( *ds );
updateStyle();
- tqrepaint();
+ repaint();
}
}
@@ -1441,7 +1441,7 @@ void KateStyleListItem::setColor( int column )
break;
}
- tqrepaint();
+ repaint();
}
void KateStyleListItem::unsetColor( int c )
@@ -1465,7 +1465,7 @@ void KateStyleListItem::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int
Q_ASSERT( lv ); //###
// use a private color group and set the text/highlighted text colors
- TQColorGroup mcg = lv->viewport()->tqcolorGroup();
+ TQColorGroup mcg = lv->viewport()->colorGroup();
if ( col ) // col 0 is drawn by the superclass method
p->fillRect( 0, 0, width, height(), TQBrush( mcg.base() ) );
@@ -1492,7 +1492,7 @@ void KateStyleListItem::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int
}
TQFont f ( ((KateStyleListView*)lv)->docfont );
p->setFont( is->font(f) );
- // FIXME - tqrepainting when text is cropped, and the column is enlarged is buggy.
+ // FIXME - repainting when text is cropped, and the column is enlarged is buggy.
// Maybe I need painting the string myself :(
// (wilbert) it depends on the font used
TQListViewItem::paintCell( p, mcg, col, width, align );
@@ -1602,10 +1602,10 @@ void KateStyleListCaption::paintCell( TQPainter *p, const TQColorGroup& /*cg*/,
Q_ASSERT( lv ); //###
// use the same colorgroup as the other items in the viewport
- TQColorGroup mcg = lv->viewport()->tqcolorGroup();
+ TQColorGroup mcg = lv->viewport()->colorGroup();
TQListViewItem::paintCell( p, mcg, col, width, align );
}
//END
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h
index 021c8787a..38b15a054 100644
--- a/kate/part/kateschema.h
+++ b/kate/part/kateschema.h
@@ -198,7 +198,7 @@ class KateSchemaConfigColorTab : public QWidget
void schemaChanged( int newSchema );
signals:
- void changed(); // connected to tqparentWidget()->tqparentWidget() TQT_SLOT(slotChanged)
+ void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
protected slots:
void slotMarkerColorChanged(const TQColor&);
@@ -223,7 +223,7 @@ class KateSchemaConfigFontTab : public QWidget
void schemaChanged( int newSchema );
signals:
- void changed(); // connected to tqparentWidget()->tqparentWidget() TQT_SLOT(slotChanged)
+ void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged)
private:
class KFontChooser *m_fontchooser;
@@ -320,4 +320,4 @@ class KateSchemaConfigPage : public KateConfigPage
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp
index 987fbb63b..742b57a3f 100644
--- a/kate/part/katesearch.cpp
+++ b/kate/part/katesearch.cpp
@@ -45,7 +45,7 @@
//BEGIN KateSearch
TQStringList KateSearch::s_searchList = TQStringList();
-TQStringList KateSearch::s_tqreplaceList = TQStringList();
+TQStringList KateSearch::s_replaceList = TQStringList();
TQString KateSearch::s_pattern = TQString();
static const bool arbitraryHLExample = false;
@@ -53,12 +53,12 @@ KateSearch::KateSearch( KateView* view )
: TQObject( view, "kate search" )
, m_view( view )
, m_doc( view->doc() )
- , tqreplacePrompt( new KateReplacePrompt( view ) )
+ , replacePrompt( new KateReplacePrompt( view ) )
{
m_arbitraryHLList = new KateSuperRangeList();
if (arbitraryHLExample) m_doc->arbitraryHL()->addHighlightToView(m_arbitraryHLList, m_view);
- connect(tqreplacePrompt,TQT_SIGNAL(clicked()),this,TQT_SLOT(tqreplaceSlot()));
+ connect(replacePrompt,TQT_SIGNAL(clicked()),this,TQT_SLOT(replaceSlot()));
}
KateSearch::~KateSearch()
@@ -68,20 +68,20 @@ KateSearch::~KateSearch()
void KateSearch::createActions( KActionCollection* ac )
{
- KStdAction::tqfind( this, TQT_SLOT(tqfind()), ac )->setWhatsThis(
+ KStdAction::find( this, TQT_SLOT(find()), ac )->setWhatsThis(
i18n("Look up the first occurrence of a piece of text or regular expression."));
- KStdAction::tqfindNext( this, TQT_SLOT(slotFindNext()), ac )->setWhatsThis(
+ KStdAction::findNext( this, TQT_SLOT(slotFindNext()), ac )->setWhatsThis(
i18n("Look up the next occurrence of the search phrase."));
- KStdAction::tqfindPrev( this, TQT_SLOT(slotFindPrev()), ac, "edit_tqfind_prev" )->setWhatsThis(
+ KStdAction::findPrev( this, TQT_SLOT(slotFindPrev()), ac, "edit_find_prev" )->setWhatsThis(
i18n("Look up the previous occurrence of the search phrase."));
- KStdAction::tqreplace( this, TQT_SLOT(tqreplace()), ac )->setWhatsThis(
- i18n("Look up a piece of text or regular expression and tqreplace the result with some given text."));
+ KStdAction::replace( this, TQT_SLOT(replace()), ac )->setWhatsThis(
+ i18n("Look up a piece of text or regular expression and replace the result with some given text."));
}
void KateSearch::addToList( TQStringList& list, const TQString& s )
{
if( list.count() > 0 ) {
- TQStringList::Iterator it = list.tqfind( s );
+ TQStringList::Iterator it = list.find( s );
if( *it != 0L )
list.remove( it );
if( list.count() >= 16 )
@@ -90,30 +90,30 @@ void KateSearch::addToList( TQStringList& list, const TQString& s )
list.prepend( s );
}
-void KateSearch::tqfind()
+void KateSearch::find()
{
// if multiline selection around, search in it
long searchf = KateViewConfig::global()->searchFlags();
if (m_view->hasSelection() && m_view->selStartLine() != m_view->selEndLine())
searchf |= KFindDialog::SelectedText;
- KFindDialog *tqfindDialog = new KFindDialog ( m_view, "", searchf,
+ KFindDialog *findDialog = new KFindDialog ( m_view, "", searchf,
s_searchList, m_view->hasSelection() );
- tqfindDialog->setPattern (getSearchText());
+ findDialog->setPattern (getSearchText());
- if( tqfindDialog->exec() == TQDialog::Accepted ) {
- s_searchList = tqfindDialog->tqfindHistory () ;
+ if( findDialog->exec() == TQDialog::Accepted ) {
+ s_searchList = findDialog->findHistory () ;
// Do *not* remove the TQString() wrapping, it fixes a nasty crash
- tqfind( TQString(s_searchList.first()), tqfindDialog->options(), true, true );
+ find( TQString(s_searchList.first()), findDialog->options(), true, true );
}
- delete tqfindDialog;
- m_view->tqrepaintText ();
+ delete findDialog;
+ m_view->repaintText ();
}
-void KateSearch::tqfind( const TQString &pattern, long flags, bool add, bool shownotfound )
+void KateSearch::find( const TQString &pattern, long flags, bool add, bool shownotfound )
{
KateViewConfig::global()->setSearchFlags( flags );
if( add )
@@ -130,7 +130,7 @@ void KateSearch::tqfind( const TQString &pattern, long flags, bool add, bool sho
searchFlags.backward = KateViewConfig::global()->searchFlags() & KFindDialog::FindBackwards;
searchFlags.selected = KateViewConfig::global()->searchFlags() & KFindDialog::SelectedText;
searchFlags.prompt = false;
- searchFlags.tqreplace = false;
+ searchFlags.replace = false;
searchFlags.finished = false;
searchFlags.regExp = KateViewConfig::global()->searchFlags() & KFindDialog::RegularExpression;
searchFlags.useBackRefs = KateViewConfig::global()->searchFlags() & KReplaceDialog::BackReference;
@@ -151,7 +151,7 @@ void KateSearch::tqfind( const TQString &pattern, long flags, bool add, bool sho
search( searchFlags );
}
-void KateSearch::tqreplace()
+void KateSearch::replace()
{
if (!doc()->isReadWrite()) return;
@@ -160,33 +160,33 @@ void KateSearch::tqreplace()
if (m_view->hasSelection() && m_view->selStartLine() != m_view->selEndLine())
searchf |= KFindDialog::SelectedText;
- KReplaceDialog *tqreplaceDialog = new KReplaceDialog ( m_view, "", searchf,
- s_searchList, s_tqreplaceList, m_view->hasSelection() );
+ KReplaceDialog *replaceDialog = new KReplaceDialog ( m_view, "", searchf,
+ s_searchList, s_replaceList, m_view->hasSelection() );
- tqreplaceDialog->setPattern (getSearchText());
+ replaceDialog->setPattern (getSearchText());
- if( tqreplaceDialog->exec() == TQDialog::Accepted ) {
- long opts = tqreplaceDialog->options();
- m_tqreplacement = tqreplaceDialog->tqreplacement();
- s_searchList = tqreplaceDialog->tqfindHistory () ;
- s_tqreplaceList = tqreplaceDialog->tqreplacementHistory () ;
+ if( replaceDialog->exec() == TQDialog::Accepted ) {
+ long opts = replaceDialog->options();
+ m_replacement = replaceDialog->replacement();
+ s_searchList = replaceDialog->findHistory () ;
+ s_replaceList = replaceDialog->replacementHistory () ;
// Do *not* remove the TQString() wrapping, it fixes a nasty crash
- tqreplace( TQString(s_searchList.first()), m_tqreplacement, opts );
+ replace( TQString(s_searchList.first()), m_replacement, opts );
}
- delete tqreplaceDialog;
+ delete replaceDialog;
m_view->update ();
}
-void KateSearch::tqreplace( const TQString& pattern, const TQString &tqreplacement, long flags )
+void KateSearch::replace( const TQString& pattern, const TQString &replacement, long flags )
{
if (!doc()->isReadWrite()) return;
addToList( s_searchList, pattern );
s_pattern = pattern;
- addToList( s_tqreplaceList, tqreplacement );
- m_tqreplacement = tqreplacement;
+ addToList( s_replaceList, replacement );
+ m_replacement = replacement;
KateViewConfig::global()->setSearchFlags( flags );
SearchFlags searchFlags;
@@ -197,7 +197,7 @@ void KateSearch::tqreplace( const TQString& pattern, const TQString &tqreplaceme
searchFlags.backward = KateViewConfig::global()->searchFlags() & KFindDialog::FindBackwards;
searchFlags.selected = KateViewConfig::global()->searchFlags() & KFindDialog::SelectedText;
searchFlags.prompt = KateViewConfig::global()->searchFlags() & KReplaceDialog::PromptOnReplace;
- searchFlags.tqreplace = true;
+ searchFlags.replace = true;
searchFlags.finished = false;
searchFlags.regExp = KateViewConfig::global()->searchFlags() & KFindDialog::RegularExpression;
searchFlags.useBackRefs = KateViewConfig::global()->searchFlags() & KReplaceDialog::BackReference;
@@ -216,7 +216,7 @@ void KateSearch::tqreplace( const TQString& pattern, const TQString &tqreplaceme
search( searchFlags );
}
-void KateSearch::tqfindAgain( bool reverseDirection )
+void KateSearch::findAgain( bool reverseDirection )
{
SearchFlags searchFlags;
searchFlags.caseSensitive = KateViewConfig::global()->searchFlags() & KFindDialog::CaseSensitive;
@@ -226,7 +226,7 @@ void KateSearch::tqfindAgain( bool reverseDirection )
searchFlags.backward = KateViewConfig::global()->searchFlags() & KFindDialog::FindBackwards;
searchFlags.selected = KateViewConfig::global()->searchFlags() & KFindDialog::SelectedText;
searchFlags.prompt = KateViewConfig::global()->searchFlags() & KReplaceDialog::PromptOnReplace;
- searchFlags.tqreplace = false;
+ searchFlags.replace = false;
searchFlags.finished = false;
searchFlags.regExp = KateViewConfig::global()->searchFlags() & KFindDialog::RegularExpression;
searchFlags.useBackRefs = KateViewConfig::global()->searchFlags() & KReplaceDialog::BackReference;
@@ -263,14 +263,14 @@ void KateSearch::search( SearchFlags flags )
s.flags.finished = true;
}
- if( s.flags.tqreplace ) {
- tqreplaces = 0;
+ if( s.flags.replace ) {
+ replaces = 0;
if( s.flags.prompt )
promptReplace();
else
- tqreplaceAll();
+ replaceAll();
} else {
- tqfindAgain();
+ findAgain();
}
}
@@ -301,17 +301,17 @@ void KateSearch::wrapSearch()
}
// oh, we wrapped around one time allready now !
- // only check that on tqreplace
- s.wrapped = s.flags.tqreplace;
+ // only check that on replace
+ s.wrapped = s.flags.replace;
- tqreplaces = 0;
+ replaces = 0;
s.flags.finished = true;
}
-void KateSearch::tqfindAgain()
+void KateSearch::findAgain()
{
if( s_pattern.isEmpty() ) {
- tqfind();
+ find();
return;
}
@@ -320,7 +320,7 @@ void KateSearch::tqfindAgain()
} else if( !s.flags.finished ) {
if( askContinue() ) {
wrapSearch();
- tqfindAgain();
+ findAgain();
} else {
if (arbitraryHLExample) m_arbitraryHLList->clear();
}
@@ -334,23 +334,23 @@ void KateSearch::tqfindAgain()
}
}
-void KateSearch::tqreplaceAll()
+void KateSearch::replaceAll()
{
doc()->editStart ();
while( doSearch( s_pattern ) )
- tqreplaceOne();
+ replaceOne();
doc()->editEnd ();
if( !s.flags.finished ) {
if( askContinue() ) {
wrapSearch();
- tqreplaceAll();
+ replaceAll();
}
} else {
KMessageBox::information( view(),
- i18n("%n tqreplacement made.","%n tqreplacements made.",tqreplaces),
+ i18n("%n replacement made.","%n replacements made.",replaces),
i18n("Replace") );
}
}
@@ -359,30 +359,30 @@ void KateSearch::promptReplace()
{
if ( doSearch( s_pattern ) ) {
exposeFound( s.cursor, s.matchedLength );
- tqreplacePrompt->show();
- tqreplacePrompt->setFocus ();
+ replacePrompt->show();
+ replacePrompt->setFocus ();
} else if( !s.flags.finished && askContinue() ) {
wrapSearch();
promptReplace();
} else {
if (arbitraryHLExample) m_arbitraryHLList->clear();
- tqreplacePrompt->hide();
+ replacePrompt->hide();
KMessageBox::information( view(),
- i18n("%n tqreplacement made.","%n tqreplacements made.",tqreplaces),
+ i18n("%n replacement made.","%n replacements made.",replaces),
i18n("Replace") );
}
}
-void KateSearch::tqreplaceOne()
+void KateSearch::replaceOne()
{
- TQString tqreplaceWith = m_tqreplacement;
+ TQString replaceWith = m_replacement;
if ( s.flags.regExp && s.flags.useBackRefs ) {
// Replace each "\0"..."\9" with the corresponding capture,
// "\n" and "\t" with newline and tab,
// "\\" with "\",
// and remove the "\" for any other sequence.
TQRegExp br("\\\\(.)");
- int pos = br.search( tqreplaceWith );
+ int pos = br.search( replaceWith );
int ncaps = m_re.numCaptures();
while ( pos >= 0 ) {
TQString substitute;
@@ -393,7 +393,7 @@ void KateSearch::tqreplaceOne()
if (ccap <= ncaps ) {
substitute = m_re.cap( ccap );
} else {
- kdDebug()<<"KateSearch::tqreplaceOne(): you don't have "<<ccap<<" backreferences in regexp '"<<m_re.pattern()<<"'"<<endl;
+ kdDebug()<<"KateSearch::replaceOne(): you don't have "<<ccap<<" backreferences in regexp '"<<m_re.pattern()<<"'"<<endl;
break;
}
} else if ( argument == 'n' ) {
@@ -404,27 +404,27 @@ void KateSearch::tqreplaceOne()
// handle a validly escaped backslash, or an invalid escape.
substitute = argument;
}
- tqreplaceWith.tqreplace( pos, br.matchedLength(), substitute );
- pos = br.search( tqreplaceWith, pos + substitute.length() );
+ replaceWith.replace( pos, br.matchedLength(), substitute );
+ pos = br.search( replaceWith, pos + substitute.length() );
}
}
doc()->editStart();
doc()->removeText( s.cursor.line(), s.cursor.col(),
s.cursor.line(), s.cursor.col() + s.matchedLength );
- doc()->insertText( s.cursor.line(), s.cursor.col(), tqreplaceWith );
+ doc()->insertText( s.cursor.line(), s.cursor.col(), replaceWith );
doc()->editEnd(),
- tqreplaces++;
+ replaces++;
// if we inserted newlines, we better adjust.
- uint newlines = tqreplaceWith.tqcontains('\n');
+ uint newlines = replaceWith.contains('\n');
if ( newlines )
{
if ( ! s.flags.backward )
{
s.cursor.setLine( s.cursor.line() + newlines );
- s.cursor.setCol( tqreplaceWith.length() - tqreplaceWith.tqfindRev('\n') );
+ s.cursor.setCol( replaceWith.length() - replaceWith.findRev('\n') );
}
// selection?
if ( s.flags.selected )
@@ -435,17 +435,17 @@ void KateSearch::tqreplaceOne()
// adjust selection endcursor if needed
if( s.flags.selected && s.cursor.line() == s.selEnd.line() )
{
- s.selEnd.setCol(s.selEnd.col() + tqreplaceWith.length() - s.matchedLength );
+ s.selEnd.setCol(s.selEnd.col() + replaceWith.length() - s.matchedLength );
}
// adjust wrap cursor if needed
if( s.cursor.line() == s.wrappedEnd.line() && s.cursor.col() <= s.wrappedEnd.col())
{
- s.wrappedEnd.setCol(s.wrappedEnd.col() + tqreplaceWith.length() - s.matchedLength );
+ s.wrappedEnd.setCol(s.wrappedEnd.col() + replaceWith.length() - s.matchedLength );
}
if( !s.flags.backward ) {
- s.cursor.setCol(s.cursor.col() + tqreplaceWith.length());
+ s.cursor.setCol(s.cursor.col() + replaceWith.length());
} else if( s.cursor.col() > 0 ) {
s.cursor.setCol(s.cursor.col() - 1);
} else {
@@ -470,12 +470,12 @@ void KateSearch::skipOne()
}
}
-void KateSearch::tqreplaceSlot() {
- switch( (Dialog_results)tqreplacePrompt->result() ) {
- case srCancel: tqreplacePrompt->hide(); break;
- case srAll: tqreplacePrompt->hide(); tqreplaceAll(); break;
- case srYes: tqreplaceOne(); promptReplace(); break;
- case srLast: tqreplacePrompt->hide(), tqreplaceOne(); break;
+void KateSearch::replaceSlot() {
+ switch( (Dialog_results)replacePrompt->result() ) {
+ case srCancel: replacePrompt->hide(); break;
+ case srAll: replacePrompt->hide(); replaceAll(); break;
+ case srYes: replaceOne(); promptReplace(); break;
+ case srLast: replacePrompt->hide(), replaceOne(); break;
case srNo: skipOne(); promptReplace(); break;
}
}
@@ -483,9 +483,9 @@ void KateSearch::tqreplaceSlot() {
bool KateSearch::askContinue()
{
TQString made =
- i18n( "%n tqreplacement made.",
- "%n tqreplacements made.",
- tqreplaces );
+ i18n( "%n replacement made.",
+ "%n replacements made.",
+ replaces );
TQString reached = !s.flags.backward ?
i18n( "End of document reached." ) :
@@ -502,12 +502,12 @@ bool KateSearch::askContinue()
i18n( "Continue from the beginning?" ) :
i18n( "Continue from the end?" );
- TQString text = s.flags.tqreplace ?
+ TQString text = s.flags.replace ?
made + "\n" + reached + "\n" + question :
reached + "\n" + question;
return KMessageBox::Yes == KMessageBox::questionYesNo(
- view(), text, s.flags.tqreplace ? i18n("Replace") : i18n("Find"),
+ view(), text, s.flags.replace ? i18n("Replace") : i18n("Find"),
KStdGuiItem::cont(), i18n("&Stop") );
}
@@ -553,8 +553,8 @@ TQString KateSearch::getSearchText()
break;
}
- str.tqreplace( TQRegExp("^\\n"), "" );
- str.tqreplace( TQRegExp("\\n.*"), "" );
+ str.replace( TQRegExp("^\\n"), "" );
+ str.replace( TQRegExp("\\n.*"), "" );
return str;
}
@@ -609,12 +609,12 @@ bool KateSearch::doSearch( const TQString& text )
{
KateDocCursor docCursor(line, col, doc());
- // If we're at the top of the document, we're not gonna tqfind anything, so bail.
+ // If we're at the top of the document, we're not gonna find anything, so bail.
if (docCursor.line() == 0 && docCursor.col() == 0)
return false;
- // Move one step backward before searching, if this is a "tqfind again", we don't
- // want to tqfind the same match.
+ // Move one step backward before searching, if this is a "find again", we don't
+ // want to find the same match.
docCursor.moveBackward(1);
line = docCursor.line();
col = docCursor.col();
@@ -816,42 +816,42 @@ void KateReplacePrompt::done (int result)
//BEGIN SearchCommand
bool SearchCommand::exec(class Kate::View *view, const TQString &cmd, TQString &msg)
{
- TQString flags, pattern, tqreplacement;
- if ( cmd.startsWith( "tqfind" ) )
+ TQString flags, pattern, replacement;
+ if ( cmd.startsWith( "find" ) )
{
- static TQRegExp re_tqfind("tqfind(?::([bcersw]*))?\\s+(.+)");
- if ( re_tqfind.search( cmd ) < 0 )
+ static TQRegExp re_find("find(?::([bcersw]*))?\\s+(.+)");
+ if ( re_find.search( cmd ) < 0 )
{
- msg = i18n("Usage: tqfind[:[bcersw]] PATTERN");
+ msg = i18n("Usage: find[:[bcersw]] PATTERN");
return false;
}
- flags = re_tqfind.cap( 1 );
- pattern = re_tqfind.cap( 2 );
+ flags = re_find.cap( 1 );
+ pattern = re_find.cap( 2 );
}
- else if ( cmd.startsWith( "itqfind" ) )
+ else if ( cmd.startsWith( "ifind" ) )
{
- static TQRegExp re_itqfind("itqfind(?::([bcrs]*))?\\s+(.*)");
- if ( re_itqfind.search( cmd ) < 0 )
+ static TQRegExp re_ifind("ifind(?::([bcrs]*))?\\s+(.*)");
+ if ( re_ifind.search( cmd ) < 0 )
{
- msg = i18n("Usage: itqfind[:[bcrs]] PATTERN");
+ msg = i18n("Usage: ifind[:[bcrs]] PATTERN");
return false;
}
- itqfindClear();
+ ifindClear();
return true;
}
- else if ( cmd.startsWith( "tqreplace" ) )
+ else if ( cmd.startsWith( "replace" ) )
{
- // Try if the pattern and tqreplacement is quoted, using a quote character ["']
- static TQRegExp re_rep("tqreplace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s+\\2((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
+ // Try if the pattern and replacement is quoted, using a quote character ["']
+ static TQRegExp re_rep("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s+\\2((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
// Or one quoted argument
- TQRegExp re_rep1("tqreplace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
+ TQRegExp re_rep1("replace(?::([bceprsw]*))?\\s+([\"'])((?:[^\\\\\\\\2]|\\\\.)*)\\2\\s*$");
// Else, it's just one or two (space separated) words
- TQRegExp re_rep2("tqreplace(?::([bceprsw]*))?\\s+(\\S+)(.*)");
+ TQRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)");
#define unbackslash(s) p=0;\
-while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\
+while ( (p = pattern.find( '\\' + delim, p )) > -1 )\
{\
if ( !p || pattern[p-1] != '\\' )\
pattern.remove( p, 1 );\
@@ -862,15 +862,15 @@ while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\
{
flags = re_rep.cap(1);
pattern = re_rep.cap( 3 );
- tqreplacement = re_rep.cap( 4 );
+ replacement = re_rep.cap( 4 );
int p(0);
// unbackslash backslashed delimiter strings
// in pattern ..
TQString delim = re_rep.cap( 2 );
unbackslash(pattern);
- // .. and in tqreplacement
- unbackslash(tqreplacement);
+ // .. and in replacement
+ unbackslash(replacement);
}
else if ( re_rep1.search( cmd ) >= 0 )
{
@@ -885,35 +885,35 @@ while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\
{
flags = re_rep2.cap( 1 );
pattern = re_rep2.cap( 2 );
- tqreplacement = re_rep2.cap( 3 ).stripWhiteSpace();
+ replacement = re_rep2.cap( 3 ).stripWhiteSpace();
}
else
{
- msg = i18n("Usage: tqreplace[:[bceprsw]] PATTERN [REPLACEMENT]");
+ msg = i18n("Usage: replace[:[bceprsw]] PATTERN [REPLACEMENT]");
return false;
}
- kdDebug()<<"tqreplace '"<<pattern<<"' with '"<<tqreplacement<<"'"<<endl;
+ kdDebug()<<"replace '"<<pattern<<"' with '"<<replacement<<"'"<<endl;
#undef unbackslash
}
long f = 0;
- if ( flags.tqcontains( 'b' ) ) f |= KFindDialog::FindBackwards;
- if ( flags.tqcontains( 'c' ) ) f |= KFindDialog::FromCursor;
- if ( flags.tqcontains( 'e' ) ) f |= KFindDialog::SelectedText;
- if ( flags.tqcontains( 'r' ) ) f |= KFindDialog::RegularExpression;
- if ( flags.tqcontains( 'p' ) ) f |= KReplaceDialog::PromptOnReplace;
- if ( flags.tqcontains( 's' ) ) f |= KFindDialog::CaseSensitive;
- if ( flags.tqcontains( 'w' ) ) f |= KFindDialog::WholeWordsOnly;
-
- if ( cmd.startsWith( "tqfind" ) )
+ if ( flags.contains( 'b' ) ) f |= KFindDialog::FindBackwards;
+ if ( flags.contains( 'c' ) ) f |= KFindDialog::FromCursor;
+ if ( flags.contains( 'e' ) ) f |= KFindDialog::SelectedText;
+ if ( flags.contains( 'r' ) ) f |= KFindDialog::RegularExpression;
+ if ( flags.contains( 'p' ) ) f |= KReplaceDialog::PromptOnReplace;
+ if ( flags.contains( 's' ) ) f |= KFindDialog::CaseSensitive;
+ if ( flags.contains( 'w' ) ) f |= KFindDialog::WholeWordsOnly;
+
+ if ( cmd.startsWith( "find" ) )
{
- ((KateView*)view)->tqfind( pattern, f );
+ ((KateView*)view)->find( pattern, f );
return true;
}
- else if ( cmd.startsWith( "tqreplace" ) )
+ else if ( cmd.startsWith( "replace" ) )
{
f |= KReplaceDialog::BackReference; // mandatory here?
- ((KateView*)view)->tqreplace( pattern, tqreplacement, f );
+ ((KateView*)view)->replace( pattern, replacement, f );
return true;
}
@@ -922,15 +922,15 @@ while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\
bool SearchCommand::help(class Kate::View *, const TQString &cmd, TQString &msg)
{
- if ( cmd == "tqfind" )
- msg = i18n("<p>Usage: <code>tqfind[:bcersw] PATTERN</code></p>");
+ if ( cmd == "find" )
+ msg = i18n("<p>Usage: <code>find[:bcersw] PATTERN</code></p>");
- else if ( cmd == "itqfind" )
- msg = i18n("<p>Usage: <code>itqfind:[:bcrs] PATTERN</code>"
- "<br>itqfind does incremental or 'as-you-type' search</p>");
+ else if ( cmd == "ifind" )
+ msg = i18n("<p>Usage: <code>ifind:[:bcrs] PATTERN</code>"
+ "<br>ifind does incremental or 'as-you-type' search</p>");
else
- msg = i18n("<p>Usage: <code>tqreplace[:bceprsw] PATTERN REPLACEMENT</code></p>");
+ msg = i18n("<p>Usage: <code>replace[:bceprsw] PATTERN REPLACEMENT</code></p>");
msg += i18n(
"<h4><caption>Options</h4><p>"
@@ -940,15 +940,15 @@ bool SearchCommand::help(class Kate::View *, const TQString &cmd, TQString &msg)
"<br><b>s</b> - Case sensitive search"
);
- if ( cmd == "tqfind" )
+ if ( cmd == "find" )
msg += i18n(
"<br><b>e</b> - Search in selected text only"
"<br><b>w</b> - Search whole words only"
);
- if ( cmd == "tqreplace" )
+ if ( cmd == "replace" )
msg += i18n(
- "<br><b>p</b> - Prompt for tqreplace</p>"
+ "<br><b>p</b> - Prompt for replace</p>"
"<p>If REPLACEMENT is not present, an empty string is used.</p>"
"<p>If you want to have whitespace in your PATTERN, you need to "
"quote both PATTERN and REPLACEMENT with either single or double "
@@ -962,30 +962,30 @@ bool SearchCommand::help(class Kate::View *, const TQString &cmd, TQString &msg)
TQStringList SearchCommand::cmds()
{
TQStringList l;
- l << "tqfind" << "tqreplace" << "itqfind";
+ l << "find" << "replace" << "ifind";
return l;
}
bool SearchCommand::wantsToProcessText( const TQString &cmdname )
{
- return cmdname == "itqfind";
+ return cmdname == "ifind";
}
void SearchCommand::processText( Kate::View *view, const TQString &cmd )
{
- static TQRegExp re_itqfind("itqfind(?::([bcrs]*))?\\s(.*)");
- if ( re_itqfind.search( cmd ) > -1 )
+ static TQRegExp re_ifind("ifind(?::([bcrs]*))?\\s(.*)");
+ if ( re_ifind.search( cmd ) > -1 )
{
- TQString flags = re_itqfind.cap( 1 );
- TQString pattern = re_itqfind.cap( 2 );
+ TQString flags = re_ifind.cap( 1 );
+ TQString pattern = re_ifind.cap( 2 );
// if there is no setup, or the text length is 0, set up the properties
- if ( ! m_itqfindFlags || pattern.isEmpty() )
- itqfindInit( flags );
+ if ( ! m_ifindFlags || pattern.isEmpty() )
+ ifindInit( flags );
// if there is no fromCursor, add it if this is not the first character
- else if ( ! ( m_itqfindFlags & KFindDialog::FromCursor ) && ! pattern.isEmpty() )
- m_itqfindFlags |= KFindDialog::FromCursor;
+ else if ( ! ( m_ifindFlags & KFindDialog::FromCursor ) && ! pattern.isEmpty() )
+ m_ifindFlags |= KFindDialog::FromCursor;
// search..
if ( ! pattern.isEmpty() )
@@ -1000,25 +1000,25 @@ void SearchCommand::processText( Kate::View *view, const TQString &cmd )
v->selection().length() + 1 == pattern.length() )
v->setCursorPositionInternal( v->selStartLine(), v->selStartCol() );
- v->tqfind( pattern, m_itqfindFlags, false );
+ v->find( pattern, m_ifindFlags, false );
}
}
}
-void SearchCommand::itqfindInit( const TQString &flags )
+void SearchCommand::ifindInit( const TQString &flags )
{
long f = 0;
- if ( flags.tqcontains( 'b' ) ) f |= KFindDialog::FindBackwards;
- if ( flags.tqcontains( 'c' ) ) f |= KFindDialog::FromCursor;
- if ( flags.tqcontains( 'r' ) ) f |= KFindDialog::RegularExpression;
- if ( flags.tqcontains( 's' ) ) f |= KFindDialog::CaseSensitive;
- m_itqfindFlags = f;
+ if ( flags.contains( 'b' ) ) f |= KFindDialog::FindBackwards;
+ if ( flags.contains( 'c' ) ) f |= KFindDialog::FromCursor;
+ if ( flags.contains( 'r' ) ) f |= KFindDialog::RegularExpression;
+ if ( flags.contains( 's' ) ) f |= KFindDialog::CaseSensitive;
+ m_ifindFlags = f;
}
-void SearchCommand::itqfindClear()
+void SearchCommand::ifindClear()
{
- m_itqfindFlags = 0;
+ m_ifindFlags = 0;
}
//END SearchCommand
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesearch.h b/kate/part/katesearch.h
index 0e9541069..ebf228dcd 100644
--- a/kate/part/katesearch.h
+++ b/kate/part/katesearch.h
@@ -39,7 +39,7 @@ class KateSuperRangeList;
class KActionCollection;
-class KateSearch : public TQObject
+class KateSearch : public QObject
{
Q_OBJECT
@@ -55,7 +55,7 @@ class KateSearch : public TQObject
bool backward :1;
bool selected :1;
bool prompt :1;
- bool tqreplace :1;
+ bool replace :1;
bool finished :1;
bool regExp :1;
bool useBackRefs :1;
@@ -66,7 +66,7 @@ class KateSearch : public TQObject
public:
SearchFlags flags;
KateTextCursor cursor;
- KateTextCursor wrappedEnd; // after wraping around, search/tqreplace until here
+ KateTextCursor wrappedEnd; // after wraping around, search/replace until here
bool wrapped; // have we allready wrapped around ?
bool showNotFound; // pop up annoying dialogs?
uint matchedLength;
@@ -90,52 +90,52 @@ class KateSearch : public TQObject
void createActions( KActionCollection* );
public slots:
- void tqfind();
+ void find();
/**
* Search for @p pattern given @p flags
- * This is for the commandline "tqfind", and is forwarded by
+ * This is for the commandline "find", and is forwarded by
* KateView.
* @param pattern string or regex pattern to search for.
* @param flags a OR'ed combination of KFindDialog::Options
* @param add wether this string should be added to the recent search list
* @param shownotfound wether to pop up "Not round: PATTERN" when that happens.
- * That must now be explicitly required -- the tqfind dialog does, but the commandline
+ * That must now be explicitly required -- the find dialog does, but the commandline
* incremental search does not.
*/
- void tqfind( const TQString &pattern, long flags, bool add=true, bool shownotfound=false );
- void tqreplace();
+ void find( const TQString &pattern, long flags, bool add=true, bool shownotfound=false );
+ void replace();
/**
- * Replace @p pattern with @p tqreplacement given @p flags.
- * This is for the commandline "tqreplace" and is forwarded
+ * Replace @p pattern with @p replacement given @p flags.
+ * This is for the commandline "replace" and is forwarded
* by KateView.
* @param pattern string or regular expression to search for
- * @param tqreplacement Replacement string.
+ * @param replacement Replacement string.
* @param flags OR'd combination of KFindDialog::Options
*/
- void tqreplace( const TQString &pattern, const TQString &tqreplacement, long flags );
- void tqfindAgain( bool reverseDirection );
+ void replace( const TQString &pattern, const TQString &replacement, long flags );
+ void findAgain( bool reverseDirection );
private slots:
- void tqreplaceSlot();
- void slotFindNext() { tqfindAgain( false ); }
- void slotFindPrev() { tqfindAgain( true ); }
+ void replaceSlot();
+ void slotFindNext() { findAgain( false ); }
+ void slotFindPrev() { findAgain( true ); }
private:
static void addToList( TQStringList&, const TQString& );
static void addToSearchList( const TQString& s ) { addToList( s_searchList, s ); }
- static void addToReplaceList( const TQString& s ) { addToList( s_tqreplaceList, s ); }
+ static void addToReplaceList( const TQString& s ) { addToList( s_replaceList, s ); }
static TQStringList s_searchList; ///< recent patterns
- static TQStringList s_tqreplaceList; ///< recent tqreplacement strings
+ static TQStringList s_replaceList; ///< recent replacement strings
static TQString s_pattern; ///< the string to search for
void search( SearchFlags flags );
void wrapSearch();
bool askContinue();
- void tqfindAgain();
+ void findAgain();
void promptReplace();
- void tqreplaceAll();
- void tqreplaceOne();
+ void replaceAll();
+ void replaceOne();
void skipOne();
TQString getSearchText();
@@ -156,14 +156,14 @@ class KateSearch : public TQObject
TQValueList<SConfig> m_searchResults;
int m_resultIndex;
- int tqreplaces;
- TQDialog* tqreplacePrompt;
- TQString m_tqreplacement;
+ int replaces;
+ TQDialog* replacePrompt;
+ TQString m_replacement;
TQRegExp m_re;
};
/**
- * simple tqreplace prompt dialog
+ * simple replace prompt dialog
*/
class KateReplacePrompt : public KDialogBase
{
@@ -194,7 +194,7 @@ class KateReplacePrompt : public KDialogBase
void slotClose ();
/**
- * tqreplace all pressed
+ * replace all pressed
*/
void slotUser1 ();
@@ -218,7 +218,7 @@ class KateReplacePrompt : public KDialogBase
class SearchCommand : public Kate::Command, public Kate::CommandExtension
{
public:
- SearchCommand() : m_itqfindFlags(0) {;}
+ SearchCommand() : m_ifindFlags(0) {;}
bool exec(class Kate::View *view, const TQString &cmd, TQString &errorMsg);
bool help(class Kate::View *, const TQString &, TQString &);
TQStringList cmds();
@@ -227,17 +227,17 @@ class SearchCommand : public Kate::Command, public Kate::CommandExtension
private:
/**
- * set up properties for incremental tqfind
+ * set up properties for incremental find
*/
- void itqfindInit( const TQString &cmd );
+ void ifindInit( const TQString &cmd );
/**
- * clear properties for incremental tqfind
+ * clear properties for incremental find
*/
- void itqfindClear();
+ void ifindClear();
- long m_itqfindFlags;
+ long m_ifindFlags;
};
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp
index 057b39753..6ce2b2a72 100644
--- a/kate/part/katespell.cpp
+++ b/kate/part/katespell.cpp
@@ -113,7 +113,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to
<< "ISO 8859-9" << "ISO 8859-13" << "ISO 8859-15" << "UTF-8"
<< "KOI8-R" << "KOI8-U" << "CP1251" << "CP1255";
- int enc = ksEncodings.tqfindIndex( m_view->doc()->encoding() );
+ int enc = ksEncodings.findIndex( m_view->doc()->encoding() );
if ( enc > -1 )
{
ksc->setEncoding( enc );
@@ -198,7 +198,7 @@ void KateSpell::spellResult( const TQString& )
void KateSpell::spellCleanDone()
{
- KSpell::spelltqStatus status = m_kspell->status();
+ KSpell::spellStatus status = m_kspell->status();
if( status == KSpell::Error ) {
KMessageBox::sorry( 0,
@@ -218,4 +218,4 @@ void KateSpell::spellCleanDone()
//END
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katespell.h b/kate/part/katespell.h
index e815b47ea..f376ece49 100644
--- a/kate/part/katespell.h
+++ b/kate/part/katespell.h
@@ -30,7 +30,7 @@ class KateView;
class KAction;
class KSpell;
-class KateSpell : public TQObject
+class KateSpell : public QObject
{
Q_OBJECT
@@ -83,4 +83,4 @@ class KateSpell : public TQObject
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesupercursor.cpp b/kate/part/katesupercursor.cpp
index c1895abda..8a2689014 100644
--- a/kate/part/katesupercursor.cpp
+++ b/kate/part/katesupercursor.cpp
@@ -662,7 +662,7 @@ void KateSuperRangeList::slotDeleted(TQObject* range)
m_columnBoundaries.removeRef(r->m_end);
}
- int index = tqfindRef(r);
+ int index = findRef(r);
if (index != -1)
take(index);
//else kdDebug(13020)<<"Range not found in list"<<endl;
@@ -743,4 +743,4 @@ TQPtrCollection::Item KateSuperRangeList::newItem(TQPtrCollection::Item d)
return TQPtrList<KateSuperRange>::newItem(d);
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesupercursor.h b/kate/part/katesupercursor.h
index 9b4b6a199..ef0fd378d 100644
--- a/kate/part/katesupercursor.h
+++ b/kate/part/katesupercursor.h
@@ -238,7 +238,7 @@ public:
* @todo constrain children when their position changes deliberately;
* eliminate() children when they are equivalent to their parents
*
- * @returns true if the range tqcontains the cursor and no children
+ * @returns true if the range contains the cursor and no children
* also contain it; false otherwise.
*/
bool owns(const KateTextCursor& cursor) const;
@@ -297,7 +297,7 @@ signals:
void boundaryDeleted();
/**
- * The range now tqcontains no characters (ie. the start and end cursors are the same).
+ * The range now contains no characters (ie. the start and end cursors are the same).
*
* To eliminate this range under different conditions, connect the other signal directly
* to this signal.
@@ -420,7 +420,7 @@ public:
signals:
/**
- * The range now tqcontains no characters (ie. the start and end cursors are the same).
+ * The range now contains no characters (ie. the start and end cursors are the same).
* If autoManage() is true, the range will be deleted after the signal has processed.
*/
void rangeEliminated(KateSuperRange* range);
@@ -460,4 +460,4 @@ private:
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp
index 0930808e9..8e391b620 100644
--- a/kate/part/katesyntaxdocument.cpp
+++ b/kate/part/katesyntaxdocument.cpp
@@ -275,7 +275,7 @@ KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const TQString& mainGrou
/**
* Returns a list with all the keywords inside the list type
*/
-TQStringList& KateSyntaxDocument::tqfinddata(const TQString& mainGroup, const TQString& type, bool clearList)
+TQStringList& KateSyntaxDocument::finddata(const TQString& mainGroup, const TQString& type, bool clearList)
{
kdDebug(13010)<<"Create a list of keywords \""<<type<<"\" from \""<<mainGroup<<"\"."<<endl;
if (clearList)
@@ -472,4 +472,4 @@ void KateSyntaxDocument::setupModeList (bool force)
config.sync();
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katesyntaxdocument.h b/kate/part/katesyntaxdocument.h
index 4204895d0..93deb731d 100644
--- a/kate/part/katesyntaxdocument.h
+++ b/kate/part/katesyntaxdocument.h
@@ -128,7 +128,7 @@ class KateSyntaxDocument : public QDomDocument
/**
* Returns a list with all the keywords inside the list type
*/
- TQStringList& tqfinddata(const TQString& mainGroup,const TQString& type,bool clearList=true);
+ TQStringList& finddata(const TQString& mainGroup,const TQString& type,bool clearList=true);
private:
/**
@@ -161,4 +161,4 @@ class KateSyntaxDocument : public QDomDocument
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katetemplatehandler.cpp b/kate/part/katetemplatehandler.cpp
index a4016a0de..52e07a2e4 100644
--- a/kate/part/katetemplatehandler.cpp
+++ b/kate/part/katetemplatehandler.cpp
@@ -83,7 +83,7 @@ KateTemplateHandler::KateTemplateHandler(
if ( rx.cap( 1 ) != "%" || placeholder == value )
buildList.append( KateTemplateHandlerPlaceHolderInfo( pos, value.length(), placeholder ) );
- insertString.tqreplace( pos, rx.matchedLength(), value );
+ insertString.replace( pos, rx.matchedLength(), value );
pos += value.length();
opos = pos;
}
@@ -168,7 +168,7 @@ void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, c
ph->ranges.setAutoManage( false );
}
- // FIXME handle space/tab tqreplacement correctly make it use of the indenter
+ // FIXME handle space/tab replacement correctly make it use of the indenter
while ( colInText < ( *it ).begin )
{
++col;
diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp
index 6280c7300..e64b928c7 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, 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++;
@@ -278,16 +278,16 @@ bool KateTextLine::searchText (uint startCol, const TQString &text, uint *foundA
{
int col = startCol;
uint l = text.length();
- // allow tqfinding the string ending at eol
+ // allow finding the string ending at eol
if ( col == (int) m_text.length() ) ++startCol;
do {
- index = m_text.tqfindRev( text, col, casesensitive );
+ index = m_text.findRev( text, col, casesensitive );
col--;
} while ( col >= 0 && l + index >= startCol );
}
else
- index = m_text.tqfind (text, startCol, casesensitive);
+ index = m_text.find (text, startCol, casesensitive);
if (index > -1)
{
@@ -309,7 +309,7 @@ bool KateTextLine::searchText (uint startCol, const TQRegExp &regexp, uint *foun
{
int col = startCol;
- // allow tqfinding the string ending at eol
+ // allow finding the string ending at eol
if ( col == (int) m_text.length() ) ++startCol;
do {
index = regexp.searchRev (m_text, col);
@@ -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)
@@ -440,4 +440,4 @@ char *KateTextLine::restore (char *buf)
return buf;
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/katetextline.h b/kate/part/katetextline.h
index a954c87ea..3922d04d0 100644
--- a/kate/part/katetextline.h
+++ b/kate/part/katetextline.h
@@ -32,10 +32,10 @@ class KateRenderer;
class TQTextStream;
/**
- * The KateTextLine represents a line of text. A text line that tqcontains the
+ * The KateTextLine represents a line of text. A text line that contains the
* text, an attribute for each character, an attribute for the free space
* behind the last character and a context number for the syntax highlight.
- * The attribute stores the index to a table that tqcontains fonts and colors
+ * The attribute stores the index to a table that contains fonts and colors
* and also if a character is selected.
*/
class KateTextLine : public KShared
@@ -145,16 +145,16 @@ 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
* The size of this is string().length()
*
- * This tqcontains the index for the attributes (so you can only
+ * This contains the index for the attributes (so you can only
* have a maximum of 2^8 different highlighting styles in a document)
*
* To turn this into actual attributes (bold, green, etc),
@@ -211,7 +211,7 @@ class KateTextLine : public KShared
uint lengthWithTabs (uint tabChars) const;
/**
- * Can we tqfind the given string at the given position
+ * Can we find the given string at the given position
* @param pos startpostion of given string
* @param match string to match at given pos
* @return did the string match?
@@ -419,7 +419,7 @@ class KateTextLine : public KShared
*/
private:
/**
- * text of line as tqunicode
+ * text of line as unicode
*/
TQString m_text;
@@ -453,4 +453,4 @@ class KateTextLine : public KShared
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateundo.cpp b/kate/part/kateundo.cpp
index da6a99474..379df16f0 100644
--- a/kate/part/kateundo.cpp
+++ b/kate/part/kateundo.cpp
@@ -389,4 +389,4 @@ bool KateUndoGroup::isOnlyType(KateUndoGroup::UndoType type)
return true;
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateundo.h b/kate/part/kateundo.h
index 467f5dd58..4d0141189 100644
--- a/kate/part/kateundo.h
+++ b/kate/part/kateundo.h
@@ -102,7 +102,7 @@ class KateUndoGroup
private:
/**
* singleType
- * @return the type if it's only one type, or editInvalid if it tqcontains multiple types.
+ * @return the type if it's only one type, or editInvalid if it contains multiple types.
*/
KateUndoGroup::UndoType singleType();
@@ -138,4 +138,4 @@ class KateUndoGroup
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp
index a3997ff70..7840e79d5 100644
--- a/kate/part/kateview.cpp
+++ b/kate/part/kateview.cpp
@@ -125,7 +125,7 @@ KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name )
setPopupMenuInterfaceDCOPSuffix (viewDCOPSuffix());
setSessionConfigInterfaceDCOPSuffix (viewDCOPSuffix());
setViewCursorInterfaceDCOPSuffix (viewDCOPSuffix());
- setViewtqStatusMsgInterfaceDCOPSuffix (viewDCOPSuffix());
+ setViewStatusMsgInterfaceDCOPSuffix (viewDCOPSuffix());
setInstance( KateFactory::self()->instance() );
doc->addView( this );
@@ -194,9 +194,9 @@ void KateView::setupConnections()
this, TQT_SLOT(slotSaveCanceled(const TQString&)) );
connect( m_viewInternal, TQT_SIGNAL(dropEventPass(TQDropEvent*)),
this, TQT_SIGNAL(dropEventPass(TQDropEvent*)) );
- connect(this,TQT_SIGNAL(cursorPositionChanged()),this,TQT_SLOT(slottqStatusMsg()));
- connect(this,TQT_SIGNAL(newtqStatus()),this,TQT_SLOT(slottqStatusMsg()));
- connect(m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slottqStatusMsg()));
+ connect(this,TQT_SIGNAL(cursorPositionChanged()),this,TQT_SLOT(slotStatusMsg()));
+ connect(this,TQT_SIGNAL(newStatus()),this,TQT_SLOT(slotStatusMsg()));
+ connect(m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotStatusMsg()));
if ( m_doc->browserView() )
{
@@ -243,13 +243,13 @@ void KateView::setupActions()
// setup Tools menu
a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, this, TQT_SLOT(indent()), ac, "tools_indent");
a->setWhatsThis(i18n("Use this to indent a selected block of text.<br><br>"
- "You can configure whether tabs should be honored and used or tqreplaced with spaces, in the configuration dialog."));
+ "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, this, TQT_SLOT(unIndent()), ac, "tools_unindent");
a->setWhatsThis(i18n("Use this to unindent a selected block of text."));
a=new KAction(i18n("&Clean Indentation"), 0, this, TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent");
a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)<br><br>"
- "You can configure whether tabs should be honored and used or tqreplaced with spaces, in the configuration dialog."));
+ "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
a=new KAction(i18n("&Align"), 0, this, TQT_SLOT(align()), ac, "tools_align");
a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level."));
@@ -680,7 +680,7 @@ void KateView::slotGotFocus()
{
m_editActions->accel()->setEnabled( true );
- slottqStatusMsg ();
+ slotStatusMsg ();
}
void KateView::slotLostFocus()
@@ -693,7 +693,7 @@ void KateView::setDynWrapIndicators(int mode)
config()->setDynWordWrapIndicators (mode);
}
-void KateView::slottqStatusMsg ()
+void KateView::slotStatusMsg ()
{
TQString ovrstr;
if (m_doc->isReadWrite())
@@ -715,14 +715,14 @@ void KateView::slottqStatusMsg ()
TQString modstr = m_doc->isModified() ? TQString (" * ") : TQString (" ");
TQString blockstr = blockSelectionMode() ? i18n(" BLK ") : i18n(" NORM ");
- emit viewtqStatusMsg (s1 + s2 + " " + ovrstr + blockstr + modstr);
+ emit viewStatusMsg (s1 + s2 + " " + ovrstr + blockstr + modstr);
}
void KateView::slotSelectionTypeChanged()
{
m_toggleBlockSelection->setChecked( blockSelectionMode() );
- emit newtqStatus();
+ emit newStatus();
}
bool KateView::isOverwriteMode() const
@@ -733,12 +733,12 @@ bool KateView::isOverwriteMode() const
void KateView::reloadFile()
{
m_doc->reloadFile();
- emit newtqStatus();
+ emit newStatus();
}
void KateView::slotUpdate()
{
- emit newtqStatus();
+ emit newStatus();
slotNewUndo();
}
@@ -753,7 +753,7 @@ void KateView::slotReadWriteChanged ()
TQStringList l;
- l << "edit_tqreplace" << "set_insert" << "tools_spelling" << "tools_indent"
+ l << "edit_replace" << "set_insert" << "tools_spelling" << "tools_indent"
<< "tools_unindent" << "tools_cleanIndent" << "tools_align" << "tools_comment"
<< "tools_uncomment" << "tools_uppercase" << "tools_lowercase"
<< "tools_capitalize" << "tools_join_lines" << "tools_apply_wordwrap"
@@ -793,7 +793,7 @@ void KateView::contextMenuEvent( TQContextMenuEvent *ev )
if ( !m_doc || !m_doc->browserExtension() )
return;
emit m_doc->browserExtension()->popupMenu( /*this, */ev->globalPos(), m_doc->url(),
- TQString::tqfromLatin1( "text/plain" ) );
+ TQString::fromLatin1( "text/plain" ) );
ev->accept();
}
@@ -832,7 +832,7 @@ void KateView::toggleInsert()
m_doc->setConfigFlags(m_doc->config()->configFlags() ^ KateDocument::cfOvr);
m_toggleInsert->setChecked (isOverwriteMode ());
- emit newtqStatus();
+ emit newStatus();
}
bool KateView::canDiscard()
@@ -1089,29 +1089,29 @@ void KateView::slotNeedTextHint(int line, int col, TQString &text)
text=TQString("test %1 %2").arg(line).arg(col);
}
-void KateView::tqfind()
+void KateView::find()
{
- m_search->tqfind();
+ m_search->find();
}
-void KateView::tqfind( const TQString& pattern, long flags, bool add )
+void KateView::find( const TQString& pattern, long flags, bool add )
{
- m_search->tqfind( pattern, flags, add );
+ m_search->find( pattern, flags, add );
}
-void KateView::tqreplace()
+void KateView::replace()
{
- m_search->tqreplace();
+ m_search->replace();
}
-void KateView::tqreplace( const TQString &pattern, const TQString &tqreplacement, long flags )
+void KateView::replace( const TQString &pattern, const TQString &replacement, long flags )
{
- m_search->tqreplace( pattern, tqreplacement, flags );
+ m_search->replace( pattern, replacement, flags );
}
-void KateView::tqfindAgain( bool back )
+void KateView::findAgain( bool back )
{
- m_search->tqfindAgain( back );
+ m_search->findAgain( back );
}
void KateView::slotSelectionChanged ()
@@ -1233,11 +1233,11 @@ void KateView::updateRendererConfig()
// update the text area
m_viewInternal->updateView (true);
- m_viewInternal->tqrepaint ();
+ m_viewInternal->repaint ();
// update the left border right, for example linenumbers
m_viewInternal->leftBorder->updateFont();
- m_viewInternal->leftBorder->tqrepaint ();
+ m_viewInternal->leftBorder->repaint ();
// @@ showIndentLines is not cached anymore.
// m_renderer->setShowIndentLines (m_renderer->config()->showIndentationLines());
@@ -1305,7 +1305,7 @@ void KateView::clear ()
m_viewInternal->clear ();
}
-void KateView::tqrepaintText (bool paintOnlyDirty)
+void KateView::repaintText (bool paintOnlyDirty)
{
m_viewInternal->paintText(0,0,m_viewInternal->width(),m_viewInternal->height(), paintOnlyDirty);
}
@@ -1360,7 +1360,7 @@ bool KateView::setSelection( const KateTextCursor& start, const KateTextCursor&
tagSelection(oldSelectStart, oldSelectEnd);
- tqrepaintText(true);
+ repaintText(true);
emit selectionChanged ();
emit m_doc->selectionChanged ();
@@ -1405,7 +1405,7 @@ bool KateView::clearSelection(bool redraw, bool finishedChangingSelection)
oldSelectEnd = selectEnd;
if (redraw)
- tqrepaintText(true);
+ repaintText(true);
if (finishedChangingSelection)
{
@@ -1596,7 +1596,7 @@ void KateView::paste()
{
m_doc->paste( this );
emit selectionChanged();
- m_viewInternal->tqrepaint();
+ m_viewInternal->repaint();
}
void KateView::cut()
@@ -1736,7 +1736,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T
for (uint curPos=startCol;curPos<(length+startCol);curPos++)
{
if ( curPos == 0 || line->attribute( curPos ) != line->attribute( curPos - 1 ) &&
- // Since many highlight files tqcontains itemdatas that have the exact
+ // Since many highlight files contains itemdatas that have the exact
// same styles, join those to keep the HTML text size down
KateAttribute(*charAttributes) != KateAttribute(*m_renderer->attribute(line->attribute(curPos))) )
{
@@ -1748,7 +1748,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T
charAttributes = m_renderer->attribute(line->attribute(curPos));
- if ( ! stylecache.tqcontains( line->attribute(curPos) ) )
+ if ( ! stylecache.contains( line->attribute(curPos) ) )
{
TQString textdecoration;
TQString style;
@@ -1917,4 +1917,4 @@ void KateView::getIMSelectionValue( uint *imStartLine, uint *imStart, uint *imEn
}
//END IM INPUT STUFF
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateview.h b/kate/part/kateview.h
index aab0a6035..aa428096d 100644
--- a/kate/part/kateview.h
+++ b/kate/part/kateview.h
@@ -56,7 +56,7 @@ class TQGridLayout;
//
class KateView : public Kate::View,
public KTextEditor::SessionConfigInterface,
- public KTextEditor::ViewtqStatusMsgInterface,
+ public KTextEditor::ViewStatusMsgInterface,
public KTextEditor::TextHintInterface,
public KTextEditor::SelectionInterface,
public KTextEditor::SelectionInterfaceExt,
@@ -270,7 +270,7 @@ class KateView : public Kate::View,
void clear ();
- void tqrepaintText (bool paintOnlyDirty = false);
+ void repaintText (bool paintOnlyDirty = false);
void updateView (bool changed = false);
//END
@@ -376,14 +376,14 @@ class KateView : public Kate::View,
public slots:
int getEol();
void setEol( int eol );
- void tqfind();
- void tqfind( const TQString&, long, bool add=true ); ///< proxy for KateSearch
- void tqreplace();
- void tqreplace( const TQString&, const TQString &, long ); ///< proxy for KateSearch
- /** Highly confusing but KateSearch::tqfindAgain() is backwards too. */
- void tqfindAgain( bool back );
- void tqfindAgain() { tqfindAgain( false ); }
- void tqfindPrev() { tqfindAgain( true ); }
+ void find();
+ void find( const TQString&, long, bool add=true ); ///< proxy for KateSearch
+ void replace();
+ void replace( const TQString&, const TQString &, long ); ///< proxy for KateSearch
+ /** Highly confusing but KateSearch::findAgain() is backwards too. */
+ void findAgain( bool back );
+ void findAgain() { findAgain( false ); }
+ void findPrev() { findAgain( true ); }
void setFoldingMarkersOn( bool enable ); // Not in Kate::View, but should be
void setIconBorder( bool enable );
@@ -420,7 +420,7 @@ class KateView : public Kate::View,
signals:
void gotFocus( Kate::View* );
void lostFocus( Kate::View* );
- void newtqStatus(); // Not in Kate::View, but should be (Kate app connects to it)
+ void newStatus(); // Not in Kate::View, but should be (Kate app connects to it)
//
// Extras
@@ -443,7 +443,7 @@ class KateView : public Kate::View,
signals:
void dropEventPass(TQDropEvent*);
- void viewtqStatusMsg (const TQString &msg);
+ void viewStatusMsg (const TQString &msg);
public:
bool setCursorPositionInternal( uint line, uint col, uint tabwidth = 1, bool calledExternally = false );
@@ -459,7 +459,7 @@ class KateView : public Kate::View,
void slotGotFocus();
void slotLostFocus();
void slotDropEventPass( TQDropEvent* ev );
- void slottqStatusMsg();
+ void slotStatusMsg();
void slotSaveCanceled( const TQString& error );
void slotExpandToplevel();
void slotCollapseLocal();
diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp
index 663255714..da88676bc 100644
--- a/kate/part/kateviewhelpers.cpp
+++ b/kate/part/kateviewhelpers.cpp
@@ -170,7 +170,7 @@ void KateScrollBar::recomputeMarksPositions(bool forceFullUpdate)
if (tree)
{
- KateCodeFoldingNode *node = tree->tqfindNodeForLine(line);
+ KateCodeFoldingNode *node = tree->findNodeForLine(line);
while (node)
{
@@ -244,7 +244,7 @@ class KateCmdLnWhatsThis : public QWhatsThis
Kate::Command *cmd = KateCmd::self()->queryCommand( name );
if ( cmd )
{
- if ( cmd->help( (Kate::View*)m_parent->tqparentWidget(), name, s ) )
+ if ( cmd->help( (Kate::View*)m_parent->parentWidget(), name, s ) )
return beg + name + mid + s + end;
else
return beg + name + mid + i18n("No help for '%1'").arg( name ) + end;
@@ -380,7 +380,7 @@ void KateCmdLine::slotReturnPressed ( const TQString& text )
void KateCmdLine::hideMe () // unless i have focus ;)
{
- if ( isVisibleTo(tqparentWidget()) && ! hasFocus() ) {
+ if ( isVisibleTo(parentWidget()) && ! hasFocus() ) {
m_view->toggleCmdLine ();
}
}
@@ -697,7 +697,7 @@ KateIconBorder::KateIconBorder ( KateViewInternal* internalView, TQWidget *paren
, m_cachedLNWidth( 0 )
, m_maxCharWidth( 0 )
{
- tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
setBackgroundMode( NoBackground );
@@ -757,7 +757,7 @@ void KateIconBorder::setFoldingMarkersOn( bool enable )
TQTimer::singleShot( 0, this, TQT_SLOT(update()) );
}
-TQSize KateIconBorder::tqsizeHint() const
+TQSize KateIconBorder::sizeHint() const
{
int w = 0;
@@ -866,7 +866,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
{
// we went from n0 ->n9 lines or vice verca
// this causes an extra updateGeometry() first time the line numbers
- // are displayed, but tqsizeHint() is supposed to be const so we can't set
+ // are displayed, but sizeHint() is supposed to be const so we can't set
// the cached value there.
m_cachedLNWidth = lnWidth;
m_oldBackgroundColor = m_view->renderer()->config()->iconBarColor();
@@ -1202,4 +1202,4 @@ void KateViewEncodingAction::setMode (int mode)
doc->reloadFile();
}
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateviewhelpers.h b/kate/part/kateviewhelpers.h
index 6ba067aea..8e3fa94b3 100644
--- a/kate/part/kateviewhelpers.h
+++ b/kate/part/kateviewhelpers.h
@@ -127,7 +127,7 @@ class KateIconBorder : public QWidget
KateIconBorder( KateViewInternal* internalView, TQWidget *parent );
// VERY IMPORTANT ;)
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
void updateFont();
int lineNumberWidth() const;
@@ -204,4 +204,4 @@ class KateViewEncodingAction : public KActionMenu
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp
index 8508bd3d0..77f98643d 100644
--- a/kate/part/kateviewinternal.cpp
+++ b/kate/part/kateviewinternal.cpp
@@ -89,7 +89,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
// cursor
cursor.setMoveOnInsert (true);
- // tqinvalidate selStartCached, or keyb selection is screwed initially
+ // invalidate selStartCached, or keyb selection is screwed initially
selStartCached.setLine( -1 );
//
// scrollbar for lines
@@ -284,7 +284,7 @@ KateTextCursor KateViewInternal::endPos() const
}
Q_ASSERT(false);
- kdDebug(13030) << "WARNING: could not tqfind a lineRange at all" << endl;
+ kdDebug(13030) << "WARNING: could not find a lineRange at all" << endl;
return KateTextCursor(-1, -1);
}
@@ -765,7 +765,7 @@ void KateViewInternal::makeVisible (const KateTextCursor& c, uint endCol, bool f
{
//kdDebug() << "MakeVisible start [" << startPos().line << "," << startPos().col << "] end [" << endPos().line << "," << endPos().col << "] -> request: [" << c.line << "," << c.col << "]" <<endl;// , new start [" << scroll.line << "," << scroll.col << "] lines " << (linesDisplayed() - 1) << " height " << height() << endl;
// if the line is in a folded region, unfold all the way up
- //if ( m_doc->foldingTree()->tqfindNodeForLine( c.line )->visible )
+ //if ( m_doc->foldingTree()->findNodeForLine( c.line )->visible )
// kdDebug()<<"line ("<<c.line<<") should be visible"<<endl;
if ( force )
@@ -871,7 +871,7 @@ void KateViewInternal::updateMicroFocusHint()
{
int line = displayViewLine(displayCursor, true);
/* Check for hasFocus() to avoid crashes in QXIMInputContext as in bug #131266.
- This is only a workaround until somebody can tqfind the real reason of the crash
+ This is only a workaround until somebody can find the real reason of the crash
(probably it's in Qt). */
if (line == -1 || !hasFocus())
return;
@@ -1825,7 +1825,7 @@ void KateViewInternal::cursorToMatchingBracket( bool sel )
{
KateTextCursor start( cursor ), end;
- if( !m_doc->tqfindMatchingBracket( start, end ) )
+ if( !m_doc->findMatchingBracket( start, end ) )
return;
// The cursor is now placed just to the left of the matching bracket.
@@ -2486,7 +2486,7 @@ bool KateViewInternal::eventFilter( TQObject *obj, TQEvent *e )
width() - scrollMargin * 2,
height() - scrollMargin * 2 );
- if ( !doNotScrollRegion.tqcontains( currentPoint ) )
+ if ( !doNotScrollRegion.contains( currentPoint ) )
{
startDragScroll();
// Keep sending move events
@@ -2759,7 +2759,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e )
}
else
{
- selStartCached.setLine( -1 ); // tqinvalidate
+ selStartCached.setLine( -1 ); // invalidate
}
if( !( e->state() & Qt::ShiftButton ) && isTargetSelected( e->pos() ) )
@@ -3074,7 +3074,7 @@ void KateViewInternal::resizeEvent(TQResizeEvent* e)
bool dirtied = false;
for (uint i = 0; i < lineRanges.count(); i++) {
- // tqfind the first dirty line
+ // find the first dirty line
// the word wrap updateView algorithm is forced to check all lines after a dirty one
if (lineRanges[i].wrap ||
(!expandedHorizontally && (lineRanges[i].endX - lineRanges[i].startX) > width())) {
@@ -3493,4 +3493,4 @@ void KateViewInternal::imEndEvent( TQIMEvent *e )
}
//END IM INPUT STUFF
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/kateviewinternal.h b/kate/part/kateviewinternal.h
index a78c0cbe9..9b0a940be 100644
--- a/kate/part/kateviewinternal.h
+++ b/kate/part/kateviewinternal.h
@@ -221,7 +221,7 @@ class KateViewInternal : public QWidget
int scrollX;
int scrollY;
- Qt::tqCursorShape m_mouseCursor;
+ Qt::CursorShape m_mouseCursor;
KateSuperCursor cursor;
KateTextCursor displayCursor;
@@ -310,20 +310,20 @@ class KateViewInternal : public QWidget
// Returns the lineRange of the specified realLine + viewLine.
KateLineRange range(uint realLine, int viewLine);
- // tqfind the view line of cursor c (0 = same line, 1 = down one, etc.)
+ // find the view line of cursor c (0 = same line, 1 = down one, etc.)
uint viewLine(const KateTextCursor& realCursor);
- // tqfind the view line of the cursor, relative to the display (0 = top line of view, 1 = second line, etc.)
+ // find the view line of the cursor, relative to the display (0 = top line of view, 1 = second line, etc.)
// if limitToVisible is true, only lines which are currently visible will be searched for, and -1 returned if the line is not visible.
int displayViewLine(const KateTextCursor& virtualCursor, bool limitToVisible = false);
- // tqfind the index of the last view line for a specific line
+ // find the index of the last view line for a specific line
uint lastViewLine(uint realLine);
// count the number of view lines for a real line
uint viewLineCount(uint realLine);
- // tqfind the cursor offset by (offset) view lines from a cursor.
+ // find the cursor offset by (offset) view lines from a cursor.
// when keepX is true, the column position will be calculated based on the x
// position of the specified cursor.
KateTextCursor viewLineOffset(const KateTextCursor& virtualCursor, int offset, bool keepX = false);
@@ -394,4 +394,4 @@ class KateViewInternal : public QWidget
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp
index b81081b15..e3f9f52e6 100644
--- a/kate/part/test_regression.cpp
+++ b/kate/part/test_regression.cpp
@@ -364,7 +364,7 @@ KJS::Value OutputFunction::call(KJS::ExecState *exec, KJS::Object &thisObj, cons
const char failureSnapshotPrefix[] = "testkateregressionrc-FS.";
-static TQString tqfindMostRecentFailureSnapshot() {
+static TQString findMostRecentFailureSnapshot() {
TQDir dir(kapp->dirs()->saveLocation("config"),
TQString(failureSnapshotPrefix)+"*",
TQDir::Time, TQDir::Files);
@@ -515,7 +515,7 @@ int main(int argc, char *argv[])
KateDocument *part = new KateDocument(/*bSingleViewMode*/true,
/*bBrowserView*/false,
/*bReadOnly*/false,
- /*tqparentWidget*/toplevel,
+ /*parentWidget*/toplevel,
/*widgetName*/"testkate");
part->readConfig(&cfg);
@@ -560,7 +560,7 @@ int main(int argc, char *argv[])
{
TQString failureSnapshot = args->getOption("cmp-failures");
if (failureSnapshot.isEmpty())
- failureSnapshot = tqfindMostRecentFailureSnapshot();
+ failureSnapshot = findMostRecentFailureSnapshot();
if (!failureSnapshot.isEmpty())
regressionTest->setFailureSnapshotConfig(
new KSimpleConfig(failureSnapshotPrefix + failureSnapshot, true),
@@ -659,7 +659,7 @@ RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig,
m_view = static_cast<KateView *>(m_part->widget());
m_baseConfig = baseConfig;
m_baseDir = baseDir;
- m_baseDir = m_baseDir.tqreplace( "//", "/" );
+ m_baseDir = m_baseDir.replace( "//", "/" );
if ( m_baseDir.endsWith( "/" ) )
m_baseDir = m_baseDir.left( m_baseDir.length() - 1 );
if (outputDir.isEmpty())
@@ -740,7 +740,7 @@ void RegressionTest::setFailureSnapshotSaver(KConfig *cfg, const TQString &sname
TQStringList RegressionTest::concatListFiles(const TQString &relPath, const TQString &filename)
{
TQStringList cmds;
- int pos = relPath.tqfindRev('/');
+ int pos = relPath.findRev('/');
if (pos >= 0)
cmds += concatListFiles(relPath.left(pos), filename);
cmds += readListFile(m_baseDir + "/tests/" + relPath + "/" + filename);
@@ -779,12 +779,12 @@ bool RegressionTest::runTests(TQString relPath, bool mustExist, int known_failur
TQString filename = sourceDir[fileno];
TQString relFilename = relPath.isEmpty() ? filename : relPath+"/"+filename;
- if (filename.startsWith(".") || ignoreFiles.tqcontains(filename) )
+ if (filename.startsWith(".") || ignoreFiles.contains(filename) )
continue;
int failure_type = NoFailure;
- if ( failureFiles.tqcontains( filename ) )
+ if ( failureFiles.contains( filename ) )
failure_type |= AllFailure;
- if ( failureFiles.tqcontains ( filename + "-result" ) )
+ if ( failureFiles.contains ( filename + "-result" ) )
failure_type |= ResultFailure;
runTests(relFilename, false, failure_type);
}
@@ -855,7 +855,7 @@ void RegressionTest::createLink( const TQString& test, int failures )
/** returns the path in a way that is relatively reachable from base.
* @param base base directory (must not include trailing slash)
* @param path directory/file to be relatively reached by base
- * @return path with all elements tqreplaced by .. and concerning path elements
+ * @return path with all elements replaced by .. and concerning path elements
* to be relatively reachable from base.
*/
static TQString makeRelativePath(const TQString &base, const TQString &path)
@@ -869,10 +869,10 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
int pos = 0;
do {
pos++;
- int newpos = absBase.tqfind('/', 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,11 +886,11 @@ 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().tqcontains('/'); i > 0; --i)
+ for (int i = relBase.string().contains('/'); i > 0; --i)
rel += "../";
rel += "..";
if (relPath.string().length() > 0) rel += "/";
@@ -935,13 +935,13 @@ void RegressionTest::doFailureReport( const TQString& test, int failures )
if ( failures & ResultFailure ) {
domDiff += "<pre>";
- FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-result %3/%2-result" )
+ FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {
TQString line = is->readLine();
- line = line.tqreplace( '<', "&lt;" );
- line = line.tqreplace( '>', "&gt;" );
+ line = line.replace( '<', "&lt;" );
+ line = line.replace( '>', "&gt;" );
domDiff += line + "\n";
}
delete is;
@@ -1026,7 +1026,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures )
void RegressionTest::testStaticFile(const TQString & filename, const TQStringList &commands)
{
- tqApp->mainWidget()->resize( 800, 600); // restore size
+ qApp->mainWidget()->resize( 800, 600); // restore size
// Set arguments
KParts::URLArgs args;
@@ -1271,7 +1271,7 @@ void RegressionTest::printDescription(const TQString& description)
if (!description.isEmpty()) {
TQString desc = description;
- desc.tqreplace( '\n', ' ' );
+ desc.replace( '\n', ' ' );
printf(" [%s]", desc.latin1());
}
@@ -1291,7 +1291,7 @@ void RegressionTest::createMissingDirs(const TQString & filename)
pathComponents.prepend(parentDir.absFilePath());
while (!parentDir.exists()) {
TQString parentPath = parentDir.absFilePath();
- int slashPos = parentPath.tqfindRev('/');
+ int slashPos = parentPath.findRev('/');
if (slashPos < 0)
break;
parentPath = parentPath.left(slashPos);
@@ -1334,7 +1334,7 @@ bool RegressionTest::svnIgnored( const TQString &filename )
void RegressionTest::resizeTopLevelWidget( int w, int h )
{
- tqApp->mainWidget()->resize( w, h );
+ qApp->mainWidget()->resize( w, h );
// Since we're not visible, this doesn't have an immediate effect, TQWidget posts the event
TQApplication::sendPostedEvents( 0, TQEvent::Resize );
}
diff --git a/kate/part/test_regression.h b/kate/part/test_regression.h
index 6ee708db8..ee4f8fdfa 100644
--- a/kate/part/test_regression.h
+++ b/kate/part/test_regression.h
@@ -82,7 +82,7 @@ class KateViewObject : public KJS::ObjectImp
virtual KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const;
private:
- // evil hack I: class tqlayout of katejscript/KateJSView must be duplicated
+ // evil hack I: class layout of katejscript/KateJSView must be duplicated
// here, structurally as well as functionally
KateView *view;
// end evil hack
@@ -160,7 +160,7 @@ class OutputFunction : public KJS::ObjectImp
/**
* @internal
*/
-class RegressionTest : public TQObject
+class RegressionTest : public QObject
{
Q_OBJECT
public: