summaryrefslogtreecommitdiffstats
path: root/parts/abbrev/abbrevpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/abbrev/abbrevpart.cpp')
-rw-r--r--parts/abbrev/abbrevpart.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/parts/abbrev/abbrevpart.cpp b/parts/abbrev/abbrevpart.cpp
index a86d98f8..33660069 100644
--- a/parts/abbrev/abbrevpart.cpp
+++ b/parts/abbrev/abbrevpart.cpp
@@ -65,8 +65,8 @@ public:
K_EXPORT_COMPONENT_FACTORY( libkdevabbrev, AbbrevFactory )
-AbbrevPart::AbbrevPart(TQObject *parent, const char *name, const TQStringList &)
- : KDevPlugin(&data, parent, name ? name : "AbbrevPart")
+AbbrevPart::AbbrevPart(TQObject *tqparent, const char *name, const TQStringList &)
+ : KDevPlugin(&data, tqparent, name ? name : "AbbrevPart")
{
setInstance(AbbrevFactory::instance());
setXMLFile("kdevabbrev.rc");
@@ -158,17 +158,17 @@ void AbbrevPart::load()
if (TQFileInfo(localTemplatesFile).exists())
files << localTemplatesFile;
else
- files = dirs->findAllResources("codetemplates", TQString::null, false, true);
+ files = dirs->findAllResources("codetemplates", TQString(), false, true);
TQString localSourcesFile = locateLocal("sources", "sources", AbbrevFactory::instance());
TQStringList sourceFiles;
if (TQFileInfo(localSourcesFile).exists())
sourceFiles << localSourcesFile;
else
- sourceFiles = dirs->findAllResources("sources", TQString::null, false, true);
+ sourceFiles = dirs->findAllResources("sources", TQString(), false, true);
kdDebug(9028) << "=========> sourceFiles: " << sourceFiles.join(" ") << endl;
- this->m_completionFile = TQString::null;
+ this->m_completionFile = TQString();
for( TQStringList::Iterator it=sourceFiles.begin(); it!=sourceFiles.end(); ++it ) {
TQString fn = *it;
kdDebug(9028) << "===> load file: " << fn << endl;
@@ -284,7 +284,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin
}
TQString suffix = part->url().url();
- int pos = suffix.findRev('.');
+ int pos = suffix.tqfindRev('.');
if (pos != -1)
suffix.remove(0, pos+1);
kdDebug(9028) << "AbbrevPart::findAllWords with suffix " << suffix << endl;
@@ -298,7 +298,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin
while ( (pos = rx.search(text, idx)) != -1 ) {
len = rx.matchedLength();
TQString word = text.mid(pos, len);
- if (map.find(word) == map.end()) {
+ if (map.tqfind(word) == map.end()) {
KTextEditor::CompletionEntry e;
e.text = word;
entries << e;
@@ -313,7 +313,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin
while ( (pos = rx.search(m_completionFile, idx)) != -1 ) {
len = rx.matchedLength();
TQString word = m_completionFile.mid(pos, len);
- if (map.find(word) == map.end()) {
+ if (map.tqfind(word) == map.end()) {
KTextEditor::CompletionEntry e;
e.text = word;
entries << e;
@@ -345,7 +345,7 @@ void AbbrevPart::slotExpandAbbrev()
}
TQString suffix = part->url().url();
- int pos = suffix.findRev('.');
+ int pos = suffix.tqfindRev('.');
if (pos != -1)
suffix.remove(0, pos+1);
@@ -374,7 +374,7 @@ void AbbrevPart::slotExpandAbbrev()
cursoriface->cursorPositionReal(&line, &col);
TQString linestr = editIface->textLine(line);
- int startPos = QMAX( QMIN( (int)col, (int)linestr.length()-1 ), 0 );
+ int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 );
int endPos = startPos;
startPos--;
while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') )
@@ -417,7 +417,7 @@ void AbbrevPart::insertChars( const TQString &chars )
currentCol += spaces.length();
}
- int idx = lineText.find( '|' );
+ int idx = lineText.tqfind( '|' );
if( idx != -1 ){
stream << lineText.left( idx ) << lineText.mid( idx+1 );
if( !foundPipe ){
@@ -562,7 +562,7 @@ void AbbrevPart::slotFilterInsertString( KTextEditor::CompletionEntry* entry, TQ
}
TQString suffix = part->url().url();
- int pos = suffix.findRev('.');
+ int pos = suffix.tqfindRev('.');
if (pos != -1)
suffix.remove(0, pos+1);
kdDebug(9028) << "AbbrevPart::slotFilterInsertString with suffix " << suffix << endl;
@@ -621,9 +621,9 @@ TQMap< TQString, CodeTemplate * > CodeTemplateList::operator [ ]( TQString suffi
for (TQMap<TQString, TQMap<TQString, CodeTemplate* > >::const_iterator it = templates.begin(); it != templates.end(); ++it)
{
kdDebug(9028) << "CodeTemplateList::operator [] - suffixes " << it.key() << endl;
- if (TQStringList::split(",", it.key()).contains(suffix))
+ if (TQStringList::split(",", it.key()).tqcontains(suffix))
{
- kdDebug(9028) << "CodeTemplateList::operator [] - suffixes " << it.key() << " contains " << suffix << endl;
+ kdDebug(9028) << "CodeTemplateList::operator [] - suffixes " << it.key() << " tqcontains " << suffix << endl;
TQMap<TQString, CodeTemplate* > m = it.data();
for (TQMap<TQString, CodeTemplate* >::const_iterator itt = m.begin(); itt != m.end(); ++itt)
@@ -640,18 +640,18 @@ void CodeTemplateList::insert( TQString name, TQString description, TQString cod
{
TQString origSuffixes = suffixes;
// TQStringList suffixList;
- int pos = suffixes.find('(');
+ int pos = suffixes.tqfind('(');
if (pos == -1)
return;
suffixes.remove(0, pos+1);
- pos = suffixes.find(')');
+ pos = suffixes.tqfind(')');
if (pos == -1)
return;
suffixes.remove(pos, suffixes.length()-pos);
// suffixList = TQStringList::split(",", suffixes);
CodeTemplate *t;
- if (templates.contains(suffixes) && templates[suffixes].contains(name))
+ if (templates.tqcontains(suffixes) && templates[suffixes].tqcontains(name))
{
kdDebug(9028) << "found template for suffixes " << suffixes << " and name " << name << endl;
t = templates[suffixes][name];
@@ -667,7 +667,7 @@ void CodeTemplateList::insert( TQString name, TQString description, TQString cod
t->description = description;
t->code = code;
t->suffixes = origSuffixes;
- if (!m_suffixes.contains(origSuffixes))
+ if (!m_suffixes.tqcontains(origSuffixes))
m_suffixes.append(origSuffixes);
}