rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 35dc587911
commit 0813b39aed

@ -85,10 +85,10 @@ void AddRemoveDialog::setFileList(const TQStringList& files)
{
// the dot for the root directory is hard to see, so
// we convert it to the absolut path
if( files.tqfind(".") != files.end() )
if( files.find(".") != files.end() )
{
TQStringList copy(files);
int idx = copy.tqfindIndex(".");
int idx = copy.findIndex(".");
copy[idx] = TQFileInfo(".").absFilePath();
m_listBox->insertStringList(copy);
@ -98,4 +98,4 @@ void AddRemoveDialog::setFileList(const TQStringList& files)
}
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -46,4 +46,4 @@ private:
#endif
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -180,9 +180,9 @@ void AddRepositoryDialog::repoChanged()
{
TQString repo = repository();
rsh_edit->setEnabled((!repo.startsWith(":pserver:"))
&& repo.tqcontains(":"));
m_useDifferentCompression->setEnabled(repo.tqcontains(":"));
if( !repo.tqcontains(":") )
&& repo.contains(":"));
m_useDifferentCompression->setEnabled(repo.contains(":"));
if( !repo.contains(":") )
m_compressionLevel->setEnabled(false);
else
compressionToggled(m_useDifferentCompression->isChecked());

@ -649,7 +649,7 @@ void CervisiaPart::popupRequested(KListView*, TQListViewItem* item, const TQPoin
if( isFileItem(item) )
{
// remove old 'Edit with...' menu
if( m_editWithId && popup->tqfindItem(m_editWithId) != 0 )
if( m_editWithId && popup->findItem(m_editWithId) != 0 )
{
popup->removeItem(m_editWithId);
delete m_currentEditMenu;
@ -969,7 +969,7 @@ void CervisiaPart::slotCommit()
return;
TQString msg = dlg.logMessage();
if( !recentCommits.tqcontains( msg ) )
if( !recentCommits.contains( msg ) )
{
recentCommits.prepend( msg );
while (recentCommits.count() > 50)
@ -1504,7 +1504,7 @@ void CervisiaPart::slotLastChange()
int pos, lastnumber;
bool ok;
if ( (pos = revA.tqfindRev('.')) == -1
if ( (pos = revA.findRev('.')) == -1
|| (lastnumber=revA.right(revA.length()-pos-1).toUInt(&ok), !ok) )
{
KMessageBox::sorry(widget(),
@ -1757,7 +1757,7 @@ bool CervisiaPart::openSandbox(const TQString &dirname)
KConfig *conf = config();
conf->setGroup("General");
bool dostatus = conf->readBoolEntry(repository.tqcontains(":")?
bool dostatus = conf->readBoolEntry(repository.contains(":")?
"StatusForRemoteRepos" :
"StatusForLocalRepos",
false);

@ -198,7 +198,7 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service,
TQStringList list2 = Repositories::readConfigFile();
TQStringList::ConstIterator it2;
for (it2 = list2.begin(); it2 != list2.end(); ++it2)
if (!list1.tqcontains(*it2))
if (!list1.contains(*it2))
repo_combo->insertItem(*it2);
setHelp((act == Import) ? "importing" : "checkingout");
@ -353,9 +353,9 @@ void CheckoutDialog::moduleButtonClicked()
if (str.left(12) == "Unknown host")
continue;
int pos = str.tqfind(' ');
int pos = str.find(' ');
if (pos == -1)
pos = str.tqfind('\t');
pos = str.find('\t');
if (pos == -1)
pos = str.length();
TQString module( str.left(pos).stripWhiteSpace() );
@ -398,11 +398,11 @@ void CheckoutDialog::branchButtonClicked()
if( line.isEmpty() || line[0] != '\t' )
continue;
if( (colonPos = line.tqfind(':', 1)) < 0 )
if( (colonPos = line.find(':', 1)) < 0 )
continue;
const TQString tag = line.mid(1, colonPos - 1);
if( !branchTagList.tqcontains(tag) )
if( !branchTagList.contains(tag) )
branchTagList.push_back(tag);
}

@ -185,7 +185,7 @@ void CommitDialog::setLogHistory(const TQStringList &list)
continue;
TQString txt = *it;
int index = txt.tqfind('\n', 0);
int index = txt.find('\n', 0);
if ( index != -1 ) // Fetch first line
{
txt = txt.mid(0, index);

@ -97,15 +97,15 @@ bool CvsLoginJob::execute()
kdDebug(8051) << "process output = " << line << endl;
// retrieve repository from 'Logging in to'-line
if( line.tqcontains(LOGIN_PHRASE) )
if( line.contains(LOGIN_PHRASE) )
{
repository = line.remove(0, line.tqfind(":pserver:"));
repository = line.remove(0, line.find(":pserver:"));
continue;
}
// process asks for the password
// search case insensitive as cvs and cvsnt use different capitalization
if( line.tqcontains(PASS_PHRASE, false) )
if( line.contains(PASS_PHRASE, false) )
{
kdDebug(8051) << "process waits for the password." << endl;
@ -123,7 +123,7 @@ bool CvsLoginJob::execute()
m_Proc->writeLine(password);
// wait for the result
while( !line.tqcontains(FAILURE_PHRASE) )
while( !line.contains(FAILURE_PHRASE) )
{
line = m_Proc->readLine();
if( line.isNull() )

@ -157,7 +157,7 @@ bool Repository::setWorkingCopy(const TQString& dirName)
// add identities (ssh-add) to ssh-agent
// TODO CL make sure this is called only once
if( d->location.tqcontains(":ext:", false) > 0 )
if( d->location.contains(":ext:", false) > 0 )
{
SshAgent ssh;
ssh.addSshIdentities();
@ -227,7 +227,7 @@ void Repository::Private::readConfig()
if( !config->hasGroup(repositoryGroup) )
{
// find the position of the first path separator
const int insertPos = repositoryGroup.tqfind('/');
const int insertPos = repositoryGroup.find('/');
if( insertPos > 0 )
{
// add port to location

@ -173,8 +173,8 @@ void DiffView::addLine(const TQString &line, DiffType type, int no)
// For some fonts, e.g. "Clean", is fm.maxWidth() greater than
// fmbold.maxWidth().
TQString copy(line);
const int numTabs = copy.tqcontains('\t', false);
copy.tqreplace( TQRegExp("\t"), "");
const int numTabs = copy.contains('\t', false);
copy.replace( TQRegExp("\t"), "");
const int tabSize = m_tabWidth * TQMAX(fm.maxWidth(), fmbold.maxWidth());
const int copyWidth = TQMAX(fm.width(copy), fmbold.width(copy));
@ -211,7 +211,7 @@ int DiffView::findLine(int lineno)
int offset;
DiffViewItem tmp;
tmp.no = lineno;
if ( (offset = items.tqfind(&tmp)) == -1)
if ( (offset = items.find(&tmp)) == -1)
{
kdDebug(8050) << "Internal Error: Line " << lineno << " not found" << endl;
return -1;

@ -40,7 +40,7 @@ static TQDateTime parseDate(const TQString& date, const TQString& _time, const T
{
// cvs history only prints hh:mm but parseDateISO8601 needs hh:mm:ss
TQString time(_time);
if( time.tqcontains(':') == 1 )
if( time.contains(':') == 1 )
time += ":00";
TQDateTime dateTime;

@ -62,7 +62,7 @@ LogDialog::LogDialog(KConfig& cfg, TQWidget *tqparent, const char *name)
Ok | Apply | Close | Help | User1 | User2 | User3, Close, true,
KGuiItem(i18n("&Annotate")),
KGuiItem(i18n("&Diff"), "vcs_diff"),
KGuiItem(i18n("&Find..."), "tqfind"))
KGuiItem(i18n("&Find..."), "find"))
, cvsService(0)
, partConfig(cfg)
{
@ -262,8 +262,8 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const TQString& fileName)
const TQString tag(strlist[0].simplifyWhiteSpace());
TQString branchpoint;
int pos1, pos2;
if( (pos2 = rev.tqfindRev('.')) > 0 &&
(pos1 = rev.tqfindRev('.', pos2-1)) > 0 &&
if( (pos2 = rev.findRev('.')) > 0 &&
(pos1 = rev.findRev('.', pos2-1)) > 0 &&
rev.mid(pos1+1, pos2-pos1-1) == "0" )
{
// For a branch tag 2.10.0.6, we want:
@ -303,7 +303,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const TQString& fileName)
// convert date into ISO format (YYYY-MM-DDTHH:MM:SS)
int len = strList[0].length();
TQString dateTimeStr = strList[0].right(len-6); // remove 'date: '
dateTimeStr.tqreplace('/', '-');
dateTimeStr.replace('/', '-');
TQString date = dateTimeStr.section(' ', 0, 0);
TQString time = dateTimeStr.section(' ', 1, 1);
@ -338,8 +338,8 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const TQString& fileName)
TQString branchrev;
int pos1, pos2;
// 1.60.x.y => revision belongs to branch 1.60.0.x
if( (pos2 = rev.tqfindRev('.')) > 0 &&
(pos1 = rev.tqfindRev('.', pos2-1)) > 0 )
if( (pos2 = rev.findRev('.')) > 0 &&
(pos1 = rev.findRev('.', pos2-1)) > 0 )
branchrev = rev.left(pos2);
// Build Cervisia::TagInfo for logInfo

@ -78,7 +78,7 @@ TQString LogListViewItem::truncateLine(const TQString &s)
int pos;
TQString res = s.simplifyWhiteSpace();
if ( (pos = res.tqfind('\n')) != -1 )
if ( (pos = res.find('\n')) != -1 )
res = res.left(pos) + "...";
return res;

@ -159,7 +159,7 @@ void LogMessageEdit::tryCompletion()
if( paragraphText.at(index).isSpace() )
{
if( !m_completing )
m_completionStartPos = paragraphText.tqfindRev(' ', index-1) + 1;
m_completionStartPos = paragraphText.findRev(' ', index-1) + 1;
int length = index - m_completionStartPos;
TQString word = paragraphText.mid(m_completionStartPos, length);

@ -33,7 +33,7 @@ using namespace Cervisia;
LogPlainView::LogPlainView(TQWidget* tqparent, const char* name)
: KTextBrowser(tqparent, name)
, m_tqfind(0)
, m_find(0)
, m_findPos(0)
{
setNotifyClick(false);
@ -42,7 +42,7 @@ LogPlainView::LogPlainView(TQWidget* tqparent, const char* name)
LogPlainView::~LogPlainView()
{
delete m_tqfind; m_tqfind = 0;
delete m_find; m_find = 0;
}
@ -107,11 +107,11 @@ void LogPlainView::addRevision(const LogInfo& logInfo)
void LogPlainView::searchText(int options, const TQString& pattern)
{
m_tqfind = new KFind(pattern, options, this);
m_find = new KFind(pattern, options, this);
connect(m_tqfind, TQT_SIGNAL(highlight(const TQString&, int, int)),
connect(m_find, TQT_SIGNAL(highlight(const TQString&, int, int)),
this, TQT_SLOT(searchHighlight(const TQString&, int, int)));
connect(m_tqfind, TQT_SIGNAL(findNext()),
connect(m_find, TQT_SIGNAL(findNext()),
this, TQT_SLOT(findNext()));
m_findPos = 0;
@ -140,24 +140,24 @@ void LogPlainView::findNext()
while( res == KFind::NoMatch && m_findPos < paragraphs() && m_findPos >= 0 )
{
if( m_tqfind->needData() )
if( m_find->needData() )
{
TQString richText = text(m_findPos);
// tqreplace <br/> with '\n'
richText.tqreplace(breakLineTag, "\n");
// replace <br/> with '\n'
richText.replace(breakLineTag, "\n");
// remove html tags from text
richText.tqreplace(htmlTags, "");
richText.replace(htmlTags, "");
m_tqfind->setData(richText);
m_find->setData(richText);
}
res = m_tqfind->find();
res = m_find->find();
if( res == KFind::NoMatch )
{
if( m_tqfind->options() & KFindDialog::FindBackwards )
if( m_find->options() & KFindDialog::FindBackwards )
--m_findPos;
else
++m_findPos;
@ -167,15 +167,15 @@ void LogPlainView::findNext()
// reached the end?
if( res == KFind::NoMatch )
{
if( m_tqfind->shouldRestart() )
if( m_find->shouldRestart() )
{
m_findPos = 0;
findNext();
}
else
{
delete m_tqfind;
m_tqfind = 0;
delete m_find;
m_find = 0;
}
}
}

@ -56,7 +56,7 @@ protected:
virtual void setSource(const TQString& name);
private:
KFind* m_tqfind;
KFind* m_find;
int m_findPos;
};

@ -105,8 +105,8 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
// find branch
int pos1, pos2;
if ((pos2 = rev.tqfindRev('.')) > 0 &&
(pos1 = rev.tqfindRev('.', pos2-1)) > 0)
if ((pos2 = rev.findRev('.')) > 0 &&
(pos1 = rev.findRev('.', pos2-1)) > 0)
{
// e. g. for rev = 1.1.2.3 we have
// branchrev = 1.1.2, branchpoint = 1.1

@ -95,14 +95,14 @@ static const TQStringList FetchBranchesAndTags(const TQString& searchedType,
continue;
if( (wsPos = FindWhiteSpace(line, 2)) < 0 )
continue;
if( (bracketPos = line.tqfind('(', wsPos + 1)) < 0 )
if( (bracketPos = line.find('(', wsPos + 1)) < 0 )
continue;
if( (colonPos = line.tqfind(':', bracketPos + 1)) < 0 )
if( (colonPos = line.find(':', bracketPos + 1)) < 0 )
continue;
const TQString tag = line.mid(1, wsPos - 1);
const TQString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1);
if( type == searchedType && !branchOrTagList.tqcontains(tag) )
if( type == searchedType && !branchOrTagList.contains(tag) )
branchOrTagList.push_back(tag);
}
@ -122,7 +122,7 @@ bool Cervisia::IsValidTag(const TQString& tag)
for( uint i = 1; i < tag.length(); ++i )
{
if( !isgraph(tag[i].latin1()) || prohibitedChars.tqcontains(tag[i]) )
if( !isgraph(tag[i].latin1()) || prohibitedChars.contains(tag[i]) )
return false;
}
@ -248,7 +248,7 @@ TQStringList splitLine(TQString line, char delim)
TQStringList list;
line = line.simplifyWhiteSpace();
while ((pos = line.tqfind(delim)) != -1)
while ((pos = line.find(delim)) != -1)
{
list.append(line.left(pos));
line = line.mid(pos+1, line.length()-pos-1);
@ -309,12 +309,12 @@ int compareRevisions(const TQString& rev1, const TQString& rev2)
int startPos2(0);
while (startPos1 < length1 && startPos2 < length2)
{
int pos1(rev1.tqfind('.', startPos1));
int pos1(rev1.find('.', startPos1));
if (pos1 < 0)
pos1 = length1;
const int partLength1(pos1 - startPos1);
int pos2(rev2.tqfind('.', startPos2));
int pos2(rev2.find('.', startPos2));
if (pos2 < 0)
pos2 = length2;
const int partLength2(pos2 - startPos2);

@ -252,7 +252,7 @@ void ProgressDialog::startGuiPart()
void ProgressDialog::processOutput()
{
int pos;
while( (pos = d->buffer.tqfind('\n')) != -1 )
while( (pos = d->buffer.find('\n')) != -1 )
{
TQString item = d->buffer.left(pos);
if( item.startsWith(d->errorId1) ||

@ -142,7 +142,7 @@ void ProtocolView::slotJobExited(bool normalExit, int exitStatus)
void ProtocolView::processOutput()
{
int pos;
while ( (pos = buf.tqfind('\n')) != -1)
while ( (pos = buf.find('\n')) != -1)
{
TQString line = buf.left(pos);
if (!line.isEmpty())

@ -1279,7 +1279,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
TQPainter paint( this );
if ( !contentsRect().tqcontains( updateR, TRUE ) ) {// update frame ?
if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ?
drawFrame( &paint );
if ( updateR.left() < frameWidth() ) //###
updateR.setLeft( frameWidth() );
@ -1342,7 +1342,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
matrix.translate( xPos, yPos );
paint.setWorldMatrix( matrix );
if ( testTableFlags(Tbl_clipCellPainting) ||
frameWidth() > 0 && !winR.tqcontains( cellR ) ) { //##arnt
frameWidth() > 0 && !winR.contains( cellR ) ) { //##arnt
paint.setClipRect( cellUR );
paintCell( &paint, row, col );
paint.setClipping( FALSE );
@ -1354,7 +1354,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
#else
paint.translate( xPos, yPos );
if ( testTableFlags(Tbl_clipCellPainting) ||
frameWidth() > 0 && !winR.tqcontains( cellR ) ) { //##arnt
frameWidth() > 0 && !winR.contains( cellR ) ) { //##arnt
paint.setClipRect( cellUR );
paintCell( &paint, row, col );
paint.setClipping( FALSE );

@ -59,7 +59,7 @@ static TQStringList readCvsPassFile()
{
int pos;
TQString line = stream.readLine();
if ( (pos = line.tqfind(' ')) != -1)
if ( (pos = line.find(' ')) != -1)
{
if (line[0] != '/') // old format
list.append(line.left(pos));
@ -88,7 +88,7 @@ static TQStringList readCvsntPassFile()
{
const TQString line(stream.readLine());
const int pos(line.tqfind("=A"));
const int pos(line.find("=A"));
if (pos >= 0)
list.append(line.left(pos));
}
@ -117,7 +117,7 @@ TQStringList Repositories::readConfigFile()
// Some people actually use CVSROOT, so we add it here
char *env;
if ( (env = ::getenv("CVSROOT")) != 0 && !list.tqcontains(env))
if ( (env = ::getenv("CVSROOT")) != 0 && !list.contains(env))
list.append(env);
return list;

@ -105,7 +105,7 @@ void RepositoryListItem::setRsh(const TQString& rsh)
method = "pserver";
else if( repo.startsWith(":sspi:") )
method = "sspi";
else if( repo.tqcontains(':') )
else if( repo.contains(':') )
{
method = "ext";
if( !rsh.isEmpty() )
@ -501,4 +501,4 @@ void RepositoryDialog::writeRepositoryData(RepositoryListItem* item)
#include "repositorydlg.moc"
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -75,4 +75,4 @@ private:
#endif
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -72,7 +72,7 @@ public:
return m_currentLine;
}
m_endPos = m_text.tqfind('\n', m_startPos);
m_endPos = m_text.find('\n', m_startPos);
int length = m_endPos - m_startPos + 1;
m_currentLine = m_text.mid(m_startPos, length);

@ -43,7 +43,7 @@ namespace
bool StringMatcher::match(const TQString& text) const
{
if (m_exactPatterns.tqfind(text) != m_exactPatterns.end())
if (m_exactPatterns.find(text) != m_exactPatterns.end())
{
return true;
}

@ -66,7 +66,7 @@ TQString truncateLines(const TQString& text,
const TQChar newLine('\n');
const int lineSpacing(fm.lineSpacing());
const int numberOfLines(text.tqcontains(newLine) + 1);
const int numberOfLines(text.contains(newLine) + 1);
const int maxNumberOfLines(size.height() / lineSpacing);
if (numberOfLines <= maxNumberOfLines)

@ -191,9 +191,9 @@ bool UpdateView::isUnfoldingTree() const
void UpdateView::replaceItem(TQListViewItem* oldItem,
TQListViewItem* newItem)
{
const int index(relevantSelection.tqfind(oldItem));
const int index(relevantSelection.find(oldItem));
if (index >= 0)
relevantSelection.tqreplace(index, newItem);
relevantSelection.replace(index, newItem);
}
@ -208,8 +208,8 @@ void UpdateView::unfoldSelectedFolders()
// setup name of selected folder
TQString selectedItem = selection.first();
if( selectedItem.tqcontains('/') )
selectedItem.remove(0, selectedItem.tqfindRev('/')+1);
if( selectedItem.contains('/') )
selectedItem.remove(0, selectedItem.findRev('/')+1);
// avoid flicker
const bool updatesEnabled = isUpdatesEnabled();

@ -245,7 +245,7 @@ UpdateItem* UpdateDirItem::insertItem(UpdateItem* item)
UpdateItem* UpdateDirItem::findItem(const TQString& name) const
{
const TMapItemsByName::const_iterator it = m_itemsByName.tqfind(name);
const TMapItemsByName::const_iterator it = m_itemsByName.find(name);
return (it != m_itemsByName.end()) ? *it : 0;
}
@ -288,7 +288,7 @@ TQDateTime parseDateTime(const TQString &s)
TQDate date( year, month, day );
TQTime time;
int hour, minute, second;
int pivot = s.tqfind( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) );
int pivot = s.find( TQRegExp(TQString::tqfromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) );
if ( pivot != -1 ) {
hour = s.mid( pivot, 2 ).toInt();
minute = s.mid( pivot+3, 2 ).toInt();
@ -337,7 +337,7 @@ void UpdateDirItem::syncWithEntries()
const TQString options(line.section('/', 4, 4));
entry.m_tag = line.section('/', 5, 5);
const bool isBinary(options.tqfind("-kb") >= 0);
const bool isBinary(options.find("-kb") >= 0);
// file date in local time
entry.m_dateTime = TQFileInfo(path + entry.m_name).lastModified();
@ -349,7 +349,7 @@ void UpdateDirItem::syncWithEntries()
entry.m_status = Cervisia::LocallyRemoved;
rev.remove(0, 1);
}
else if (timestamp.tqfind('+') >= 0)
else if (timestamp.find('+') >= 0)
{
entry.m_status = Cervisia::Conflict;
}

@ -103,15 +103,15 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService,
table->setText(numRows, 1, list[1]);
TQCheckTableItem* item = new TQCheckTableItem(table, "");
item->setChecked(list.tqcontains("edit"));
item->setChecked(list.contains("edit"));
table->setItem(numRows, 2, item);
item = new TQCheckTableItem(table, "");
item->setChecked(list.tqcontains("unedit"));
item->setChecked(list.contains("unedit"));
table->setItem(numRows, 3, item);
item = new TQCheckTableItem(table, "");
item->setChecked(list.tqcontains("commit"));
item->setChecked(list.contains("commit"));
table->setItem(numRows, 4, item);
++numRows;

@ -34,8 +34,8 @@ make -j$numprocs
make install-strip DESTDIR=\$RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/%{name}-master.list
tqfind . -type f -o -type l | sed 's|^\.||' >> \$RPM_BUILD_DIR/%{name}-master.list
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/%{name}-master.list
find . -type f -o -type l | sed 's|^\.||' >> \$RPM_BUILD_DIR/%{name}-master.list
%clean
rm -rf \$RPM_BUILD_DIR/%{name}-%{version}

@ -299,7 +299,7 @@ function GetFileList
if [ -d "$DIRECTORY" ];
then
# FILES=`/bin/ls -1 -I "no-exe" -I*~ $DIRECTORY`;
FILES=`cd $DIRECTORY; tqfind . ! -name "*~" -maxdepth 1 -type f -print | sed 's,^\./,,' | sort`;
FILES=`cd $DIRECTORY; find . ! -name "*~" -maxdepth 1 -type f -print | sed 's,^\./,,' | sort`;
if [ ! "$FILES" ];
then

@ -13,7 +13,7 @@
function LoadDefaults
{
# horrid hack to try and figure out what shell we are using
# basically, if we can tqfind /usr/ucb/echo, then we are almost for sure
# basically, if we can find /usr/ucb/echo, then we are almost for sure
# NOT on a Linux system and probably 'echo "\c" works. if we don't
# find it, we'll assume that the shell is really bash.
if [ -f "/usr/ucb/echo" ];

@ -207,7 +207,7 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage
if(!poInfo.encoding.isEmpty())
text += poInfo.encoding+'\n';
int lines = text.tqcontains('\n')+1;
int lines = text.contains('\n')+1;
if(lines < numLines)
{
text = poInfo.headerComment+'\n'+text;
@ -286,7 +286,7 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage
// physical newline in the file if we don't come from one
if ( !newLine )
{
int pos = text.tqfind( '\n', i );
int pos = text.find( '\n', i );
if ( pos > (int) i )
i = pos +1;
}

@ -235,10 +235,10 @@ void CatalogManager::setupActions()
// the edit menu
action = new KAction( i18n("Fi&nd in Files..."), CTRL+Key_F, TQT_TQOBJECT(this),
TQT_SLOT(tqfind()), actionCollection(), "find_in_files");
TQT_SLOT(find()), actionCollection(), "find_in_files");
action->setEnabled(false);
action = new KAction( i18n("Re&place in Files..."), CTRL+Key_R, TQT_TQOBJECT(this),
TQT_SLOT(tqreplace()), actionCollection(), "replace_in_files");
TQT_SLOT(replace()), actionCollection(), "replace_in_files");
action->setEnabled(false);
action = new KAction( i18n("&Stop Searching"), "stop", Key_Escape, TQT_TQOBJECT(this),
TQT_SLOT(stopSearching()), actionCollection(), "stop_search");
@ -928,7 +928,7 @@ void CatalogManager::slotHelp()
kapp->invokeHelp("CATALOGMANAGER","kbabel");
}
void CatalogManager::tqfind()
void CatalogManager::find()
{
if( !_findDialog ) _findDialog = new FindInFilesDialog(false,this);
@ -950,8 +950,8 @@ void CatalogManager::tqfind()
_findOptions.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::tqfind" << endl;
TQString url = _catalogManager->tqfind(_findOptions, _toBeSearched );
kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::find" << endl;
TQString url = _catalogManager->find(_findOptions, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
@ -1011,7 +1011,7 @@ void CatalogManager::tqfind()
}
}
void CatalogManager::tqreplace()
void CatalogManager::replace()
{
if( !_replaceDialog ) _replaceDialog = new FindInFilesDialog(true,this);
@ -1036,7 +1036,7 @@ void CatalogManager::tqreplace()
options.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
TQString url = _catalogManager->tqfind(options, _toBeSearched );
TQString url = _catalogManager->find(options, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )

@ -100,8 +100,8 @@ public slots:
void selectedChanged(uint actionValue);
virtual void slotHelp();
virtual void tqfind();
virtual void tqreplace();
virtual void find();
virtual void replace();
virtual void stopSearching();
virtual void optionsPreferences();
virtual void optionsShowStatusbar(bool on);

@ -1270,7 +1270,7 @@ void CatalogManagerView::showLog()
_logWindow->show();
}
TQString CatalogManagerView::tqfind( FindOptions &options, TQStringList &rest )
TQString CatalogManagerView::find( FindOptions &options, TQStringList &rest )
{
CatManListItem* i=(CatManListItem*) currentItem();
@ -1391,8 +1391,8 @@ bool CatalogManagerView::hasMatchingWords( TQStringList &itemWords, TQStringList
for( TQStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 )
for( TQStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 )
if( *it1 == *it2
|| (*it1).tqcontains(*it2)
|| (*it2).tqcontains(*it1) ) return true;
|| (*it1).contains(*it2)
|| (*it2).contains(*it1) ) return true;
return false;
}
@ -1609,11 +1609,11 @@ void CatalogManagerView::slotDirCommand(int index)
if(index>=0 && item && item->isDir())
{
TQString cmd=*(_settings.dirCommands).at(index);
cmd.tqreplace("@PACKAGE@",item->name());
cmd.tqreplace("@PODIR@",item->poFile());
cmd.tqreplace("@POTDIR@",item->potFile());
cmd.tqreplace("@POFILES@",current().join(" "));
cmd.tqreplace("@MARKEDPOFILES@",marked().join(" "));
cmd.replace("@PACKAGE@",item->name());
cmd.replace("@PODIR@",item->poFile());
cmd.replace("@POTDIR@",item->potFile());
cmd.replace("@POFILES@",current().join(" "));
cmd.replace("@MARKEDPOFILES@",marked().join(" "));
kdDebug(KBABEL_CATMAN) << cmd << endl;
@ -1641,12 +1641,12 @@ void CatalogManagerView::slotFileCommand(int index)
CatManListItem* tqparent = (CatManListItem*)item->tqparent();
TQString cmd=*(_settings.fileCommands).at(index);
cmd.tqreplace("@PACKAGE@",item->name());
cmd.tqreplace("@POFILE@",item->poFile());
cmd.tqreplace("@POTFILE@",item->potFile());
cmd.tqreplace("@PODIR@",tqparent->poFile());
cmd.tqreplace("@POTDIR@",tqparent->potFile());
cmd.tqreplace("@POEMAIL@",item->text(COL_TRANSLATOR));
cmd.replace("@PACKAGE@",item->name());
cmd.replace("@POFILE@",item->poFile());
cmd.replace("@POTFILE@",item->potFile());
cmd.replace("@PODIR@",tqparent->poFile());
cmd.replace("@POTDIR@",tqparent->potFile());
cmd.replace("@POEMAIL@",item->text(COL_TRANSLATOR));
kdDebug(KBABEL_CATMAN) << cmd << endl;
@ -1929,7 +1929,7 @@ bool CatalogManagerView::buildDir(const TQString& baseDir,const TQString& relDir
_fileList.insert(file,item);
_readInfoFileList.prepend(file);
if(_markerList.tqcontains(file))
if(_markerList.contains(file))
{
item->setMarked(true);
}
@ -2027,7 +2027,7 @@ void CatalogManagerView::updateDir(TQString relDir)
item = new CatManListItem(this, thisItem,poBaseDir+file+".po",potBaseDir+file+".pot",file);
_fileList.insert(file,item);
if(_markerList.tqcontains(file))
if(_markerList.contains(file))
{
item->setMarked(true);
}
@ -2109,7 +2109,7 @@ void CatalogManagerView::updateDir(TQString relDir)
item = new CatManListItem(this, thisItem,poBaseDir+file+".po",potBaseDir+file+".pot",file);
_fileList.insert(file,item);
if(_markerList.tqcontains(file))
if(_markerList.contains(file))
{
item->setMarked(true);
}
@ -2207,7 +2207,7 @@ void CatalogManagerView::updateDir(TQString relDir)
// if this directory has to be removed, check, if
// the tqparent directory has to be removed too
const int index=relDir.tqfindRev("/",relDir.length()-2);
const int index=relDir.findRev("/",relDir.length()-2);
if(index<0)
{
relDir="/";
@ -2271,7 +2271,7 @@ void CatalogManagerView::directoryChanged(const TQString& dir)
do
{
prevRelDir=relDir;
const int index=relDir.tqfindRev("/",relDir.length()-2);
const int index=relDir.findRev("/",relDir.length()-2);
if(index<0)
{
relDir="/";
@ -2417,7 +2417,7 @@ void CatalogManagerView::directoryDeleted(const TQString& dir)
void CatalogManagerView::fileInfoRead( TQString filename )
{
if( _readInfoFileList.tqfind( filename ) != _readInfoFileList.end() ) {
if( _readInfoFileList.find( filename ) != _readInfoFileList.end() ) {
emit progress( ++_readInfoCount);
_readInfoFileList.remove( filename );
}
@ -3129,4 +3129,4 @@ void CatalogManagerView::toggleColumn( uint column, bool show )
}
#include "catalogmanagerview.moc"
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -185,7 +185,7 @@ public slots:
void svnInfo();
void svnInfoMarked();
TQString tqfind(KBabel::FindOptions &options, TQStringList &rest);
TQString find(KBabel::FindOptions &options, TQStringList &rest);
void showLog();

@ -804,7 +804,7 @@ TQString CatManListItem::packageDir( ) const
TQString CatManListItem::name() const
{
int index = _package.tqfindRev("/");
int index = _package.findRev("/");
return _package.right(_package.length()-index-1);
}

@ -57,7 +57,7 @@ FindInFilesDialog::FindInFilesDialog(bool forReplace, TQWidget* tqparent)
_askForSave = new TQCheckBox(i18n("Save &without asking"),box);
TQWhatsThis::add(box,i18n("<qt><p><b>File Options</b></p>"
"<p>Here you can finetune where to tqfind:"
"<p>Here you can finetune where to find:"
"<ul><li><b>In all files</b>: search in all files, otherwise searched "
"is the selected file or files in the selected folder</li>"
"<li><b>Ask before next file</b>: show a dialog asking to proceed to the next file</li>"

@ -282,7 +282,7 @@ void CVSDialog::slotExecuteCommand( )
}
// Change the command line to have the real name of the temporary file
_commandLine.tqreplace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
_commandLine.replace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
// Update the list of log messages
if ( !msg.isEmpty() ) {

@ -138,7 +138,7 @@ CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const
bool isInRepository = false;
while ( !stream.atEnd() ) {
temp = stream.readLine( );
if ( temp.tqfind( rx ) == 0 ) {
if ( temp.find( rx ) == 0 ) {
isInRepository = true;
break;
}
@ -162,7 +162,7 @@ CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const
return LOCALLY_REMOVED;
// check for conflicts
if ( timestamp.tqfind( '+' ) >= 0 )
if ( timestamp.find( '+' ) >= 0 )
return CONFLICT;
// calculate the UTC time from the file's last modified date
@ -314,7 +314,7 @@ void CVSHandler::checkToAdd( const TQStringList& files )
temp = TQFileInfo( *it ).dirPath( true );
}
// check recursivlely if tqparent dirs have to be added as well
while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.tqfindIndex( temp ) == -1 ) {
while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
temp = TQFileInfo( temp ).dirPath( true );
}
@ -357,7 +357,7 @@ void CVSHandler::processStatusOutput( const TQString& status )
TQString entr = *it;
// translate the filename from repository to local
TQRegExp rx( basedir + ".*,v" );
int pos = entr.tqfind( rx );
int pos = entr.find( rx );
TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
@ -365,14 +365,14 @@ void CVSHandler::processStatusOutput( const TQString& status )
// TODO: do some markup
map.tqreplace( file, entr );
map.replace( file, entr );
}
}
void CVSHandler::processDiff( TQString output )
{
output.remove( TQRegExp( "\\[ .* \\]$" ));
output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).tqreplace("[","\\[").tqreplace("]","\\]")));
output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;

@ -261,7 +261,7 @@ void SVNDialog::slotExecuteCommand( )
}
// Change the command line to have the real name of the temporary file
_commandLine.tqreplace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
_commandLine.replace( "@LOG@FILE@", KProcess::quote( m_tempFile->name() ) );
// Update the list of log messages
if ( !msg.isEmpty() ) {
@ -397,4 +397,4 @@ void SVNDialog::saveSettings( )
#include "svndialog.moc"
// kate: space-indent on; indent-width 2; tqreplace-tabs on;
// kate: space-indent on; indent-width 2; replace-tabs on;

@ -416,7 +416,7 @@ void SVNHandler::checkToAdd( const TQStringList& files )
// ### TODO: does SVN really needs this or does it do it automatically?
// check recursivlely if tqparent dirs have to be added as well
while ( ! isInSvn( temp ) && toBeAdded.tqfindIndex( temp ) == -1 ) {
while ( ! isInSvn( temp ) && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
temp = TQFileInfo( temp ).dirPath( true );
}
@ -464,7 +464,7 @@ void SVNHandler::processStatusOutput( const TQString& status )
TQString entr = *it;
// translate the filename from repository to local
TQRegExp rx( basedir + ".*,v" );
int pos = entr.tqfind( rx );
int pos = entr.find( rx );
TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
@ -472,7 +472,7 @@ void SVNHandler::processStatusOutput( const TQString& status )
// TODO: do some markup
map.tqreplace( file, entr );
map.replace( file, entr );
}
#endif
}
@ -480,7 +480,7 @@ void SVNHandler::processStatusOutput( const TQString& status )
void SVNHandler::processDiff( TQString output )
{
output.remove( TQRegExp( "\\[ .* \\]$" ));
output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).tqreplace("[","\\[").tqreplace("]","\\]")));
output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
@ -541,4 +541,4 @@ void SVNOutputCollector::slotGatherStdout( KProcess*, char* data, int len )
#include "svnhandler.moc"
// kate: space-indent on; indent-width 2; tqreplace-tabs on;
// kate: space-indent on; indent-width 2; replace-tabs on;

@ -168,7 +168,7 @@ void ValidateProgressDialog::validate_internal()
}
TQString errortext=TQString::number(item.index+1)+": " + item.msgid.first().left(50);
errortext.tqreplace("\n"," ");
errortext.replace("\n"," ");
if( item.msgid.first().length() > 50 ) errortext+="...";
_mainWidget->_errorList->insertItem( errortext);
@ -205,7 +205,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(TQListBoxItem * item)
TQString it = item->text();
bool ok =false;
int offset = it.tqfind(":");
int offset = it.find(":");
int num;
if( offset < -1 ) num = 0;
@ -239,7 +239,7 @@ void ValidateProgressDialog::showContextMenu(TQListBoxItem * item, const TQPoint
errorItemDoubleClicked( item );
break;
case ID_ERROR_IGNORE:
IgnoreItem it = _errors.tqfind(item->text()).data();
IgnoreItem it = _errors.find(item->text()).data();
// if there is no pixmap, it's the whole file
if( !item->pixmap() )

@ -165,7 +165,7 @@ int Catalog::indexForMsgid(const TQString& id) const
int i=0;
TQValueVector<CatalogItem>::ConstIterator it = d->_entries.begin();
while(it != d->_entries.end() && !((*it).msgid(true).tqcontains(id)))
while(it != d->_entries.end() && !((*it).msgid(true).contains(id)))
{
++it;
i++;
@ -290,8 +290,8 @@ bool Catalog::setHeader(CatalogItem newHeader)
{
// normalize the values - ensure every key:value pair is only on a single line
TQString values = newHeader.msgstr().first();
values.tqreplace ("\n", "");
values.tqreplace ("\\n", "\\n\n");
values.replace ("\n", "");
values.replace ("\\n", "\\n\n");
kdDebug () << "Normalized header: " << values << endl;
@ -343,7 +343,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *Last-Translator:.*")))
if((*it).contains(TQRegExp("^ *Last-Translator:.*")))
{
(*it) = temp;
found=true;
@ -363,7 +363,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *PO-Revision-Date:.*")))
if((*it).contains(TQRegExp("^ *PO-Revision-Date:.*")))
{
(*it) = temp;
found=true;
@ -380,11 +380,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
temp="Project-Id-Version: "+saveOptions.projectString+"\\n";
temp.tqreplace( "@PACKAGE@", packageName());
temp.replace( "@PACKAGE@", packageName());
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *Project-Id-Version:.*")))
if((*it).contains(TQRegExp("^ *Project-Id-Version:.*")))
{
(*it) = temp;
found=true;
@ -408,7 +408,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *Language-Team:.*")))
if((*it).contains(TQRegExp("^ *Language-Team:.*")))
{
(*it) = temp;
found=true;
@ -440,7 +440,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it = headerList.begin();
while( it != headerList.end() )
{
if( (*it).tqfind( TQRegExp( "^ *Content-Type:.*" ) ) != -1 )
if( (*it).find( TQRegExp( "^ *Content-Type:.*" ) ) != -1 )
{
if ( found )
{
@ -483,7 +483,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *Content-Transfer-Encoding:.*")))
if((*it).contains(TQRegExp("^ *Content-Transfer-Encoding:.*")))
{
(*it) = temp;
found=true;
@ -502,7 +502,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *X-Generator:.*")))
if((*it).contains(TQRegExp("^ *X-Generator:.*")))
{
(*it) = temp;
found=true;
@ -519,7 +519,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *MIME-Version:")))
if((*it).contains(TQRegExp("^ *MIME-Version:")))
{
(*it) = temp;
found=true;
@ -541,7 +541,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
for( it = headerList.begin(); it != headerList.end(); ++it )
{
if((*it).tqcontains(TQRegExp("^ *Plural-Forms:")))
if((*it).contains(TQRegExp("^ *Plural-Forms:")))
{
(*it) = temp;
found=true;
@ -564,7 +564,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = commentList.begin(); it != commentList.end(); ++it )
{
// U+00A9 is the Copyright sign
if ( (*it).tqfind( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
{
found=true;
break;
@ -572,21 +572,21 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
}
if(found)
{
if ( (*it).tqfind( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
{
//template string
if( saveOptions.FSFCopyright == ProjectSettingsBase::Remove)
(*it).remove(" YEAR Free Software Foundation, Inc");
else
(*it).tqreplace("YEAR", TQDate::tqcurrentDate().toString("yyyy"));
(*it).replace("YEAR", TQDate::tqcurrentDate().toString("yyyy"));
} else
if( saveOptions.FSFCopyright == ProjectSettingsBase::Update )
{
//update years
TQString cy = TQDate::tqcurrentDate().toString("yyyy");
if( !(*it).tqcontains( TQRegExp(cy)) ) // is the year already included?
if( !(*it).contains( TQRegExp(cy)) ) // is the year already included?
{
int index = (*it).tqfindRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
int index = (*it).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if( index == -1 )
{
KMessageBox::information(0,i18n("Free Software Foundation Copyright does not contain any year. "
@ -603,14 +603,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
&& ( !saveOptions.descriptionString.isEmpty() ) )
{
temp = "# "+saveOptions.descriptionString;
temp.tqreplace( "@PACKAGE@", packageName());
temp.tqreplace( "@LANGUAGE@", identityOptions.languageName);
temp.replace( "@PACKAGE@", packageName());
temp.replace( "@LANGUAGE@", identityOptions.languageName);
temp = temp.stripWhiteSpace();
// The description strings has often buggy variants already in the file, these must be removed
TQString regexpstr = "^#\\s+" + TQRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$";
regexpstr.tqreplace( "@PACKAGE@", ".*" );
regexpstr.tqreplace( "@LANGUAGE@", ".*" );
regexpstr.replace( "@PACKAGE@", ".*" );
regexpstr.replace( "@LANGUAGE@", ".*" );
//kdDebug() << "REGEXPSTR: " << regexpstr << endl;
TQRegExp regexp ( regexpstr );
@ -683,11 +683,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
while ( it != commentList.end() )
{
bool deleteItem = false;
if ( (*it).tqfind ( "copyright", 0, false ) != -1 )
if ( (*it).find ( "copyright", 0, false ) != -1 )
{
// We have a line with a copyright. It should not be moved.
}
else if ( (*it).tqfind ( regexpYearAlone ) != -1 )
else if ( (*it).find ( regexpYearAlone ) != -1 )
{
// We have found a year number that is preceeded by a comma.
// That is typical of KBabel 1.10 (and earlier?) when there is neither an author name nor an email
@ -699,9 +699,9 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
// Typical placeholder, remove it.
deleteItem = true;
}
else if ( (*it).tqfind ( regexpAuthorYear ) != -1 ) // email address followed by year
else if ( (*it).find ( regexpAuthorYear ) != -1 ) // email address followed by year
{
if ( foundAuthors.tqfind( (*it) ) == foundAuthors.end() )
if ( foundAuthors.find( (*it) ) == foundAuthors.end() )
{
// The author line is new (and not a duplicate), so add it to the author line list
foundAuthors.append( (*it) );
@ -726,12 +726,12 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
ait = foundAuthors.end();
for( it = foundAuthors.begin() ; it!=foundAuthors.end(); ++it )
{
if ( (*it).tqfind( TQRegExp(
if ( (*it).find( TQRegExp(
TQRegExp::escape( identityOptions.authorName )+".*"
+ TQRegExp::escape( identityOptions.authorEmail ) ) ) != -1 )
{
foundAuthor = true;
if( (*it).tqfind( cy ) != -1 )
if( (*it).find( cy ) != -1 )
found = true;
else
ait = it;
@ -744,7 +744,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
else if ( ait != foundAuthors.end() )
{
//update years
const int index = (*ait).tqfindRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
const int index = (*ait).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if ( index == -1 )
(*ait)+=", "+cy;
else
@ -760,7 +760,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it=commentList.end();
do
--it;
while( ( it != commentList.begin() ) && ( (*it).tqfind( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
while( ( it != commentList.begin() ) && ( (*it).find( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
++it;
for( ait = foundAuthors.begin() ; ait != foundAuthors.end() ; ++ait )
{
@ -838,7 +838,7 @@ TQString Catalog::packageName() const
TQString package=d->_url.fileName();
int index=package.tqfind(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
int index=package.find(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
if(index>0)
package=package.left(index);
@ -848,7 +848,7 @@ TQString Catalog::packageName() const
void Catalog::setPackage(const TQString& package )
{
const int pos = package.tqfindRev( '/' );
const int pos = package.findRev( '/' );
if( pos < 0 )
{
d->_packageDir = TQString();
@ -1095,7 +1095,7 @@ ConversiontqStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, co
Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors)
{
if( !d->_mimeTypes.tqcontains( "application/x-gettext" ) )
if( !d->_mimeTypes.contains( "application/x-gettext" ) )
return Msgfmt::Unsupported;
TQString filename;
@ -1128,10 +1128,10 @@ Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors)
const TQStringList lines = TQStringList::split("\n",output);
for ( TQStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it )
{
if( (*it).tqfind(TQRegExp("^.+:\\d+:")) >= 0 )
if( (*it).find(TQRegExp("^.+:\\d+:")) >= 0 )
{
const int begin=(*it).tqfind(":",0)+1;
const int end=(*it).tqfind(":",begin);
const int begin=(*it).find(":",0)+1;
const int end=(*it).find(":",begin);
const TQString line=(*it).mid(begin,end-begin);
@ -1148,7 +1148,7 @@ Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors)
continue;
}
if( !d->_errorIndex.tqcontains(currentIndex) )
if( !d->_errorIndex.contains(currentIndex) )
{
d->_errorIndex.append(currentIndex);
d->_entries[currentIndex].setSyntaxError(true);
@ -1177,7 +1177,7 @@ void Catalog::clearErrorList()
void Catalog::removeFromErrorList(uint index)
{
if(d->_errorIndex.tqcontains(index))
if(d->_errorIndex.contains(index))
{
d->_errorIndex.remove(index);
d->_entries[index].setSyntaxError(false);
@ -1241,7 +1241,7 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors)
{
if( !tool->run( "validate", (void*)(&(*it)), "CatalogItem", "application/x-kbabel-catalogitem" ))
{
if( !d->_errorIndex.tqcontains(index) )
if( !d->_errorIndex.contains(index) )
{
d->_errorIndex.append(index);
hasErrors=true;
@ -1461,7 +1461,7 @@ bool Catalog::isUntranslated(uint index) const
bool Catalog::hasError(uint index, DocPosition& pos) const
{
if( d->_errorIndex.tqcontains(index) )
if( d->_errorIndex.contains(index) )
{
pos.item=index;
pos.form=0;
@ -1541,7 +1541,7 @@ int Catalog::prevError(uint startIndex, DocPosition& pos) const
void Catalog::registerView(CatalogView* view)
{
if(d->_views.tqcontainsRef(view)==0)
if(d->_views.containsRef(view)==0)
{
d->_views.append(view);
}
@ -1734,7 +1734,7 @@ int Catalog::findNextInList(const TQValueList<uint>& list,uint index) const
int nextIndex=-1;
// find index in List
it=list.tqfind(index);
it=list.find(index);
// if the given index is found in the list and not the last entry
// in the list, return the next listentry
@ -1765,7 +1765,7 @@ int Catalog::findPrevInList(const TQValueList<uint>& list,uint index) const
int prevIndex=-1;
it=list.tqfind(index);
it=list.find(index);
// if the given index is found in the list and not the last entry
// in the list, return the next listentry
@ -1831,49 +1831,49 @@ TQString Catalog::dateTime() const
const TQTime time = dt.time();
// the year
dateTimeString.tqreplace( "%Y", TQString::number( date.year() ) );
dateTimeString.tqreplace( "%y", TQString::number( date.year() ).right(2) );
dateTimeString.replace( "%Y", TQString::number( date.year() ) );
dateTimeString.replace( "%y", TQString::number( date.year() ).right(2) );
// the month
if(date.month()<10)
{
dateTimeString.tqreplace( "%m", "0"+TQString::number( date.month() ) );
dateTimeString.replace( "%m", "0"+TQString::number( date.month() ) );
}
else
{
dateTimeString.tqreplace( "%m", TQString::number( date.month() ) );
dateTimeString.replace( "%m", TQString::number( date.month() ) );
}
dateTimeString.tqreplace( "%f", TQString::number( date.month() ) );
dateTimeString.replace( "%f", TQString::number( date.month() ) );
dateTimeString.tqreplace( "%b", date.longMonthName(date.month()) );
dateTimeString.tqreplace( "%h", date.longMonthName(date.month()) );
dateTimeString.replace( "%b", date.longMonthName(date.month()) );
dateTimeString.replace( "%h", date.longMonthName(date.month()) );
// the day
dateTimeString.tqreplace( "%j", TQString::number( date.dayOfYear() ) );
dateTimeString.tqreplace( "%e", TQString::number( date.day() ) );
dateTimeString.replace( "%j", TQString::number( date.dayOfYear() ) );
dateTimeString.replace( "%e", TQString::number( date.day() ) );
if(date.day() < 10)
{
dateTimeString.tqreplace( "%d", "0"+TQString::number( date.day() ) );
dateTimeString.replace( "%d", "0"+TQString::number( date.day() ) );
}
else
{
dateTimeString.tqreplace( "%d", TQString::number( date.day() ) );
dateTimeString.replace( "%d", TQString::number( date.day() ) );
}
dateTimeString.tqreplace( "%a", date.longDayName( date.dayOfWeek() ) );
dateTimeString.replace( "%a", date.longDayName( date.dayOfWeek() ) );
// hour
dateTimeString.tqreplace( "%k", TQString::number( time.hour() ) );
dateTimeString.replace( "%k", TQString::number( time.hour() ) );
if(time.hour() < 10)
{
dateTimeString.tqreplace( "%H", "0"+TQString::number( time.hour() ) );
dateTimeString.replace( "%H", "0"+TQString::number( time.hour() ) );
}
else
{
dateTimeString.tqreplace( "%H", TQString::number( time.hour() ) );
dateTimeString.replace( "%H", TQString::number( time.hour() ) );
}
TQString zone; // AM or PM
@ -1888,46 +1888,46 @@ TQString Catalog::dateTime() const
zone="AM";
}
dateTimeString.tqreplace( "%I", TQString::number( hour ) );
dateTimeString.replace( "%I", TQString::number( hour ) );
if(hour < 10)
{
dateTimeString.tqreplace( "%i", "0"+TQString::number( hour ) );
dateTimeString.replace( "%i", "0"+TQString::number( hour ) );
}
else
{
dateTimeString.tqreplace( "%i", TQString::number( hour ) );
dateTimeString.replace( "%i", TQString::number( hour ) );
}
dateTimeString.tqreplace( "%p", zone );
dateTimeString.replace( "%p", zone );
// minutes
if(time.minute() < 10)
{
dateTimeString.tqreplace( "%M", "0"+TQString::number( time.minute() ) );
dateTimeString.replace( "%M", "0"+TQString::number( time.minute() ) );
}
else
{
dateTimeString.tqreplace( "%M", TQString::number( time.minute() ) );
dateTimeString.replace( "%M", TQString::number( time.minute() ) );
}
// seconds
if(time.second() < 10)
{
dateTimeString.tqreplace( "%S", "0"+TQString::number( time.second() ) );
dateTimeString.replace( "%S", "0"+TQString::number( time.second() ) );
}
else
{
dateTimeString.tqreplace( "%S", TQString::number( time.second() ) );
dateTimeString.replace( "%S", TQString::number( time.second() ) );
}
// timezone
dateTimeString.tqreplace( "%Z", d->_project->identitySettings().timeZone );
dateTimeString.replace( "%Z", d->_project->identitySettings().timeZone );
TQTime t;
const int offset = KRFCDate::localUTCOffset();
const int correction = offset < 0 ? -60 : 60;
t = t.addSecs( offset * correction );
dateTimeString.tqreplace( "%z", ( offset < 0 ? "-" : "+" ) + t.toString("hhmm") );
dateTimeString.replace( "%z", ( offset < 0 ? "-" : "+" ) + t.toString("hhmm") );
break;
}
}
@ -2179,72 +2179,72 @@ PoInfo Catalog::headerInfo(const CatalogItem headerItem)
// extract information from the header
for(it=header.begin();it!=header.end();++it)
{
if((*it).tqcontains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
if((*it).contains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
{
info.project=(*it).tqreplace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
info.project=(*it).replace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
if(info.project.right(2)=="\\n")
info.project.remove(info.project.length()-2,2);
info.project=info.project.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
else if((*it).contains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
{
info.creation=(*it).tqreplace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
info.creation=(*it).replace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
if(info.creation.right(2)=="\\n")
info.creation.remove(info.creation.length()-2,2);
info.creation=info.creation.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
else if((*it).contains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
{
info.revision=(*it).tqreplace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
info.revision=(*it).replace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
if(info.revision.right(2)=="\\n")
info.revision.remove(info.revision.length()-2,2);
info.revision=info.revision.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
else if((*it).contains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
{
info.lastTranslator=(*it).tqreplace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
info.lastTranslator=(*it).replace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
if(info.lastTranslator.right(2)=="\\n")
info.lastTranslator.remove(info.lastTranslator.length()-2,2);
info.lastTranslator=info.lastTranslator.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
else if((*it).contains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
{
info.languageTeam=(*it).tqreplace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),"");
info.languageTeam=(*it).replace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),"");
if(info.languageTeam.right(2)=="\\n")
info.languageTeam.remove(info.languageTeam.length()-2,2);
info.languageTeam=info.languageTeam.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
else if((*it).contains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
{
info.mimeVersion=(*it).tqreplace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
info.mimeVersion=(*it).replace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
if(info.mimeVersion.right(2)=="\\n")
info.mimeVersion.remove(info.mimeVersion.length()-2,2);
info.mimeVersion=info.mimeVersion.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
else if((*it).contains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
{
info.contentType=(*it).tqreplace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),"");
info.contentType=(*it).replace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),"");
if(info.contentType.right(2)=="\\n")
info.contentType.remove(info.contentType.length()-2,2);
info.contentType=info.contentType.simplifyWhiteSpace();
}
else if((*it).tqcontains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
else if((*it).contains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
{
info.encoding=(*it).tqreplace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
info.encoding=(*it).replace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
if(info.encoding.right(2)=="\\n")
info.encoding.remove(info.encoding.length()-2,2);
@ -2590,9 +2590,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
}
if(findOpts->ignoreAccelMarker
&& targetStr.tqcontains(miscOptions.accelMarker))
&& targetStr.contains(miscOptions.accelMarker))
{
accelMarkerPos = targetStr.tqfind(miscOptions.accelMarker);
accelMarkerPos = targetStr.find(miscOptions.accelMarker);
targetStr.remove(accelMarkerPos,1);
if(docPos.offset > (uint)accelMarkerPos)
@ -2605,7 +2605,7 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@ -2617,13 +2617,13 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
else {
if( (pos=targetStr.tqfind(searchStr,docPos.offset,findOpts->caseSensitive)) >= 0 ) {
if( (pos=targetStr.find(searchStr,docPos.offset,findOpts->caseSensitive)) >= 0 ) {
len=searchStr.length();
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@ -2839,9 +2839,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
if(findOpts->ignoreAccelMarker
&& targetStr.tqcontains(miscOptions.accelMarker))
&& targetStr.contains(miscOptions.accelMarker))
{
accelMarkerPos = targetStr.tqfind(miscOptions.accelMarker);
accelMarkerPos = targetStr.find(miscOptions.accelMarker);
targetStr.remove(accelMarkerPos,1);
if(docPos.offset > (uint)accelMarkerPos)
@ -2854,7 +2854,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
else if( findOpts->isRegExp ) {
/*
don't work!?
if((pos=targetStr.tqfindRev(regexp,docPos.offset)) >= 0 ) {
if((pos=targetStr.findRev(regexp,docPos.offset)) >= 0 ) {
regexp.match(targetStr,pos,&len); // to get the length of the string
*/
bool found=false;
@ -2871,7 +2871,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@ -2882,13 +2882,13 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
}
else if( (pos=targetStr.tqfindRev(searchStr,docPos.offset-1,findOpts->caseSensitive)) >= 0
else if( (pos=targetStr.findRev(searchStr,docPos.offset-1,findOpts->caseSensitive)) >= 0
&& (uint)pos < docPos.offset) {
len=searchStr.length();
if(findOpts->wholeWords) {
TQString pre=targetStr.mid(pos-1,1);
TQString post=targetStr.mid(pos+len,1);
if(!pre.tqcontains(TQRegExp("[a-zA-Z0-9]")) && !post.tqcontains(TQRegExp("[a-zA-Z0-9]")) ){
if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@ -3071,8 +3071,8 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
// then look if the same msgid is contained in the diff file
// FIXME: should care about plural forms in msgid
TQString id = msgid(entry).first();
id.tqreplace( "\n","");
if(d->msgidDiffList.tqcontains(id))
id.replace( "\n","");
if(d->msgidDiffList.contains(id))
{
// FIXME:: should care about plural forms in msgid
*result = msgid(entry).first();
@ -3091,8 +3091,8 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
// then look if there are entries with the same translation
kdWarning() << "Diff feature (2) does not work with plural forms" << endl;
TQString str = msgstr(entry).first();
str.tqreplace("\n","");
if(d->msgstr2MsgidDiffList.tqcontains(str))
str.replace("\n","");
if(d->msgstr2MsgidDiffList.contains(str))
{
TQStringList list = d->msgstr2MsgidDiffList[str];
@ -3193,7 +3193,7 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
TQString r = wordDiff(idForDiff,id);
//esp for plural forms
*result = r.tqreplace("\\n<KBABELADD>" + TQString(TQChar(0x00B6)) + "</KBABELADD>", "\\n\n");
*result = r.replace("\\n<KBABELADD>" + TQString(TQChar(0x00B6)) + "</KBABELADD>", "\\n\n");
s = new TQString(*result);
if( !d->diffCache.insert(entry,s) )
@ -3236,14 +3236,14 @@ void Catalog::setDiffList( const TQValueList<DiffEntry>& list)
}
TQString id = (*it).msgid;
id.tqreplace("\n","");
id.replace("\n","");
TQString str = (*it).msgstr;
str.tqreplace("\n","");
str.replace("\n","");
d->msgidDiffList.append(id);
if(!str.isEmpty())
{
if(d->msgstr2MsgidDiffList.tqcontains(str))
if(d->msgstr2MsgidDiffList.contains(str))
{
TQStringList sl = d->msgstr2MsgidDiffList[str];
sl.append(id);
@ -3506,4 +3506,4 @@ void Catalog::wordCount (uint &total, uint &fuzzy, uint &untranslated) const
#include "catalog.moc"
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -75,7 +75,7 @@ TQString CatalogItem::msgctxt(const bool noNewlines) const
if( noNewlines )
{
TQString tmp = d->_msgctxt;
tmp.tqreplace("\n", " "); // ### TODO: " " or "" ?
tmp.replace("\n", " "); // ### TODO: " " or "" ?
return tmp;
}
else
@ -207,29 +207,29 @@ TQStringList CatalogItem::argList( RegExpExtractor& te)
bool CatalogItem::isFuzzy() const
{
return d->_comment.tqfind( TQRegExp(",\\s*fuzzy") ) != -1;
return d->_comment.find( TQRegExp(",\\s*fuzzy") ) != -1;
}
bool CatalogItem::isCformat() const
{
// Allow "possible-c-format" (from xgettext --debug) or "c-format"
// Note the regexp (?: ) is similar to () but it does not capture (so it is faster)
return d->_comment.tqfind( TQRegExp(",\\s*(?:possible-)c-format") ) == -1;
return d->_comment.find( TQRegExp(",\\s*(?:possible-)c-format") ) == -1;
}
bool CatalogItem::isNoCformat() const
{
return d->_comment.tqfind( TQRegExp(",\\s*no-c-format") ) == -1;
return d->_comment.find( TQRegExp(",\\s*no-c-format") ) == -1;
}
bool CatalogItem::isTQtformat() const
{
return d->_comment.tqfind( TQRegExp(",\\s*qt-format") ) == -1;
return d->_comment.find( TQRegExp(",\\s*qt-format") ) == -1;
}
bool CatalogItem::isNoTQtformat() const
{
return d->_comment.tqfind( TQRegExp(",\\s*no-qt-format") ) == -1;
return d->_comment.find( TQRegExp(",\\s*no-qt-format") ) == -1;
}
bool CatalogItem::isUntranslated() const
@ -252,23 +252,23 @@ int CatalogItem::totalLines() const
int lines=0;
if(!d->_comment.isEmpty())
{
lines = d->_comment.tqcontains('\n')+1;
lines = d->_comment.contains('\n')+1;
}
int msgctxtLines=0;
if(!d->_msgctxt.isEmpty())
{
msgctxtLines=d->_msgctxt.tqcontains('\n')+1;
msgctxtLines=d->_msgctxt.contains('\n')+1;
}
int msgidLines=0;
TQStringList::ConstIterator it;
for(it=d->_msgid.begin(); it != d->_msgid.end(); ++it)
{
msgidLines += (*it).tqcontains('\n')+1;
msgidLines += (*it).contains('\n')+1;
}
int msgstrLines=0;
for(it=d->_msgstr.begin(); it != d->_msgstr.end(); ++it)
{
msgstrLines += (*it).tqcontains('\n')+1;
msgstrLines += (*it).contains('\n')+1;
}
if(msgctxtLines>1)
@ -286,7 +286,7 @@ int CatalogItem::totalLines() const
void CatalogItem::setSyntaxError(bool on)
{
if(on && !d->_errors.tqcontains("syntax error"))
if(on && !d->_errors.contains("syntax error"))
d->_errors.append("syntax error");
else
d->_errors.remove("syntax error");
@ -305,7 +305,7 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
TQRegExp fuzzyStr(",\\s*fuzzy");
int offset;
offset=comment.tqfind(fuzzyStr);
offset=comment.find(fuzzyStr);
while(offset>=0)
{
cmd = new DelTextCmd(offset,fuzzyStr.cap(),0);
@ -314,11 +314,11 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,fuzzyStr.cap().length());
offset=comment.tqfind(fuzzyStr,offset+1);
offset=comment.find(fuzzyStr,offset+1);
}
// remove empty comment lines
if( comment.tqcontains( TQRegExp("^#\\s*$") ))
if( comment.contains( TQRegExp("^#\\s*$") ))
{
cmd = new DelTextCmd(0,comment,0);
cmd->setPart(Comment);
@ -326,9 +326,9 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment="";
}
if( comment.tqcontains( TQRegExp("\n#\\s*$") ))
if( comment.contains( TQRegExp("\n#\\s*$") ))
{
offset=comment.tqfind( TQRegExp("\n#\\s*$") );
offset=comment.find( TQRegExp("\n#\\s*$") );
while(offset>=0)
{
cmd = new DelTextCmd(offset,comment.mid(offset),0);
@ -337,15 +337,15 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,comment.length()-offset);
offset=comment.tqfind( TQRegExp("\n#\\s*$"), offset+1 );
offset=comment.find( TQRegExp("\n#\\s*$"), offset+1 );
}
}
if( comment.tqcontains( TQRegExp("\n#\\s*\n") ))
if( comment.contains( TQRegExp("\n#\\s*\n") ))
{
offset=comment.tqfind( TQRegExp("\n#\\s*\n") )+1;
offset=comment.find( TQRegExp("\n#\\s*\n") )+1;
while(offset>=0)
{
int endIndex=comment.tqfind("\n",offset)+1;
int endIndex=comment.find("\n",offset)+1;
cmd = new DelTextCmd(offset,comment.mid(offset,endIndex-offset),0);
cmd->setPart(Comment);
@ -353,7 +353,7 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,endIndex-offset);
offset=comment.tqfind( TQRegExp("\n#\\s*\n"), offset+1 );
offset=comment.find( TQRegExp("\n#\\s*\n"), offset+1 );
}
}
@ -499,7 +499,7 @@ void CatalogItem::clearErrors()
void CatalogItem::appendError(const TQString& error )
{
if( !d->_errors.tqcontains( error ) )
if( !d->_errors.contains( error ) )
d->_errors.append(error);
}
@ -518,4 +518,4 @@ void CatalogItem::setProject( Project::Ptr project )
d->_project = project;
}
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -59,7 +59,7 @@ TQString KBabel::charsetString(const TQTextCodec *codec)
if ( encodingStr.startsWith("CP " ) )
encodingStr.remove( 2, 1 );
else if ( encodingStr.startsWith("IBM " ) )
encodingStr.tqreplace( "IBM ", "CP" );
encodingStr.replace( "IBM ", "CP" );
return encodingStr;
}
else
@ -192,7 +192,7 @@ TQString Defaults::Identity::authorEmail()
TQString Defaults::Identity::mailingList()
{
TQString lang=Defaults::Identity::languageCode();
int temp=lang.tqfind("_");
int temp=lang.find("_");
lang=lang.left(temp);
return lang+"@li.org";
}

@ -81,7 +81,7 @@ typedef enum
inline TQString LCSprinter::getString()
{
return resultString.join("").tqreplace(TQChar('\n'), ""); //w/o replace we'd get whole line colored
return resultString.join("").replace(TQChar('\n'), ""); //w/o replace we'd get whole line colored
}
#endif // DIFF_H

@ -68,7 +68,7 @@ bool DelTextCmd::merge( EditCommand* other)
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
DelTextCmd* o = (DelTextCmd*) other;
if ( offset + int(str.length()) == o->offset && !str.tqcontains(TQRegExp("^\\s$")) )
if ( offset + int(str.length()) == o->offset && !str.contains(TQRegExp("^\\s$")) )
{
o->str.prepend( str );
o->offset = offset;
@ -95,7 +95,7 @@ bool InsTextCmd::merge( EditCommand* other)
if ( o->index()==index() && o->part() == part()
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
if ( offset == o->offset + int(o->str.length()) && !str.tqcontains(TQRegExp("^\\s$")) )
if ( offset == o->offset + int(o->str.length()) && !str.contains(TQRegExp("^\\s$")) )
{
o->str += str;
return true;

@ -199,7 +199,7 @@ TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName,
// actually reside in one of its subdirectories. Else they are stored
// without relative path.
TQString poArchFileName = url.path();
if (_poBaseDir.isEmpty( ) || poArchFileName.tqfind(_poBaseDir) != 0)
if (_poBaseDir.isEmpty( ) || poArchFileName.find(_poBaseDir) != 0)
poArchFileName = TQFileInfo( poArchFileName ).fileName();
else
poArchFileName.remove( TQRegExp( "^" + TQRegExp::escape( _poBaseDir ) + "/?" ) );

@ -80,7 +80,7 @@ Msgfmt::tqStatus Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu)
}
else if(proc.normalExit())
{
if( proc.exitStatus() || _output.tqcontains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
@ -109,7 +109,7 @@ Msgfmt::tqStatus Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString&
_output="";
proc << "IFS='\n'; msgfmt --statistics -o /dev/null "
"$(tqfind" << KProcess::quote(dir) << "-name" << KProcess::quote(regexp) << ")";
"$(find" << KProcess::quote(dir) << "-name" << KProcess::quote(regexp) << ")";
if(!proc.start(KProcess::Block,KProcess::Stderr))
{
@ -117,7 +117,7 @@ Msgfmt::tqStatus Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString&
}
else if(proc.normalExit())
{
if( proc.exitStatus() || _output.tqcontains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else

@ -209,7 +209,7 @@ bool PoInfo::cacheFind(const TQString url, PoInfo& info)
cacheRead();
}
poInfoCacheItem *item = _poInfoCache.tqfind( url );
poInfoCacheItem *item = _poInfoCache.find( url );
if( item ) {
TQFileInfo fi( url );
@ -297,7 +297,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
{
bool knownKey=false;
// We search for the : character, which is the separator between key and value
const int res=(*it).tqfind(':');
const int res=(*it).find(':');
if (res>=0)
{
knownKey=true; // We know most keys, if not it will be changed to false in the "else" case
@ -415,7 +415,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
success=OK;
if( temp.comment().tqcontains("\n#~") ) continue; // skip obsolete
if( temp.comment().contains("\n#~") ) continue; // skip obsolete
if( temp.msgid().first().isEmpty()) //header
{
@ -453,7 +453,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
TQString w = sl.first();
sl.pop_front();
if( !wordList.tqcontains(w) ) wordList.append( w );
if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.msgstr().join(" " ).simplifyWhiteSpace().lower();
sl = TQStringList::split( ' ', st );
@ -461,7 +461,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
TQString w = sl.first();
sl.pop_front();
if( !wordList.tqcontains(w) ) wordList.append( w );
if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.comment().simplifyWhiteSpace().lower();
sl = TQStringList::split( ' ', st );
@ -469,7 +469,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList
{
TQString w = sl.first();
sl.pop_front();
if( !wordList.tqcontains(w) ) wordList.append( w );
if( !wordList.contains(w) ) wordList.append( w );
}
}
}
@ -560,15 +560,15 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.isRegExp )
pos=regexp.search(text, 0 );
else
pos=text.tqfind(searchStr,0,options.caseSensitive);
pos=text.find(searchStr,0,options.caseSensitive);
if( pos >= 0)
{
if( options.wholeWords) {
len = searchStr.length();
TQString pre = text.mid(pos-1,1);
TQString post = text.mid(pos+len,1);
if( !pre.tqcontains( TQRegExp("[a-zA-Z0-9]")) &&
!post.tqcontains( TQRegExp("[a-zA-Z0-9]") )
if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
!post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@ -601,7 +601,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.ignoreAccelMarker )
{
pos = text.tqfind( options.accelMarker );
pos = text.find( options.accelMarker );
if( pos >= 0 )
text.remove( pos, 1 );
}
@ -609,7 +609,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.isRegExp )
pos=regexp.search(text, 0 );
else
pos=text.tqfind(searchStr,0,options.caseSensitive);
pos=text.find(searchStr,0,options.caseSensitive);
if( pos >= 0)
{
@ -617,8 +617,8 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
len = searchStr.length();
TQString pre = text.mid(pos-1,1);
TQString post = text.mid(pos+len,1);
if( !pre.tqcontains( TQRegExp("[a-zA-Z0-9]")) &&
!post.tqcontains( TQRegExp("[a-zA-Z0-9]") )
if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
!post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@ -758,7 +758,7 @@ ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer,
{
TQStringList msgstrs = item.msgstr();
TQString s = TQString::fromUtf8(lexer->YYText());
while( lexer->lastToken == T_MSGSTR && s.tqcontains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
while( lexer->lastToken == T_MSGSTR && s.contains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
it = msgstrs.fromLast();
@ -778,4 +778,4 @@ ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer,
return OK;
}
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -140,7 +140,7 @@ TQString RegExpExtractor::plainString(bool keepPos)
{
s+=' ';
}
tmp.tqreplace(ti->index,len,s);
tmp.replace(ti->index,len,s);
}
if(!keepPos)
@ -151,18 +151,18 @@ TQString RegExpExtractor::plainString(bool keepPos)
return tmp;
}
TQString RegExpExtractor::matchesReplaced(const TQString& tqreplace)
TQString RegExpExtractor::matchesReplaced(const TQString& replace)
{
TQString tmp=_string;
int posCorrection=0;
int replaceLen=tqreplace.length();
int replaceLen=replace.length();
MatchedEntryInfo *ti;
for(ti=_matches.first(); ti != 0; ti=_matches.next())
{
uint len=ti->extracted.length();
tmp.tqreplace(ti->index + posCorrection,len,tqreplace);
tmp.replace(ti->index + posCorrection,len,replace);
posCorrection+=(replaceLen-len);
}
@ -213,7 +213,7 @@ void RegExpExtractor::processString()
{
s+=' ';
}
tmp.tqreplace(pos,tag.length(),s);
tmp.replace(pos,tag.length(),s);
break;
}

@ -125,7 +125,7 @@ public:
/**
* @return the string, where matches are replaced with the given string
*/
TQString matchesReplaced(const TQString& tqreplace);
TQString matchesReplaced(const TQString& replace);
//Functions that allow user to define his own regexps.

@ -41,7 +41,7 @@ const int Distance::editCost_replace_base = 1;
const int HammingDistance::editCost = 1;
const int LevenshteinDistance::editCost_tqreplace = 1;
const int LevenshteinDistance::editCost_replace = 1;
const int LevenshteinDistance::editCost_insert = 1;
const int LevenshteinDistance::editCost_delete = 1;

@ -114,8 +114,8 @@ class LevenshteinDistance : public Distance
{
protected:
virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost_tqreplace; }
static const int editCost_tqreplace;
int editCostReplace() { return editCost_replace; }
static const int editCost_replace;
static const int editCost_insert;
static const int editCost_delete;
};

@ -160,14 +160,14 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
if ( !poDir.isEmpty() )
{
pref.tqreplace( "@POFILEDIR@", poDir );
pref.replace( "@POFILEDIR@", poDir );
}
else if ( pref.tqfind( "@POFILEDIR@ " ) != -1 )
else if ( pref.find( "@POFILEDIR@ " ) != -1 )
continue; // No need to keep this path pattern, as we have no PO file dir
pref.tqreplace( "@PACKAGEDIR@", packageDir);
pref.tqreplace( "@PACKAGE@", packageName);
pref.tqreplace( "@CODEROOT@", _project->settings()->codeRoot());
pref.replace( "@PACKAGEDIR@", packageDir);
pref.replace( "@PACKAGE@", packageName);
pref.replace( "@CODEROOT@", _project->settings()->codeRoot());
prefixes.append(pref);
}
@ -191,7 +191,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
ref.line = re.cap(2).toInt();
ref.path = re.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
ref.path.tqreplace( TQChar( '\\' ), TQChar( '/' ) );
ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@ -223,7 +223,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
ref.line = res.cap(2).toInt();
ref.path = res.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
ref.path.tqreplace( TQChar( '\\' ), TQChar( '/' ) );
ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@ -240,7 +240,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
for ( TQStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 )
{
TQString path = (*it1);
path.tqreplace( "@COMMENTPATH@", fileName);
path.replace( "@COMMENTPATH@", fileName);
//kdDebug() << "CONTEXT PATH: " << path << endl; // DEBUG
TQFileInfo pathInfo( path );
@ -302,4 +302,4 @@ void SourceContext::setProject( KBabel::Project::Ptr project )
#include "context.moc"
// kate: space-indent on; indent-width 4; tqreplace-tabs on;
// kate: space-indent on; indent-width 4; replace-tabs on;

@ -99,7 +99,7 @@ FindDialog::FindDialog(bool forReplace, TQWidget* tqparent)
}
else {
setCaption(i18n("Find"));
setButtonOK(KGuiItem(i18n("&Find"),"tqfind"));
setButtonOK(KGuiItem(i18n("&Find"),"find"));
_replaceLabel=0;
_replaceCombo=0;
@ -502,7 +502,7 @@ void FindDialog::saveSettings()
void FindDialog::inButtonsClicked(int id)
{
// check if at least one button is checked
if(! _buttonGrp->tqfind(id)->isOn() ) {
if(! _buttonGrp->find(id)->isOn() ) {
if(!_inMsgstr->isOn() && !_inComment->isOn() ) {
if(_inMsgid->isEnabled()) {
if( !_inMsgid->isOn() ) {
@ -541,7 +541,7 @@ ReplaceDialog::ReplaceDialog(TQWidget* tqparent)
TQLabel *label = new TQLabel(i18n("Replace this string?"),page);
tqlayout->addWidget(label);
connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(tqreplace()));
connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(replace()));
connect(this,TQT_SIGNAL(user2Clicked()),this,TQT_SIGNAL(next()));
connect(this,TQT_SIGNAL(user3Clicked()),this,TQT_SIGNAL(replaceAll()));
}

@ -129,7 +129,7 @@ public:
~ReplaceDialog();
signals:
void tqreplace();
void replace();
void replaceAll();
void next();

@ -770,7 +770,7 @@ TQString MiscPreferences::contextInfo() const
void MiscPreferences::setContextInfo(TQString reg)
{
reg.tqreplace("\n","\\n");
reg.replace("\n","\\n");
contextInfoEdit->setText(reg);
}
@ -939,7 +939,7 @@ CatmanPreferences::CatmanPreferences(TQWidget* tqparent)
_indexButton = new TQCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" );
TQWhatsThis::add( _indexButton , i18n("<qt><p><b>Create index for file contents</b></p>\n"
"<p>If you check this, KBabel will create an index for each PO file to speed up the tqfind/replace functions.</p>\n"
"<p>If you check this, KBabel will create an index for each PO file to speed up the find/replace functions.</p>\n"
"<p>NOTE: This will slow down updating the file information considerably.</p></qt>") );
m_msgfmtButton = new TQCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" );

@ -60,8 +60,8 @@ ProjectWizard::ProjectWizard(TQWidget *tqparent,const char *name)
{
// we need untranslated entries here, because of Translation Robot!
TQString entry = (*it);
const int i = entry.tqfind('_');
entry.tqreplace(0, i, entry.left(i).lower());
const int i = entry.find('_');
entry.replace(0, i, entry.left(i).lower());
all_languages.setGroup(entry);
entry = all_languages.readEntryUntranslated("Name");
if( ! entry.isEmpty() )

@ -292,7 +292,7 @@ void RoughTransDlg::translate()
if( catalog->pluralForm(i) == NoPluralForm )
{
TQString origTrans = catalog->msgstr(i).first();
if(msg.tqfind("_: NAME OF TRANSLATORS\\n")==0)
if(msg.find("_: NAME OF TRANSLATORS\\n")==0)
{
TQString authorName;
if( !catalog->identitySettings().authorLocalizedName.isEmpty() )
@ -302,24 +302,24 @@ void RoughTransDlg::translate()
authorName = catalog->identitySettings().authorName;
else continue; // there is no name to be inserted
if( !TQStringList::split(',', origTrans).tqcontains(authorName) )
if( !TQStringList::split(',', origTrans).contains(authorName) )
{
if(origTrans.isEmpty() ) translation=authorName;
else translation+=origTrans+","+authorName;
}
}
else if(msg.tqfind("_: EMAIL OF TRANSLATORS\\n")==0)
else if(msg.find("_: EMAIL OF TRANSLATORS\\n")==0)
{
// skip, if email is not specified in settings
if( catalog->identitySettings().authorEmail.isEmpty() ) continue;
if( !TQStringList::split(',', origTrans).tqcontains(catalog->identitySettings().authorEmail) )
if( !TQStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
{
if(origTrans.isEmpty() ) translation=catalog->identitySettings().authorEmail;
else translation=origTrans+","+catalog->identitySettings().authorEmail;
}
}
else if (msg.tqfind("ROLES_OF_TRANSLATORS") == 0)
else if (msg.find("ROLES_OF_TRANSLATORS") == 0)
{
TQString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
"<surname></surname>\n<affiliation><address><email>" +
@ -327,10 +327,10 @@ void RoughTransDlg::translate()
"</affiliation><contrib></contrib></othercredit>";
if (origTrans.isEmpty( ))
translation = temp;
else if (origTrans.tqfind(catalog->identitySettings( ).authorEmail) < 0)
else if (origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
translation = origTrans + "\n" + temp;
}
else if (msg.tqfind("CREDIT_FOR_TRANSLATORS") == 0)
else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0)
{
TQString authorName;
if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( ))
@ -341,8 +341,8 @@ void RoughTransDlg::translate()
catalog->identitySettings( ).authorEmail + "</email></para>";
if (origTrans.isEmpty( ))
translation = temp;
else if (origTrans.tqfind(authorName) < 0 &&
origTrans.tqfind(catalog->identitySettings( ).authorEmail) < 0)
else if (origTrans.find(authorName) < 0 &&
origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
translation = origTrans + "\n" + temp;
}
}
@ -350,8 +350,8 @@ void RoughTransDlg::translate()
else // not kdeSpecific
{
// skip KDE specific texts
if( msg.tqfind("_: EMAIL OF TRANSLATORS\\n")==0 || msg.tqfind("_: NAME OF TRANSLATORS\\n")==0 ||
msg.tqfind("ROLES_OF_TRANSLATORS")==0 || msg.tqfind("CREDIT_FOR_TRANSLATORS")==0)
if( msg.find("_: EMAIL OF TRANSLATORS\\n")==0 || msg.find("_: NAME OF TRANSLATORS\\n")==0 ||
msg.find("ROLES_OF_TRANSLATORS")==0 || msg.find("CREDIT_FOR_TRANSLATORS")==0)
continue;
}
@ -364,9 +364,9 @@ void RoughTransDlg::translate()
totalTried++;
if(msg.tqcontains(contextReg))
if(msg.contains(contextReg))
{
msg.tqreplace(contextReg,"");
msg.replace(contextReg,"");
}
// try exact translation
@ -442,7 +442,7 @@ void RoughTransDlg::translate()
TQStringList wordList;
TQChar accel;
TQString endingPunctuation;
int pos = msg.tqfindRev(endPunctReg);
int pos = msg.findRev(endPunctReg);
if(pos >= 0)
{
endingPunctuation = msg.right(msg.length()-pos);
@ -475,7 +475,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty() )
{
if(!word.tqcontains(digitReg))
if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@ -483,7 +483,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty())
{
if(!word.tqcontains(digitReg))
if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@ -500,7 +500,7 @@ void RoughTransDlg::translate()
{
if(msg[index+1]=='n' && msg[index+2].isSpace())
{
if(!word.isEmpty() && !word.tqcontains(digitReg))
if(!word.isEmpty() && !word.contains(digitReg))
wordList.append(word);
word=TQString();
@ -510,7 +510,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty() )
{
if(!word.tqcontains(digitReg))
if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@ -518,7 +518,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty())
{
if(!word.tqcontains(digitReg))
if(!word.contains(digitReg))
wordList.append(word);
word=TQString();
@ -526,7 +526,7 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty())
{
if(!word.tqcontains(digitReg)) {
if(!word.contains(digitReg)) {
wordList.append(word);
}
@ -582,7 +582,7 @@ void RoughTransDlg::translate()
// try to set the correct keyboard accelerator
if(!accel.isNull())
{
int index = translation.tqfind(accel,0,false);
int index = translation.find(accel,0,false);
if(index >= 0)
{
translation.insert(index,accelMarker);
@ -717,7 +717,7 @@ void RoughTransDlg::msgButtonClicked(int id)
if(!transButton->isChecked() && !untransButton->isChecked()
&& !fuzzyButton->isChecked())
{
TQButton *button = whatBox->tqfind(id);
TQButton *button = whatBox->find(id);
if(button == transButton)
{
transButton->setChecked(true);

@ -69,7 +69,7 @@ TQPtrList<KAction> ToolAction::dataToolActionList( const TQValueList<KDataToolIn
TQStringList::ConstIterator sit = shortcuts.begin();
for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit)
{
if( !excludeCommand == command.tqcontains(*cit) )
if( !excludeCommand == command.contains(*cit) )
{
TQString sc=*sit;
@ -96,7 +96,7 @@ TQValueList<KDataToolInfo> ToolAction::validationTools()
for( TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry )
{
if( (*entry).commands().tqcontains("validate") )
if( (*entry).commands().contains("validate") )
{
result.append( *entry );
}

@ -63,7 +63,7 @@ void ToolSelectionWidget::loadTools( const TQStringList &commands,
TQStringList::ConstIterator cit = toolCommands.begin();
for (; uit != userCommands.end() && cit != toolCommands.end(); ++uit, ++cit )
{
if( commands.tqcontains(*cit) )
if( commands.contains(*cit) )
{
availableListBox()->insertItem( *uit );
}
@ -78,8 +78,8 @@ void ToolSelectionWidget::setSelectedTools( const TQStringList& tools )
TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
TQString uic=*(*entry).userCommands().at((*entry).commands().tqfindIndex("validate"));
if( tools.tqcontains((*entry).service()->library()) )
TQString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate"));
if( tools.contains((*entry).service()->library()) )
selectedListBox()->insertItem( uic );
else
availableListBox()->insertItem( uic );
@ -96,7 +96,7 @@ TQStringList ToolSelectionWidget::selectedTools()
TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
if( usedNames.tqcontains(*((*entry).userCommands().at((*entry).commands().tqfindIndex("validate")))) )
if( usedNames.contains(*((*entry).userCommands().at((*entry).commands().findIndex("validate")))) )
result += (*entry).service()->library();
}
return result;

@ -97,8 +97,8 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString&
{
// FIXME: this should care about plural forms in msgid
TQString lineid=item->msgid().first();
lineid.tqreplace( _context, "");
lineid.tqreplace(TQRegExp("\\n"),"");
lineid.replace( _context, "");
lineid.replace(TQRegExp("\\n"),"");
lineid.simplifyWhiteSpace();
TQString regStr(_marker);
regStr+="[^\\s]";
@ -110,12 +110,12 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString&
TQString linestr=(*form);
linestr.simplifyWhiteSpace();
int n = lineid.tqcontains(reg);
int n = lineid.contains(reg);
if( _marker == '&' )
n = n - lineid.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
int m = linestr.tqcontains(reg);
n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
int m = linestr.contains(reg);
if( _marker == '&' )
m = m - linestr.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
hasError = hasError || ( n<=1 && m != n);
}
}

@ -110,46 +110,46 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( line.startsWith("_n:" ))
{
// truncate text after first \n to get args only once
line = line.mid(0,line.tqfind("\\n"));
line = line.mid(0,line.find("\\n"));
}
}
line.tqreplace(_context, "");
line.tqreplace(TQRegExp("\\n"),"");
line.replace(_context, "");
line.replace(TQRegExp("\\n"),"");
line.simplifyWhiteSpace();
// flag, for GNU only we can allow reordering
bool non_gnu = (item->pluralForm() == KDESpecific);
int index=line.tqfind(TQRegExp("%."));
int index=line.find(TQRegExp("%."));
while(index>=0)
{
int endIndex=line.tqfind(TQRegExp("[^\\d]"),index+1);
int endIndex=line.find(TQRegExp("[^\\d]"),index+1);
if(endIndex<0)
{
endIndex=line.length();
}
else if( formatChars.tqcontains(line[endIndex]) )
else if( formatChars.contains(line[endIndex]) )
{
endIndex++;
}
if(endIndex - index > 1 ) {
TQString arg = line.mid(index,endIndex-index);
if( arg.tqcontains( TQRegExp("\\d") ) ) {
if( arg.contains( TQRegExp("\\d") ) ) {
non_gnu = true;
}
argList.append(arg);
}
index=line.tqfind(TQRegExp("%."),endIndex);
index=line.find(TQRegExp("%."),endIndex);
}
if( item->pluralForm()==KDESpecific)
{
// FIXME: this is KDE specific
if( _checkPlurals && line.startsWith("_n:" ) && !argList.tqcontains("%n") )
if( _checkPlurals && line.startsWith("_n:" ) && !argList.contains("%n") )
{
argList.append("%n");
}
@ -180,7 +180,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
line=(*i);
line.tqreplace(TQRegExp("\\n"),"");
line.replace(TQRegExp("\\n"),"");
TQRegExp argdesc(
"%((["+formatChars+"])"
@ -196,7 +196,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( index == -1 ) break;
// do not add a redundant argument, if it is non GNU
if( !non_gnu || !foundArgs.tqcontains( argdesc.cap(0) ) )
if( !non_gnu || !foundArgs.contains( argdesc.cap(0) ) )
foundArgs.append( argdesc.cap( 0 ) );
} while( true );
@ -205,7 +205,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( non_gnu ) {
for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
if( argList.tqfind( *it ) == argList.end() ) {
if( argList.find( *it ) == argList.end() ) {
hasError = true;
break;
} else {
@ -227,7 +227,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
*oit = TQString();
} else {
// try to strip replacement
int index = (*it).tqfind( '$' );
int index = (*it).find( '$' );
if( index == -1 ) {
// there is no replacement, this is wrong
hasError = true;

@ -92,8 +92,8 @@ bool ContextTool::run( const TQString& command, void* data, const TQString& data
bool hasError = false;
if(!item->isUntranslated() && item->msgid().first().tqcontains(_context)
&& item->msgstr().first().tqcontains(_context) )
if(!item->isUntranslated() && item->msgid().first().contains(_context)
&& item->msgstr().first().contains(_context) )
{
hasError = true;
}

@ -86,12 +86,12 @@ bool EquationsTool::run( const TQString& command, void* data, const TQString& da
bool hasError = false;
if(!item->isUntranslated() && !item->msgid().first().tqcontains('\n')
&& item->msgid().first().tqcontains(_equation))
if(!item->isUntranslated() && !item->msgid().first().contains('\n')
&& item->msgid().first().contains(_equation))
{
int index = item->msgid().first().tqfind('=');
int index = item->msgid().first().find('=');
TQString left = item->msgid().first().left(index);
index = item->msgstr().first().tqfind('=');
index = item->msgstr().first().find('=');
if(left != item->msgstr().first().left(index))
hasError = true;
}

@ -104,7 +104,7 @@ bool LengthTool::run( const TQString& command, void* data, const TQString& datat
if( item->pluralForm() == KDESpecific ) {
str = TQStringList::split( "\\n", item->msgstr().first(), true );
id = TQStringList::split( "\\n",
item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true );
item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
@ -113,12 +113,12 @@ bool LengthTool::run( const TQString& command, void* data, const TQString& datat
//Check for translations that are too short or too long
//This may not be totally correct but we check both
//the singular and plural forms against each translated plural.
//FIXME: tqreplace 10% check with configurable setting or a statistical
//FIXME: replace 10% check with configurable setting or a statistical
//based expected length relationship
int idlen, strlen;
for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
TQString iditem = (*i);
idlen = iditem.tqreplace( TQRegExp(_context),"").length();
idlen = iditem.replace( TQRegExp(_context),"").length();
for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
TQString stritem = (*j);
strlen = stritem.length();

@ -101,13 +101,13 @@ bool NotTranslatedTool::run( const TQString& command, void* data, const TQString
if( item->pluralForm() == KDESpecific ) {
str = TQStringList::split( "\\n", item->msgstr().first(), true );
id = TQStringList::split( "\\n",
item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true );
item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
TQString id_str = (*i).tqreplace( TQRegExp(_context), "");
TQString id_str = (*i).replace( TQRegExp(_context), "");
for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
TQString str_str = (*j);
hasError = hasError || ( id_str == str_str );

@ -102,11 +102,11 @@ bool PluralsTool::run( const TQString& command, void* data, const TQString& data
if(!item->isUntranslated() && item->pluralForm() == KDESpecific )
{
if(_neededForms <= 0 || item->msgstr().first().tqcontains(_plurals))
if(_neededForms <= 0 || item->msgstr().first().contains(_plurals))
{
hasError = true;
}
else if( item->msgstr().first().tqcontains(TQString("\\n"))+1 != _neededForms )
else if( item->msgstr().first().contains(TQString("\\n"))+1 != _neededForms )
{
hasError = true;
}

@ -92,7 +92,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString&
// lookup punctuation in original text
TQRegExp punc("[\\.!\\?:]+$");
int i = lineid.tqfind(punc);
int i = lineid.find(punc);
TQString t("");
@ -102,7 +102,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString&
{
// check, that both plural forms contain the same punctuation
TQString pl = *(item->msgid().at(1));
int j = pl.tqfind(punc);
int j = pl.find(punc);
TQString tp("");
if( j != -1 ) tp = pl.right(pl.length()-j);
@ -122,7 +122,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString&
{
TQString linestr=(*form);
int j = linestr.tqfind(punc);
int j = linestr.find(punc);
// there is no punctuation in original, but one in the translation
if( i == -1 && j != i )

@ -104,27 +104,27 @@ bool WhitespaceTool::run( const TQString& command, void* data, const TQString& d
if( item->pluralForm() == KDESpecific ) {
str = TQStringList::split( "\\n", item->msgstr().first(), true );
id = TQStringList::split( "\\n",
item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true );
item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
//Strip equations
id.first().tqreplace( TQRegExp(_equation), "");
str.first().tqreplace( TQRegExp(_equation), "");
id.first().replace( TQRegExp(_equation), "");
str.first().replace( TQRegExp(_equation), "");
//Ignore Messages with blank msgid components
for( TQStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) {
TQString resultstring = (*it);
hasIdError = hasIdError || resultstring.tqcontains(_whitespace);
hasIdError = hasIdError || resultstring.contains(_whitespace);
}
if( hasIdError ) return true;
//Check each TQString in the List is not whitespace
for( TQStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) {
TQString resultstring = (*it);
hasStrError = hasStrError || resultstring.tqcontains(_whitespace);
hasStrError = hasStrError || resultstring.contains(_whitespace);
}
}

@ -94,12 +94,12 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype
uint correctnessLevel = 0;
TQString msgid = item->msgid().first();
msgid.tqreplace( "\\\"", "\"" ); // Change '\"' to '"'
msgid.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
msgid.tqreplace( _context, "" );
msgid.tqreplace("\n",""); // delete newlines
msgid.replace( "\\\"", "\"" ); // Change '\"' to '"'
msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
msgid.replace( _context, "" );
msgid.replace("\n",""); // delete newlines
if( _levelCache.tqcontains(msgid) )
if( _levelCache.contains(msgid) )
{
correctnessLevel = _levelCache[msgid];
}
@ -134,8 +134,8 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype
for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ )
{
TQString text=(*form);
text.tqreplace( "\\\"", "\"" ); // Change '\"' to '"'
text.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
text.replace( "\\\"", "\"" ); // Change '\"' to '"'
text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
// isNonCaseWithoutCommonCompliant can fail
// even though higher level checks works
@ -189,16 +189,16 @@ bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text)
TQDomDocument doc;
TQString test = text.lower();
TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" );
test.tqreplace( rx, "" );
test.replace( rx, "" );
TQString a;
do
{
a = test;
test.tqreplace( TQRegExp("<[^_:A-Za-z/]"), "" );
test.replace( TQRegExp("<[^_:A-Za-z/]"), "" );
} while( a!=test);
test.tqreplace( TQRegExp("<$"), "" );
test.replace( TQRegExp("<$"), "" );
return doc.setContent("<para>" + test + "</para>" );
}

@ -211,7 +211,7 @@ void GettextExportPlugin::writeComment( TQTextStream& stream, const TQString& co
int pos = 0;
for(;;)
{
const int newpos = comment.tqfind( '\n', pos, false );
const int newpos = comment.find( '\n', pos, false );
if ( newpos == pos )
{
++pos;
@ -305,7 +305,7 @@ void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& ke
realText.remove( '\n' );
bool needFirstEmptyLine = false;
if ( realText.tqfind( "\\n" ) != -1 )
if ( realText.find( "\\n" ) != -1 )
{
// We have more than one (logical) line, so write the extra empty line
needFirstEmptyLine = true;
@ -340,7 +340,7 @@ void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& ke
// Be sure that at least two useful characters are written, even if the wrap width is too small
availableWidth = 2;
}
const int newlinePos = realText.tqfind ( "\\n", pos );
const int newlinePos = realText.find ( "\\n", pos );
if ( ( newlinePos >= 0 ) && ( newlinePos - pos + 2 < availableWidth ) )
{
// The newline is near than the maximum available numbers of characters

@ -1,4 +1,4 @@
// kate: space-indent on; indent-width 3; tqreplace-tabs on;
// kate: space-indent on; indent-width 3; replace-tabs on;
/* ****************************************************************************
This file is part of KBabel
@ -163,7 +163,7 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
}
// check if header seems to indicate docbook content generated by xml2pot
const bool docbookContent = (tempHeader.msgstr().tqfind("application/x-xml2pot") != tempHeader.msgstr().end());
const bool docbookContent = (tempHeader.msgstr().find("application/x-xml2pot") != tempHeader.msgstr().end());
// now parse the rest of the file
uint counter=0;
@ -200,7 +200,7 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
appendCatalogItem(tempCatItem);
// check if first comment seems to indicate a docbook source file
if(counter==0)
docbookFile = ( tempCatItem.comment().tqfind(".docbook") != -1 );
docbookFile = ( tempCatItem.comment().find(".docbook") != -1 );
}
}
else if(success==RECOVERED_PARSE_ERROR)
@ -439,7 +439,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
part=Comment;
_comment=line;
}
else if(line.tqfind(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
@ -449,7 +449,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
_msgctxt=line;
seenMsgctxt=true;
}
else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1)
else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
@ -460,7 +460,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
@ -494,7 +494,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
_comment+=("\n"+line);
}
else if(line.tqfind(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
@ -504,7 +504,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
_msgctxt=line;
seenMsgctxt=true;
}
else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1)
else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
@ -515,7 +515,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
@ -539,7 +539,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
if(line.isEmpty())
continue;
else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1)
else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^\""));
@ -551,7 +551,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
else
_msgctxt+=("\n"+line);
}
else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1)
else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
@ -562,7 +562,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
@ -586,7 +586,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
if(line.isEmpty())
continue;
else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1)
else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^\""));
@ -604,7 +604,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
else
(*it)+=("\n"+line);
}
else if(line.tqfind(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1)
else if(line.find(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
@ -616,7 +616,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
_msgid.append(line);
}
// one of the quotation marks is missing
else if(line.tqfind(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
else if(line.find(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
@ -631,7 +631,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
recoverableError=true;
}
else if(!_gettextPluralForm
&& (line.tqfind(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
&& (line.find(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
@ -642,7 +642,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*msgstrIt)=line;
}
else if(!_gettextPluralForm
&& line.tqfind(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
&& line.find(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
{
part=Msgstr;
@ -656,7 +656,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
recoverableError=true;
}
else if( _gettextPluralForm
&& (line.tqfind(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
&& (line.find(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
@ -667,7 +667,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*msgstrIt)=line;
}
else if( _gettextPluralForm
&& (line.tqfind(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
&& (line.find(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
{
part=Msgstr;
@ -694,7 +694,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
break;
}
// a line of the msgid with a missing quotation mark
else if(line.tqfind(TQRegExp("^\"?.+\\n?\"?$")) != -1)
else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
@ -726,7 +726,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
if(line.isEmpty())
continue;
// another line of the msgstr
else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1)
else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^\""));
@ -738,7 +738,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
(*msgstrIt)+=("\n"+line);
}
else if( _gettextPluralForm
&& (line.tqfind(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
&& (line.find(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\"?"));
@ -747,7 +747,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
msgstrIt=_msgstr.append(line);
}
else if( _gettextPluralForm
&& (line.tqfind(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
&& (line.find(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
{
// remove quotes at beginning and the end of the lines
line.remove(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?"));
@ -758,7 +758,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
if(!line.isEmpty())
recoverableError=true;
}
else if((line.tqfind(TQRegExp("^\\s*msgid")) != -1) || (line.tqfind(TQRegExp("^\\s*#")) != -1))
else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1))
{
// We have read successfully one entry, so end loop.
stream.tqdevice()->at(pos);// reset position in stream to beginning of this line
@ -771,7 +771,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
break;
}
// another line of the msgstr with a missing quotation mark
else if(line.tqfind(TQRegExp("^\"?.+\\n?\"?$")) != -1)
else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;

@ -123,17 +123,17 @@ const TQString LinguistExportPlugin::extractComment( TQDomDocument& doc, const T
* writing the comment for Linguist
*/
int pos = comment.tqfind("#, fuzzy");
int pos = comment.find("#, fuzzy");
if ( pos >= 0) {
fuzzy = true;
comment.remove("#, fuzzy");
}
TQString newContext;
pos = comment.tqfind( '\n' );
pos = comment.find( '\n' );
if ( pos >= 0 ) {
newContext = comment.left( pos );
comment.tqreplace( 0, pos + 1, "" ); // ### TODO: use TQString::remove
comment.replace( 0, pos + 1, "" ); // ### TODO: use TQString::remove
} else {
newContext = comment;
comment = ""; // ### TODO: use TQString() instead of ""

@ -1,4 +1,4 @@
// kate: space-indent on; indent-width 2; tqreplace-tabs on;
// kate: space-indent on; indent-width 2; replace-tabs on;
/* ****************************************************************************
This file is part of KBabel

@ -1,4 +1,4 @@
// kate: space-indent on; indent-width 2; tqreplace-tabs on;
// kate: space-indent on; indent-width 2; replace-tabs on;
/* ****************************************************************************
This file is part of KBabel

@ -106,15 +106,15 @@ void ContextView::updateView()
if(!temp.isEmpty())
{
temp = TQStyleSheet::convertFromPlainText(temp);
temp.tqreplace(TQRegExp("^<p>"),"");
temp.tqreplace(TQRegExp("</p>$"),"");
temp.replace(TQRegExp("^<p>"),"");
temp.replace(TQRegExp("</p>$"),"");
entry += "<i>"+temp+"</i><br/>";
}
// FIXME: should care about plural forms
temp = TQStyleSheet::convertFromPlainText(_catalog->msgid(i).first());
temp.tqreplace(TQRegExp("^<p>"),"");
temp.tqreplace(TQRegExp("</p>$"),"");
temp.replace(TQRegExp("^<p>"),"");
temp.replace(TQRegExp("</p>$"),"");
entry += temp + "<br/>---<br/>";
TQStringList tempList = _catalog->msgstr(i);
@ -141,8 +141,8 @@ void ContextView::updateView()
}
}
temp = TQStyleSheet::convertFromPlainText(temp);
temp.tqreplace(TQRegExp("^<p>"),"");
temp.tqreplace(TQRegExp("</p>$"),"");
temp.replace(TQRegExp("^<p>"),"");
temp.replace(TQRegExp("</p>$"),"");
entry += temp+"<br/>";
}

@ -437,10 +437,10 @@ void KBabelMW::setupActions()
action = KStdAction::copy(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalCopy()), actionCollection());
action = KStdAction::paste(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalPaste()), actionCollection());
action = KStdAction::selectAll(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalSelectAll()), actionCollection());
action = KStdAction::find(TQT_TQOBJECT(m_view), TQT_SLOT(tqfind()), actionCollection());
action = KStdAction::find(TQT_TQOBJECT(m_view), TQT_SLOT(find()), actionCollection());
action = KStdAction::findNext(TQT_TQOBJECT(m_view), TQT_SLOT(findNext()), actionCollection());
action = KStdAction::findPrev(TQT_TQOBJECT(m_view), TQT_SLOT(findPrev()), actionCollection());
action = KStdAction::replace(TQT_TQOBJECT(m_view), TQT_SLOT(tqreplace()), actionCollection());
action = KStdAction::replace(TQT_TQOBJECT(m_view), TQT_SLOT(replace()), actionCollection());
action = KStdAction::clear( TQT_TQOBJECT(m_view), TQT_SLOT(clear()), actionCollection(), "clear" );

@ -931,7 +931,7 @@ void KBabelView::setupAutoCheckTools()
TQValueList<KDataToolInfo>::Iterator it;
for( it=tools.begin(); it!=tools.end() ; ++it )
{
if(KBabelSettings::autoCheckTools().tqcontains((*it).service()->library()) )
if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) )
{
// maybe we can reuse the tools
KDataTool* t = (*it).createTool();
@ -2331,7 +2331,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
}
void KBabelView::tqfind()
void KBabelView::find()
{
Part hadFocus;
if(msgidLabel->hasFocus())
@ -2425,7 +2425,7 @@ void KBabelView::tqfind()
}
}
void KBabelView::tqreplace()
void KBabelView::replace()
{
_replacesTotal=0;
_replaceLen=0;
@ -2518,7 +2518,7 @@ void KBabelView::tqreplace()
if(success) {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
@ -2749,7 +2749,7 @@ void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions opti
else {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
@ -2803,37 +2803,37 @@ void KBabelView::msgid2msgstr()
TQString text = _catalog->msgid(_currentIndex).first();
// this is KDE specific:
if(text.tqfind("_: NAME OF TRANSLATORS\\n")==0)
if(text.find("_: NAME OF TRANSLATORS\\n")==0)
{
text=_catalog->identitySettings().authorLocalizedName;
}
else if(text.tqfind("_: EMAIL OF TRANSLATORS\\n")==0)
else if(text.find("_: EMAIL OF TRANSLATORS\\n")==0)
{
text=_catalog->identitySettings().authorEmail;
}
else if(_catalog->isGeneratedFromDocbook() && text.tqfind("ROLES_OF_TRANSLATORS")==0)
else if(_catalog->isGeneratedFromDocbook() && text.find("ROLES_OF_TRANSLATORS")==0)
{
text="<othercredit role=\\\"translator\\\">\n"
"<firstname></firstname><surname></surname>\n"
"<affiliation><address><email>"+_catalog->identitySettings().authorEmail+"</email></address>\n"
"</affiliation><contrib></contrib></othercredit>";
}
else if(_catalog->isGeneratedFromDocbook() && text.tqfind("CREDIT_FOR_TRANSLATORS")==0)
else if(_catalog->isGeneratedFromDocbook() && text.find("CREDIT_FOR_TRANSLATORS")==0)
{
text="<para>"+_catalog->identitySettings().authorLocalizedName+"\n"+
"<email>"+_catalog->identitySettings().authorEmail+"</email></para>";
}
else if(text.tqcontains(_catalog->miscSettings().singularPlural))
else if(text.contains(_catalog->miscSettings().singularPlural))
{
text.tqreplace(_catalog->miscSettings().singularPlural,"");
text.replace(_catalog->miscSettings().singularPlural,"");
}
// end of KDE specific part
TQRegExp reg=_catalog->miscSettings().contextInfo;
if(text.tqcontains(reg))
if(text.contains(reg))
{
text.tqreplace(reg,"");
text.replace(reg,"");
}
modifyMsgstrText(0,text,true);
@ -3204,9 +3204,9 @@ void KBabelView::startSearch(bool delay)
{
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.tqcontains(reg))
if(msg.contains(reg))
{
msg.tqreplace(reg,"");
msg.replace(reg,"");
}
dictBox->setActiveModule(KBabelSettings::defaultModule());
@ -3225,9 +3225,9 @@ void KBabelView::startSearch(const TQString module)
// FIXME: should care about plural forms
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.tqcontains(reg))
if(msg.contains(reg))
{
msg.tqreplace(reg,"");
msg.replace(reg,"");
}
dictBox->setActiveModule(module);
@ -3258,9 +3258,9 @@ void KBabelView::startSelectionSearch(const TQString module)
// should care about plural forms
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.tqcontains(reg))
if(msg.contains(reg))
{
msg.tqreplace(reg,"");
msg.replace(reg,"");
}
dictBox->startSearch(msg);
@ -3302,7 +3302,7 @@ void KBabelView::emitEntryState()
TQPalette palette=msgstrEdit->palette();
palette.setColor( TQColorGroup::Text, red );
if( _catalog->itemtqStatus(_currentIndex).tqcontains("syntax error"))
if( _catalog->itemtqStatus(_currentIndex).contains("syntax error"))
{
msgstrEdit->setCurrentColor( MsgMultiLineEdit::ErrorColor );
}
@ -3732,7 +3732,7 @@ void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint f
}
else if( c == '\\')
{
if(pos+1 < textLength && spclChars.tqcontains(text[pos+1]) )
if(pos+1 < textLength && spclChars.contains(text[pos+1]) )
{
pos+=2;
}
@ -3981,9 +3981,9 @@ void KBabelView::spellStart(KSpell *)
if(_spellcheckSettings.rememberIgnored)
{
TQString urlString = _spellcheckSettings.ignoreURL;
if(urlString.tqcontains("@PACKAGE@"))
if(urlString.contains("@PACKAGE@"))
{
urlString.tqreplace("@PACKAGE@",_catalog->packageName());
urlString.replace("@PACKAGE@",_catalog->packageName());
}
// ### TODO: correctly set the URL; support for MostLocalURL
KURL url(urlString);
@ -4085,13 +4085,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
text=text.mid(begin,end-begin);
TQChar accelMarker=_catalog->miscSettings().accelMarker;
if(text.tqcontains(accelMarker))
if(text.contains(accelMarker))
{
text.tqreplace(accelMarker,"");
text.replace(accelMarker,"");
}
if(text.tqcontains('\n'))
if(text.contains('\n'))
{
text.tqreplace("\n","");
text.replace("\n","");
}
bool textOk=true;
@ -4099,8 +4099,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
{
// if text and orig are not the same,
// maybe it was a word with hyphens
int n=text.tqcontains('-');
n+=text.tqcontains('\'');
int n=text.contains('-');
n+=text.contains('\'');
if( n > 0 )
{
// re-get the original text since we replace some things above
@ -4113,8 +4113,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
while(!textFound && i <= n)
{
int lastPos=e+1;
e = text.tqfind('-',lastPos);
int tmp = text.tqfind('\'',lastPos);
e = text.find('-',lastPos);
int tmp = text.find('\'',lastPos);
if(e < 0 && tmp > 0)
{
e=tmp;
@ -4127,13 +4127,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
if(e<0) e=text.length();
TQString w=text.mid(lastPos,e-lastPos);
if(w.tqcontains(accelMarker))
if(w.contains(accelMarker))
{
w.tqreplace(accelMarker,"");
w.replace(accelMarker,"");
}
if(text.tqcontains('\n'))
if(text.contains('\n'))
{
text.tqreplace("\n","");
text.replace("\n","");
}
if( w == orig)
{
@ -4225,15 +4225,15 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi
TQString marked=msgstrEdit->selectedText();
spell.origWords.append(marked);
if(marked.tqcontains("\n") && !newWord.tqcontains('\n'))
if(marked.contains("\n") && !newWord.contains('\n'))
{
TQString s1=newWord;
s1.tqreplace(" ","\n");
s1.replace(" ","\n");
// if only a newline has been replaced with a white space
if(s1==marked)
{
newWord.tqreplace(" "," \n");
newWord.replace(" "," \n");
}
}
@ -4241,11 +4241,11 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi
// word has no accelerator, try to add the accelerator for
// the same char else add in at the same position
TQChar accelMarker=_catalog->miscSettings().accelMarker;
if(marked.tqcontains(accelMarker) && !newWord.tqcontains(accelMarker))
if(marked.contains(accelMarker) && !newWord.contains(accelMarker))
{
int b=marked.tqfind(accelMarker);
int b=marked.find(accelMarker);
TQChar accel=marked[b+1];
int nb=newWord.tqfind(accel,0,false);
int nb=newWord.find(accel,0,false);
if(nb>=0)
{
newWord.insert(nb,accelMarker);
@ -4422,7 +4422,7 @@ void KBabelView::cancelSpellcheck()
void KBabelView::spellAddIgnore(const TQString &word)
{
if(!spell.ignoreList.tqcontains(word))
if(!spell.ignoreList.contains(word))
{
spell.newIgnoreList.append(word);
}

@ -217,10 +217,10 @@ public slots:
void textPaste();
bool findNext();
bool findPrev();
void tqfind();
void find();
void findInFile(TQCString fileSource, KBabel::FindOptions options);
void replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options);
void tqreplace();
void replace();
void selectAll();
void deselectAll();
void clear();
@ -470,13 +470,13 @@ private slots:
*/
void replaceNext();
/**
* called from a signal from ReplaceDialog to tqreplace
* called from a signal from ReplaceDialog to replace
* all without asking anymore.
*/
void replaceAll();
/**
* called from a signal from ReplaceDialog to go to next
* string to tqreplace
* string to replace
*/
void findNextReplace();

@ -203,7 +203,7 @@ void KBabelView::updateTags()
{
TQString s = *it;
if( s.startsWith("&") ) s = "&"+s;
if(!tList.tqcontains(s))
if(!tList.contains(s))
{
_tagsMenu->insertItem(s,counter);
tList.append(s);
@ -297,7 +297,7 @@ void KBabelView::modifyMsgstrText(const uint offset, const TQString& text, bool
void KBabelView::insertTag(int n)
{
TQString tag = _tagsMenu->text(n);
if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // tqreplace && -> &. && is used for correct menu display
if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // replace && -> &. && is used for correct menu display
modifyMsgstrText( msgstrEdit->currentIndex(), tag );
}
@ -331,10 +331,10 @@ void KBabelView::insertNextTagMsgid()
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
int pos = msgstrEdit->currentIndex();
int currentFormBegin=s.tqfindRev("\\n",pos);
int currentFormBegin=s.findRev("\\n",pos);
if( currentFormBegin == -1 ) currentFormBegin=0;
else currentFormBegin+=3; // skip the newline
int currentFormEnd=s.tqfind("\\n",pos);
int currentFormEnd=s.find("\\n",pos);
if( currentFormEnd == -1 ) currentFormEnd=s.length();
s=s.mid(currentFormBegin,currentFormEnd-currentFormBegin);
@ -382,7 +382,7 @@ void KBabelView::updateArgs()
for(it=_args.begin(); it!=_args.end(); ++it)
{
TQString s = *it;
if(!tList.tqcontains(s))
if(!tList.contains(s))
{
_argsMenu->insertItem(s,counter);
tList.append(s);
@ -427,10 +427,10 @@ void KBabelView::insertNextArg()
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
int pos = msgstrEdit->currentIndex();
int currentFormBegin=s.tqfindRev("\\n",pos);
int currentFormBegin=s.findRev("\\n",pos);
if( currentFormBegin == -1 ) currentFormBegin=0;
else currentFormBegin+=3; // skip the newline
int currentFormEnd=s.tqfind("\\n",pos);
int currentFormEnd=s.find("\\n",pos);
if( currentFormEnd == -1 ) currentFormEnd=s.length();
s=s.mid(currentFormBegin,currentFormEnd-currentFormBegin);
@ -807,7 +807,7 @@ void KBabelView::showTryLaterMessageBox()
lay->add( label2 );
lay->addStretch(1);
TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this tqfind/replace session again"), topcontents);
TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this find/replace session again"), topcontents);
dialog->setMainWidget(topcontents);
dialog->enableButtonSeparator(false);
@ -904,10 +904,10 @@ void KBabelView::plural2msgstr()
case KDESpecific:
{
pos = msgstrEdit->currentIndex();
currentFormBegin=text.tqfindRev("\\n",pos);
currentFormBegin=text.findRev("\\n",pos);
if( currentFormBegin == -1 ) currentFormBegin=0;
else currentFormBegin+=3; // skip the newline
currentFormEnd=text.tqfind("\\n",pos);
currentFormEnd=text.find("\\n",pos);
if( currentFormEnd == -1 ) currentFormEnd=text.length();
text=text.mid(currentFormBegin,currentFormEnd-currentFormBegin);
@ -940,7 +940,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const TQString &
bool result=_catalog->checkUsingTool(tool);
emitEntryState();
TQString checkName = *(info.userCommands().at( info.commands().tqfindIndex(command) ));
TQString checkName = *(info.userCommands().at( info.commands().findIndex(command) ));
if(result)
{

@ -50,10 +50,10 @@ KBabelBookmark::KBabelBookmark(int msgindex, TQString msgtext)
// insert one '&' before every consecutive group of ampersands to keep the
// first of these from acting either as accelerator or tqmask in the menu
TQRegExp rx("&+");
int pos = msgtext.tqfind(rx);
int pos = msgtext.find(rx);
while (pos >= 0) {
msgtext.insert(pos, '&');
pos = msgtext.tqfind(rx, pos + rx.matchedLength() + 1);
pos = msgtext.find(rx, pos + rx.matchedLength() + 1);
}
_msgtext = msgtext;

@ -63,7 +63,7 @@ KBCatalogListView::~KBCatalogListView()
void KBCatalogListView::selectionChanged ( TQListViewItem * item)
{
DocPosition pos;
int number = m_items->tqfind(reinterpret_cast<KBCatalogListViewItem*>(item));
int number = m_items->find(reinterpret_cast<KBCatalogListViewItem*>(item));
if(number<0) number = 0;
pos.item=number;

@ -205,9 +205,9 @@ TQString KBCatalogListViewItem::formatMsg(const TQString str)
{
// TODO: Use KBHighlighting for this
TQString tmp_msgid = str;
tmp_msgid = tmp_msgid.tqreplace( "\\n", "<br>" );
tmp_msgid = tmp_msgid.tqreplace( "<", "&lt;" );
tmp_msgid = tmp_msgid.tqreplace( ">", "&gt;" );
tmp_msgid = tmp_msgid.replace( "\\n", "<br>" );
tmp_msgid = tmp_msgid.replace( "<", "&lt;" );
tmp_msgid = tmp_msgid.replace( ">", "&gt;" );
return tmp_msgid;
}

@ -98,7 +98,7 @@ void KBabelHighlighter::highlight( )
// create a single line out of the text: remove "\n", so that we only
// have to deal with one single line of text.
TQString text = _edit->text( );
text.tqreplace( "\n", "" );
text.replace( "\n", "" );
TQRegExp rx;
int pos;
@ -107,10 +107,10 @@ void KBabelHighlighter::highlight( )
{
for ( uint i = 0; i < regexps.count( ); ++i ) {
rx.setPattern( regexps[i] );
pos = text.tqfind( rx );
pos = text.find( rx );
while ( pos >= 0 ) {
doHighlighting( (HighlightType)(i+1), pos, rx.matchedLength( ) );
pos = text.tqfind( rx, pos + rx.matchedLength( ) );
pos = text.find( rx, pos + rx.matchedLength( ) );
}
}
}
@ -223,7 +223,7 @@ void KBabelHighlighter::flushCurrentWord()
currentPos += tags.matchedLength();
}
currentWord.tqreplace ( tags, "" );
currentWord.replace ( tags, "" );
if (!currentWord.isEmpty()) {
bool isPlainWord = true;
@ -251,7 +251,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw)
// word first.
TQString word = wordRaw;
kdDebug(KBABEL) << "isampersand: checking (raw):" << word << endl;
word.tqreplace("&", "" );
word.replace("&", "" );
kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl;
// Normally isMisspelled would look up a dictionary and return
@ -266,7 +266,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw)
// there is no 'spelt correctly' signal so default to Okay
kdDebug(KBABEL) << "Adding word " << word << endl;
dict.tqreplace(word, Okay);
dict.replace(word, Okay);
mSpell->checkWord(word, false);
return false;
}
@ -275,7 +275,7 @@ void KBabelHighlighter::slotMisspelling(const TQString & originalword,
const TQStringList & suggestions, unsigned int)
{
kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl;
dict.tqreplace( originalword, NotOkay );
dict.replace( originalword, NotOkay );
// this is slow but since kspell is async this will have to do for now
highlight();

@ -141,7 +141,7 @@ void MyMultiLineEdit::processCommand(EditCommand* cmd, bool undo)
setCursorPosition( row, col );
_firstChangedLine=row;
if(delcmd->str.tqfind("\n")>0 )_lastChangedLine=row+delcmd->str.tqcontains("\n");
if(delcmd->str.find("\n")>0 )_lastChangedLine=row+delcmd->str.contains("\n");
else _lastChangedLine=row;
KTextEdit::insert( delcmd->str );
@ -355,7 +355,7 @@ void MyMultiLineEdit::insert( const TQString & text, bool indent, bool checkNewL
emit signalUndoCmd( new EndCommand(-1,UndefPart));
}
int n=text.tqfind("\n");
int n=text.find("\n");
if( n > 0 ) _lastChangedLine+=n;
// setup palettes
@ -661,7 +661,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
if(_showDiff)
{
diffPos.clear();
int lines = s.tqcontains('\n');
int lines = s.contains('\n');
diffPos.resize(lines+1);
TQStringList lineList = TQStringList::split('\n',s,true);
@ -689,7 +689,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
}
else
{
addPos = (*it).tqfind("<KBABELADD>",lastPos);
addPos = (*it).find("<KBABELADD>",lastPos);
}
if(haveDel && multiline)
@ -698,7 +698,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
}
else
{
delPos = (*it).tqfind("<KBABELDEL>",lastPos);
delPos = (*it).find("<KBABELDEL>",lastPos);
}
if(delPos >= 0 && addPos >= 0)
@ -741,7 +741,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
(*it).remove(addPos,11);
}
int endPos = (*it).tqfind("</KBABELADD>",addPos);
int endPos = (*it).find("</KBABELADD>",addPos);
if(endPos < 0)
{
endPos = (*it).length();
@ -768,7 +768,7 @@ void MsgMultiLineEdit::setText(const TQString& s)
(*it).remove(delPos,11);
}
int endPos = (*it).tqfind("</KBABELDEL>",delPos);
int endPos = (*it).find("</KBABELDEL>",delPos);
if(endPos < 0)
{
endPos = (*it).length();
@ -805,9 +805,9 @@ void MsgMultiLineEdit::setText(const TQString& s)
}
TQRegExp reg("</?KBABELADD>");
str.tqreplace(reg,"");
str.replace(reg,"");
reg.setPattern("</?KBABELDEL>");
str.tqreplace(reg,"");
str.replace(reg,"");
}
MyMultiLineEdit::setText(str);
@ -989,7 +989,7 @@ void MsgMultiLineEdit::paintSpacePoints()
if ( paragraphRect( curpara ).top() > contentsY()+visibleHeight()) break;
const TQString& s = text(curpara);
int i = s.tqfind( " " );
int i = s.find( " " );
while( (i >= 0) && (i < (int)s.length()-1) ) // -1 because text will end by EOLN
{
TQPixmap* pm = ( s.tqat(i).tqunicode() == 0x00A0U ) ? wsnb : ws;
@ -997,7 +997,7 @@ void MsgMultiLineEdit::paintSpacePoints()
r.moveBy( r.width()/2, (r.height() - fm.descent())/2 );
r.moveBy( -pm->rect().width()/2, -pm->rect().height()/2-1 );
bitBlt(viewport(), r.topLeft(), pm, pm->rect(), TQt::CopyROP);
i = s.tqfind( " ", i+1 );
i = s.find( " ", i+1 );
}
++curpara;
}
@ -1522,7 +1522,7 @@ void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e)
{
TQString spclChars="abfnrtv'\"?\\";
if(col < (int)str.length()-1
&& spclChars.tqcontains(str.at(col+1)))
&& spclChars.contains(str.at(col+1)))
{
del();
}
@ -1548,7 +1548,7 @@ void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e)
TQString str=text(row);
TQString spclChars="abfnrtv'\"?\\";
if(!str.isEmpty() && col > 0 && spclChars.tqcontains(str.at(col-1)))
if(!str.isEmpty() && col > 0 && spclChars.contains(str.at(col-1)))
{
if(col > 1 && str.at(col-2)=='\\' && !isMasked(&str,col-2))
{

@ -109,7 +109,7 @@ DictChooser::DictChooser(KBabelDictBox*b, TQStringList selected
for(mi = dictList.first(); mi != 0; mi = dictList.next())
{
if(!selected.tqcontains(mi->id))
if(!selected.contains(mi->id))
{
unselectedBox->insertItem(mi->name);
}

@ -110,7 +110,7 @@ void DictionaryMenu::add(const TQString& n, const TQString& moduleId
TQString name=n;
TQString keyString=key;
if(keyString.tqcontains("%1"))
if(keyString.contains("%1"))
{
keyString=key.tqarg(accel2id.count()+1);
}

@ -56,7 +56,7 @@ public:
/**
* Adds an item to this menu and to the keyboard accelerator.
* If key tqcontains %1 it is replaced with a number 1-9
* If key contains %1 it is replaced with a number 1-9
*/
void add(const TQString& name,const TQString& id, const TQString& key);

@ -109,7 +109,7 @@ ResultListItem::ResultListItem(TQListView *tqparent, const SearchResult& result
tmp=result.found.first();
bool cutted=false;
int index=tmp.tqfind('\n');
int index=tmp.find('\n');
if(index > 0)
{
tmp=tmp.left(index);
@ -132,7 +132,7 @@ ResultListItem::ResultListItem(TQListView *tqparent, const SearchResult& result
tmp=result.translation;
cutted=false;
index=tmp.tqfind('\n');
index=tmp.find('\n');
if(index > 0)
{
tmp=tmp.left(index);
@ -347,7 +347,7 @@ KBabelDictBox::KBabelDictBox( TQWidget* tqparent, const char* name, WFlags fl )
for ( TQStringList::Iterator fit = list.begin(); fit != list.end()
; ++fit )
{
if(!fileList.tqcontains((*fit)))
if(!fileList.contains((*fit)))
{
fileList.append((*fit));
}
@ -373,7 +373,7 @@ KBabelDictBox::KBabelDictBox( TQWidget* tqparent, const char* name, WFlags fl )
TQStringList appList = rcConfig.readListEntry("Applications");
KInstance *inst = KGlobal::instance();
if(inst && !appList.isEmpty() && !appList.tqcontains(inst->instanceName()))
if(inst && !appList.isEmpty() && !appList.contains(inst->instanceName()))
{
continue;
}
@ -1679,7 +1679,7 @@ void KBabelDictBox::editFile()
DCOPClient *dcop = kapp->dcopClient();
QCStringList list = dcop->registeredApplications();
int index = list.tqfindIndex("kbabel");
int index = list.findIndex("kbabel");
if(index < 0)
// if(!dcop->isApplicationRegistered("kbabel"));
{

@ -607,7 +607,7 @@ KDBSearchEngine::repeat ()
if (tot >= min && !inlibs)
{
id = item.key;
id = id.tqreplace ("\n", "\"\n\"");
id = id.replace ("\n", "\"\n\"");
mle->append (txt.arg (tot).arg (ntra).arg (id));
}
@ -667,7 +667,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
bool allkey = (searchmode == MD_ALL_GOOD_KEYS);
bool equal, tqcontains, contained, regexp, intra;
bool equal, contains, contained, regexp, intra;
intra = searchmode & MD_IN_TRANSLATION;
@ -700,12 +700,12 @@ KDBSearchEngine::startSearchNow (int searchmode)
int pos;
for (i = 0; i < len; i++)
{
while ((pos = idMod->tqfind (remchar.at (i))) != -1)
while ((pos = idMod->find (remchar.at (i))) != -1)
idMod->remove (pos, 1);
}
if (comm)
idMod->tqreplace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
if (norm)
@ -802,12 +802,12 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove character in list of character to be ignored
for (i = 0; i < len; i++)
while ((pos = msgId.tqfind (remchar.at (i))) != -1)
while ((pos = msgId.find (remchar.at (i))) != -1)
msgId.remove (pos, 1);
//Remove context information from id found
if (comm)
msgId.tqreplace (TQRegExp ("\\_\\:.*\\\\n"), "");
msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), "");
if (norm)
@ -838,14 +838,14 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove character in list of character to be ignored
for (i = 0; i < len; i++)
while ((pos =
msgId.tqfind (remchar.at (i))) !=
msgId.find (remchar.at (i))) !=
-1)
msgId.remove (pos, 1);
//Remove context information from id found
if (comm)
msgId.
tqreplace (TQRegExp ("\\_\\:.*\\\\n"),
replace (TQRegExp ("\\_\\:.*\\\\n"),
"");
@ -867,12 +867,12 @@ KDBSearchEngine::startSearchNow (int searchmode)
equal = false;
if (rules & Contains)
tqcontains = idMod->tqcontains (msgId);
contains = idMod->contains (msgId);
else
tqcontains = false;
contains = false;
if (rules & Contained)
contained = msgId.tqcontains (*idMod);
contained = msgId.contains (*idMod);
else
contained = false;
@ -887,7 +887,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
}
while (intra && nn < item.numTra);
if (equal || tqcontains || contained || regexp || allkey)
if (equal || contains || contained || regexp || allkey)
{
if (equal)
@ -1034,7 +1034,7 @@ KDBSearchEngine::startSingleSearch (TQString searchString,
in = reg.search (searchString, in + len);
len = reg.matchedLength ();
TQString regToAdd = searchString;
regToAdd.tqreplace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.append ("$");
regToAdd.prepend ("^");
// fprintf(stderr,"%s",(const char *)regToAdd.local8Bit());

@ -1446,7 +1446,7 @@ DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog,
isThisOne = (*ittr).translation == msgstr;
// is there the catnum we are looking for?
if ((*ittr).infoRef.tqfind (catnum) != (*ittr).infoRef.end ())
if ((*ittr).infoRef.find (catnum) != (*ittr).infoRef.end ())
{
found_catalog_info = true;
if (ow && !isThisOne)

@ -120,7 +120,7 @@ InfoItem cinfo;
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
TQString location=fileName.right(fileName.length()-fileName.tqfindRev("/")-1);
TQString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);

@ -285,7 +285,7 @@ It also substitutes groups of more than one space character with only one space
<cstring>containsCB</cstring>
</property>
<property name="text">
<string>Query tqcontains</string>
<string>Query contains</string>
</property>
<property name="whatsThis" stdset="0">
<string>Match if query contains the database string</string>

@ -116,9 +116,9 @@ nmax++;
normalizestr(a);
// printf("#%s#\n",a);
// while (st.tqfind("#~")==0)
// while (st.find("#~")==0)
// st = st.right(st.length()-2);
// while (st.tqfind(" ")==0)
// while (st.find(" ")==0)
// st = st.right(st.length()-1);
if(isAMsgId) nextIsFuzzy=false;

@ -250,7 +250,7 @@ void KDBSearchEngine2::stringChanged( TQString orig, TQString translated
if(!init()) return;
//if(translated.isEmpty()) return;
InputInfo ii;
if(description.tqfind("fuzzy",false)==-1)
if(description.find("fuzzy",false)==-1)
di->addEntry(orig,translated,&ii);
}
@ -499,7 +499,7 @@ void KDBSearchEngine2::scanNowPressed()
TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(!init()) return;
if(sources.tqcontains(sourceName))
if(sources.contains(sourceName))
{
TQValueList<KURL> urls=sources[sourceName].urls();
PoScanner ps(di);
@ -538,7 +538,7 @@ void KDBSearchEngine2::editSource()
TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(sources.tqcontains(sourceName))
if(sources.contains(sourceName))
{
bool nameIsNew;
TQString newName;
@ -554,7 +554,7 @@ void KDBSearchEngine2::editSource()
{
return;
}
nameIsNew=sources.tqcontains(newName);
nameIsNew=sources.contains(newName);
if(newName!=sourceName && !nameIsNew)
{
@ -602,13 +602,13 @@ void KDBSearchEngine2::addSource()
if(sd.exec()==TQDialog::Accepted)
{
newName= sd.sourceName->text();
nameIsNew=!sources.tqcontains(newName);
nameIsNew=!sources.contains(newName);
}
else
{
return;
}
// nameIsNew=sources.tqcontains(newName);
// nameIsNew=sources.contains(newName);
if(!nameIsNew)
{
KMessageBox::error(0,i18n("The name you chose is already used.\nPlease change the source name."),

@ -145,7 +145,7 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString
for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1)
{
TQString chunkTranslation= (*it1).result();
if(!translationUsed.tqcontains(chunkTranslation))
if(!translationUsed.contains(chunkTranslation))
{
translationUsed[chunkTranslation]=true;
kdDebug(0) << "a translation is: " << chunkTranslation << endl;
@ -330,7 +330,7 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString &
TQString re=di->format(di->simple(*it,true),query);
QueryResult r(re,ori,score);
for(TQPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
ori=ori.tqreplace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
ori=ori.replace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
}
r.setRichOriginal(ori);
if(!di->stopNow())

@ -282,7 +282,7 @@ bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo
TQStringList wt=words(*otIt);
for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.tqcontains(*it))
if(correlationDiff.contains(*it))
correlationDiff[*it]--;
else
correlationDiff[*it]=-1;
@ -299,7 +299,7 @@ bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo
TQStringList wt=words(*otIt);
for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.tqcontains(*it))
if(correlationDiff.contains(*it))
correlationDiff[*it]++;
else
correlationDiff[*it]=1;
@ -408,7 +408,7 @@ TQMap<TQString,float> DataBaseInterface::correlation(TQString word,SearchFilter
MainEntry e=get(k->getString(),filter);
TQStringList trad=e.second.getTranslations();
nocck=words(k->getString()).tqcontains(sword);
nocck=words(k->getString()).contains(sword);
for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
{
@ -465,7 +465,7 @@ TQStringList DataBaseInterface::words(TQString s)
int pos;
do {
pos=str.tqfind(TQRegExp("\\s"));
pos=str.find(TQRegExp("\\s"));
// if(!simple(str.left(pos)).isEmpty())
// list.append(simple(str.left(pos)));
if(!str.left(pos).isEmpty())
@ -484,13 +484,13 @@ TQString DataBaseInterface::simple(TQString str,bool ck)
else
res=str.lower(); //lowercase
//FIXME: uncoment the foll. line (check speed)
res=res.tqreplace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
res=res.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
//Try to get rid of regexps.
// res=res.tqreplace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
// res=res.tqreplace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
// res=res.tqreplace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
// res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
// res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
// res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
TQString r;
TQChar c;
@ -607,16 +607,16 @@ TQString DataBaseInterface::format(TQString _s,TQString t)
//FIXME use regexp
TQString s=_s;
TQString noTagT=t.tqreplace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
TQChar first=noTagT[noTagT.tqfind(TQRegExp("\\w"))];
TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))];
bool firstCapital=isUpper(first);
/*
bool dotsAtEnd=(t.tqfind("...")+3==t.length());
bool gtgtAtEnd=(t.tqfind(">>")+2==t.length());
bool ltltAtEnd=(t.tqfind("<<")==t.length()-2);
bool dotsAtEnd=(t.find("...")+3==t.length());
bool gtgtAtEnd=(t.find(">>")+2==t.length());
bool ltltAtEnd=(t.find("<<")==t.length()-2);
bool columnAtEnd=(t.tqfind(":")+1==t.length());
bool columnAtEnd=(t.find(":")+1==t.length());
*/
bool allupper=(t.upper()==t);
@ -643,13 +643,13 @@ if(columnAtEnd)
if(allupper)
s=s.upper();
int pos=t.tqfind(TQRegExp("&"));
int pos=t.find(TQRegExp("&"));
if(pos>=0) {
TQChar accel=t[t.tqfind(TQRegExp("&"))+1];
TQChar accel=t[t.find(TQRegExp("&"))+1];
if(accel!='&')
{
pos=s.tqfind(accel,false);
pos=s.find(accel,false);
if(pos<0)
pos=0;
s.insert(pos,"&");
@ -685,8 +685,8 @@ TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,T
//kdDebug(0) << "phRegExp: " << phRegExp << endl;
//kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl;
stringReplace = stringReplace.tqreplace(TQRegExp(phRegExp),*capit);
stringSearch = stringSearch.tqreplace(TQRegExp(phRegExp),*capit);
stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit);
stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit);
i++;
}
@ -694,7 +694,7 @@ TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,T
// kdDebug(0) << "stringReplace " << stringReplace << endl;
TQRegExp stringSearchRegExp = TQRegExp(stringSearch);
// kdDebug(0) << "before: "<<s<<endl;
s = s.tqreplace(stringSearchRegExp,stringReplace);
s = s.replace(stringSearchRegExp,stringReplace);
// kdDebug(0) << "after: "<<s<<endl;
}

@ -77,7 +77,7 @@ void DBItemMainData::write(TQDataStream *s)
void DBItemMainData::addTranslation(TQString str, unsigned int ref)
{
//get();
if(translations[str].tqfind(ref)==translations[str].end()) // If it do not exists
if(translations[str].find(ref)==translations[str].end()) // If it do not exists
translations[str].append(ref); //add a new reference.
else
{
@ -106,7 +106,7 @@ TQMapIterator<TQString,TQValueList<unsigned int> > it2;
{ //Dirty hack
it2=it;
it++;
if(it2.data().tqfind(ref)!=it2.data().end())
if(it2.data().find(ref)!=it2.data().end())
removeTranslation(it2.key(),ref);
}
@ -142,7 +142,7 @@ list.clear();
void DBItemMultiIndex::addEntry(unsigned int index)
{
// get();
if(list.tqfind(index)==list.end())
if(list.find(index)==list.end())
{
list.append(index);
qHeapSort(list);

@ -203,7 +203,7 @@ emit fileStarted();
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
TQString pretty=u.prettyURL();
TQString location=pretty.right(pretty.length()-pretty.tqfindRev("/")-1);
TQString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);

@ -288,7 +288,7 @@ It also substitutes groups of more than one space character with only one space
<cstring>containsCB</cstring>
</property>
<property name="text">
<string>Query tqcontains</string>
<string>Query contains</string>
</property>
<property name="whatsThis" stdset="0">
<string>Match if query contains the database string</string>

@ -184,7 +184,7 @@ bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFi
kapp->tqprocessEvents(100);
text.tqreplace("\n","");
text.replace("\n","");
Entry *entry = msgidDict[text];
if(entry)
@ -358,27 +358,27 @@ void PoAuxiliary::loadAuxiliary()
TQString path=url;
if(path.tqcontains("@LANG@"))
if(path.contains("@LANG@"))
{
path.tqreplace("@LANG@",langCode);
path.replace("@LANG@",langCode);
}
if(path.tqcontains("@PACKAGE@"))
if(path.contains("@PACKAGE@"))
{
int pos=package.tqfindRev("/");
int pos=package.findRev("/");
if( pos<0 ) pos=0;
path.tqreplace("@PACKAGE@",package.mid(pos));
path.replace("@PACKAGE@",package.mid(pos));
}
if(path.tqcontains("@PACKAGEDIR@"))
if(path.contains("@PACKAGEDIR@"))
{
TQString packagedir;
int pos=package.tqfindRev("/");
int pos=package.findRev("/");
if( pos > 0 ) packagedir=package.left(pos);
else packagedir="";
path.tqreplace("@PACKAGEDIR@",packagedir);
path.replace("@PACKAGEDIR@",packagedir);
kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl;
}
TQRegExp reg("@DIR[0-9]+@");
if(path.tqcontains(reg))
if(path.contains(reg))
{
int pos=reg.search(path);
int len = reg.matchedLength();
@ -393,7 +393,7 @@ void PoAuxiliary::loadAuxiliary()
{
TQString dir=directory(editedFile,number);
TQString s("@DIR%1@");
path.tqreplace(s.tqarg(number),dir);
path.replace(s.tqarg(number),dir);
pos+=dir.length();
}
@ -461,7 +461,7 @@ void PoAuxiliary::loadAuxiliary()
Entry *e = new Entry;
// FIXME: should care about plural forms
e->orig = catalog->msgid(i).first();
e->orig.tqreplace("\n","");
e->orig.replace("\n","");
kdWarning() << "PoAuxialiary does not support plural forms" << endl;
e->translation = catalog->msgstr(i).first();
e->comment = catalog->comment(i);
@ -491,7 +491,7 @@ void PoAuxiliary::loadAuxiliary()
void PoAuxiliary::setEditedFile(const TQString& file)
{
if(initialized && (url.tqcontains("@DIR") || KURL::isRelativeURL(url))
if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url))
&& file!=editedFile && !loadTimer->isActive() )
{
initialized=false;
@ -503,7 +503,7 @@ void PoAuxiliary::setEditedFile(const TQString& file)
void PoAuxiliary::setEditedPackage(const TQString& pack)
{
if(initialized && url.tqcontains("@PACKAGE@") && pack!=package
if(initialized && url.contains("@PACKAGE@") && pack!=package
&& !loadTimer->isActive() )
{
initialized=false;
@ -515,7 +515,7 @@ void PoAuxiliary::setEditedPackage(const TQString& pack)
void PoAuxiliary::setLanguageCode(const TQString& lang)
{
if(initialized && url.tqcontains("@LANG@") && lang!=langCode
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
{
initialized=false;

@ -221,7 +221,7 @@ const TQValueList<int>* CompendiumData::textonlyDict(const TQString text) const
void CompendiumData::registerObject(TQObject *obj)
{
if(!_registered.tqcontainsRef(obj))
if(!_registered.containsRef(obj))
_registered.append(obj);
}

@ -232,7 +232,7 @@ bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm,
TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.tqcontains(*it))
if(foundIndices.contains(*it))
{
continue;
}
@ -288,7 +288,7 @@ bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrLi
TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.tqcontains(*it))
if(foundIndices.contains(*it))
{
continue;
}
@ -346,12 +346,12 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr
if(stop)
break;
if(foundIndices.tqcontains(*it))
if(foundIndices.contains(*it))
{
continue;
}
if(checkedIndices.tqcontains(*it))
if(checkedIndices.contains(*it))
{
continue;
}
@ -397,7 +397,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr
s=" "+*wit+" ";
o=" "+origStr+" ";
}
if(o.tqcontains(s))
if(o.contains(s))
{
found=true;
}
@ -519,7 +519,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr
emit progress( 50+(50*(checkCounter+1))/catalogInfo.total);
}
if(checkedIndices.tqcontains(i))
if(checkedIndices.contains(i))
{
continue;
}
@ -532,7 +532,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr
continue;
}
if(foundIndices.tqcontains(i))
if(foundIndices.contains(i))
{
continue;
}
@ -689,7 +689,7 @@ bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const Sear
// search without whitespace
searchTextOnly(searchStr, pluralForm, results, foundIndices, checkedIndices);
// now, search based on words (tqcontains, is contained, etc)
// now, search based on words (contains, is contained, etc)
searchWords(searchStr, pluralForm, results, foundIndices, checkedIndices);
@ -797,9 +797,9 @@ void PoCompendium::slotLoadCompendium()
TQString path=url;
if(path.tqcontains("@LANG@"))
if(path.contains("@LANG@"))
{
path.tqreplace("@LANG@",langCode);
path.replace("@LANG@",langCode);
}
KURL u=KCmdLineArgs::makeURL(path.local8Bit());
realURL = u.url();
@ -866,19 +866,19 @@ void PoCompendium::recheckData()
TQString PoCompendium::maskString(TQString s)
{
s.tqreplace("\\","\\\\");
s.tqreplace("\?","\\?");
s.tqreplace("[","\\[");
s.tqreplace(".","\\.");
s.tqreplace("*","\\*");
s.tqreplace("+","\\+");
s.tqreplace("^","\\^");
s.tqreplace("$","\\$");
s.tqreplace("(","\\(");
s.tqreplace(")","\\)");
s.tqreplace("{","\\{");
s.tqreplace("}","\\}");
s.tqreplace("|","\\|");
s.replace("\\","\\\\");
s.replace("\?","\\?");
s.replace("[","\\[");
s.replace(".","\\.");
s.replace("*","\\*");
s.replace("+","\\+");
s.replace("^","\\^");
s.replace("$","\\$");
s.replace("(","\\(");
s.replace(")","\\)");
s.replace("{","\\{");
s.replace("}","\\}");
s.replace("|","\\|");
return s;
}
@ -917,7 +917,7 @@ void PoCompendium::addResult(SearchResult *result, TQPtrList<SearchResult>& res)
void PoCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.tqcontains("@LANG@") && lang!=langCode
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
{
initialized=false;
@ -1120,7 +1120,7 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui
return res.first()->translation;
}
// now, search based on words (tqcontains, is contained, etc)
// now, search based on words (contains, is contained, etc)
searchWords(searchStr, pluralForm, res, foundIndices, checkedIndices);
if( matchNGram ||
@ -1181,7 +1181,7 @@ void PoCompendium::unregisterData()
void PoCompendium::registerData()
{
data = compendiumDict()->tqfind(realURL);
data = compendiumDict()->find(realURL);
if(!data)
{
data = new CompendiumData;

@ -267,7 +267,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.tqcontains(*it))
if(foundIndices.contains(*it))
{
continue;
}
@ -319,12 +319,12 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
if(stop)
break;
if(foundIndices.tqcontains(*it))
if(foundIndices.contains(*it))
{
continue;
}
if(checkedIndices.tqcontains(*it))
if(checkedIndices.contains(*it))
{
continue;
}
@ -365,7 +365,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
s=" "+*wit+" ";
o=" "+origStr+" ";
}
if(o.tqcontains(s))
if(o.contains(s))
{
found=true;
}
@ -471,7 +471,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
i++;
if(checkedIndices.tqcontains(i))
if(checkedIndices.contains(i))
{
continue;
}
@ -479,7 +479,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea
checkedIndices.append(i);
checkCounter++;
if(foundIndices.tqcontains(i))
if(foundIndices.contains(i))
{
continue;
}
@ -687,9 +687,9 @@ void TmxCompendium::slotLoadCompendium()
TQString path=url;
if(path.tqcontains("@LANG@"))
if(path.contains("@LANG@"))
{
path.tqreplace("@LANG@",langCode);
path.replace("@LANG@",langCode);
}
KURL u=KCmdLineArgs::makeURL(path.local8Bit());
realURL = u.url();
@ -748,19 +748,19 @@ void TmxCompendium::recheckData()
TQString TmxCompendium::maskString(TQString s) const
{
s.tqreplace('\\',"\\\\");
s.tqreplace('?',"\\?");
s.tqreplace('[',"\\[");
s.tqreplace('.',"\\.");
s.tqreplace('*',"\\*");
s.tqreplace('+',"\\+");
s.tqreplace('^',"\\^");
s.tqreplace('$',"\\$");
s.tqreplace('(',"\\(");
s.tqreplace(')',"\\)");
s.tqreplace('{',"\\{");
s.tqreplace('}',"\\}");
s.tqreplace('|',"\\|");
s.replace('\\',"\\\\");
s.replace('?',"\\?");
s.replace('[',"\\[");
s.replace('.',"\\.");
s.replace('*',"\\*");
s.replace('+',"\\+");
s.replace('^',"\\^");
s.replace('$',"\\$");
s.replace('(',"\\(");
s.replace(')',"\\)");
s.replace('{',"\\{");
s.replace('}',"\\}");
s.replace('|',"\\|");
return s;
}
@ -797,7 +797,7 @@ void TmxCompendium::addResult(SearchResult *result)
void TmxCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.tqcontains("@LANG@") && lang!=langCode
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
{
initialized=false;
@ -943,7 +943,7 @@ void TmxCompendium::unregisterData()
void TmxCompendium::registerData()
{
data = compendiumDict()->tqfind(realURL);
data = compendiumDict()->find(realURL);
if(!data)
{
data = new TmxCompendiumData;

@ -268,7 +268,7 @@ const TQString TmxCompendiumData::msgstr(const int index) const
void TmxCompendiumData::registerObject(TQObject *obj)
{
if(!_registered.tqcontainsRef(obj))
if(!_registered.containsRef(obj))
_registered.append(obj);
}

@ -204,7 +204,7 @@ TQString SearchEngine::directory(const TQString& path, int n)
if(n<0)
return TQString();
int begin=path.tqfindRev('/');
int begin=path.findRev('/');
int end=path.length();
if(begin < 0)
@ -224,7 +224,7 @@ TQString SearchEngine::directory(const TQString& path, int n)
}
end = begin;
begin = path.tqfindRev('/', end-1);
begin = path.findRev('/', end-1);
if(begin < 0)
{
@ -266,7 +266,7 @@ uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_cnt = text1.length() - ngram_len + 1;
for (uint i = 0; i < ngram_cnt; i++) {
if (text2.tqfind(text1.mid(i,ngram_len)) >= 0)
if (text2.find(text1.mid(i,ngram_len)) >= 0)
cnt++;
}

@ -59,7 +59,7 @@ Package::List BugCache::loadPackageList()
TQStringList::ConstIterator it;
for( it = packages.begin(); it != packages.end(); ++it ) {
if ((*it) == "<default>") continue;
if ((*it).tqcontains("/")) continue;
if ((*it).contains("/")) continue;
m_cachePackages->setGroup(*it);

@ -181,7 +181,7 @@ TQValueList<BugDetails::Attachment> BugDetails::extractAttachments( const TQStri
kdDebug() << "BugDetails::extractAttachments found header " << *rit << endl;
#endif
// Taken from libkdenetwork/kmime_headers.cpp
int pos=header.tqfind("filename=", 0, false);
int pos=header.find("filename=", 0, false);
TQString fn;
if(pos>-1) {
pos+=9;
@ -231,7 +231,7 @@ TQValueList<BugDetails::Attachment> BugDetails::extractAttachments( const TQStri
}
contents += line; // no newline, because of linebreaking between <br and />
}
contents = contents.tqreplace( TQRegExp("<br */>"), TQString() );
contents = contents.replace( TQRegExp("<br */>"), TQString() );
#ifdef DEBUG_EXTRACT
kdDebug() << "BugDetails::extractAttachments contents=***\n" << contents << "\n***" << endl;
#endif

@ -216,14 +216,14 @@ bool BugServer::queueCommand( BugCommand *cmd )
TQPtrList<BugCommand> BugServer::queryCommands( const Bug &bug ) const
{
CommandsMap::ConstIterator it = mCommands.tqfind( bug.number() );
CommandsMap::ConstIterator it = mCommands.find( bug.number() );
if (it == mCommands.end()) return TQPtrList<BugCommand>();
else return *it;
}
bool BugServer::hasCommandsFor( const Bug &bug ) const
{
CommandsMap::ConstIterator it = mCommands.tqfind( bug.number() );
CommandsMap::ConstIterator it = mCommands.find( bug.number() );
return it != mCommands.end();
}

@ -273,7 +273,7 @@ KBB::Error DomProcessor::parseDomBugDetails( const TQDomElement &element,
text += raw;
}
TQString bugBaseURL = server()->serverConfig().baseUrl().htmlURL();
text = "<pre>" + wrapLines( text ).tqreplace( TQRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ),
text = "<pre>" + wrapLines( text ).replace( TQRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ),
"<a href=\"" + bugBaseURL + "/attachment.cgi?id=\\2&action=view\">\\1</a>" ) + "\n</pre>";
}
}
@ -361,7 +361,7 @@ TQString DomProcessor::wrapLines( const TQString &text )
TQString wrappedLine;
while ( line.length() > uint( wrap ) )
{
int breakPoint = line.tqfindRev( ' ', wrap );
int breakPoint = line.findRev( ' ', wrap );
//kdDebug() << "Breaking at " << breakPoint << endl;
if( breakPoint == -1 ) {
wrappedLine += line.left( wrap ) + '\n';

@ -100,10 +100,10 @@ void HtmlParser::processResult( Package::List & )
TQString HtmlParser::getAttribute( const TQString &line, const TQString &name )
{
int pos1 = line.tqfind( name + "=\"" );
int pos1 = line.find( name + "=\"" );
if ( pos1 < 1 ) return TQString();
pos1 += name.length() + 2;
int pos2 = line.tqfind( "\"", pos1 );
int pos2 = line.find( "\"", pos1 );
if ( pos2 < 1 ) return TQString();
return line.mid( pos1, pos2 - pos1 );
}
@ -111,24 +111,24 @@ TQString HtmlParser::getAttribute( const TQString &line, const TQString &name )
bool HtmlParser::getCpts( const TQString &line, TQString &key,
TQStringList &values )
{
if ( !line.tqcontains( TQRegExp( "\\s*cpts" ) ) ) return false;
if ( !line.contains( TQRegExp( "\\s*cpts" ) ) ) return false;
// kdDebug() << "LINE: " << line << endl;
int pos1 = line.tqfind( "[" );
int pos1 = line.find( "[" );
if ( pos1 < 0 ) return false;
int pos2 = line.tqfind( "]", ++pos1 );
int pos2 = line.find( "]", ++pos1 );
if ( pos2 < 0 ) return false;
key = line.mid( pos1, pos2 - pos1 );
int pos3 = key.tqfind( "'" );
int pos3 = key.find( "'" );
if ( pos3 >= 0 ) {
int pos4 = key.tqfind( "'", ++pos3 );
int pos4 = key.find( "'", ++pos3 );
if ( pos4 >= 0 ) key = key.mid( pos3, pos4 - pos3 );
}
// kdDebug() << " KEY: " << key << endl;
pos1 = line.tqfind( "'", ++pos2 );
if ( pos1 >= 0 ) pos2 = line.tqfind( "'", ++pos1 );
pos1 = line.find( "'", ++pos2 );
if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 );
while ( pos1 >= 0 && pos2 >= 0 ) {
TQString value = line.mid( pos1, pos2 - pos1 );
@ -136,8 +136,8 @@ bool HtmlParser::getCpts( const TQString &line, TQString &key,
values.append( value );
pos1 = line.tqfind( "'", ++pos2 );
if ( pos1 >= 0 ) pos2 = line.tqfind( "'", ++pos1 );
pos1 = line.find( "'", ++pos2 );
if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 );
}
return true;
@ -153,7 +153,7 @@ KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Bug::List &bugs )
// kdDebug() << " NUMBER: " << number << endl;
TQString summary;
int pos = line.tqfindRev( "summary>" );
int pos = line.findRev( "summary>" );
if ( pos >= 0 ) summary = line.mid( pos + 8 );
Bug bug( new BugImpl( summary, Person(), number, 0xFFFFFFFF, Bug::SeverityUndefined,
@ -248,13 +248,13 @@ KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & )
switch ( mState ) {
case Idle:
case SearchComponents:
if ( line.tqcontains( "var cpts" ) ) mState = Components;
if ( line.contains( "var cpts" ) ) mState = Components;
break;
case SearchProducts:
if ( line.tqcontains( "onchange=\"selectProduct" ) ) mState = Products;
if ( line.contains( "onchange=\"selectProduct" ) ) mState = Products;
break;
case Components: {
if ( line.tqcontains( TQRegExp( "\\s*function" ) ) ) {
if ( line.contains( TQRegExp( "\\s*function" ) ) ) {
mState = SearchProducts;
}
TQString key;
@ -264,7 +264,7 @@ KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & )
}
}
case Products: {
if ( line.tqcontains( "</select>" ) ) mState = Finished;
if ( line.contains( "</select>" ) ) mState = Finished;
TQString product = getAttribute( line, "value" );
if ( !product.isEmpty() ) {
kdDebug() << "PRODUCT: " << product << endl;

@ -4,7 +4,7 @@
Person::Person( const TQString &fullName )
{
int emailPos = fullName.tqfind( '<' );
int emailPos = fullName.find( '<' );
if ( emailPos < 0 ) {
email = fullName;
} else {
@ -41,10 +41,10 @@ Person Person::parseFromString( const TQString &_str )
TQString str = _str;
int ltPos = str.tqfind( '<' );
int ltPos = str.find( '<' );
if ( ltPos != -1 )
{
int gtPos = str.tqfind( '>', ltPos );
int gtPos = str.find( '>', ltPos );
if ( gtPos != -1 )
{
res.name = str.left( ltPos - 1 );
@ -52,16 +52,16 @@ Person Person::parseFromString( const TQString &_str )
}
}
int atPos = str.tqfind( '@' );
int spacedAtPos = str.tqfind( TQString::tqfromLatin1( " at " ) );
int atPos = str.find( '@' );
int spacedAtPos = str.find( TQString::tqfromLatin1( " at " ) );
if ( atPos == -1 && spacedAtPos != -1 )
str.tqreplace( spacedAtPos, 4, TQString::tqfromLatin1( "@" ) );
str.replace( spacedAtPos, 4, TQString::tqfromLatin1( "@" ) );
int spacePos = str.tqfind( ' ' );
int spacePos = str.find( ' ' );
while ( spacePos != -1 )
{
str[ spacePos ] = '.';
spacePos = str.tqfind( ' ', spacePos );
spacePos = str.find( ' ', spacePos );
}
res.email = str;

@ -340,11 +340,11 @@ void CentralWidget::slotExtractAttachments()
for ( TQValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
{
// Handle duplicates
if ( fileList.tqcontains( (*it).filename ) )
if ( fileList.contains( (*it).filename ) )
{
int n = 2; // looks stupid to have "blah" and "1-blah", start at 2
TQString fn = TQString::number(n) + '-' + (*it).filename;
while ( fileList.tqcontains( fn ) )
while ( fileList.contains( fn ) )
{
++n;
fn = TQString::number(n) + '-' + (*it).filename;

@ -42,7 +42,7 @@
using namespace KBugBusterMainWindow;
CWBugListContainer::CWBugListContainer( TQWidget *tqparent , const char * name )
: TQWidget( tqparent, name ), m_tqfind(0), m_findItem(0)
: TQWidget( tqparent, name ), m_find(0), m_findItem(0)
{
TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
@ -114,7 +114,7 @@ CWBugListContainer::~CWBugListContainer()
{
m_listBugs->saveLayout( KBBPrefs::instance()->config(), "BugListLayout" );
KBBPrefs::instance()->writeConfig();
delete m_tqfind;
delete m_find;
}
void CWBugListContainer::setBugList( const TQString &label, const Bug::List &bugs )
@ -258,12 +258,12 @@ void CWBugListContainer::clearCommand( const TQString &bug )
void CWBugListContainer::searchBugByTitle( int options, const TQString& pattern )
{
m_tqfind = new KFind( pattern, options, this );
m_find = new KFind( pattern, options, this );
// Connect signals to code which handles highlighting
// of found text.
connect(m_tqfind, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
connect(m_find, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
this, TQT_SLOT( searchHighlight( const TQString &, int, int ) ) );
connect(m_tqfind, TQT_SIGNAL( findNext() ), this, TQT_SLOT( slotFindNext() ) );
connect(m_find, TQT_SIGNAL( findNext() ), this, TQT_SLOT( slotFindNext() ) );
m_findItem = (BugLVI *)m_listBugs->firstChild();
if ( options & KFindDialog::FromCursor && m_listBugs->currentItem() )
@ -279,26 +279,26 @@ void CWBugListContainer::slotFindNext()
KFind::Result res = KFind::NoMatch;
while( res == KFind::NoMatch && m_findItem ) {
if ( m_tqfind->needData() )
m_tqfind->setData( m_findItem->text(2) );
if ( m_find->needData() )
m_find->setData( m_findItem->text(2) );
// Let KFind inspect the text fragment, and display a dialog if a match is found
res = m_tqfind->find();
res = m_find->find();
if ( res == KFind::NoMatch ) {
if ( m_tqfind->options() & KFindDialog::FindBackwards )
if ( m_find->options() & KFindDialog::FindBackwards )
m_findItem = (BugLVI *)m_findItem->itemAbove();
else
m_findItem = (BugLVI *)m_findItem->itemBelow();
}
}
if ( res == KFind::NoMatch ) // i.e. at end
if ( m_tqfind->shouldRestart() ) {
if ( m_find->shouldRestart() ) {
m_findItem = (BugLVI *)m_listBugs->firstChild();
slotFindNext();
} else {
delete m_tqfind;
m_tqfind = 0L;
delete m_find;
m_find = 0L;
}
}

@ -86,7 +86,7 @@ private:
TQWidgetStack *m_listStack;
KListView *m_listBugs;
KFind *m_tqfind;
KFind *m_find;
BugLVI *m_findItem;
CWLoadingWidget *m_listLoading;

@ -170,11 +170,11 @@ void KBBMainWindow::initActions()
new KAction( i18n("&Search by Product..."), "goto", CTRL+TQt::Key_P, TQT_TQOBJECT(this),
TQT_SLOT( searchPackage() ), actionCollection(), "search_package" );
new KAction( i18n("Search by Bug &Number..."), "filetqfind", CTRL+TQt::Key_N, TQT_TQOBJECT(this),
new KAction( i18n("Search by Bug &Number..."), "filefind", CTRL+TQt::Key_N, TQT_TQOBJECT(this),
TQT_SLOT( searchBugNumber() ), actionCollection(), "search_bugnumber" );
// For now "Description" searches by title. Maybe later we can have a
// full-text search interfacing bugs.kde.org and rename the current one to "By Title".
new KAction( i18n("Search by &Description...") ,"tqfind", CTRL+TQt::Key_D, TQT_TQOBJECT(this),
new KAction( i18n("Search by &Description...") ,"find", CTRL+TQt::Key_D, TQT_TQOBJECT(this),
TQT_SLOT( searchDescription() ), actionCollection(), "search_description" );
// new KAction( i18n("&Merge"), "view_remove", CTRL+TQt::Key_M, TQT_TQOBJECT(m_mainWidget),

@ -105,7 +105,7 @@ void MessageEditor::updateMessage()
void MessageEditor::saveMessage()
{
mMessageButtons.tqreplace(mCurrentButton,mMessageEdit->text());
mMessageButtons.replace(mCurrentButton,mMessageEdit->text());
}
void MessageEditor::slotOk()

@ -169,7 +169,7 @@ void PackageSelectDialog::slotOk()
BugServer *server = BugSystem::self()->server();
TQStringList recent = server->serverConfig().recentPackages();
if( !recent.tqcontains( recent_key ) ) {
if( !recent.contains( recent_key ) ) {
recent.prepend( recent_key );
if ( int( recent.count() ) > KBBPrefs::instance()->mRecentPackagesCount ) {
recent.remove( recent.last() );

@ -42,9 +42,9 @@ make -j$numprocs
make install-strip DESTDIR=$RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.kcachegrind
tqfind . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind
tqfind . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.kcachegrind
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind
%clean
rm -rf $RPM_BUILD_ROOT/*

@ -167,7 +167,7 @@ bool CachegrindLoader::canLoadTrace(TQFile* file)
TQCString s;
s.setRawData(buf, read+1);
int pos = s.tqfind("events:");
int pos = s.find("events:");
if (pos>0 && buf[pos-1] != '\n') pos = -1;
s.resetRawData(buf, read+1);
return (pos>=0);
@ -346,7 +346,7 @@ TraceObject* CachegrindLoader::compressedObject(const TQString& name)
if ((name[0] != '(') || !name[1].isDigit()) return _data->object(checkUnknown(name));
// compressed format using _objectVector
int p = name.tqfind(')');
int p = name.find(')');
if (p<2) {
kdError() << _filename << ":" << _lineNo
<< " - Invalid compressed ELF object ('"
@ -400,7 +400,7 @@ TraceFile* CachegrindLoader::compressedFile(const TQString& name)
if ((name[0] != '(') || !name[1].isDigit()) return _data->file(checkUnknown(name));
// compressed format using _fileVector
int p = name.tqfind(')');
int p = name.find(')');
if (p<2) {
kdError() << _filename << ":" << _lineNo
<< " - Invalid compressed file ('"
@ -457,7 +457,7 @@ TraceFunction* CachegrindLoader::compressedFunction(const TQString& name,
return _data->function(checkUnknown(name), file, object);
// compressed format using _functionVector
int p = name.tqfind(')');
int p = name.find(')');
if (p<2) {
kdError() << _filename << ":" << _lineNo
<< " - Invalid compressed function ('"
@ -1030,8 +1030,8 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// positions:
if (line.stripPrefix("ositions:")) {
TQString positions(line);
hasLineInfo = (positions.tqfind("line")>=0);
hasAddrInfo = (positions.tqfind("instr")>=0);
hasLineInfo = (positions.find("line")>=0);
hasAddrInfo = (positions.find("instr")>=0);
continue;
}
break;

@ -174,13 +174,13 @@ TraceCall* GraphNode::visibleCalling()
void GraphNode::setCalling(GraphEdge* e)
{
_lastCallingIndex = callings.tqfindRef(e);
_lastCallingIndex = callings.findRef(e);
_lastFromCaller = false;
}
void GraphNode::setCaller(GraphEdge* e)
{
_lastCallerIndex = callers.tqfindRef(e);
_lastCallerIndex = callers.findRef(e);
_lastFromCaller = true;
}
@ -797,7 +797,7 @@ GraphNode* GraphExporter::node(TraceFunction* f)
{
if (!f) return 0;
GraphNodeMap::Iterator it = _nodeMap.tqfind(f);
GraphNodeMap::Iterator it = _nodeMap.find(f);
if (it == _nodeMap.end()) return 0;
return &(*it);
@ -805,7 +805,7 @@ GraphNode* GraphExporter::node(TraceFunction* f)
GraphEdge* GraphExporter::edge(TraceFunction* f1, TraceFunction* f2)
{
GraphEdgeMap::Iterator it = _edgeMap.tqfind(tqMakePair(f1, f2));
GraphEdgeMap::Iterator it = _edgeMap.find(tqMakePair(f1, f2));
if (it == _edgeMap.end()) return 0;
return &(*it);
@ -927,14 +927,14 @@ void GraphExporter::buildGraph(TraceFunction* f, int d,
if (call->isRecursion()) continue;
if (toCallings) {
GraphEdgeSet::Iterator it = n.callingSet.tqfind(&e);
GraphEdgeSet::Iterator it = n.callingSet.find(&e);
if (it == n.callingSet.end()) {
n.callings.append(&e);
n.callingSet.insert(&e, 1 );
}
}
else {
GraphEdgeSet::Iterator it = n.callerSet.tqfind(&e);
GraphEdgeSet::Iterator it = n.callerSet.find(&e);
if (it == n.callerSet.end()) {
n.callers.append(&e);
n.callerSet.insert(&e, 1 );
@ -1000,7 +1000,7 @@ void PannerView::drawContents(TQPainter * p, int clipx, int clipy, int clipw, in
void PannerView::contentsMousePressEvent(TQMouseEvent* e)
{
if (_zoomRect.isValid()) {
if (!_zoomRect.tqcontains(e->pos()))
if (!_zoomRect.contains(e->pos()))
emit zoomRectMoved(e->pos().x() - _zoomRect.center().x(),
e->pos().y() - _zoomRect.center().y());

@ -127,15 +127,15 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
TQString n = it.currentKey();
if (n.startsWith(objectPrefix)) {
n = n.remove(0, objectPrefix.length()+1);
if (oList.tqfindIndex(n) == -1) oList.append(n);
if (oList.findIndex(n) == -1) oList.append(n);
}
else if (n.startsWith(classPrefix)) {
n = n.remove(0, classPrefix.length()+1);
if (cList.tqfindIndex(n) == -1) cList.append(n);
if (cList.findIndex(n) == -1) cList.append(n);
}
else if (n.startsWith(filePrefix)) {
n = n.remove(0, filePrefix.length()+1);
if (fList.tqfindIndex(n) == -1) fList.append(n);
if (fList.findIndex(n) == -1) fList.append(n);
}
}
@ -388,7 +388,7 @@ void ConfigDlg::dirsAddPressed()
if (newDir.endsWith("/"))
newDir = newDir.left(newDir.length()-1);
if (dirs->tqfindIndex(newDir)>=0) return;
if (dirs->findIndex(newDir)>=0) return;
dirs->append(newDir);
if (newDir.isEmpty()) newDir = TQString("/");

@ -738,7 +738,7 @@ void FunctionSelection::updateGroupSizes(bool hideEmpty)
TQListViewItem* item = groupList->firstChild();
for (;item;item = item->nextSibling()) {
CostListItem* i = (CostListItem*)item;
int size = (_groupSize.tqcontains(i->costItem())) ?
int size = (_groupSize.contains(i->costItem())) ?
_groupSize[i->costItem()] : -1;
i->setSize(size);
i->setVisible(!hideEmpty || (size>0));
@ -774,28 +774,28 @@ void FunctionSelection::query(TQString query)
if (re.search(f->prettyName())>=0) {
if (_group) {
if (_groupType==TraceItem::Object) {
if (_groupSize.tqcontains(f->object()))
if (_groupSize.contains(f->object()))
_groupSize[f->object()]++;
else
_groupSize[f->object()] = 1;
if (f->object() != _group) continue;
}
else if (_groupType==TraceItem::Class) {
if (_groupSize.tqcontains(f->cls()))
if (_groupSize.contains(f->cls()))
_groupSize[f->cls()]++;
else
_groupSize[f->cls()] = 1;
if (f->cls() != _group) continue;
}
else if (_groupType==TraceItem::File) {
if (_groupSize.tqcontains(f->file()))
if (_groupSize.contains(f->file()))
_groupSize[f->file()]++;
else
_groupSize[f->file()] = 1;
if (f->file() != _group) continue;
}
else if (_groupType==TraceItem::FunctionCycle) {
if (_groupSize.tqcontains(f->cycle()))
if (_groupSize.contains(f->cycle()))
_groupSize[f->cycle()]++;
else
_groupSize[f->cycle()] = 1;

@ -615,7 +615,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
// generate command
TQString popencmd, objfile;
objfile = function->object()->name();
objfile = objfile.tqreplace(TQRegExp("[\"']"), ""); // security...
objfile = objfile.replace(TQRegExp("[\"']"), ""); // security...
popencmd = TQString("objdump -C -d "
"--start-address=0x%1 --stop-address=0x%2 \"%3\"")
.tqarg(dumpStartAddr.toString()).tqarg(dumpEndAddr.toString())

@ -128,7 +128,7 @@ void MultiView::selected(TraceItemView* sender, TraceItem* i)
// we react only on selection changes of the active TabView
if (sender != (TraceItemView*)_active) return;
_views.tqfindRef(_active);
_views.findRef(_active);
TabView* next = _views.next();
if (!next) next = _views.first();

@ -125,7 +125,7 @@ void PartAreaWidget::setGroupType(TraceCost::CostType gt)
bool PartAreaWidget::isHidden(TracePart* part) const
{
return (_hiddenParts.tqcontainsRef(part)>0);
return (_hiddenParts.containsRef(part)>0);
}
TQColor PartAreaWidget::groupColor(TraceFunction* f) const

@ -239,7 +239,7 @@ void PartSelection::activePartsChangedSlot(const TracePartList& list)
// first deselect inactive, then select active (makes current active)
for (i=l.first();i;i=l.next()) {
TracePart* part = ((PartItem*)i)->part();
bool active = (list.tqcontainsRef(part)>0);
bool active = (list.containsRef(part)>0);
if (!active && partAreaWidget->isSelected(i)) {
#if 0
qDebug("PartSelection::partsChangedSlot: Part %s changed to unselected.",
@ -251,7 +251,7 @@ void PartSelection::activePartsChangedSlot(const TracePartList& list)
}
for (i=l.first();i;i=l.next()) {
TracePart* part = ((PartItem*)i)->part();
bool active = (list.tqcontainsRef(part)>0);
bool active = (list.containsRef(part)>0);
if (active && !partAreaWidget->isSelected(i)) {
#if 0
qDebug("PartSelection::partsChangedSlot: Part %s changed to selected.",

@ -175,7 +175,7 @@ void PartView::doUpdate(int changeType)
for(;item;item = item->nextSibling()) {
part = ((PartListItem*)item)->part();
if (_partList.tqcontainsRef(part)>0) {
if (_partList.containsRef(part)>0) {
setSelected(item, true);
ensureItemVisible(item);
}
@ -214,7 +214,7 @@ void PartView::refresh()
TQListViewItem* item = 0;
for (part = allParts.first(); part; part = allParts.next()) {
if (hidden.tqfindRef(part)>=0) continue;
if (hidden.findRef(part)>=0) continue;
item = new PartListItem(this, f, _costType, _groupType, part);
if (part->isActive()) {

@ -57,7 +57,7 @@ SourceItem::SourceItem(SourceView* sv, TQListView* tqparent,
setText(0, TQString::number(lineno));
TQString s = src;
setText(4, s.tqreplace( TQRegExp("\t"), " " ));
setText(4, s.replace( TQRegExp("\t"), " " ));
updateGroup();
updateCost();

@ -172,7 +172,7 @@ TraceFunction* Stack::called(TraceFunction* fn, bool extend)
return 0;
}
bool Stack::tqcontains(TraceFunction* fn)
bool Stack::contains(TraceFunction* fn)
{
// cycles are listed on there own
if (fn->cycle() == fn) return false;
@ -337,7 +337,7 @@ HistoryItem* StackBrowser::select(TraceFunction* f)
}
Stack* s = _current->stack();
if (!s->tqcontains(f)) {
if (!s->contains(f)) {
s = s->split(f);
if (!s)
s = new Stack(f);

@ -29,7 +29,7 @@ public:
Stack(TraceFunction*);
// extend the stack at top/bottom if possible
bool tqcontains(TraceFunction*);
bool contains(TraceFunction*);
void extendBottom();
void extendTop();

@ -751,19 +751,19 @@ void TabView::readViewConfig(KConfig* c,
++it;
TQString n = TQString(v->widget()->name());
if (topTabs.tqcontains(n)) {
if (topTabs.contains(n)) {
moveTab(v->widget(), TraceItemView::Top);
if (n == activeT) activeTop = v;
}
else if (bottomTabs.tqcontains(n)) {
else if (bottomTabs.contains(n)) {
moveTab(v->widget(), TraceItemView::Bottom);
if (n == activeB) activeBottom = v;
}
else if (leftTabs.tqcontains(n)) {
else if (leftTabs.contains(n)) {
moveTab(v->widget(), TraceItemView::Left);
if (n == activeL) activeLeft = v;
}
else if (rightTabs.tqcontains(n)) {
else if (rightTabs.contains(n)) {
moveTab(v->widget(), TraceItemView::Right);
if (n == activeR) activeRight = v;
}

@ -259,7 +259,7 @@ void TopLevel::restoreCurrentState(TQString postfix)
// dock properties (not position, this should be have done before)
TQCString group = TQCString("PartOverview");
if (gList.tqcontains(group+pf)) group += pf;
if (gList.contains(group+pf)) group += pf;
KConfigGroup psConfig(kconfig, group);
_partSelection->readVisualisationConfig(&psConfig);
@ -2111,8 +2111,8 @@ void TopLevel::partsHideSelectedSlot()
TracePartList newHidden, newActive;
TracePartList l = _data->parts();
for (part=l.first();part;part=l.next()) {
if ((_activeParts.tqfindRef(part)>=0) ||
(_hiddenParts.tqfindRef(part)>=0))
if ((_activeParts.findRef(part)>=0) ||
(_hiddenParts.findRef(part)>=0))
newHidden.append(part);
else
newActive.append(part);

@ -1443,7 +1443,7 @@ TraceListCost::~TraceListCost()
void TraceListCost::addDep(TraceCost* dep)
{
#if TRACE_ASSERTIONS
if (_deps.tqfindRef(dep)>=0) {
if (_deps.findRef(dep)>=0) {
qDebug("addDep: %s already in list!",
dep->fullName().ascii());
return;
@ -1517,7 +1517,7 @@ TraceJumpListCost::~TraceJumpListCost()
void TraceJumpListCost::addDep(TraceJumpCost* dep)
{
#if TRACE_ASSERTIONS
if (_deps.tqfindRef(dep)>=0) {
if (_deps.findRef(dep)>=0) {
qDebug("addDep: %s already in list!",
dep->fullName().ascii());
return;
@ -1591,7 +1591,7 @@ TraceCallListCost::~TraceCallListCost()
void TraceCallListCost::addDep(TraceCallCost* dep)
{
#if TRACE_ASSERTIONS
if (_deps.tqfindRef(dep)>=0) {
if (_deps.findRef(dep)>=0) {
qDebug("addDep: %s already in list!",
dep->fullName().ascii());
return;
@ -1670,7 +1670,7 @@ TraceInclusiveListCost::~TraceInclusiveListCost()
void TraceInclusiveListCost::addDep(TraceInclusiveCost* dep)
{
#if TRACE_ASSERTIONS
if (_deps.tqfindRef(dep)>=0) {
if (_deps.findRef(dep)>=0) {
qDebug("addDep: %s already in list!",
dep->fullName().ascii());
return;
@ -1908,7 +1908,7 @@ TQString TracePartFunction::costString(TraceCostMapping* m)
void TracePartFunction::addPartInstr(TracePartInstr* ref)
{
#if TRACE_ASSERTIONS
if (_partInstr.tqfindRef(ref)>=0) {
if (_partInstr.findRef(ref)>=0) {
qDebug("TracePartFunction::addPartInstr: %s already in list!",
ref->name().ascii());
return;
@ -1929,7 +1929,7 @@ void TracePartFunction::addPartInstr(TracePartInstr* ref)
void TracePartFunction::addPartLine(TracePartLine* ref)
{
#if TRACE_ASSERTIONS
if (_partLines.tqfindRef(ref)>=0) {
if (_partLines.findRef(ref)>=0) {
qDebug("TracePartFunction::addPartLine: %s already in list!",
ref->name().ascii());
return;
@ -1950,7 +1950,7 @@ void TracePartFunction::addPartLine(TracePartLine* ref)
void TracePartFunction::addPartCaller(TracePartCall* ref)
{
#if TRACE_ASSERTIONS
if (_partCallers.tqfindRef(ref)>=0) {
if (_partCallers.findRef(ref)>=0) {
qDebug("TracePartFunction::addPartCaller: %s already in list!",
ref->name().ascii());
return;
@ -1971,7 +1971,7 @@ void TracePartFunction::addPartCaller(TracePartCall* ref)
void TracePartFunction::addPartCalling(TracePartCall* ref)
{
#if TRACE_ASSERTIONS
if (_partCallings.tqfindRef(ref)>=0) {
if (_partCallings.findRef(ref)>=0) {
qDebug("TracePartFunction::addPartCalling: %s already in list!",
ref->name().ascii());
return;
@ -2683,7 +2683,7 @@ TraceInstrJump* TraceInstr::instrJump(TraceInstr* to, bool isJmpCond)
void TraceInstr::addInstrCall(TraceInstrCall* instrCall)
{
#if TRACE_ASSERTIONS
if (_instrCalls.tqfindRef(instrCall)>=0) return;
if (_instrCalls.findRef(instrCall)>=0) return;
if (instrCall->instr() != this) {
qDebug("Can't add instruction call to another instruction!");
@ -2783,7 +2783,7 @@ TraceLineJump* TraceLine::lineJump(TraceLine* to, bool isJmpCond)
void TraceLine::addLineCall(TraceLineCall* lineCall)
{
#if TRACE_ASSERTIONS
if (_lineCalls.tqfindRef(lineCall)>=0) return;
if (_lineCalls.findRef(lineCall)>=0) return;
if (lineCall->line() != this) {
qDebug("Can't add line call to another line!");
@ -2908,7 +2908,7 @@ TraceLine* TraceFunctionSource::line(uint lineno, bool createNew)
if (!createNew) {
if (!_lineMap) return 0;
TraceLineMap::Iterator it = _lineMap->tqfind(lineno);
TraceLineMap::Iterator it = _lineMap->find(lineno);
if (it == _lineMap->end()) return 0;
return &(it.data());
}
@ -3240,7 +3240,7 @@ TQString TraceFunction::prettyName() const
if (_name.isEmpty())
return i18n("(unknown)");
int p = _name.tqfind('(');
int p = _name.find('(');
if (p>0) {
// handle C++ "operator()" correct
if ((_name[p+1] == ')') && (_name[p+2] == '(')) p+=2;
@ -3381,7 +3381,7 @@ TraceInstr* TraceFunction::instr(Addr addr, bool createNew)
if (!createNew) {
if (!_instrMap) return 0;
TraceInstrMap::Iterator it = _instrMap->tqfind(addr);
TraceInstrMap::Iterator it = _instrMap->find(addr);
if (it == _instrMap->end())
return 0;
return &(it.data());
@ -3410,7 +3410,7 @@ void TraceFunction::addCaller(TraceCall* caller)
return;
}
if (_callers.tqfindRef(caller)>=0) return;
if (_callers.findRef(caller)>=0) return;
#endif
_callers.append(caller);
@ -3426,7 +3426,7 @@ void TraceFunction::addCaller(TraceCall* caller)
TraceCall* TraceFunction::calling(TraceFunction* called)
{
TraceCallMap::Iterator it = _callingMap.tqfind(called);
TraceCallMap::Iterator it = _callingMap.find(called);
TraceCall* calling = (it == _callingMap.end()) ? 0 : it.data();
if (!calling) {
@ -3987,7 +3987,7 @@ void TraceFunctionCycle::setup()
TraceCall *call;
TraceCallList l = f->callers();
for (call=l.first();call;call=l.next()) {
if ( _memberSet.tqcontains(call->caller()) ) continue;
if ( _memberSet.contains(call->caller()) ) continue;
_callers.append(call);
}
@ -4041,7 +4041,7 @@ void TraceClass::addFunction(TraceFunction* function)
return;
}
if (_functions.tqfindRef(function)>=0) return;
if (_functions.findRef(function)>=0) return;
#endif
_functions.append(function);
@ -4088,7 +4088,7 @@ void TraceFile::addFunction(TraceFunction* function)
return;
}
if (_functions.tqfindRef(function)>=0) return;
if (_functions.findRef(function)>=0) return;
#endif
_functions.append(function);
@ -4138,7 +4138,7 @@ TQString TraceFile::directory()
if (!_dir.isEmpty()) return _dir;
int lastIndex = 0, index;
while ( (index=_name.tqfind("/", lastIndex)) >=0)
while ( (index=_name.find("/", lastIndex)) >=0)
lastIndex = index+1;
if (lastIndex==0) return TQString();
@ -4151,7 +4151,7 @@ TQString TraceFile::directory()
TQString TraceFile::shortName() const
{
int lastIndex = 0, index;
while ( (index=_name.tqfind("/", lastIndex)) >=0)
while ( (index=_name.find("/", lastIndex)) >=0)
lastIndex = index+1;
return _name.mid(lastIndex);
@ -4206,7 +4206,7 @@ void TraceObject::addFunction(TraceFunction* function)
return;
}
if (_functions.tqfindRef(function)>=0) return;
if (_functions.findRef(function)>=0) return;
#endif
_functions.append(function);
@ -4226,7 +4226,7 @@ void TraceObject::setName(const TQString& name)
_name = name;
int lastIndex = 0, index;
while ( (index=_name.tqfind("/", lastIndex)) >=0)
while ( (index=_name.find("/", lastIndex)) >=0)
lastIndex = index+1;
_shortName = _name.mid(lastIndex);
@ -4290,7 +4290,7 @@ void TracePart::setProcessID(int pid)
TQString TracePart::shortName() const
{
int lastIndex = 0, index;
while ( (index=_name.tqfind("/", lastIndex)) >=0)
while ( (index=_name.find("/", lastIndex)) >=0)
lastIndex = index+1;
return _name.mid(lastIndex);
@ -4389,7 +4389,7 @@ TraceData::~TraceData()
TQString TraceData::shortTraceName() const
{
int lastIndex = 0, index;
while ( (index=_traceName.tqfind("/", lastIndex)) >=0)
while ( (index=_traceName.find("/", lastIndex)) >=0)
lastIndex = index+1;
return _traceName.mid(lastIndex);
@ -4568,7 +4568,7 @@ bool TraceData::activateParts(const TracePartList& l)
TracePart* part;
for (part=_parts.first();part;part=_parts.next())
if (part->activate(l.tqcontainsRef(part)>0))
if (part->activate(l.containsRef(part)>0))
changed = true;
if (changed) {
@ -4588,7 +4588,7 @@ bool TraceData::activateParts(TracePartList l, bool active)
TracePart* part;
for (part=l.first();part;part=l.next())
if (_parts.tqfindRef(part)>=0)
if (_parts.findRef(part)>=0)
if (part->activate(active))
changed = true;
@ -4715,16 +4715,16 @@ TraceClass* TraceData::cls(const TQString& fnName, TQString& shortName)
int lastIndex = 0, index, pIndex;
// we ignore any "::" after a '(' or a space
pIndex=fnName.tqfind("(", 0);
pIndex=fnName.find("(", 0);
#if 0
int sIndex=fnName.tqfind(" ", 0);
int sIndex=fnName.find(" ", 0);
if (sIndex>=0)
if ((pIndex == -1) || (sIndex < pIndex))
pIndex = sIndex;
#endif
while ((index=fnName.tqfind("::", lastIndex)) >=0) {
while ((index=fnName.find("::", lastIndex)) >=0) {
if (pIndex>=0 && pIndex<index) break;
lastIndex = index+2;
}
@ -4766,7 +4766,7 @@ TraceFunction* TraceData::function(const TQString& name,
TQString key = name + object->shortName();
TraceFunctionMap::Iterator it;
it = _functionMap.tqfind(key);
it = _functionMap.find(key);
if (it == _functionMap.end()) {
it = _functionMap.insert(key, TraceFunction());
TraceFunction& f = it.data();
@ -4803,7 +4803,7 @@ TraceFunctionMap::Iterator TraceData::functionIterator(TraceFunction* f)
key += f->name();
key += f->object()->shortName();
return _functionMap.tqfind(key);
return _functionMap.find(key);
}
TraceFunctionMap::ConstIterator TraceData::functionBeginIterator() const

@ -62,7 +62,7 @@ KConfigGroup* TraceItemView::configGroup(KConfig* c,
TQString group, TQString post)
{
TQStringList gList = c->groupList();
if (gList.tqcontains((group+post).ascii()) ) group += post;
if (gList.contains((group+post).ascii()) ) group += post;
return new KConfigGroup(c, group);
}

@ -1096,7 +1096,7 @@ void TreeMapTip::maybeTip( const TQPoint& pos )
if (rList) {
TQRect* r;
for(r=rList->first();r;r=rList->next())
if (r->tqcontains(pos))
if (r->contains(pos))
tip(*r, p->tipString(i));
}
}
@ -1459,10 +1459,10 @@ void TreeMapWidget::setMinimalArea(int area)
void TreeMapWidget::deletingItem(TreeMapItem* i)
{
// remove any references to the item to be deleted
while(_selection.tqfindRef(i) > -1)
while(_selection.findRef(i) > -1)
_selection.remove();
while(_tmpSelection.tqfindRef(i) > -1)
while(_tmpSelection.findRef(i) > -1)
_tmpSelection.remove();
if (_current == i) _current = 0;
@ -1504,7 +1504,7 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const
TreeMapItem* p = _base;
TreeMapItem* i;
if (!TQT_TQRECT_OBJECT(rect()).tqcontains(x, y)) return 0;
if (!TQT_TQRECT_OBJECT(rect()).contains(x, y)) return 0;
if (DEBUG_DRAWING) kdDebug(90100) << "item(" << x << "," << y << "):" << endl;
while (1) {
@ -1521,7 +1521,7 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const
<< "-" << i->tqitemRect().width()
<< "x" << i->tqitemRect().height() << ")" << endl;
if (i->tqitemRect().tqcontains(x, y)) {
if (i->tqitemRect().contains(x, y)) {
if (DEBUG_DRAWING) kdDebug(90100) << " .. Got. Index " << idx << endl;
@ -1572,7 +1572,7 @@ TreeMapItem* TreeMapWidget::visibleItem(TreeMapItem* i) const
(i->tqitemRect().height() <1))) {
TreeMapItem* p = i->tqparent();
if (!p) break;
int idx = p->tqchildren()->tqfindRef(i);
int idx = p->tqchildren()->findRef(i);
idx--;
if (idx<0)
i = p;
@ -1622,12 +1622,12 @@ TreeMapItemList TreeMapWidget::diff(TreeMapItemList& l1,
TreeMapItem* item;
while ( (item = it1.current()) != 0 ) {
++it1;
if (l2.tqcontainsRef(item) > 0) continue;
if (l2.containsRef(item) > 0) continue;
l.append(item);
}
while ( (item = it2.current()) != 0 ) {
++it2;
if (l1.tqcontainsRef(item) > 0) continue;
if (l1.containsRef(item) > 0) continue;
l.append(item);
}
@ -1694,12 +1694,12 @@ bool TreeMapWidget::clearSelection(TreeMapItem* tqparent)
bool TreeMapWidget::isSelected(TreeMapItem* i) const
{
return _selection.tqcontainsRef(i)>0;
return _selection.containsRef(i)>0;
}
bool TreeMapWidget::isTmpSelected(TreeMapItem* i)
{
return _tmpSelection.tqcontainsRef(i)>0;
return _tmpSelection.containsRef(i)>0;
}
@ -1964,7 +1964,7 @@ int nextVisible(TreeMapItem* i)
TreeMapItem* p = i->tqparent();
if (!p || p->tqitemRect().isEmpty()) return -1;
int idx = p->tqchildren()->tqfindRef(i);
int idx = p->tqchildren()->findRef(i);
if (idx<0) return -1;
while (idx < (int)p->tqchildren()->count()-1) {
@ -1982,7 +1982,7 @@ int prevVisible(TreeMapItem* i)
TreeMapItem* p = i->tqparent();
if (!p || p->tqitemRect().isEmpty()) return -1;
int idx = p->tqchildren()->tqfindRef(i);
int idx = p->tqchildren()->findRef(i);
if (idx<0) return -1;
while (idx > 0) {

@ -328,7 +328,7 @@ public:
virtual double sum() const;
virtual double value() const;
// tqreplace "Default" position with setting from TreeMapWidget
// replace "Default" position with setting from TreeMapWidget
virtual Position position(int) const;
virtual const TQFont& font() const;
virtual bool isMarked(int) const;

@ -54,12 +54,12 @@ bool KDEAccountsFormat::loadAll( KABC::AddressBook *book,
TQString name;
TQString email;
int firstSpace = line.tqfind( delim );
int firstSpace = line.find( delim );
if ( firstSpace > 0 )
{
nickName = line.left( firstSpace );
int lastSpace = line.tqfindRev( delim );
int lastSpace = line.findRev( delim );
if ( lastSpace > firstSpace )
{
email = line.mid( lastSpace +1 );

@ -94,25 +94,25 @@ bool KCppPlugin::readInfo( KFileMetaInfo& info, uint )
continue;
}
if (line.tqcontains("/*")) inComment = true;
if (line.contains("/*")) inComment = true;
if (!inComment)
{
codeLines++;
if (line.tqcontains(TQRegExp("^\\s*#\\s*include"))) Includes++;
if (line.contains(TQRegExp("^\\s*#\\s*include"))) Includes++;
int pos = line.tqfind("//");
int pos = line.find("//");
if (pos>=0) commentLines++;
// truncate the comment - we don't want to count strings in it
line.truncate(pos);
Strings+=line.tqcontains(TQRegExp("\".*\""));
Stringsi18n+=line.tqcontains(TQRegExp("(?:i18n|I18N_NOOP)\\s*\\("));
Strings+=line.contains(TQRegExp("\".*\""));
Stringsi18n+=line.contains(TQRegExp("(?:i18n|I18N_NOOP)\\s*\\("));
}
else
commentLines++;
if (line.tqcontains("*/")) inComment = false;
if (line.contains("*/")) inComment = false;
}
KFileMetaInfoGroup group = appendGroup(info, "General");

@ -210,25 +210,25 @@ enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const TQStringList li
while ( it != lines.end() )
{
line = (*it);
if ( line.tqfind( TQRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 )
if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 )
{
return KDiffPlugin::Normal;
}
else if ( line.tqfind( TQRegExp( "^--- " ), 0 ) == 0 )
else if ( line.find( TQRegExp( "^--- " ), 0 ) == 0 )
{
// unified has first a '^--- ' line, then a '^+++ ' line
return KDiffPlugin::Unified;
}
else if ( line.tqfind( TQRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 )
else if ( line.find( TQRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 )
{
// context has first a '^*** ' line, then a '^--- ' line
return KDiffPlugin::Context;
}
else if ( line.tqfind( TQRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 )
else if ( line.find( TQRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 )
{
return KDiffPlugin::RCS;
}
else if ( line.tqfind( TQRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 )
else if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 )
{
return KDiffPlugin::Ed;
}

@ -66,18 +66,18 @@ bool KTsPlugin::readInfo(KFileMetaInfo& info, uint)
TQString line = stream.readLine();
// is it really a linguist file?
if (!line.tqcontains("<!DOCTYPE TS>", false))
if (!line.contains("<!DOCTYPE TS>", false))
return false;
while (!stream.eof())
{
line = stream.readLine();
if (line.tqcontains("type=\"obsolete\"")) obsolete++;
if (line.contains("type=\"obsolete\"")) obsolete++;
if (line.tqcontains("<source>")) messages++;
if (line.contains("<source>")) messages++;
if (line.tqcontains("type=\"unfinished\"")) untranslated++;
if (line.contains("type=\"unfinished\"")) untranslated++;
}

@ -247,7 +247,7 @@ void kio_svnProtocol::get(const KURL& url ){
//find the requested revision
svn_opt_revision_t rev;
svn_opt_revision_t endrev;
int idx = target.tqfindRev( "?rev=" );
int idx = target.findRev( "?rev=" );
if ( idx != -1 ) {
TQString revstr = target.mid( idx+5 );
#if 0
@ -309,7 +309,7 @@ void kio_svnProtocol::stat(const KURL & url){
//find the requested revision
svn_opt_revision_t rev;
svn_opt_revision_t endrev;
int idx = target.tqfindRev( "?rev=" );
int idx = target.findRev( "?rev=" );
if ( idx != -1 ) {
TQString revstr = target.mid( idx+5 );
#if 0
@ -414,7 +414,7 @@ void kio_svnProtocol::listDir(const KURL& url){
//find the requested revision
svn_opt_revision_t rev;
svn_opt_revision_t endrev;
int idx = target.tqfindRev( "?rev=" );
int idx = target.findRev( "?rev=" );
if ( idx != -1 ) {
TQString revstr = target.mid( idx+5 );
svn_opt_parse_revision( &rev, &endrev, revstr.utf8(), subpool );
@ -530,7 +530,7 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions
//find the requested revision
svn_opt_revision_t rev;
int idx = srcsvn.tqfindRev( "?rev=" );
int idx = srcsvn.findRev( "?rev=" );
if ( idx != -1 ) {
TQString revstr = srcsvn.mid( idx+5 );
kdDebug(7128) << "revision string found " << revstr << endl;
@ -650,7 +650,7 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite
//find the requested revision
svn_opt_revision_t rev;
int idx = srcsvn.tqfindRev( "?rev=" );
int idx = srcsvn.findRev( "?rev=" );
if ( idx != -1 ) {
TQString revstr = srcsvn.mid( idx+5 );
kdDebug(7128) << "revision string found " << revstr << endl;
@ -1234,7 +1234,7 @@ TQString kio_svnProtocol::makeSvnURL ( const KURL& url ) const {
tpURL.setProtocol("file");
svnUrl = tpURL.url(-1);
//hack : add one more / after file:/
int idx = svnUrl.tqfind("/");
int idx = svnUrl.find("/");
svnUrl.insert( idx, "//" );
return svnUrl;
}

@ -120,9 +120,9 @@ void parseLine(const TQCString &_line, char operation)
maxBytes = totalBytes;
if (count > maxCount)
maxCount = count;
if (entryDict->tqfind(entry->base))
if (entryDict->find(entry->base))
fprintf(stderr, "\rAllocated twice: 0x%08x \n", entry->base);
entryDict->tqreplace(entry->base, entry);
entryDict->replace(entry->base, entry);
} break;
case '-':
{
@ -155,7 +155,7 @@ void sortBlocks()
entryList->append(entry);
for(int i = 0; entry->backtrace[i]; i++)
{
if (!symbolDict->tqfind(entry->backtrace[i]))
if (!symbolDict->find(entry->backtrace[i]))
symbolDict->insert(entry->backtrace[i], unknown);
}
}
@ -170,7 +170,7 @@ void collectDupes()
{
Entry *entry = it.current();
++it;
Entry *entry2 = dupeDict.tqfind(entry->signature);
Entry *entry2 = dupeDict.find(entry->signature);
if (entry2)
{
entry2->count++;
@ -223,7 +223,7 @@ int lookupSymbols(FILE *stream)
if (addr)
{
long i_addr = fromHex(addr);
const char* str = symbolDict->tqfind(i_addr);
const char* str = symbolDict->find(i_addr);
if (str == unknown)
{
*addr = 0;
@ -232,7 +232,7 @@ int lookupSymbols(FILE *stream)
str = qstrdup(rindex(line2, '/')+1);
else
str = qstrdup(line2);
symbolDict->tqreplace(i_addr, str);
symbolDict->replace(i_addr, str);
symbols++;
}
}
@ -285,7 +285,7 @@ void lookupUnknownSymbols(const char *appname)
TQCString symbol;
symbol.sprintf("%s(%s)", buffer2, buffer1);
if(*buffer1 != '?')
symbolDict->tqreplace(it2.currentKey(),qstrdup(symbol.data()));
symbolDict->replace(it2.currentKey(),qstrdup(symbol.data()));
}
fclose(fInputFile);
}
@ -308,9 +308,9 @@ int match(const char *s1, const char *s2)
const char *lookupAddress(int addr)
{
char *str = formatDict->tqfind(addr);
char *str = formatDict->find(addr);
if (str) return str;
TQCString s = symbolDict->tqfind(addr);
TQCString s = symbolDict->find(addr);
if (s.isEmpty())
{
fprintf(stderr, "Error!\n");
@ -318,15 +318,15 @@ fprintf(stderr, "Error!\n");
}
else
{
int start = s.tqfind('(');
int end = s.tqfindRev('+');
int start = s.find('(');
int end = s.findRev('+');
if (end < 0)
end = s.tqfindRev(')');
end = s.findRev(')');
if ((start > 0) && (end > start))
{
TQCString symbol = s.mid(start+1, end-start-1);
char *res = 0;
if (symbol.tqfind(')') == -1)
if (symbol.find(')') == -1)
res = cplus_demangle(symbol.data(), DMGL_PARAMS | DMGL_AUTO | DMGL_ANSI );
if (res)
@ -344,7 +344,7 @@ fprintf(stderr, "Error!\n");
return excluded;
}
}
s.tqreplace(start+1, end-start-1, symbol);
s.replace(start+1, end-start-1, symbol);
}
}
str = qstrdup(s.data());
@ -439,12 +439,12 @@ void buildTree ()
; // find last (topmost) backtrace entry
for (--i; i >= 0; --i)
{
TreeList::Iterator pos = list->tqfind (entry->backtrace[i]);
TreeList::Iterator pos = list->find (entry->backtrace[i]);
if (pos == list->end ())
{
list->prepend (TreeEntry (entry->backtrace[i], entry->total_size,
entry->count));
pos = list->tqfind (entry->backtrace[i]);
pos = list->find (entry->backtrace[i]);
}
else
*pos = TreeEntry (entry->backtrace[i],
@ -642,7 +642,7 @@ int main(int argc, char *argv[])
exe = app.stripWhiteSpace();
fprintf(stderr, "ktrace.out: malloc trace of %s\n", exe.data());
}
else if(!app.tqcontains(exe.data()))
else if(!app.contains(exe.data()))
{
fprintf(stderr, "trace file was for application '%s', not '%s'\n", app.data(), exe.data());
exit(1);

@ -62,7 +62,7 @@ int main(int argc, char **argv)
{
fgets(buf, 1024, call_file);
TQString line = TQString::tqfromLatin1(buf).stripWhiteSpace();
if (dict.tqfind(line))
if (dict.find(line))
{
qWarning("%s", line.latin1());
}

@ -551,8 +551,8 @@ void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* mo
if ( !m_dirName.isEmpty() )
{
if ( path.tqfind( m_dirName ) > -1 )
path = path.tqreplace( path.tqfind( m_dirName ), m_dirName.length(), "" );
if ( path.find( m_dirName ) > -1 )
path = path.replace( path.find( m_dirName ), m_dirName.length(), "" );
}
// kdDebug(8105) << "Path after removal of own dir (\"" << m_dirName << "\") = " << path << endl;
@ -565,7 +565,7 @@ void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* mo
KDirLVI* child;
TQString dir = path.mid( 0, path.tqfind( "/", 0 ) + 1 );
TQString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
child = findChild( dir );
if ( !child )
{

@ -154,7 +154,7 @@ int KompareListView::firstVisibleDifference()
}
if( item )
return m_items.tqfindIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
return m_items.findIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
return -1;
}
@ -177,7 +177,7 @@ int KompareListView::lastVisibleDifference()
}
if( item )
return m_items.tqfindIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
return m_items.findIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
return -1;
}
@ -658,7 +658,7 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
// kdDebug(8104) << "c->offset() = " << c->offset() << endl;
// kdDebug(8104) << "prevValue = " << prevValue << endl;
textChunk.tqreplace( TQChar('\t'), kompareListView()->spaces() );
textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
prevValue = m->offset();
if ( m->type() == Marker::End )
{
@ -688,7 +688,7 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co
{
// Still have to draw some string without changes
textChunk = m_text->string().mid( prevValue, kMax( ( unsigned int )1, m_text->string().length() - prevValue ) );
textChunk.tqreplace( TQChar('\t'), kompareListView()->spaces() );
textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
TQFont font( p->font() );
font.setBold( false );

@ -53,27 +53,27 @@ enum Kompare::Format CVSDiffParser::determineFormat()
while( it != m_diffLines.end() )
{
if( (*it).tqfind( normalRE, 0 ) == 0 )
if( (*it).find( normalRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a Normal diff..." << endl;
return Kompare::Normal;
}
else if( (*it).tqfind( unifiedRE, 0 ) == 0 )
else if( (*it).find( unifiedRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a Unified diff..." << endl;
return Kompare::Unified;
}
else if( (*it).tqfind( contextRE, 0 ) == 0 )
else if( (*it).find( contextRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a Context diff..." << endl;
return Kompare::Context;
}
else if( (*it).tqfind( rcsRE, 0 ) == 0 )
else if( (*it).find( rcsRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from a RCS diff..." << endl;
return Kompare::RCS;
}
else if( (*it).tqfind( edRE, 0 ) == 0 )
else if( (*it).find( edRE, 0 ) == 0 )
{
// kdDebug(8101) << "Difflines are from an ED diff..." << endl;
return Kompare::Ed;

@ -79,10 +79,10 @@ void DiffModel::splitSourceInPathAndFileName()
{
int pos;
if( ( pos = m_source.tqfindRev( "/" ) ) >= 0 )
if( ( pos = m_source.findRev( "/" ) ) >= 0 )
m_sourcePath = m_source.mid( 0, pos+1 );
if( ( pos = m_source.tqfindRev( "/" ) ) >= 0 )
if( ( pos = m_source.findRev( "/" ) ) >= 0 )
m_sourceFile = m_source.mid( pos+1, m_source.length() - pos );
else
m_sourceFile = m_source;
@ -94,10 +94,10 @@ void DiffModel::splitDestinationInPathAndFileName()
{
int pos;
if( ( pos = m_destination.tqfindRev( "/" ) )>= 0 )
if( ( pos = m_destination.findRev( "/" ) )>= 0 )
m_destinationPath = m_destination.mid( 0, pos+1 );
if( ( pos = m_destination.tqfindRev( "/" ) ) >= 0 )
if( ( pos = m_destination.findRev( "/" ) ) >= 0 )
m_destinationFile = m_destination.mid( pos+1, m_destination.length() - pos );
else
m_destinationFile = m_source;
@ -393,10 +393,10 @@ bool DiffModel::setSelectedDifference( Difference* diff )
if ( diff != m_selectedDifference )
{
if ( ( m_differences.tqfindIndex( diff ) ) == -1 )
if ( ( m_differences.findIndex( diff ) ) == -1 )
return false;
// Dont set m_diffIndex if it cant be found
m_diffIndex = m_differences.tqfindIndex( diff );
m_diffIndex = m_differences.findIndex( diff );
kdDebug( 8101 ) << "m_diffIndex = " << m_diffIndex << endl;
m_selectedDifference = diff;
}

@ -61,7 +61,7 @@ public:
DifferenceList* allDifferences();
int findDifference( Difference* diff ) const { return m_differences.tqfindIndex( diff ); }
int findDifference( Difference* diff ) const { return m_differences.findIndex( diff ); }
Difference* firstDifference();
Difference* lastDifference();

@ -49,27 +49,27 @@ enum Kompare::Format DiffParser::determineFormat()
while( it != m_diffLines.end() )
{
kdDebug(8101) << (*it) << endl;
if( (*it).tqfind( normalRE, 0 ) == 0 )
if( (*it).find( normalRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Normal diff..." << endl;
return Kompare::Normal;
}
else if( (*it).tqfind( unifiedRE, 0 ) == 0 )
else if( (*it).find( unifiedRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Unified diff..." << endl;
return Kompare::Unified;
}
else if( (*it).tqfind( contextRE, 0 ) == 0 )
else if( (*it).find( contextRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Context diff..." << endl;
return Kompare::Context;
}
else if( (*it).tqfind( rcsRE, 0 ) == 0 )
else if( (*it).find( rcsRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from an RCS diff..." << endl;
return Kompare::RCS;
}
else if( (*it).tqfind( edRE, 0 ) == 0 )
else if( (*it).find( edRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from an ED diff..." << endl;
return Kompare::Ed;

@ -135,7 +135,7 @@ public:
relative += "../";
}
relative += TQString( to ).tqreplace( 0, root.path(1).length(), "" );
relative += TQString( to ).replace( 0, root.path(1).length(), "" );
return relative;
}

@ -494,7 +494,7 @@ TQStringList KompareModelList::split( const TQString& fileContents )
#else
const char split = '\n';
#endif
while ( ( pos = contents.tqfind( split, oldpos ) ) >= 0 )
while ( ( pos = contents.find( split, oldpos ) ) >= 0 )
{
list.append( contents.mid( oldpos, pos - oldpos + 1 ) );
oldpos = pos + 1;
@ -637,7 +637,7 @@ void KompareModelList::slotSelectionChanged( const Diff2::DiffModel* model, cons
// kdDebug(8101) << kdBacktrace() << endl;
m_selectedModel = const_cast<DiffModel*>(model);
m_modelIndex = m_models->tqfindIndex( m_selectedModel );
m_modelIndex = m_models->findIndex( m_selectedModel );
kdDebug( 8101 ) << "m_modelIndex = " << m_modelIndex << endl;
m_selectedDifference = const_cast<Difference*>(diff);
@ -1255,10 +1255,10 @@ bool KompareModelList::setSelectedModel( DiffModel* model )
if ( model != m_selectedModel )
{
if ( m_models->tqfindIndex( model ) == -1 )
if ( m_models->findIndex( model ) == -1 )
return false;
kdDebug(8101) << "m_selectedModel (was) = " << m_selectedModel << endl;
m_modelIndex = m_models->tqfindIndex( model );
m_modelIndex = m_models->findIndex( model );
kdDebug(8101) << "m_selectedModel (is) = " << m_selectedModel << endl;
m_selectedModel = model;
}

@ -88,11 +88,11 @@ public:
int appliedCount() const;
const DiffModel* modelAt( int i ) const { return *( m_models->at( i ) ); };
int findModel( DiffModel* model ) const { return m_models->tqfindIndex( model ); };
int findModel( DiffModel* model ) const { return m_models->findIndex( model ); };
bool isModified() const;
int currentModel() const { return m_models->tqfindIndex( m_selectedModel ); };
int currentModel() const { return m_models->findIndex( m_selectedModel ); };
int currentDifference() const { return m_selectedModel ? m_selectedModel->findDifference( m_selectedDifference ) : -1; };
const DiffModel* selectedModel() const { return m_selectedModel; };

@ -50,7 +50,7 @@ int Parser::cleanUpCrap( TQStringList& diffLines )
// correcting the advance of the iterator because of the remove
--it;
TQString temp( *it );
temp.truncate( temp.tqfind( '\n' ) );
temp.truncate( temp.find( '\n' ) );
*it = temp;
++nol;
}

@ -53,22 +53,22 @@ enum Kompare::Format PerforceParser::determineFormat()
while( it != m_diffLines.end() )
{
if( (*it).tqfind( unifiedRE, 0 ) == 0 )
if( (*it).find( unifiedRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Unified diff..." << endl;
return Kompare::Unified;
}
else if( (*it).tqfind( contextRE, 0 ) == 0 )
else if( (*it).find( contextRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Context diff..." << endl;
return Kompare::Context;
}
else if( (*it).tqfind( normalRE, 0 ) == 0 )
else if( (*it).find( normalRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a Normal diff..." << endl;
return Kompare::Normal;
}
else if( (*it).tqfind( rcsRE, 0 ) == 0 )
else if( (*it).find( rcsRE, 0 ) == 0 )
{
kdDebug(8101) << "Difflines are from a RCS diff..." << endl;
return Kompare::RCS;

@ -13,7 +13,7 @@ diff -c -r1.2 dcopfind.cpp
! bool findObject( const char* app, const char* obj, const char* func, int argc, char** args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
--- 36,42 ----
static bool bAppIdOnly = 0;
static bool bLaunchApp = 0;
@ -21,7 +21,7 @@ diff -c -r1.2 dcopfind.cpp
! bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
***************
*** 118,124 ****
f = fc;

@ -83,8 +83,8 @@ diff -c -r1.26 dcop.cpp
{
-
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );
int left = f.find( '(' );
int right = f.find( ')' );
--- 146,153 ----
}
}
@ -92,8 +92,8 @@ diff -c -r1.26 dcop.cpp
! void callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );
int left = f.find( '(' );
int right = f.find( ')' );
***************
*** 136,142 ****
bool ok = false;
@ -116,7 +116,7 @@ diff -c -r1.26 dcop.cpp
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
! int a = (*it).tqcontains(',');
! int a = (*it).contains(',');
! if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) )
break;
}
@ -127,12 +127,12 @@ diff -c -r1.26 dcop.cpp
! exit(1);
}
f = realfunc;
left = f.tqfind( '(' );
left = f.find( '(' );
--- 180,195 ----
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
! uint a = (*it).tqcontains(',');
! uint a = (*it).contains(',');
! if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
break;
}
@ -144,7 +144,7 @@ diff -c -r1.26 dcop.cpp
! return;
}
f = realfunc;
left = f.tqfind( '(' );
left = f.find( '(' );
***************
*** 243,253 ****
QCString replyType;
@ -363,13 +363,13 @@ diff -c -r1.26 dcop.cpp
QCString function;
! QCStringList params;
! DCOPClient *client = 0L;
! if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
! if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
{
! // WARNING: This part (until the closing '}') could very
! // well be broken now. As I don't know how to trigger and test
! // dcoprefs this code is *not* tested. It compiles and it looks
! // ok to me, but that's all I can say - Martijn (2001/12/24)
! int delimPos = args[ 0 ].tqfindRev( ',' );
! int delimPos = args[ 0 ].findRev( ',' );
! if( delimPos == -1 )
! {
! cerr << "Error: '" << args[ 0 ]
@ -748,7 +748,7 @@ diff -c -r1.2 dcopfind.cpp
! bool findObject( const char* app, const char* obj, const char* func, int argc, char** args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
--- 36,42 ----
static bool bAppIdOnly = 0;
static bool bLaunchApp = 0;
@ -756,7 +756,7 @@ diff -c -r1.2 dcopfind.cpp
! bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
***************
*** 118,124 ****
f = fc;

@ -352,7 +352,7 @@ int main( int argc, char** argv )
// well be broken now. As I don't know how to trigger and test
// dcoprefs this code is *not* tested. It compiles and it looks
// ok to me, but that's all I can say - Martijn (2001/12/24)
int delimPos = args[ 0 ].tqfindRev( ',' );
int delimPos = args[ 0 ].findRev( ',' );
if( delimPos == -1 )
{
cerr << "Error: '" << args[ 0 ]
@ -376,7 +376,7 @@ int main( int argc, char** argv )
286,287c
QCStringList params;
DCOPClient *client = 0L;
if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
.
282a
/**
@ -498,7 +498,7 @@ void showHelp( int exitCode = 0 )
return;
.
156,157c
uint a = (*it).tqcontains(',');
uint a = (*it).contains(',');
if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
.
139c

@ -60,10 +60,10 @@ diff -r1.26 dcop.cpp
---
> if ( !ok && args.isEmpty() )
156,157c183,184
< int a = (*it).tqcontains(',');
< int a = (*it).contains(',');
< if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) )
---
> uint a = (*it).tqcontains(',');
> uint a = (*it).contains(',');
> if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
164c191,192
< exit(1);
@ -201,7 +201,7 @@ diff -r1.26 dcop.cpp
---
> QCStringList params;
> DCOPClient *client = 0L;
> if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
> if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
289,304c406,429
< char *delim = strchr(argv[1], ',');
< if (!delim)
@ -224,7 +224,7 @@ diff -r1.26 dcop.cpp
> // well be broken now. As I don't know how to trigger and test
> // dcoprefs this code is *not* tested. It compiles and it looks
> // ok to me, but that's all I can say - Martijn (2001/12/24)
> int delimPos = args[ 0 ].tqfindRev( ',' );
> int delimPos = args[ 0 ].findRev( ',' );
> if( delimPos == -1 )
> {
> cerr << "Error: '" << args[ 0 ]

@ -53,7 +53,7 @@ a139 1
if ( !ok && args.isEmpty() )
d156 2
a157 2
uint a = (*it).tqcontains(',');
uint a = (*it).contains(',');
if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
d164 1
a164 2
@ -175,14 +175,14 @@ d286 2
a287 3
QCStringList params;
DCOPClient *client = 0L;
if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
d289 16
a304 24
// WARNING: This part (until the closing '}') could very
// well be broken now. As I don't know how to trigger and test
// dcoprefs this code is *not* tested. It compiles and it looks
// ok to me, but that's all I can say - Martijn (2001/12/24)
int delimPos = args[ 0 ].tqfindRev( ',' );
int delimPos = args[ 0 ].findRev( ',' );
if( delimPos == -1 )
{
cerr << "Error: '" << args[ 0 ]

@ -13,7 +13,7 @@ diff -u -r1.2 dcopfind.cpp
+bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
@@ -118,7 +118,7 @@
f = fc;
}

@ -67,8 +67,8 @@ diff -u -r1.26 dcop.cpp
{
-
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );
int left = f.find( '(' );
int right = f.find( ')' );
@@ -136,7 +163,7 @@
bool ok = false;
QCStringList funcs = dcop->remoteFunctions( app, obj, &ok );
@ -82,9 +82,9 @@ diff -u -r1.26 dcop.cpp
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
- int a = (*it).tqcontains(',');
- int a = (*it).contains(',');
- if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) )
+ uint a = (*it).tqcontains(',');
+ uint a = (*it).contains(',');
+ if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
break;
}
@ -97,7 +97,7 @@ diff -u -r1.26 dcop.cpp
+ return;
}
f = realfunc;
left = f.tqfind( '(' );
left = f.find( '(' );
@@ -243,11 +271,12 @@
QCString replyType;
QDataStream arg(data, IO_WriteOnly);
@ -237,7 +237,7 @@ diff -u -r1.26 dcop.cpp
- if ((argc > 1) && (strncmp(argv[1], "DCOPRef(", 8)) == 0)
+ QCStringList params;
+ DCOPClient *client = 0L;
+ if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
+ if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
{
- char *delim = strchr(argv[1], ',');
- if (!delim)
@ -259,7 +259,7 @@ diff -u -r1.26 dcop.cpp
+ // well be broken now. As I don't know how to trigger and test
+ // dcoprefs this code is *not* tested. It compiles and it looks
+ // ok to me, but that's all I can say - Martijn (2001/12/24)
+ int delimPos = args[ 0 ].tqfindRev( ',' );
+ int delimPos = args[ 0 ].findRev( ',' );
+ if( delimPos == -1 )
+ {
+ cerr << "Error: '" << args[ 0 ]
@ -669,7 +669,7 @@ diff -u -r1.2 dcopfind.cpp
+bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
@@ -118,7 +118,7 @@
f = fc;
}

@ -79,8 +79,8 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp
{
-
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );
int left = f.find( '(' );
int right = f.find( ')' );
--- 146,153 ----
}
}
@ -88,8 +88,8 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp
! void callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );
int left = f.find( '(' );
int right = f.find( ')' );
***************
*** 136,142 ****
bool ok = false;
@ -112,7 +112,7 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
! int a = (*it).tqcontains(',');
! int a = (*it).contains(',');
! if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) )
break;
}
@ -123,12 +123,12 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp
! exit(1);
}
f = realfunc;
left = f.tqfind( '(' );
left = f.find( '(' );
--- 180,195 ----
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
! uint a = (*it).tqcontains(',');
! uint a = (*it).contains(',');
! if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
break;
}
@ -140,7 +140,7 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp
! return;
}
f = realfunc;
left = f.tqfind( '(' );
left = f.find( '(' );
***************
*** 243,253 ****
QCString replyType;
@ -357,13 +357,13 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp
QCString function;
! QCStringList params;
! DCOPClient *client = 0L;
! if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
! if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
{
! // WARNING: This part (until the closing '}') could very
! // well be broken now. As I don't know how to trigger and test
! // dcoprefs this code is *not* tested. It compiles and it looks
! // ok to me, but that's all I can say - Martijn (2001/12/24)
! int delimPos = args[ 0 ].tqfindRev( ',' );
! int delimPos = args[ 0 ].findRev( ',' );
! if( delimPos == -1 )
! {
! cerr << "Error: '" << args[ 0 ]
@ -738,7 +738,7 @@ diff -cr dcop/client/dcopfind.cpp dcop2/client/dcopfind.cpp
! bool findObject( const char* app, const char* obj, const char* func, int argc, char** args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
--- 36,42 ----
static bool bAppIdOnly = 0;
static bool bLaunchApp = 0;
@ -746,7 +746,7 @@ diff -cr dcop/client/dcopfind.cpp dcop2/client/dcopfind.cpp
! bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
***************
*** 118,124 ****
f = fc;

@ -348,7 +348,7 @@ int main( int argc, char** argv )
// well be broken now. As I don't know how to trigger and test
// dcoprefs this code is *not* tested. It compiles and it looks
// ok to me, but that's all I can say - Martijn (2001/12/24)
int delimPos = args[ 0 ].tqfindRev( ',' );
int delimPos = args[ 0 ].findRev( ',' );
if( delimPos == -1 )
{
cerr << "Error: '" << args[ 0 ]
@ -372,7 +372,7 @@ int main( int argc, char** argv )
286,287c
QCStringList params;
DCOPClient *client = 0L;
if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
.
282a
/**
@ -494,7 +494,7 @@ void showHelp( int exitCode = 0 )
return;
.
156,157c
uint a = (*it).tqcontains(',');
uint a = (*it).contains(',');
if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
.
139c

@ -56,10 +56,10 @@ diff -r dcop/client/dcop.cpp dcop2/client/dcop.cpp
---
> if ( !ok && args.isEmpty() )
156,157c183,184
< int a = (*it).tqcontains(',');
< int a = (*it).contains(',');
< if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) )
---
> uint a = (*it).tqcontains(',');
> uint a = (*it).contains(',');
> if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
164c191,192
< exit(1);
@ -197,7 +197,7 @@ diff -r dcop/client/dcop.cpp dcop2/client/dcop.cpp
---
> QCStringList params;
> DCOPClient *client = 0L;
> if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
> if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
289,304c406,429
< char *delim = strchr(argv[1], ',');
< if (!delim)
@ -220,7 +220,7 @@ diff -r dcop/client/dcop.cpp dcop2/client/dcop.cpp
> // well be broken now. As I don't know how to trigger and test
> // dcoprefs this code is *not* tested. It compiles and it looks
> // ok to me, but that's all I can say - Martijn (2001/12/24)
> int delimPos = args[ 0 ].tqfindRev( ',' );
> int delimPos = args[ 0 ].findRev( ',' );
> if( delimPos == -1 )
> {
> cerr << "Error: '" << args[ 0 ]

@ -49,7 +49,7 @@ a139 1
if ( !ok && args.isEmpty() )
d156 2
a157 2
uint a = (*it).tqcontains(',');
uint a = (*it).contains(',');
if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
d164 1
a164 2
@ -171,14 +171,14 @@ d286 2
a287 3
QCStringList params;
DCOPClient *client = 0L;
if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
d289 16
a304 24
// WARNING: This part (until the closing '}') could very
// well be broken now. As I don't know how to trigger and test
// dcoprefs this code is *not* tested. It compiles and it looks
// ok to me, but that's all I can say - Martijn (2001/12/24)
int delimPos = args[ 0 ].tqfindRev( ',' );
int delimPos = args[ 0 ].findRev( ',' );
if( delimPos == -1 )
{
cerr << "Error: '" << args[ 0 ]

@ -63,8 +63,8 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp
{
-
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );
int left = f.find( '(' );
int right = f.find( ')' );
@@ -136,7 +163,7 @@
bool ok = false;
QCStringList funcs = dcop->remoteFunctions( app, obj, &ok );
@ -78,9 +78,9 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
- int a = (*it).tqcontains(',');
- int a = (*it).contains(',');
- if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) )
+ uint a = (*it).tqcontains(',');
+ uint a = (*it).contains(',');
+ if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) )
break;
}
@ -93,7 +93,7 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp
+ return;
}
f = realfunc;
left = f.tqfind( '(' );
left = f.find( '(' );
@@ -243,11 +271,12 @@
QCString replyType;
QDataStream arg(data, IO_WriteOnly);
@ -232,7 +232,7 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp
- if ((argc > 1) && (strncmp(argv[1], "DCOPRef(", 8)) == 0)
+ QCStringList params;
+ DCOPClient *client = 0L;
+ if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
+ if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
{
- char *delim = strchr(argv[1], ',');
- if (!delim)
@ -254,7 +254,7 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp
+ // well be broken now. As I don't know how to trigger and test
+ // dcoprefs this code is *not* tested. It compiles and it looks
+ // ok to me, but that's all I can say - Martijn (2001/12/24)
+ int delimPos = args[ 0 ].tqfindRev( ',' );
+ int delimPos = args[ 0 ].findRev( ',' );
+ if( delimPos == -1 )
+ {
+ cerr << "Error: '" << args[ 0 ]
@ -660,7 +660,7 @@ diff -aur dcop/client/dcopfind.cpp dcop2/client/dcopfind.cpp
+bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
QString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int left = f.find( '(' );
@@ -118,7 +118,7 @@
f = fc;
}

@ -75,7 +75,7 @@ void PropsView::buildList( TQObject *o )
for ( uint i = 0; i < names.count(); i++ ) {
char *prop = names.at( i );
TQVariant v = o->property( prop );
const TQMetaProperty *mp = mo->property( mo->tqfindProperty(prop, true), true );
const TQMetaProperty *mp = mo->property( mo->findProperty(prop, true), true );
TQString val( "????" );
switch( v.type() ) {

@ -54,7 +54,7 @@ TQString libkstartperf()
if (line.left(15) == "library_names='")
{
lib = line.mid(15);
int pos = lib.tqfind(" ");
int pos = lib.find(" ");
if (pos > 0)
lib = lib.left(pos);
}

@ -70,7 +70,7 @@ namespace KUnitTest
*/
bool addDebugInfo(const TQString &name, const TQString &info)
{
Tester *tester = Runner::self()->registry().tqfind(name.local8Bit());
Tester *tester = Runner::self()->registry().find(name.local8Bit());
if ( tester == 0L ) return false;
tester->results()->addDebugInfo(info);
@ -80,7 +80,7 @@ namespace KUnitTest
bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info)
{
Tester *tester = Runner::self()->registry().tqfind(name.local8Bit());
Tester *tester = Runner::self()->registry().find(name.local8Bit());
if ( tester == 0L ) return false;
if ( ! tester->inherits("KUnitTest::SlotTester") ) return false;
@ -113,10 +113,10 @@ namespace KUnitTest
addTester(it.currentKey(), it.current());
TQString test = it.currentKey();
int index = test.tqfind("::");
int index = test.find("::");
if ( index != -1 ) test = test.left(index);
if ( suites.tqcontains(test) == 0 )
if ( suites.contains(test) == 0 )
suites.append(test);
}
@ -322,7 +322,7 @@ namespace KUnitTest
TQString prefix = fullName(item);
if ( prefix.endsWith("()") )
{
int index = prefix.tqfindRev("::");
int index = prefix.findRev("::");
prefix = prefix.left(index);
}
prefixes << prefix;
@ -360,7 +360,7 @@ namespace KUnitTest
TQString name = fullName(item);
if ( name.endsWith("()") ) name = fullName(item->tqparent());
Tester *tester = Runner::self()->registry().tqfind(name.local8Bit());
Tester *tester = Runner::self()->registry().find(name.local8Bit());
if ( tester == 0L ) return;

@ -180,8 +180,8 @@ bool StructureParser::closureTag(const TQString& message, const TQString &tag)
uint index = 0;
while (true)
{
int nextclose = message.tqfind(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)), index);
int nextstart = message.tqfind(TQRegExp(TQString::tqfromLatin1("<%1[>\\s]").tqarg(tag)), index);
int nextclose = message.find(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)), index);
int nextstart = message.find(TQRegExp(TQString::tqfromLatin1("<%1[>\\s]").tqarg(tag)), index);
// qDebug("finding %d %d %d %d", nextstart, nextclose, index, inside);
if (nextclose == -1) {
#ifdef POXML_DEBUG
@ -254,7 +254,7 @@ void StructureParser::descape(TQString &message)
index++;
}
message.tqreplace(TQRegExp("\010"), "");
message.replace(TQRegExp("\010"), "");
}
bool StructureParser::formatMessage(MsgBlock &msg) const
@ -327,8 +327,8 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
TQString orig = msg.msgid;
TQString endtag = msg.msgid.mid(endindex + 2, msg.msgid.length() - (endindex + 2) - 1);
TQString endtag_attr = endtag.mid(endtag.tqfind(' '), endtag.length());
endtag.tqreplace(infos_reg, "");
TQString endtag_attr = endtag.mid(endtag.find(' '), endtag.length());
endtag.replace(infos_reg, "");
if (endtag == starttag) {
if (!closureTag(msg.msgid, starttag))
break;
@ -418,9 +418,9 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
#endif
// the exception for poxml_* attributes is made in the closing tag
int closing_index = message.tqfind(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)),
int closing_index = message.find(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)),
strindex);
int starting_index = message.tqfind(TQRegExp(TQString::tqfromLatin1("<%1[\\s>]").tqarg(tag)),
int starting_index = message.find(TQRegExp(TQString::tqfromLatin1("<%1[\\s>]").tqarg(tag)),
strindex);
#ifdef POXML_DEBUG
@ -510,8 +510,8 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
while (endindex >= 0 && (message.at(endindex) != '<' || message.at(endindex + 1) != '/'))
endindex--;
TQString tag = message.mid(endindex + 2, message.length() - endindex - 3);
if (tag.tqfind(' ') > 0 ) {
tag = tag.left(tag.tqfind(' '));
if (tag.find(' ') > 0 ) {
tag = tag.left(tag.find(' '));
}
#ifdef POXML_DEBUG
qDebug("behind tag %s", tag.latin1());
@ -529,9 +529,9 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
qDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside);
#endif
int closing_index = message.tqfindRev(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)),
int closing_index = message.findRev(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)),
strindex - 1);
int starting_index = message.tqfindRev(TQRegExp(TQString::tqfromLatin1("<%1[\\s>]").tqarg(tag)),
int starting_index = message.findRev(TQRegExp(TQString::tqfromLatin1("<%1[\\s>]").tqarg(tag)),
strindex - 1);
#ifdef POXML_DEBUG
@ -640,7 +640,7 @@ bool StructureParser::endElement( const TQString& , const TQString&, const TQStr
(*it).lines.first().offset = 0;
}
}
(*it).msgid.tqreplace(infos_reg, TQString());
(*it).msgid.replace(infos_reg, TQString());
if (!(*it).msgid.isEmpty())
list.append(*it);
@ -663,11 +663,11 @@ bool StructureParser::comment ( const TQString &c )
TQString StructureParser::escapeLiterals( const TQString &_contents) {
TQString contents = _contents;
contents.tqreplace(TQRegExp("\n"), "&POXML_LINEFEED;");
contents.tqreplace(TQRegExp("<"), "&POXML_LT;");
contents.tqreplace(TQRegExp(">"), "&POXML_GT;");
contents.tqreplace(TQRegExp("\t"), " ");
contents.tqreplace(TQRegExp(" "), "&POXML_SPACE;");
contents.replace(TQRegExp("\n"), "&POXML_LINEFEED;");
contents.replace(TQRegExp("<"), "&POXML_LT;");
contents.replace(TQRegExp(">"), "&POXML_GT;");
contents.replace(TQRegExp("\t"), " ");
contents.replace(TQRegExp(" "), "&POXML_SPACE;");
return contents;
}
@ -675,11 +675,11 @@ TQString StructureParser::escapeLiterals( const TQString &_contents) {
TQString StructureParser::descapeLiterals( const TQString &_contents) {
TQString contents = _contents;
contents.tqreplace(TQRegExp("&POXML_LINEFEED;"), "\n");
contents.tqreplace(TQRegExp("&POXML_LT;"), "<");
contents.tqreplace(TQRegExp("&POXML_GT;"), ">");
contents.tqreplace(TQRegExp("&POXML_SPACE;"), " ");
contents.tqreplace(TQRegExp("!POXML_AMP!"), "&");
contents.replace(TQRegExp("&POXML_LINEFEED;"), "\n");
contents.replace(TQRegExp("&POXML_LT;"), "<");
contents.replace(TQRegExp("&POXML_GT;"), ">");
contents.replace(TQRegExp("&POXML_SPACE;"), " ");
contents.replace(TQRegExp("!POXML_AMP!"), "&");
return contents;
}
@ -710,23 +710,23 @@ void StructureParser::stripWhiteSpace( TQString &contents)
void StructureParser::cleanupTags( TQString &contents )
{
contents.tqreplace(TQRegExp("&"), "!POXML_AMP!");
contents.replace(TQRegExp("&"), "!POXML_AMP!");
for (int index = 0; literaltags[index]; index++) {
TQRegExp start(TQString("<%1[\\s>]").tqarg(literaltags[index]));
TQRegExp end(TQString("</%1[\\s>]").tqarg(literaltags[index]));
int strindex = 0;
while (true) {
strindex = contents.tqfind(start, strindex);
strindex = contents.find(start, strindex);
if (strindex < 0)
break;
while (contents.at(strindex) != '>')
strindex++;
strindex++; // one more
int endindex = contents.tqfind(end, strindex);
int endindex = contents.find(end, strindex);
TQString part = contents.mid(strindex, endindex - strindex);
TQString newpart = escapeLiterals(part);
contents.tqreplace(strindex, part.length(), newpart);
contents.replace(strindex, part.length(), newpart);
// this assumes that literal tags to not overlap
strindex = strindex + newpart.length();
}
@ -739,7 +739,7 @@ void StructureParser::cleanupTags( TQString &contents )
if (index < 0)
break;
TQString tag = unclosed.cap(1);
contents.tqreplace(index, unclosed.matchedLength(), TQString("</%1>").tqarg(tag));
contents.replace(index, unclosed.matchedLength(), TQString("</%1>").tqarg(tag));
}
TQRegExp start("<((\\s*[^<>\\s])*)\\s\\s*(/*)>");
@ -753,7 +753,7 @@ void StructureParser::cleanupTags( TQString &contents )
TQString tag = start.cap(1);
TQString cut = start.capturedTexts().last();
// qDebug("UNCLO %s %d -%s- -%s-", start.cap(0).latin1(), index, tag.latin1(), cut.latin1());
contents.tqreplace(index, start.matchedLength(), TQString("<%1%2>").tqarg(tag).tqarg(cut));
contents.replace(index, start.matchedLength(), TQString("<%1%2>").tqarg(tag).tqarg(cut));
}
TQRegExp singletag("<(\\w*)\\s([^><]*)/>");
@ -764,7 +764,7 @@ void StructureParser::cleanupTags( TQString &contents )
break;
TQString tag = singletag.cap(1);
if (!StructureParser::isSingleTag(tag)) {
contents.tqreplace(index, singletag.matchedLength(), TQString("<%1 %2></%3>").tqarg(tag).tqarg(singletag.cap(2)).tqarg(tag));
contents.replace(index, singletag.matchedLength(), TQString("<%1 %2></%3>").tqarg(tag).tqarg(singletag.cap(2)).tqarg(tag));
}
}
@ -775,7 +775,7 @@ void StructureParser::cleanupTags( TQString &contents )
if (index < 0)
break;
TQString msgid = trans_comment.cap(1);
contents.tqreplace(index, trans_comment.matchedLength(), TQString("<trans_comment>%1</trans_comment>").tqarg(msgid));
contents.replace(index, trans_comment.matchedLength(), TQString("<trans_comment>%1</trans_comment>").tqarg(msgid));
}
#ifdef POXML_DEBUG
@ -791,11 +791,11 @@ static bool removeEmptyTag( TQString &contents, const TQString & tag)
TQRegExp empty(TQString("<%1[^>]*>[\\s\n][\\s\n]*</%2\\s*>").tqarg(tag).tqarg(tag));
int strindex = 0;
while (true) {
strindex = contents.tqfind(empty, strindex);
strindex = contents.find(empty, strindex);
if (strindex < 0)
break;
qDebug("found empty tag %s", tag.latin1());
contents.tqreplace(strindex, empty.matchedLength(), " ");
contents.replace(strindex, empty.matchedLength(), " ");
strindex++;
return true;
}
@ -831,8 +831,8 @@ bool StructureParser::characters(const TQString &ch)
TQString escape(TQString message)
{
message.tqreplace(TQRegExp("\\\\"), "\\\\");
message.tqreplace(TQRegExp("\""), "\\\"");
message.replace(TQRegExp("\\\\"), "\\\\");
message.replace(TQRegExp("\""), "\\\"");
return message;
}
@ -871,46 +871,46 @@ TQString escapePO(TQString msgid)
{
int index = 0;
while (true) {
index = msgid.tqfind("\\n", index);
index = msgid.find("\\n", index);
if (index == -1)
break;
if (index >= 1 && msgid.at(index - 1) == '\\' && msgid.at(index - 2) != '\\') {
msgid.tqreplace(index - 1, 3, "&POXML_LITERALLINEFEED;");
msgid.replace(index - 1, 3, "&POXML_LITERALLINEFEED;");
index += 3;
} else
msgid.tqreplace(index, 2, "\n");
msgid.replace(index, 2, "\n");
}
index = 0;
while (true) {
index = msgid.tqfind("\\\"", index);
index = msgid.find("\\\"", index);
if (index == -1)
break;
if (index > 1 && msgid.at(index - 1) == '\\' && msgid.at(index - 2) != '\\')
msgid.tqreplace(index - 1, 3, "&POXML_LITERALTQUOTE;");
msgid.replace(index - 1, 3, "&POXML_LITERALTQUOTE;");
else
msgid.tqreplace(index, 2, "\"");
msgid.replace(index, 2, "\"");
}
index = 0;
while (true) {
index = msgid.tqfind("\\t", index);
index = msgid.find("\\t", index);
if (index == -1)
break;
if (msgid.at(index - 1) == '\\')
msgid.tqreplace(index - 1, 3, "\\t");
msgid.replace(index - 1, 3, "\\t");
else
msgid.tqreplace(index, 2, "\t");
msgid.replace(index, 2, "\t");
}
index = 0;
while (true) {
index = msgid.tqfind("\\\\", index);
index = msgid.find("\\\\", index);
if (index == -1)
break;
msgid.tqreplace(index, 2, "\\");
msgid.replace(index, 2, "\\");
index += 1;
}
msgid.tqreplace(TQRegExp("&POXML_LITERALLINEFEED;"), "\\n");
msgid.tqreplace(TQRegExp("&POXML_LITERALTQUOTE;"), "\\");
msgid.replace(TQRegExp("&POXML_LITERALLINEFEED;"), "\\n");
msgid.replace(TQRegExp("&POXML_LITERALTQUOTE;"), "\\");
return msgid;
}
@ -930,7 +930,7 @@ MsgList parseXML(const char *filename)
StructureParser::cleanupTags(contents);
while (true) {
int index = contents.tqfind("<!ENTITY");
int index = contents.find("<!ENTITY");
if (index < 0)
break;
int inside = 0;
@ -952,7 +952,7 @@ MsgList parseXML(const char *filename)
endindex++;
}
endindex++;
contents.tqreplace(index, endindex - index, replacement);
contents.replace(index, endindex - index, replacement);
}
TQTextStream ts(contents.utf8(), IO_ReadOnly);
@ -975,7 +975,7 @@ MsgList parseXML(const char *filename)
for (MsgList::Iterator it = english.begin();
it != english.end(); it++)
{
TQMap<TQString,TQString>::Iterator found = msgids.tqfind((*it).msgid);
TQMap<TQString,TQString>::Iterator found = msgids.find((*it).msgid);
if ((*it).msgid.length() < 4) {
(*it).msgid = TQString("<%1>").tqarg((*it).tag) + (*it).msgid +
TQString("</%1>").tqarg((*it).tag);

@ -19,7 +19,7 @@ TQString translate(TQString xml, TQString orig, TQString translation)
TQString prefix;
while (xml.at(0) == '<' && orig.at(0) != '<') {
// a XML tag as prefix
int index = xml.tqfind('>');
int index = xml.find('>');
assert(index != -1);
index++;
while (xml.at(index) == ' ')
@ -28,13 +28,13 @@ TQString translate(TQString xml, TQString orig, TQString translation)
xml = xml.mid(index, xml.length());
}
int index = xml.tqfind(orig);
int index = xml.find(orig);
if (index == -1) {
qWarning("can't tqfind\n%s\nin\n%s", orig.latin1(), xml.latin1());
qWarning("can't find\n%s\nin\n%s", orig.latin1(), xml.latin1());
exit(1);
}
if (!translation.isEmpty())
xml.tqreplace(index, orig.length(), translation);
xml.replace(index, orig.length(), translation);
return prefix + xml;
}
@ -65,7 +65,7 @@ int main( int argc, char **argv )
{
TQString msgstr;
TQString msgid = escapePO((*it).msgid);
if ((*it).comment.tqfind("fuzzy") < 0)
if ((*it).comment.find("fuzzy") < 0)
msgstr = escapePO((*it).msgstr);
#ifdef POXML_DEBUG
@ -88,7 +88,7 @@ int main( int argc, char **argv )
line_offsets.append(0);
int index = 0;
while (true) {
index = xml_text.tqfind('\n', index) + 1;
index = xml_text.find('\n', index) + 1;
if (index <= 0)
break;
line_offsets.append(index);
@ -137,7 +137,7 @@ int main( int argc, char **argv )
TQString xml = xml_text.mid(start_pos, end_pos - start_pos);
int index = 0;
while (true) {
index = xml.tqfind("<!--");
index = xml.find("<!--");
if (index == -1)
break;
int end_index = index + 4;
@ -147,13 +147,13 @@ int main( int argc, char **argv )
{
end_index++;
}
xml.tqreplace(index, end_index + 1 - index, " ");
xml.replace(index, end_index + 1 - index, " ");
index = end_index;
}
StructureParser::descape(xml);
TQString descaped = StructureParser::descapeLiterals((*it).msgid);
if (translations.tqcontains(descaped))
if (translations.contains(descaped))
descaped = translations[descaped];
#ifdef POXML_DEBUG
@ -236,21 +236,21 @@ int main( int argc, char **argv )
ts << xml_text.mid(old_pos);
output.tqreplace(TQRegExp("<trans_comment\\s*>"), "");
output.tqreplace(TQRegExp("</trans_comment\\s*>"), "");
output.replace(TQRegExp("<trans_comment\\s*>"), "");
output.replace(TQRegExp("</trans_comment\\s*>"), "");
StructureParser::removeEmptyTags(output);
index = 0;
while (true) {
index = output.tqfind(TQRegExp(">[^\n]"), index );
index = output.find(TQRegExp(">[^\n]"), index );
if ( index == -1 )
break;
if ( output.at( index - 1 ) == '/' || output.at( index - 1 ) == '-' ||
output.at( index - 1 ) == ']' || output.at( index - 1 ) == '?' )
index = index + 1;
else {
output.tqreplace( index, 1, "\n>" );
output.replace( index, 1, "\n>" );
index = index + 2;
}
}

@ -36,7 +36,7 @@ int main( int argc, char **argv )
if (report_mismatches && errors.count()) {
for (TQMap<int, TQString>::ConstIterator it = errors.begin(); it != errors.end(); ++it)
{
if (translated.pc.anchors.tqcontains(it.data()))
if (translated.pc.anchors.contains(it.data()))
fprintf(stderr, "id=\"%s\" not in the same paragraphs (%d vs %d)\n", it.data().latin1(),
english.pc.anchors[it.data()], translated.pc.anchors[it.data()]);
else {
@ -65,7 +65,7 @@ int main( int argc, char **argv )
it != english.end(); )
{
if ((*it).msgid == "ROLES_OF_TRANSLATORS") {
if ((*it).msgstr.length() && !(*it).msgstr.tqcontains("ROLES_OF_TRANSLATORS")) {
if ((*it).msgstr.length() && !(*it).msgstr.contains("ROLES_OF_TRANSLATORS")) {
have_roles_of_translators = true;
}
else {
@ -77,7 +77,7 @@ int main( int argc, char **argv )
}
if ((*it).msgid == "CREDIT_FOR_TRANSLATORS") {
if ((*it).msgstr.length() && !(*it).msgstr.tqcontains("CREDIT_FOR_TRANSLATORS")) {
if ((*it).msgstr.length() && !(*it).msgstr.contains("CREDIT_FOR_TRANSLATORS")) {
have_credit_for_translators = true;
}
else {
@ -88,7 +88,7 @@ int main( int argc, char **argv )
continue;
}
if (msgids.tqcontains((*it).msgid)) {
if (msgids.contains((*it).msgid)) {
english[msgids[(*it).msgid]].lines += (*it).lines;
if (english[msgids[(*it).msgid]].msgstr != (*it).msgstr) {
fprintf(stderr, "two different translations for \"%s\" (\"%s\" and \"%s\") - choosing first one\n",

@ -42,7 +42,7 @@ int main(int argc, char **argv)
return 1;
}
const bool is_desktop = filename.tqfind( "desktop_") >= 0;
const bool is_desktop = filename.find( "desktop_") >= 0;
// The header is the last item (due too the sorting)
MsgList::const_iterator header = --translated.end();
@ -85,22 +85,22 @@ int main(int argc, char **argv)
TQString msgstr;
if ( msgid.tqfind( "Definition of PluralForm" ) != -1 ) {
if ( msgid.find( "Definition of PluralForm" ) != -1 ) {
outputMsg("msgstr", "NoPlural");
cout << "\n";
continue;
}
if ( is_desktop ) {
msgstr = msgid.left( msgid.tqfind( '=' ) + 1);
msgstr += translation + msgid.mid( msgid.tqfind( '=' ) + 1) + translation;
msgstr = msgid.left( msgid.find( '=' ) + 1);
msgstr += translation + msgid.mid( msgid.find( '=' ) + 1) + translation;
outputMsg( "msgstr", escapePO(msgstr) );
cout << "\n";
continue;
}
if (msgid.startsWith("_n: ") || msgid.startsWith("_: ") ) { // KDE extentions
msgid = msgid.mid(msgid.tqfind("\\n") + 2, msgid.length());
msgid = msgid.mid(msgid.find("\\n") + 2, msgid.length());
}
if (msgid.endsWith("%"))

@ -21,7 +21,7 @@ int main( int argc, char **argv )
for (MsgList::Iterator it = english.begin();
it != english.end(); )
{
if (msgids.tqcontains((*it).msgid)) {
if (msgids.contains((*it).msgid)) {
english[msgids[(*it).msgid]].lines += (*it).lines;
MsgList::Iterator tmp = it;
it++;

@ -343,7 +343,7 @@ static void removeAccelerators(TQString &str)
static void removeXX(TQString &str)
{
str.tqreplace("xx",""); // simple but atm best working
str.replace("xx",""); // simple but atm best working
}
static TQString removedXX(TQString str)
@ -355,13 +355,13 @@ static TQString removedXX(TQString str)
static TQString stripAccelViolations(TQString str)
{
int conflict_pos = str.tqfind("(&&)");
int conflict_pos = str.find("(&&)");
if (conflict_pos >= 0)
{
str = str.mid(0, conflict_pos) + str.mid(conflict_pos+4);
}
int suggestion_pos = str.tqfind("(!)");
int suggestion_pos = str.find("(!)");
if (suggestion_pos >= 0)
{
str = str.mid(0, suggestion_pos) + str.mid(suggestion_pos+3);
@ -373,12 +373,12 @@ static TQString stripAccelViolations(TQString str)
// Must be passed a string with its accelerators removed
TQString findAccelViolations(TQString str, TQValueVector<StyleGuideViolation> &violations)
{
int conflict_pos = str.tqfind("(&)");
int conflict_pos = str.find("(&)");
if (conflict_pos >= 0)
str = str.mid(0, conflict_pos) + str.mid(conflict_pos+3);
int suggestion_pos = str.tqfind("(!)");
int suggestion_pos = str.find("(!)");
if (suggestion_pos >= 0)
{
str = str.mid(0, suggestion_pos) + str.mid(suggestion_pos+3);
@ -399,7 +399,7 @@ TQString findAccelViolations(TQString str, TQValueVector<StyleGuideViolation> &v
TQString findUntranslatedViolations(TQString str, TQValueVector<StyleGuideViolation> &violations)
{
if (str.tqfind("xx")!=-1)
if (str.find("xx")!=-1)
removeXX(str);
else {
for (unsigned int c=0; c<str.length(); c++)
@ -502,7 +502,7 @@ static TQValueVector<StyleGuideViolation> checkSentenceStyle(TQString str, Colo
}
// Check if it's in the explicit case word list
const char *correctWord = ExplicitCaseWords::words()->tqfind(word.lower());
const char *correctWord = ExplicitCaseWords::words()->find(word.lower());
// Actual captialization checking
if (correctWord)
@ -667,7 +667,7 @@ static TQValueVector<StyleGuideViolation> checkTitleStyle(TQString str, TitleTy
TQString lower_word = word.lower();
// Check if it's in the explicit case word list
const char *correctWord = ExplicitCaseWords::words()->tqfind(lower_word);
const char *correctWord = ExplicitCaseWords::words()->find(lower_word);
if ((titleType == ShortTitle) && (lower_word=="and" || lower_word=="a" || lower_word=="an" || lower_word=="the"))
{
@ -686,7 +686,7 @@ static TQValueVector<StyleGuideViolation> checkTitleStyle(TQString str, TitleTy
violations.push_back(c + x);
}
}
else if (c && !lastWord && LowerCaseWords::words()->tqfind(word.lower()))
else if (c && !lastWord && LowerCaseWords::words()->find(word.lower()))
{
// We're a lowercase word
if (str[c].category() == TQChar::Letter_Uppercase)
@ -2050,7 +2050,7 @@ void StyleCheckStyle::tqdrawControl( ControlElement element,
// Does the menu item have a text label?
if ( !s.isNull() ) {
int t = s.tqfind( '\t' );
int t = s.find( '\t' );
int m = itemVMargin;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@ -2547,7 +2547,7 @@ TQSize StyleCheckStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 )
if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 )
w += 12;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@ -2759,4 +2759,4 @@ void StyleCheckStyle::renderGradient( TQPainter* p, const TQRect& r,
}
// vim: set noet ts=4 sw=4:
// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off;
// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;

@ -170,6 +170,6 @@ class StyleCheckStyle : public KStyle
};
// vim: set noet ts=4 sw=4:
// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off;
// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
#endif

@ -23,7 +23,7 @@ if test -z $ndebug; then
xpr="$xpr;"'s/[\t ]-DNDEBUG\b//g'
xpr="$xpr;"'s/[\t ]-DNO_DEBUG\b//g'
fi
tqfind . $mxdp -name Makefile -exec perl -pi -e "$xpr" {} \;
find . $mxdp -name Makefile -exec perl -pi -e "$xpr" {} \;
using_unsermake=
if head -n 1 Makefile | grep unsermake >/dev/null; then
@ -43,7 +43,7 @@ if test "$using_unsermake" = "new"; then
# warning this uses sed, so the '?' in the perl regexp above doesn't work here
cxxflags=`grep ^CXXFLAGS $toplevelMakefile | sed -e 's/[\t ]-O[1-9]\b//g;s/[\t ]-march=\S+\b//g;s/[\t ]-DNDEBUG\b//g;s/[\t ]-DNO_DEBUG\b//g'`
xpr="s/^CXXFLAGS\s*=.*//; if ( /^\.FORWARDS:/) { "'$_'" .= \"\n$cxxflags -g3\"; }"
tqfind . $mxdp -name Makefile -exec perl -pi -e "$xpr" {} \;
find . $mxdp -name Makefile -exec perl -pi -e "$xpr" {} \;
else
echo "ERROR: top_builddir is $top_builddir but $makevars not found"
fi
@ -56,7 +56,7 @@ elif test "$using_unsermake" = "old"; then
# warning this uses sed, so the '?' in the perl regexp above doesn't work here
cxxflags=`grep ^CXXFLAGS $makevars | sed -e 's/[\t ]-O[1-9]\b//g;s/[\t ]-march=\S+\b//g;s/[\t ]-DNDEBUG\b//g;s/[\t ]-DNO_DEBUG\b//g'`
xpr="s/^CXXFLAGS\s*=.*//; if ( /^include .*MakeVars$/) { "'$_'" .= \"\n$cxxflags -g3\"; }"
tqfind . $mxdp -name Makefile -exec perl -pi -e "$xpr" {} \;
find . $mxdp -name Makefile -exec perl -pi -e "$xpr" {} \;
else
echo "ERROR: top_builddir is $top_builddir but $makevars not found"
fi

@ -42,7 +42,7 @@ handledir() {
if test -f Makefile.am; then
if test $recurse -eq 1; then
tqfind . -type d | grep -v CVS | sed -e 's,/$,,' | \
find . -type d | grep -v CVS | sed -e 's,/$,,' | \
while read dir; do
handledir $dir
done

@ -24,7 +24,7 @@ fi
srcdir=`egrep '^srcdir *=' Makefile | sed -e "s#srcdir *= *##"`
( cd $srcdir ; tqfind $1 -type d | sed -e 's,/$,,' ) | \
( cd $srcdir ; find $1 -type d | sed -e 's,/$,,' ) | \
while read a; do
if test -f "$srcdir/$a/Makefile.am"; then
test -d "$a" || mkdir -p "$a"

@ -69,7 +69,7 @@ handledir() {
if test -f Makefile.am; then
if test $recurse -eq 1; then
tqfind . -type d | egrep -v 'CVS|.svn' | sed -e 's,/$,,' | \
find . -type d | egrep -v 'CVS|.svn' | sed -e 's,/$,,' | \
while read dir; do
handledir $dir
done

@ -8,7 +8,7 @@
# Original author (of cvs2pack.sh) was Sebastian Stein <seb.stein@hpfsc.de>
# Heavy, heavy modifications by Jason Katz-Brown <jason@katzbrown.com>
# Some modifications for i18n inclusion by Dominique Devriese <devriese@kde.org>
# Added --no-i18n-lang and --tqreplace-files by Michael Buesch <mbuesch@freenet.de>
# Added --no-i18n-lang and --replace-files by Michael Buesch <mbuesch@freenet.de>
# License: GPL (http://www.gnu.org/)
# Last modification: 2004/10/13
@ -39,7 +39,7 @@ test -e ~/.cvs2distrc && extraoptions=`cat ~/.cvs2distrc`
# --log has optional argument
TEMP=`getopt \
-o v:n:r:e:a:B:dhmbgol \
--long log::,version:,name:,required-header:,required-header-error-message:,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,branch:,no-i18n,no-i18n-lang:,cvs-root:,debug,tqreplace-files: \
--long log::,version:,name:,required-header:,required-header-error-message:,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,branch:,no-i18n,no-i18n-lang:,cvs-root:,debug,replace-files: \
-n cvs2dist -- $extraoptions "$@"`
if [ $? != 0 ]; then
@ -97,7 +97,7 @@ while true; do
shift 2 ;;
esac ;;
--tqreplace-files) replace_files="$2"; shift 2 ;;
--replace-files) replace_files="$2"; shift 2 ;;
--) shift
break ;;
*) echo "Aborted."
@ -152,11 +152,11 @@ if [ ! -z $showhelp ] || [ -z $module ] || [ -z $directory ]; then
echo " -e --required-header-error-message <message>"
echo " Error message for above."
echo " -d --remove-hidden Remove hidden files/directories from packages"
echo " --tqreplace-files <file-pair-list>"
echo " --replace-files <file-pair-list>"
echo " <file-pair-list> is a comma separated list of file pairs"
echo " which should be replaced in the final distribution package."
echo " Each element of a pair is separated by an @"
echo -n " Example: --tqreplace-files take_this_file@and_move_it_here,"
echo -n " Example: --replace-files take_this_file@and_move_it_here,"
echo "configure.in.bot.dist@configure.in.bot"
echo " The filenames are all relative to your package root."
echo " Please be careful! Try to avoid the usage of .. in the path. It"
@ -349,7 +349,7 @@ fi
if [ -d $module/doc/$name ]; then
mkdir -p $temp_dist/doc/$name
cp -Rf $module/doc/$name $temp_dist/doc
tqfind $module/doc/ -maxdepth 1 ! -xtype d | xargs --tqreplace={} cp {} $temp_dist/doc
find $module/doc/ -maxdepth 1 ! -xtype d | xargs --replace={} cp {} $temp_dist/doc
if [ $doi18n = "yes" ]; then
pushd $temp_dir
@ -435,7 +435,7 @@ fi
# and all files from the base dir, except directories
echo "Copying over files from the module directory:" >> $log
tqfind $module ! -xtype d -maxdepth 1 | xargs --verbose --tqreplace={} cp {} $temp_dist 2>> $log
find $module ! -xtype d -maxdepth 1 | xargs --verbose --replace={} cp {} $temp_dist 2>> $log
echo "--------" >> $log
# we now enter the temp_dist and delete all unwanted files
@ -479,7 +479,7 @@ if [ -n "$replace_files" ]; then
echo "$from_path does not exist!" >> $log
echo ""
echo "Warning: \"$from\" does not exist!"
echo -n "Please enter the path in --tqreplace-files relative "
echo -n "Please enter the path in --replace-files relative "
echo "to the package root of your project."
echo "Your package root is: \"$module/$directory\""
echo ""
@ -516,8 +516,8 @@ cd $temp_dist
# remove files
echo "Remove files: " >> $log
for file in $remove; do
tqfind . -name $file | xargs rm -Rf
echo "tqfind . -name $file | xargs rm -Rf" >> $log
find . -name $file | xargs rm -Rf
echo "find . -name $file | xargs rm -Rf" >> $log
done
# remove more files
@ -528,7 +528,7 @@ done
unset file
# remove hidden files
test ! -z $removehidden && echo "Remove hidden files: " >> $log && tqfind $temp_dist -name ".*" -and ! -name "." | xargs --verbose rm -Rf 2>> $log
test ! -z $removehidden && echo "Remove hidden files: " >> $log && find $temp_dist -name ".*" -and ! -name "." | xargs --verbose rm -Rf 2>> $log
echo "--------" >> $log

@ -10,7 +10,7 @@
#ignore dirs "CVS", ".deps", ".libs"
#ignore files *.o, *.so, *.lo, *.la, *~, .#*
FOUND=`tqfind |grep -v "^\.$"| grep -v CVS| grep -v "\.[ls]\?o$"|grep -v "~$"|grep -v "\.libs/"|grep -v "\.deps/" |grep -v "\.depend/"| grep -v "/\.#" |grep -v "\.la$"`
FOUND=`find |grep -v "^\.$"| grep -v CVS| grep -v "\.[ls]\?o$"|grep -v "~$"|grep -v "\.libs/"|grep -v "\.deps/" |grep -v "\.depend/"| grep -v "/\.#" |grep -v "\.la$"`
#echo $FOUND
ask_for_adding() {

@ -8,7 +8,7 @@
# greatest priority right next to scoring chicks of course...
#
# This script goes through the whole history of a file to tqfind
# This script goes through the whole history of a file to find
# all modifications referencing specific string. It's useful if
# you want to know when a function has been removed/modified/added
# to a file if a recent cvs annotate doesn't anymore reference it.

@ -8,14 +8,14 @@ if [ -z "$1" ] ; then
exit 1
fi
for icon in `tqfind $1 -name cr*.png` ; do
for icon in `find $1 -name cr*.png` ; do
fullname=`echo $icon | sed 's,.*cr,,'`
res=`echo $fullname | cut -d- -f1`
type=`echo $fullname | cut -d- -f2`
name=`echo $fullname | cut -d- -f3`
dir="kdeartwork/IconThemes/kdeclassic/${res}x${res}/${type}s/"
if [ -d "$dir" ]; then
classic=`tqfind "${dir}" -name "$name"`
classic=`find "${dir}" -name "$name"`
if [ -s "$classic" ]; then
diff=`diff $icon $classic`
if [ -z "$diff" ]; then

@ -5,7 +5,7 @@
# The script helps to fix the FSF address
# Use:
# tqfind . -name .svn -prune , type f | xargs fgrep -l "Free Software Foundation" | xargs sed -i -f fixfsfaddr.sed
# find . -name .svn -prune , type f | xargs fgrep -l "Free Software Foundation" | xargs sed -i -f fixfsfaddr.sed
# Note: you should check the changes before committing them.
# Implementation note: we need to replace phrase by phrase, as

@ -200,7 +200,7 @@ sub fixFile
$flines =~ s/$lastinclude(.*\n)/$lastinclude$1#include <$adding.h>\n/;
print STDERR "ADDED <$adding.h> after \"$lastinclude\" in $file\n";
} else {
print STDERR "ERROR: can't tqfind $lastinclude in $file\n";
print STDERR "ERROR: can't find $lastinclude in $file\n";
return 0;
}

@ -289,7 +289,7 @@ sub remove_include ($$$)
}
# first parameter: srcfile
# second parameter: include to tqreplace
# second parameter: include to replace
# third parameter the include file to replace it with
sub replace_include ($$$)
{

@ -50,7 +50,7 @@ sub checkdir($)
}
}
tqfind (\&collectthing, cwd());
find (\&collectthing, cwd());
foreach my $k (keys %dir2files) {
print STDERR "Directory $k:\n headers=[";

@ -8,7 +8,7 @@
## Written by David Faure <faure@kde.org>, licensed under GPL.
## 17/03/2000
tqfind $1 -name '*[cCph]' -type f | xargs grep -H -i 'ebug(\|warning(' \
find $1 -name '*[cCph]' -type f | xargs grep -H -i 'ebug(\|warning(' \
| grep -v 'kdDebug\|kdWarning' \
| grep -v include \
| sed -e "s#:.*##" \

@ -90,15 +90,15 @@ we_started_kppp="FALSE"
kppp_connect()
{
if [ "$USE_KPPP" = "TRUE" ]; then
kppp_process=`dcoptqfind -a kppp-*`
kppp_process=`dcopfind -a kppp-*`
if [ "$kppp_process" = "" ]; then
#kppp not running
kppp > /dev/null 2>&1 &
sleep $KPPP_LOAD_TIME
`dcop $(dcoptqfind -a kppp-*) KpppIface beginConnect`
`dcop $(dcopfind -a kppp-*) KpppIface beginConnect`
#wait for a while
sleep $KPPP_CONNECT_TIME
kppp_connected=`dcop $(dcoptqfind -a kppp-*) KpppIface isConnected`
kppp_connected=`dcop $(dcopfind -a kppp-*) KpppIface isConnected`
if [ "$kppp_connected" = "true" ]; then
we_started_kppp="TRUE"
echo Connected OK
@ -107,13 +107,13 @@ if [ "$USE_KPPP" = "TRUE" ]; then
fi
else
kppp_connected=`dcop $(dcoptqfind -a kppp-*) KpppIface isConnected`
kppp_connected=`dcop $(dcopfind -a kppp-*) KpppIface isConnected`
if [ "$kppp_connected" = "false" ]; then
#Start a connection
`dcop $(dcoptqfind -a kppp-*) KpppIface beginConnect`
`dcop $(dcopfind -a kppp-*) KpppIface beginConnect`
#wait for a while
sleep $KPPP_CONNECT_TIME
kppp_connected=`dcop $(dcoptqfind -a kppp-*) KpppIface isConnected`
kppp_connected=`dcop $(dcopfind -a kppp-*) KpppIface isConnected`
if [ "$kppp_connected" = "true" ]; then
we_started_kppp="TRUE"
echo Connected OK
@ -132,13 +132,13 @@ fi
kppp_disconnect()
{
if [ "$USE_KPPP" = "TRUE" ]; then
if [ $(dcoptqfind -a kppp-*) = "" ]; then
if [ $(dcopfind -a kppp-*) = "" ]; then
#kppp not running
echo Kppp was not running so cannot be disconnected
else
if [ "$we_started_kppp" = "TRUE" ]; then
echo Disconnecting kppp
`dcop $(dcoptqfind -a kppp-*) KpppIface disconnect`
`dcop $(dcopfind -a kppp-*) KpppIface disconnect`
else
echo We didnt connect using kppp so we wont disconnect
fi
@ -409,7 +409,7 @@ else
modules="$critical_modules"
# This generates in 'modules' a list of the modules which shall be updated.
#
potential_modules=`tqfind $KDESRCDIR -type d -mindepth 1 \
potential_modules=`find $KDESRCDIR -type d -mindepth 1 \
-maxdepth 1 -follow | sed -e "s@.*/?*@@"`
for module in $potential_modules; do
if [ -d $KDESRCDIR/$module/CVS -a -w $KDESRCDIR/$module ] \

@ -57,7 +57,7 @@
(bmp (buffer-modified-p)))
(while (re-search-forward "[ \t]+$" nil t)
(setq count (1+ count))
(tqreplace-match "" t t))
(replace-match "" t t))
(set-buffer-modified-p bmp)
(and (buffer-modified-p)
(basic-save-buffer))))))
@ -76,7 +76,7 @@
(agulbra-clean-out-spaces)
)))
(add-hook 'tqfind-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'find-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'write-file-hooks 'agulbra-c++-clean-out-spaces)
(defun agulbra-delete-into-nomenclature (&optional arg)
@ -197,19 +197,19 @@ With arg, to it arg times."
(and (stringp function)
(progn ;; get rid of virtual, static, multiple spaces, default values.
(and (string-match "[ \t]*\\<virtual\\>[ \t]*" function)
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(and (string-match "^\\(virtual\\>\\)?[ \t]*" function)
(setq function (tqreplace-match "" t t function)))
(setq function (replace-match "" t t function)))
(and (string-match "^\\(static\\>\\)?[ \t]*" function)
(setq function (tqreplace-match "" t t function)))
(setq function (replace-match "" t t function)))
(while (string-match " +" function)
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(while (string-match "\t+" function)
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(while (string-match " ?=[^,)]+" function)
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(while (string-match " +," function)
(setq function (tqreplace-match "," t t function)))))
(setq function (replace-match "," t t function)))))
(and (stringp function)
(stringp class)
(stringp file)
@ -218,7 +218,7 @@ With arg, to it arg times."
(progn
(setq insertion-string
(concat
(tqreplace-match
(replace-match
(concat class "::" class "(")
t t function)
"\n{\n \n}\n"))))
@ -226,7 +226,7 @@ With arg, to it arg times."
(progn
(setq insertion-string
(concat
(tqreplace-match
(replace-match
(concat class "::~" class "(")
t t function)
"\n{\n \n}\n"))))
@ -234,7 +234,7 @@ With arg, to it arg times."
(progn
(setq insertion-string
(concat
(tqreplace-match
(replace-match
(concat " " class "::" "\\1(")
t nil function)
"\n{\n \n}\n"))))
@ -244,21 +244,21 @@ With arg, to it arg times."
"'', aborting"))))
(stringp insertion-string))
(string-match "\\.h$" file)
(setq f (tqreplace-match ".cpp" t t file))
(setq f (replace-match ".cpp" t t file))
(if (file-readable-p f )
(message "")
(progn
(string-match "\\.h$" file)
(setq f (tqreplace-match ".cc" t t file))
(setq f (replace-match ".cc" t t file))
))
(tqfind-file f)
(find-file f)
(progn
(goto-char (point-max))
(insert insertion-string)
(forward-char -3)
(save-excursion
(and (string-match ".*/" file)
(setq file (tqreplace-match "" t nil file)))
(setq file (replace-match "" t nil file)))
(or (re-search-backward
(concat "^#include *\"" file "\"$") nil t)
(progn
@ -488,7 +488,7 @@ With arg, to it arg times."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
;; of indentation for the topmost-intro line that tqcontains
;; of indentation for the topmost-intro line that contains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@ -1402,31 +1402,31 @@ With arg, to it arg times."
(c nil))
(cond ((and (string-match "\\.h$" n)
(progn
(setq c (tqreplace-match ".cpp" t t n))
(setq c (replace-match ".cpp" t t n))
(file-readable-p c)))
(tqfind-file c))
(find-file c))
((and (string-match "\\.h$" n)
(progn
(setq c (tqreplace-match ".cc" t t n))
(setq c (replace-match ".cc" t t n))
(file-readable-p c)))
(tqfind-file c))
(find-file c))
((and (string-match "\\.h$" n)
(progn
(setq c (tqreplace-match ".C" t t n))
(setq c (replace-match ".C" t t n))
(file-readable-p c)))
(tqfind-file c))
(find-file c))
((string-match "\\.h$" n)
(tqfind-file (tqreplace-match ".cpp" t t n)))
(find-file (replace-match ".cpp" t t n)))
((string-match "\\.h$" n)
(tqfind-file (tqreplace-match ".cpp" t t n)))
(find-file (replace-match ".cpp" t t n)))
;((string-match "_[a-z]+[0-9]*.cpp$" n)
; (tqfind-file (tqreplace-match ".h" t t n)))
; (find-file (replace-match ".h" t t n)))
((string-match "\\.cpp$" n)
(tqfind-file (tqreplace-match ".h" t t n)))
(find-file (replace-match ".h" t t n)))
((string-match "\\.cc$" n)
(tqfind-file (tqreplace-match ".h" t t n)))
(find-file (replace-match ".h" t t n)))
((string-match "\\.c$" n)
(tqfind-file (tqreplace-match ".h" t t n)))
(find-file (replace-match ".h" t t n)))
(t
(error "%s is neither .h, .cc, .C or .cpp" n)))))
@ -1569,7 +1569,7 @@ With arg, to it arg times."
(let* ((word (downcase (kdab-word-under-point)))
(url (if (not (string-match "XXX" kdab-qt-documentation))
(error "didn't find three X's in kdab-qt-documentation")
(tqreplace-match word t t kdab-qt-documentation))))
(replace-match word t t kdab-qt-documentation))))
(start-process "qt documentation" nil "kfmclient" "openURL" url)
(message (concat "Loading " url)))))
@ -1585,10 +1585,10 @@ With arg, to it arg times."
(if xemacs
(progn
(require 'func-menu)
(add-hook 'tqfind-file-hooks 'fume-add-menubar-entry) )
(add-hook 'find-file-hooks 'fume-add-menubar-entry) )
(progn
(require 'imenu)))
;(add-hook 'tqfind-file-hooks 'imenu)) )
;(add-hook 'find-file-hooks 'imenu)) )
;; Switch between the declaration of a class member in .cc/.cpp/.C, and its definition in the .h file
;; Written by David and Reggie after much hair tearing
@ -1640,7 +1640,7 @@ With arg, to it arg times."
(message "")
(error "Makefile.am not found!")
)
(tqfind-file makefile)
(find-file makefile)
(goto-char (point-min))
(if (re-search-forward "_SOURCES" nil t)
(progn
@ -1670,9 +1670,9 @@ With arg, to it arg times."
(interactive)
(let ((f (buffer-file-name)))
(if (string-match "^.*/" f)
(setq f (tqreplace-match "" t t f)))
(setq f (replace-match "" t t f)))
(while (string-match "\\." f)
(setq f (tqreplace-match "_" t t f)))
(setq f (replace-match "_" t t f)))
(save-excursion
(goto-char (point-min))
(insert "#ifndef " (upcase f) "\n#define " (upcase f) "\n\n")
@ -1798,8 +1798,8 @@ With arg, to it arg times."
(defun makeinstallexec () (interactive) (compile "make install-exec"))
(defun makethisfile () (interactive)
(let ((f (buffer-name)))
(if (string-match "\.cpp$" f) (setq f (tqreplace-match "\.lo" t t f)))
(if (string-match "\.cc$" f) (setq f (tqreplace-match "\.lo" t t f)))
(if (string-match "\.cpp$" f) (setq f (replace-match "\.lo" t t f)))
(if (string-match "\.cc$" f) (setq f (replace-match "\.lo" t t f)))
(compile (concat "make " f ))))
;; Indentation: 4 characters, no tabs.

@ -78,7 +78,7 @@
"*Control use of directory variables in files you visit.
The meaningful values are nil and non-nil.")
(defun dirvars-tqfind-upwards (file-name)
(defun dirvars-find-upwards (file-name)
"Find a file in the current directory or one of its parents.
Returns the fully qualified file name, or nil if it isn't found.
@ -186,7 +186,7 @@ A few variable names are treated specially."
(set var val))))
(defun dirvars-hack-local-variables-before ()
(let ((dirvars-file (dirvars-tqfind-upwards ".emacs-dirvars")))
(let ((dirvars-file (dirvars-find-upwards ".emacs-dirvars")))
(if dirvars-file
(dirvars-hack-local-variables dirvars-file))))

@ -84,11 +84,11 @@
(if (featurep 'igrep)
(progn
(setq igrep-tqfind-prune-clause
(setq igrep-find-prune-clause
(format "-type d %s -name CVS -o -name .libs -o -name .deps %s"
(shell-quote-argument "(")
(shell-quote-argument ")")))
(setq igrep-tqfind-file-clause
(setq igrep-find-file-clause
(format "-type f %s -name %s %s -name %s %s -name %s %s -name %s" ; -type l
(shell-quote-argument "!")
(shell-quote-argument "*~") ; Emacs backup
@ -103,8 +103,8 @@
)
)
(define-key global-map [(f2)] 'igrep)
(define-key global-map [(shift f2)] 'igrep-tqfind)
(define-key global-map [(f12)] 'igrep-tqfind) ; on the console, shift f2 gives f12 for some reason..
(define-key global-map [(shift f2)] 'igrep-find)
(define-key global-map [(f12)] 'igrep-find) ; on the console, shift f2 gives f12 for some reason..
;(setq igrep-files-default 'ignore) ; too hard to use *.cc *.h with it, because of the full path
)
(define-key global-map [(f2)] 'grep))

@ -22,8 +22,8 @@
(require 'kde-emacs-vars)
;;GNU/Emacs does not have this one
(if (not (fboundp 'tqreplace-in-string))
(defun tqreplace-in-string (str regexp newtext &optional literal)
(if (not (fboundp 'replace-in-string))
(defun replace-in-string (str regexp newtext &optional literal)
"Replace all matches in STR for REGEXP with NEWTEXT string,
and returns the new string.
Optional LITERAL non-nil means do a literal replacement.
@ -42,11 +42,11 @@ Otherwise treat `\\' in NEWTEXT as special:
(insert str)
(goto-char 1)
(while (re-search-forward regexp nil t)
(tqreplace-match newtext t literal))
(replace-match newtext t literal))
(buffer-string))
(let ((start 0) newstr)
(while (string-match regexp str start)
(setq newstr (tqreplace-match newtext t literal str)
(setq newstr (replace-match newtext t literal str)
start (+ (match-end 0) (- (length newstr) (length str)))
str newstr))
str)))

@ -68,7 +68,7 @@ Try to finish the symbol, or indent the line."
(bmp (buffer-modified-p)))
(while (re-search-forward "[ \t]+$" nil t)
(setq count (1+ count))
(tqreplace-match "" t t))
(replace-match "" t t))
(set-buffer-modified-p bmp)
nil
))))
@ -556,7 +556,7 @@ This function does not do any hidden buffer changes."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
;; of indentation for the topmost-intro line that tqcontains
;; of indentation for the topmost-intro line that contains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@ -1815,7 +1815,7 @@ This function does not do any hidden buffer changes."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
;; of indentation for the topmost-intro line that tqcontains
;; of indentation for the topmost-intro line that contains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@ -2901,7 +2901,7 @@ This function does not do any hidden buffer changes."
((or (eq char-before-ip ?:)
(eq char-after-ip ?:))
;; this line should be indented relative to the beginning
;; of indentation for the topmost-intro line that tqcontains
;; of indentation for the topmost-intro line that contains
;; the prototype's open paren
;; TBD: is the following redundant?
(if (eq char-before-ip ?:)
@ -3808,7 +3808,7 @@ This function does not do any hidden buffer changes."
;; return the syntax
syntax))))))
(add-hook 'tqfind-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'find-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'write-file-hooks 'agulbra-c++-clean-out-spaces)
(add-hook 'c++-mode-hook 'kde-c++-mode-hook)

@ -219,7 +219,7 @@ buffer."
"Substitues %s in the param string with ARG."
(let ((par (kde-doc-type-string 'param)))
(if (string-match "\%s" par)
(tqreplace-match ARG t t par)
(replace-match ARG t t par)
par))
)

@ -29,7 +29,7 @@
;*---------------------------------------------------------------------*/
;; Helper for kde-file-get-cpp-h
(defun kde-tqfind-file (filename basedir)
(defun kde-find-file (filename basedir)
"Looks for \"filename\" under \"basedir\""
(if basedir
(let ((path (concat basedir "/" filename)))
@ -68,7 +68,7 @@ return (\"test.cpp\" t)."
)
(if (not ret)
(progn ; look in kde-source-directory
(setq path (kde-tqfind-file (file-name-nondirectory path) kde-source-directory))
(setq path (kde-find-file (file-name-nondirectory path) kde-source-directory))
(if (and
path
(file-readable-p path))
@ -95,7 +95,7 @@ return (\"test.cpp\" t)."
(setq ret (cons path t)))))
(if (not (file-readable-p path))
(progn ; look in kde-include-directory
(setq path (kde-tqfind-file (file-name-nondirectory path) kde-include-directory))
(setq path (kde-find-file (file-name-nondirectory path) kde-include-directory))
(if (and
path
(file-readable-p path))
@ -118,7 +118,7 @@ return (\"test.cpp\" t)."
(interactive)
(let ((file (kde-file-get-cpp-h)))
(if (car file)
(tqfind-file (car file))
(find-file (car file))
(error "Corresponding source file doesn't exist.")
)
))

@ -122,7 +122,7 @@ from semantic-token-function-args"
(setq res (concat res kde-expand-arg-end))
;; if it's something like "( )" replace it with "()"
(when (string= res (concat kde-expand-arg-start kde-expand-arg-end))
(setq res (tqreplace-regexp-in-string "([ \t]+)" "()" res)))
(setq res (replace-regexp-in-string "([ \t]+)" "()" res)))
res
))
@ -214,12 +214,12 @@ would return t"
"Return function at pt as a token."
(save-excursion
(let ((token)
(what (semantic-tqfind-nonterminal-by-position pt (current-buffer)))
(what (semantic-find-nonterminal-by-position pt (current-buffer)))
(ctx))
(goto-char pt)
(if (eq (semantic-token-token what) 'function)
what
(semantic-tqfind-nonterminal-by-position pt (semantic-token-type-parts what)))
(semantic-find-nonterminal-by-position pt (semantic-token-type-parts what)))
)
))
@ -374,7 +374,7 @@ class-token has to be a token representing either a class or a struct."
(tokens))
(if exists
(progn
(tqfind-file FILENAME)
(find-file FILENAME)
(setq tokens (semantic-bovinate-toplevel t))
(switch-to-buffer buf)
tokens)
@ -417,7 +417,7 @@ in the current header file."
(filename (buffer-name))
(cppfile (car (kde-file-get-cpp-h)))
(funcs (kde-expand-tokens all-tokens)))
(tqfind-file cppfile)
(find-file cppfile)
(save-excursion
(insert "#include \"" filename "\"\n\n")
(insert funcs)
@ -428,7 +428,7 @@ in the current header file."
(defun kde-function-expand-at-point (PT)
"Expand function at point PT."
(interactive "d")
(let ((object (semantic-tqfind-nonterminal-by-position PT (current-buffer)))
(let ((object (semantic-find-nonterminal-by-position PT (current-buffer)))
(func (kde-function-at-point PT))
(file)
(buf)
@ -441,7 +441,7 @@ in the current header file."
(setq func (kde-function-construct func tqparent))
(setq file (car (kde-file-get-cpp-h)))
(setq buf (current-buffer))
(tqfind-file file)
(find-file file)
(save-excursion
(goto-char (point-max))
(insert "\n" func "\n")

@ -25,7 +25,7 @@
(if (eq kde-emacs-type 'xemacs)
(progn
(require 'func-menu)
(add-hook 'tqfind-file-hooks 'fume-add-menubar-entry))
(add-hook 'find-file-hooks 'fume-add-menubar-entry))
(require 'imenu))
(defmacro c-safe-scan-lists (from count depth)
@ -133,24 +133,24 @@ This function does not do any hidden buffer changes."
; get rid of virtual, static, multiple spaces, default values.
(defun canonical-function-sig (function)
(and (string-match "[ \t]*\\<virtual\\>[ \t]*" function)
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(and (string-match "^\\(virtual\\>\\)?[ \t]*" function)
(setq function (tqreplace-match "" t t function)))
(setq function (replace-match "" t t function)))
(and (string-match "^\\(explicit\\>\\)?[ \t]*" function)
(setq function (tqreplace-match "" t t function)))
(setq function (replace-match "" t t function)))
(and (string-match "^\\(static\\>\\)?[ \t]*" function)
(setq function (tqreplace-match "" t t function)))
(setq function (replace-match "" t t function)))
(while (string-match " +" function) ; simplifyWhiteSpace
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(while (string-match "\t+" function)
(setq function (tqreplace-match " " t t function)))
(setq function (replace-match " " t t function)))
(while (string-match "^ " function) ; remove leading whitespace
(setq function (tqreplace-match "" t t function)))
(setq function (replace-match "" t t function)))
(let ((startargs (string-match "(" function)))
(while (string-match " ?=[^,)]+" function startargs) ; remove default values
(setq function (tqreplace-match " " t t function))))
(setq function (replace-match " " t t function))))
(while (string-match " +," function) ; remove space before commas
(setq function (tqreplace-match "," t t function)))
(setq function (replace-match "," t t function)))
function ; the return value
)
@ -165,13 +165,13 @@ This function does not do any hidden buffer changes."
(cond
((string-match (concat "^ *" class "[ \\t]*(") function) ; constructor
(setq insertion-string
(tqreplace-match
(replace-match
(concat namespace class "::" class "(")
t t function)
))
((string-match (concat "^ *~" class "[ \\t]*(") function) ; destructor
(setq insertion-string
(tqreplace-match
(replace-match
(concat namespace class "::~" class "(")
t t function)
))
@ -180,7 +180,7 @@ This function does not do any hidden buffer changes."
(if (or (string-match " *\\([a-zA-Z0-9_]+\\)[ \\t]*(" function) ; normal method
(string-match " *\\(operator[^ \\t]+\\)[ \\t]*(" function)) ; operator
(setq insertion-string
(tqreplace-match
(replace-match
(if class
(concat " " namespace class "::" "\\1(") ; c++ method
(concat " " "\\1(")) ; c function
@ -243,7 +243,7 @@ This function does not do any hidden buffer changes."
(goto-char 0)
(setq sig (kde-remove-newline (kde-function-impl-sig namespace class function)))
(if (string-match "(.*" sig) ; remove args
(setq sig (tqreplace-match "" nil t sig)))
(setq sig (replace-match "" nil t sig)))
(setq found (re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) )
(if (not found)
@ -254,15 +254,15 @@ This function does not do any hidden buffer changes."
(setq sig (kde-remove-newline (kde-function-impl-sig "" class function)))
(if (string-match "(.*" sig) ; remove args
(setq sig (tqreplace-match "" nil t sig)))
(setq sig (replace-match "" nil t sig)))
(re-search-forward (concat "^[^()]*" (kde-function-regexp-quote sig) "[ \t]*(") nil t) ) )
)))))
(defun kde-remove-newline (str)
(tqreplace-in-string str "\n" " "))
(replace-in-string str "\n" " "))
; quote for use as regexp, but replace spaces with "any whitespace"
(defun kde-function-regexp-quote (str)
(tqreplace-in-string (regexp-quote str) "[ \n\t]" "[ \n\t]"))
(replace-in-string (regexp-quote str) "[ \n\t]" "[ \n\t]"))
; Initial implementation by Arnt Gulbransen
; Current maintainer: David Faure
@ -282,9 +282,9 @@ This function does not do any hidden buffer changes."
)
(setq insertion-string
(concat insertion-string "\n{\n"
(tqreplace-in-string kde-make-member-default-impl "FUNCTION"
(replace-in-string kde-make-member-default-impl "FUNCTION"
; the function name and args, without newlines
(tqreplace-in-string insertion-string "\n" " " t)
(replace-in-string insertion-string "\n" " " t)
t)
"}\n"))
; move to next method, to be ready for next call
@ -330,7 +330,7 @@ This function does not do any hidden buffer changes."
(c-indent-defun)
(save-excursion
(and (string-match ".*/" file)
(setq file (tqreplace-match "" t nil file)))
(setq file (replace-match "" t nil file)))
(and (string-match "\\.h$" file)
(functionp 'kdab-insert-include-file)
(kdab-insert-include-file file 't nil)))
@ -360,7 +360,7 @@ This function does not do any hidden buffer changes."
(if (not (file-readable-p makefile))
(error (concat makefile " not found!"))
)
(tqfind-file makefile)
(find-file makefile)
(goto-char (point-min))
(if (re-search-forward searchString nil t)
(progn
@ -405,7 +405,7 @@ This function does not do any hidden buffer changes."
(let ((part (pop parts)))
(setq definablestring
(concat
(upcase (tqreplace-in-string part "[\\.-]" "_"))
(upcase (replace-in-string part "[\\.-]" "_"))
(if (not first-iter) "_" "")
definablestring
)
@ -619,8 +619,8 @@ This function does not do any hidden buffer changes."
(if (file-readable-p "Makefile.am")
(setq objext "\.lo")
(setq objext "\.o"))
(if (string-match "\.cpp$" f) (setq f (tqreplace-match objext t t f)))
(if (string-match "\.cc$" f) (setq f (tqreplace-match objext t t f)))
(if (string-match "\.cpp$" f) (setq f (replace-match objext t t f)))
(if (string-match "\.cc$" f) (setq f (replace-match objext t t f)))
(compile (concat kde-emacs-make " " f)))
)
@ -688,7 +688,7 @@ This function does not do any hidden buffer changes."
)
)
(defun kde-year-range-tqcontains-year (ranges year)
(defun kde-year-range-contains-year (ranges year)
"checks whether year is in ranges.. ( ranges is a list as \
kde-year-range-parse-years-string returns.. "
(let ((ret))
@ -766,7 +766,7 @@ This function does not do any hidden buffer changes."
(let ((years (kde-year-range-cleanup (kde-year-range-parse-years-string (match-string 1))))
(new-copyright-string "Copyright (C) ")
(this-year (string-to-int (format-time-string "%Y"))))
(when (not (kde-year-range-tqcontains-year years this-year))
(when (not (kde-year-range-contains-year years this-year))
(kde-year-range-add-year years this-year))
(setq new-copyright-string
(concat new-copyright-string (kde-year-range-to-string years)))
@ -843,7 +843,7 @@ This function does not do any hidden buffer changes."
(let ((line "")
(begin nil)
(buffer nil))
(tqfind-file file)
(find-file file)
(goto-char 0)
(if (looking-at "#include \"")
(progn

@ -328,7 +328,7 @@
(beginning-of-buffer)
(if (re-search-forward (concat "^ *// *\\(#include *[<\"][ \t]*" header "[ \t]*[>\"]\\)") nil t)
(progn
(tqreplace-match "\\1")
(replace-match "\\1")
(when show-message
(message (concat "commented in #include for " header))))
@ -363,7 +363,7 @@
(beginning-of-buffer)
(if (re-search-forward (concat "^ *// *\\(class *" word ";\\)") nil t)
(progn
(tqreplace-match "\\1")
(replace-match "\\1")
(message (concat "commented in forward declaration for " word)))
(if (not (re-search-forward (concat "class *" word ";") nil t))
@ -415,7 +415,7 @@
(doc (if (is-qpe-class word) kdab-qpe-documentation kdab-qt-documentation))
(url (if (not (string-match "XXX" doc))
(error "didn't find three X's in kdab-qt-documentation or kdab-qpe-documentation")
(tqreplace-match word t t doc))))
(replace-match word t t doc))))
(start-process "qt documentation" nil "kfmclient" "openURL" url)
(message (concat "Loading " url)))))

@ -13,7 +13,7 @@ for fn in sys.argv[1:]:
print "Doing %s ..." % fn
f = open(fn, 'r').readlines()
if string.tqfind(f[0], "# KDE Config") == 0:
if string.find(f[0], "# KDE Config") == 0:
p = open(fn, 'w')
p.writelines(f[1:])
p.close()

@ -2990,7 +2990,7 @@ sub safe_lndir
# Recursively descend from source dir using File::Find
eval {
tqfind ({ 'wanted' => $wanted,
find ({ 'wanted' => $wanted,
'follow_fast' => 1,
'follow_skip' => 2},
$from);
@ -3361,7 +3361,7 @@ sub setup_build_system
# Check for admin dir, if it doesn't exist, create a softlink
if (not create_admin_dir($module))
{
warning "Unable to tqfind /admin directory for y[$module], it probably";
warning "Unable to find /admin directory for y[$module], it probably";
warning "won't build.";
# But continue anyways, because in this case I'm just not sure that it
# won't work in the future. ;)
@ -3888,7 +3888,7 @@ sub handle_install
# there.
if (not create_admin_dir($module))
{
warning "Unable to tqfind /admin directory for y[$module], it probably";
warning "Unable to find /admin directory for y[$module], it probably";
warning "won't install.";
# But continue anyways, because in this case I'm just not sure that it
# won't work in the future. ;)

@ -44,7 +44,7 @@ if test ! -f $dir/$file; then
if test "$dir" = "/"; then
# the case that someone puts the compile dir in /
# is very unlikely, so we better skip here ;)
echo "can't tqfind $OBJ_SUBDIR above current dir"
echo "can't find $OBJ_SUBDIR above current dir"
exit 1
fi
done

@ -64,7 +64,7 @@ if( $#dirqueue < 0 ) {
foreach $dir ( @dirqueue ) {
processEntries( $dir );
open( FILES, 'tqfind "'.$dir.'" | grep -v "/CVS"|' )
open( FILES, 'find "'.$dir.'" | grep -v "/CVS"|' )
|| die "Couldn't find files in $dir";
while( <FILES> ) {

@ -75,7 +75,7 @@ echo "done" # Startup
# Find the SVGs
FILES="$PKGDIR/FILES"
echo -n "Searching for the SVG files..."
SVGFILES=$(tqfind "$SEARCH_DIR" -name "cr*.svg*" -type f)
SVGFILES=$(find "$SEARCH_DIR" -name "cr*.svg*" -type f)
if [ $? -ne 0 ]; then
echo "There was an error when searching for the files. Exiting."
exit 1;

@ -16,11 +16,11 @@ force=0;
if [ "$1" = "-f" ]; then force=1; fi
# Look for toplevel dirs
files=`tqfind . -type d | grep -v CVS\$ | grep -v admin\$ | grep -v .libs\$ | fgrep -v .svn`
files=`find . -type d | grep -v CVS\$ | grep -v admin\$ | grep -v .libs\$ | fgrep -v .svn`
toremove="rm -rf";
for i in $files; do if test -d $i; then
# List their contents and filter out generated files
realfiles=`tqfind $i -type f | egrep -v '.svn|CVS/|Makefile$|Makefile.in$|Makefile.rules.in$|Makefile.calls.in$|\.o$|\.lo$|\.rpo$|\.la$|\.tqmoc|/\.#' `
realfiles=`find $i -type f | egrep -v '.svn|CVS/|Makefile$|Makefile.in$|Makefile.rules.in$|Makefile.calls.in$|\.o$|\.lo$|\.rpo$|\.la$|\.tqmoc|/\.#' `
if [ -z "$realfiles" ]; then
toremove="$toremove '$i'"
fi

@ -6,7 +6,7 @@
# Original author (of cvs2pack.sh) was Sebastian Stein <seb.stein@hpfsc.de>
# Heavy, heavy modifications by Jason Katz-Brown <jason@katzbrown.com>
# Some modifications for i18n inclusion by Dominique Devriese <devriese@kde.org>
# Added --no-i18n-lang and --tqreplace-files by Michael Buesch <mbuesch@freenet.de>
# Added --no-i18n-lang and --replace-files by Michael Buesch <mbuesch@freenet.de>
# License: GPL (http://www.gnu.org/)
# Last modification: 2005/01/08
@ -40,7 +40,7 @@ test -e ~/.svn2distrc && extraoptions=`cat ~/.svn2distrc`
# --log has optional argument
TEMP=`getopt \
-o v:n:r:e:a:B:dhmbgol \
--long log::,version:,name:,required-header:,required-header-error-message:,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,branch:,no-i18n,no-i18n-lang:,svn-root:,i18n-module:,debug,tqreplace-files: \
--long log::,version:,name:,required-header:,required-header-error-message:,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,branch:,no-i18n,no-i18n-lang:,svn-root:,i18n-module:,debug,replace-files: \
-n svn2dist -- $extraoptions "$@"`
if [ $? != 0 ]; then
@ -101,7 +101,7 @@ while true; do
shift 2 ;;
esac ;;
--tqreplace-files) replace_files="$2"; shift 2 ;;
--replace-files) replace_files="$2"; shift 2 ;;
--) shift
break ;;
*) echo "Aborted."
@ -157,11 +157,11 @@ if [ ! -z $showhelp ] || [ -z $module ] || [ -z $directory ]; then
echo " -e --required-header-error-message <message>"
echo " Error message for above."
echo " -d --remove-hidden Remove hidden files/directories from packages"
echo " --tqreplace-files <file-pair-list>"
echo " --replace-files <file-pair-list>"
echo " <file-pair-list> is a comma separated list of file pairs"
echo " which should be replaced in the final distribution package."
echo " Each element of a pair is separated by an @"
echo -n " Example: --tqreplace-files take_this_file@and_move_it_here,"
echo -n " Example: --replace-files take_this_file@and_move_it_here,"
echo "configure.in.bot.dist@configure.in.bot"
echo " The filenames are all relative to your package root."
echo " Please be careful! Try to avoid the usage of .. in the path. It"
@ -222,7 +222,7 @@ cd $module
directory=`echo $directory | sed -e 's#^/##'`
pofiles=""
for makefile in `tqfind $directory -name Makefile.am`; do
for makefile in `find $directory -name Makefile.am`; do
cat $makefile | while read line; do echo $line; done | perl -e '$mes=0; while (<STDIN>) { if (/^messages:/) { $mes=1; next; } if ($_ !~ m/^[^\t ]/) { $mes=0; } if ($mes && /\$\(XGETTEXT\)/ && / -o/) { s,.*-o \$\(podir\)/([a-z._-]+).*$,$1, ; chomp $_; $_ =~ s/\.pot/.po/; print "pofiles=\"$_ \$pofiles\"\n" } }' > _tmppot
. _tmppot
rm -f _tmppot
@ -357,7 +357,7 @@ fi
if [ -d $module/doc/$name ]; then
mkdir -p $temp_dist/doc/$name
cp -Rf $module/doc/$name $temp_dist/doc
tqfind $module/doc/ -maxdepth 1 ! -xtype d | xargs --tqreplace={} cp {} $temp_dist/doc
find $module/doc/ -maxdepth 1 ! -xtype d | xargs --replace={} cp {} $temp_dist/doc
if [ $doi18n = "yes" ]; then
pushd $temp_dir
@ -446,7 +446,7 @@ fi
# and all files from the base dir, except directories
echo "Copying over files from the module directory:" >> $log
tqfind $module -maxdepth 1 ! -xtype d | xargs --verbose --tqreplace={} cp {} $temp_dist 2>> $log
find $module -maxdepth 1 ! -xtype d | xargs --verbose --replace={} cp {} $temp_dist 2>> $log
echo "--------" >> $log
# we now enter the temp_dist and delete all unwanted files
@ -490,7 +490,7 @@ if [ -n "$replace_files" ]; then
echo "$from_path does not exist!" >> $log
echo ""
echo "Warning: \"$from\" does not exist!"
echo -n "Please enter the path in --tqreplace-files relative "
echo -n "Please enter the path in --replace-files relative "
echo "to the package root of your project."
echo "Your package root is: \"$module/$directory\""
echo ""
@ -527,8 +527,8 @@ cd $temp_dist
# remove files
echo "Remove files: " >> $log
for file in $remove; do
tqfind . -name $file | xargs rm -Rf
echo "tqfind . -name $file | xargs rm -Rf" >> $log
find . -name $file | xargs rm -Rf
echo "find . -name $file | xargs rm -Rf" >> $log
done
# remove more files
@ -539,7 +539,7 @@ done
unset file
# remove hidden files
test ! -z $removehidden && echo "Remove hidden files: " >> $log && tqfind $temp_dist -name ".*" -and ! -name "." | xargs --verbose rm -Rf 2>> $log
test ! -z $removehidden && echo "Remove hidden files: " >> $log && find $temp_dist -name ".*" -and ! -name "." | xargs --verbose rm -Rf 2>> $log
echo "--------" >> $log

@ -10,7 +10,7 @@
#ignore dirs "CVS", ".deps", ".libs" ".svn"
#ignore files *.o, *.so, *.lo, *.la, *~, .#*
FOUND=`tqfind |grep -v "^\.$"| grep -v CVS| grep -v "\.[ls]\?o$"|grep -v "~$"|grep -v "\.libs/"|grep -v "\.deps/" |grep -v "\.svn/" |grep -v "\.depend/"| grep -v "/\.#" |grep -v "\.la$"`
FOUND=`find |grep -v "^\.$"| grep -v CVS| grep -v "\.[ls]\?o$"|grep -v "~$"|grep -v "\.libs/"|grep -v "\.deps/" |grep -v "\.svn/" |grep -v "\.depend/"| grep -v "/\.#" |grep -v "\.la$"`
#echo $FOUND
ask_for_adding() {

@ -826,7 +826,7 @@ void AssociationWidget::setUMLAssociation (UMLAssociation * assoc)
/** Returns true if the Widget is either at the starting or ending side of the association */
bool AssociationWidget::tqcontains(UMLWidget* widget) {
bool AssociationWidget::contains(UMLWidget* widget) {
return (widget == m_role[A].m_pWidget || widget == m_role[B].m_pWidget);
}

@ -244,7 +244,7 @@ public:
*
* @return True if widget plays role A or B in this assoc.
*/
bool tqcontains(UMLWidget* widget);
bool contains(UMLWidget* widget);
/**
* Returns true if this AssociationWidget represents a collaboration message.

@ -260,7 +260,7 @@ void UMLAttribute::setTemplateParams(const TQString& templateParam, UMLClassifie
return;
TQString type = templateParam.simplifyWhiteSpace();
int start = type.tqfind(TQChar('<'));
int start = type.find(TQChar('<'));
if (start >= 0 ) {
int end = start;
int count = 1;
@ -294,7 +294,7 @@ void UMLAttribute::setTemplateParams(const TQString& templateParam, UMLClassifie
//We want to list only the params that already exist in this document
//If the param doesnt't already exist, we couldn't draw an association anyway
UMLClassifier* tmpClassifier = static_cast<UMLClassifier*>(obj);
if (templateParamList.tqfindRef(tmpClassifier) == -1) {
if (templateParamList.findRef(tmpClassifier) == -1) {
templateParamList.append(tmpClassifier);
}
}
@ -311,9 +311,9 @@ UMLClassifierList UMLAttribute::getTemplateParams() {
// Handle C++/D/Java template/generic parameters
const Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
if (pl == Uml::pl_Cpp || pl == Uml::pl_Java || pl == Uml::pl_D) {
int start = type.tqfind(TQChar('<'));
int start = type.find(TQChar('<'));
if (start >= 0 ) {
int end = type.tqfindRev(TQChar('>'));
int end = type.findRev(TQChar('>'));
if (end > start) {
templateParam = type.mid(start + 1, end - start - 1);
setTemplateParams(templateParam, templateParamList);

@ -218,8 +218,8 @@ UMLOperation* UMLClassifier::createOperation(const TQString &name /*=null*/,
bool UMLClassifier::addOperation(UMLOperation* op, int position )
{
if (m_List.tqfindRef(op) != -1) {
kDebug() << "UMLClassifier::addOperation: tqfindRef("
if (m_List.findRef(op) != -1) {
kDebug() << "UMLClassifier::addOperation: findRef("
<< op->getName() << ") finds op (bad)"
<< endl;
return false;
@ -380,7 +380,7 @@ UMLClassifierList UMLClassifier::findSubClassConcepts (ClassifierType type) {
UMLClassifier *concept = dynamic_cast<UMLClassifier*>(obj);
if (concept && (type == ALL || (!concept->isInterface() && type == CLASS)
|| (concept->isInterface() && type == INTERFACE))
&& (inheritingConcepts.tqfindRef(concept) == -1))
&& (inheritingConcepts.findRef(concept) == -1))
inheritingConcepts.append(concept);
}
}
@ -409,7 +409,7 @@ UMLClassifierList UMLClassifier::findSuperClassConcepts (ClassifierType type) {
UMLClassifier *concept = dynamic_cast<UMLClassifier*>(obj);
if (concept && (type == ALL || (!concept->isInterface() && type == CLASS)
|| (concept->isInterface() && type == INTERFACE))
&& (parentConcepts.tqfindRef(concept) == -1))
&& (parentConcepts.findRef(concept) == -1))
parentConcepts.append(concept);
}
}
@ -765,7 +765,7 @@ int UMLClassifier::takeItem(UMLClassifierListItem *item) {
buf.append(' ' + currentAtt->getName());
}
kDebug() << " UMLClassifier::takeItem (before): m_List is " << buf << endl;
int index = m_List.tqfindRef(item);
int index = m_List.findRef(item);
if (index == -1)
return -1;
switch (item->getBaseType()) {

@ -131,8 +131,8 @@ bool ClassifierCodeDocument::hasObjectVectorClassFields() {
UMLRole * role = dynamic_cast<UMLRole*>(cf->getParentObject());
TQString multi = role->getMultiplicity();
if (
multi.tqcontains(TQRegExp("[23456789\\*]")) ||
multi.tqcontains(TQRegExp("1\\d"))
multi.contains(TQRegExp("[23456789\\*]")) ||
multi.contains(TQRegExp("1\\d"))
)
return true;
}
@ -170,7 +170,7 @@ bool ClassifierCodeDocument::hasAttributeClassFields() {
// the codegenerator writer the liberty to organize their document as they desire.
bool ClassifierCodeDocument::addCodeClassField ( CodeClassField * add_object ) {
UMLObject * umlobj = add_object->getParentObject();
if(!(m_classFieldMap.tqcontains(umlobj)))
if(!(m_classFieldMap.contains(umlobj)))
{
m_classfieldVector.append(add_object);
m_classFieldMap.insert(umlobj,add_object);
@ -194,7 +194,7 @@ void ClassifierCodeDocument::addAttributeClassField (UMLClassifierListItem *obj,
*/
bool ClassifierCodeDocument::removeCodeClassField ( CodeClassField * remove_object ) {
UMLObject * umlobj = remove_object->getParentObject();
if(m_classFieldMap.tqcontains(umlobj))
if(m_classFieldMap.contains(umlobj))
{
if (m_classfieldVector.removeRef(remove_object))
{
@ -542,7 +542,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
{
UMLRole * role = a->getUMLRole(Uml::B);
if(!m_classFieldMap.tqcontains((UMLObject*)role))
if(!m_classFieldMap.contains((UMLObject*)role))
{
CodeClassField * classfield = CodeGenFactory::newCodeClassField(this, role);
if( addCodeClassField(classfield))
@ -554,7 +554,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
if (printRoleA)
{
UMLRole * role = a->getUMLRole(Uml::A);
if(!m_classFieldMap.tqcontains((UMLObject*)role))
if(!m_classFieldMap.contains((UMLObject*)role))
{
CodeClassField * classfield = CodeGenFactory::newCodeClassField(this, role);
if( addCodeClassField(classfield))

@ -83,7 +83,7 @@ void UMLClassifierListItem::setTypeName(const TQString &type) {
m_pSecondary = pDoc->findUMLObject(type);
if (m_pSecondary == NULL) {
// Make data type for easily identified cases
if (Model_Utils::isCommonDataType(type) || type.tqcontains('*')) {
if (Model_Utils::isCommonDataType(type) || type.contains('*')) {
m_pSecondary = Object_Factory::createUMLObject(Uml::ot_Datatype, type);
kDebug() << "UMLClassifierListItem::setTypeName: "
<< "created datatype for " << type << endl;

@ -281,7 +281,7 @@ bool UMLClipboard::insertItemChildren(UMLListViewItem * Item, UMLListViewItemLis
// If the child is selected, remove it from the list of selected items
// otherwise it will be inserted twice in m_ObjectList.
if(child->isSelected()) {
SelectedItems.remove(SelectedItems.tqfind(child) );
SelectedItems.remove(SelectedItems.find(child) );
}
insertItemChildren(child, SelectedItems);
child = (UMLListViewItem*)child->nextSibling();

@ -172,7 +172,7 @@ bool CodeClassField::addMethod ( CodeAccessorMethod * add_object ) {
return false;
/*
// this wont work as the key for TQMap needs to inherit from TQObject
if(m_methodMap->tqcontains(type))
if(m_methodMap->contains(type))
return false; // return false, we already have some object with this tag in the list
else
m_methodMap->insert(type, add_object);
@ -331,7 +331,7 @@ int CodeClassField::minimumListOccurances( ) {
if(!multi.isEmpty())
{
TQString lowerBoundString = multi.remove(TQRegExp("\\.\\.\\d+$"));
if(!lowerBoundString.isEmpty() &&lowerBoundString.tqcontains(TQRegExp("^\\d+$")))
if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(TQRegExp("^\\d+$")))
return lowerBoundString.toInt();
}
@ -348,7 +348,7 @@ int CodeClassField::maximumListOccurances( ) {
if(!multi.isEmpty())
{
TQString upperBoundString = multi.section(TQRegExp("(\\.\\.)"),1);
if(!upperBoundString.isEmpty() && upperBoundString.tqcontains(TQRegExp("^\\d+$")))
if(!upperBoundString.isEmpty() && upperBoundString.contains(TQRegExp("^\\d+$")))
return upperBoundString.toInt();
else
return -1; // unbounded
@ -392,7 +392,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType ( CodeAccessorMethod::Acce
//if we already know to which file this class was written/should be written, just return it.
/*
// argh. this wont work because "accessorType' doesn't inherit from TQObject.
if(m_methodMap->tqcontains(type))
if(m_methodMap->contains(type))
return ((*m_methodMap)[type]);
CodeAccessorMethod * obj = NULL;
*/
@ -422,7 +422,7 @@ void CodeClassField::initAccessorMethods()
{
// everything gets potential get/set method
//if(!m_methodMap->tqcontains(CodeAccessorMethod::GET))
//if(!m_methodMap->contains(CodeAccessorMethod::GET))
if(!findMethodByType(CodeAccessorMethod::GET))
{
CodeAccessorMethod * method = CodeGenFactory::newCodeAccessorMethod (getParentDocument(), this, CodeAccessorMethod::GET);
@ -585,8 +585,8 @@ bool CodeClassField::fieldIsSingleValue ( )
TQString multi = role->getMultiplicity();
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^(0|1)$"))
|| multi.tqcontains(TQRegExp("^0\\.\\.1$")))
if(multi.isEmpty() || multi.contains(TQRegExp("^(0|1)$"))
|| multi.contains(TQRegExp("^0\\.\\.1$")))
return true;
return false;

@ -112,11 +112,11 @@ TQString CodeDocument::getPath ( ) {
path = path.simplifyWhiteSpace();
// Replace all blanks with underscore
path.tqreplace(TQRegExp(" "), "_");
path.replace(TQRegExp(" "), "_");
// this allows multiple directory paths (ala Java, some other languages)
// in from the package specification
path.tqreplace(TQRegExp("\\."),"/"); // Simple hack!.. but this is more or less language
path.replace(TQRegExp("\\."),"/"); // Simple hack!.. but this is more or less language
// dependant and should probably be commented out.
// Still, as a general default it may be useful -b.t.
return path;
@ -215,7 +215,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo
if(!findTextBlockByTag(tag, true))
return false;
int index = m_textblockVector.tqfindRef(existingBlock);
int index = m_textblockVector.findRef(existingBlock);
if(index < 0)
{
// may be hiding in child hierarchical codeblock
@ -242,7 +242,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo
newBlock->setTag(new_tag);
}
if(m_textBlockTagMap.tqcontains(new_tag))
if(m_textBlockTagMap.contains(new_tag))
return false; // return false, we already have some object with this tag in the list
else
m_textBlockTagMap.insert(new_tag, newBlock);
@ -278,10 +278,10 @@ void CodeDocument::updateHeader () {
//try to find a heading file (license, coments, etc) then extract its text
TQString headingText = UMLApp::app()->getCommonPolicy()->getHeadingFile(getFileExtension());
headingText.tqreplace(TQRegExp("%filename%"),getFileName()+getFileExtension());
headingText.tqreplace(TQRegExp("%filepath%"),getPath());
headingText.tqreplace( TQRegExp("%time%"), TQTime::currentTime().toString());
headingText.tqreplace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString());
headingText.replace(TQRegExp("%filename%"),getFileName()+getFileExtension());
headingText.replace(TQRegExp("%filepath%"),getPath());
headingText.replace( TQRegExp("%time%"), TQTime::currentTime().toString());
headingText.replace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString());
getHeader()->setText(headingText);
@ -380,7 +380,7 @@ void CodeDocument::setAttributesFromNode ( TQDomElement & root) {
TQString pkgStr = root.attribute("package","");
if (!pkgStr.isEmpty() && pkgStr != "-1") {
UMLDoc *umldoc = UMLApp::app()->getDocument();
if (pkgStr.tqcontains( TQRegExp("\\D") )) {
if (pkgStr.contains( TQRegExp("\\D") )) {
// suspecting pre-1.5.3 file format where the package name was
// saved instead of the package ID.
UMLObject *o = umldoc->findUMLObject(pkgStr);
@ -467,11 +467,11 @@ void CodeDocument::addChildTagToMap ( const TQString &tag, TextBlock * tb)
TextBlock * CodeDocument::findTextBlockByTag( const TQString &tag , bool descendIntoChildren)
{
//if we already know to which file this class was written/should be written, just return it.
if(m_textBlockTagMap.tqcontains(tag))
if(m_textBlockTagMap.contains(tag))
return m_textBlockTagMap[tag];
if (descendIntoChildren)
if(m_childTextBlockTagMap.tqcontains(tag))
if(m_childTextBlockTagMap.contains(tag))
return m_childTextBlockTagMap[tag];
return (TextBlock*) NULL;

@ -514,7 +514,7 @@ TQString CodeGenerationPolicy::getHeadingFile(const TQString& str) {
if(!getIncludeHeadings() || str.isEmpty())
return TQString("");
if(str.tqcontains(" ") ||str.tqcontains(";")) {
if(str.contains(" ") ||str.contains(";")) {
kWarning() << "File folder must not have spaces or semi colons!" << endl;
return TQString("");
}
@ -549,10 +549,10 @@ TQString CodeGenerationPolicy::getHeadingFile(const TQString& str) {
retstr += ts.readLine()+endLine;
//do variable substitution
retstr.tqreplace( TQRegExp("%author%"),TQString(getenv("USER"))); //get the user name from some where else
retstr.tqreplace( TQRegExp("%headingpath%"),filename );
retstr.tqreplace( TQRegExp("%time%"), TQTime::currentTime().toString());
retstr.tqreplace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString());
retstr.replace( TQRegExp("%author%"),TQString(getenv("USER"))); //get the user name from some where else
retstr.replace( TQRegExp("%headingpath%"),filename );
retstr.replace( TQRegExp("%time%"), TQTime::currentTime().toString());
retstr.replace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString());
// the replace filepath, time parts are also in the code document updateHeader method
// (which is not a virtual function)...

@ -116,7 +116,7 @@ TQString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
CodeDocument * CodeGenerator::findCodeDocumentByID( const TQString &tag ) {
//if we already know to which file this class was written/should be written, just return it.
CodeDocument * doc = (CodeDocument*)NULL;
if((doc = m_codeDocumentDictionary.tqfind(tag)))
if((doc = m_codeDocumentDictionary.find(tag)))
return doc;
return doc;
@ -133,7 +133,7 @@ bool CodeGenerator::addCodeDocument ( CodeDocument * doc )
doc->setID(tag);
}
if(m_codeDocumentDictionary.tqfind(tag))
if(m_codeDocumentDictionary.find(tag))
return false; // return false, we already have some object with this tag in the list
else
m_codeDocumentDictionary.insert(tag, doc);
@ -485,7 +485,7 @@ bool CodeGenerator::openFile (TQFile & file, const TQString &fileName ) {
*/
TQString CodeGenerator::cleanName ( const TQString &name ) {
TQString retval = name;
retval.tqreplace(TQRegExp("\\W"), "_");
retval.replace(TQRegExp("\\W"), "_");
return retval;
}
@ -499,7 +499,7 @@ TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
// if path is given add this as a directory to the file name
if (!path.isEmpty()) {
path.tqreplace(TQRegExp("::"), "/"); // Simple hack!
path.replace(TQRegExp("::"), "/"); // Simple hack!
name = path + '/' + codeDocument->getFileName();
path = '/' + path;
} else {
@ -507,7 +507,7 @@ TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
}
// Convert all "::" to "/" : Platform-specific path separator
name.tqreplace(TQRegExp("::"), "/"); // Simple hack!
name.replace(TQRegExp("::"), "/"); // Simple hack!
// if a path name exists check the existence of the path directory
if (!path.isEmpty()) {
@ -539,7 +539,7 @@ TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
}
name.simplifyWhiteSpace();
name.tqreplace(TQRegExp(" "),"_");
name.replace(TQRegExp(" "),"_");
return overwritableName( name, codeDocument->getFileExtension() );
}
@ -584,7 +584,7 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
}
// now add in list ONLY if its not already there
if(temp && !cList.tqcontainsRef(temp))
if(temp && !cList.containsRef(temp))
cList.append(temp);
}
@ -594,13 +594,13 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
temp =0;
//check return value
temp =(UMLClassifier*) op->getType();
if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.tqcontainsRef(temp))
if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.containsRef(temp))
cList.append(temp);
//check parameters
UMLAttributeList atl = op->getParmList();
for (UMLAttribute *at = atl.first(); at; at = atl.next()) {
temp = (UMLClassifier*)at->getType();
if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.tqcontainsRef(temp))
if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.containsRef(temp))
cList.append(temp);
}
@ -612,7 +612,7 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
for (UMLAttribute *at = atl.first(); at; at = atl.next()) {
temp=0;
temp = (UMLClassifier*) at->getType();
if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.tqcontainsRef(temp))
if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.containsRef(temp))
cList.append(temp);
}
}
@ -640,7 +640,7 @@ TQString CodeGenerator::formatDoc(const TQString &text, const TQString &linePref
continue;
}
int index;
while ((index = input.tqfindRev(" ", lineWidth)) >= 0) {
while ((index = input.findRev(" ", lineWidth)) >= 0) {
output += linePrefix + input.left(index) + endLine; // add line
input.remove(0, index + 1); //and remove processed string, including
// white space
@ -706,7 +706,7 @@ bool CodeGenerator::isReservedKeyword(const TQString & keyword) {
const TQStringList keywords = reservedKeywords();
return keywords.tqcontains(keyword);
return keywords.contains(keyword);
}
const TQStringList CodeGenerator::reservedKeywords() const {

@ -124,7 +124,7 @@ void AdaWriter::computeAssocTypeAndRole(UMLClassifier *c,
return;
const TQString multi = a->getMulti(Uml::B);
bool hasNonUnityMultiplicity = (!multi.isEmpty() && multi != "1");
hasNonUnityMultiplicity &= !multi.tqcontains(TQRegExp("^1 *\\.\\. *1$"));
hasNonUnityMultiplicity &= !multi.contains(TQRegExp("^1 *\\.\\. *1$"));
roleName = cleanName(a->getRoleName(Uml::B));
if (roleName.isEmpty())
roleName = cleanName(a->getName());
@ -154,7 +154,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
const bool isClass = !c->isInterface();
TQString classname = cleanName(c->getName());
TQString fileName = packageName(c).lower();
fileName.tqreplace('.', '-');
fileName.replace('.', '-');
//find an appropriate name for our file
fileName = overwritableName(c, fileName, ".ads");
@ -176,8 +176,8 @@ void AdaWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".ads");
if (!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), fileName);
str.tqreplace(TQRegExp("%filepath%"), file.name());
str.replace(TQRegExp("%filename%"), fileName);
str.replace(TQRegExp("%filepath%"), file.name());
ada << str << endl;
}

@ -67,8 +67,8 @@ void ASWriter::writeClass(UMLClassifier *c)
str = getHeadingFile(".as");
if(!str.isEmpty())
{
str.tqreplace(TQRegExp("%filename%"),fileName+".as");
str.tqreplace(TQRegExp("%filepath%"),fileas.name());
str.replace(TQRegExp("%filename%"),fileName+".as");
str.replace(TQRegExp("%filepath%"),fileas.name());
as << str << m_endl;
}

@ -65,7 +65,7 @@ TQString CPPCodeClassField::getFieldName() {
UMLRole * role = (UMLRole*) getParentObject();
TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.tqreplace(0, 1, roleName.left(1).lower());
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
return roleName.lower() + "Vector";
}

@ -224,40 +224,40 @@ void CPPCodeGenerationPolicy::setVectorIncludeIsGlobal(bool value) {
TQString CPPCodeGenerationPolicy::getVectorMethodAppend(const TQString & variableName, const TQString & itemClassName) {
TQString value = m_vectorMethodAppendBase;
if(!variableName.isEmpty())
value.tqreplace(TQRegExp("%VARNAME%"),variableName);
value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
value.replace(TQRegExp("%VARNAME%"),variableName);
value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName);
value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
TQString CPPCodeGenerationPolicy::getVectorMethodRemove(const TQString & variableName, const TQString & itemClassName) {
TQString value = m_vectorMethodRemoveBase;
if(!variableName.isEmpty())
value.tqreplace(TQRegExp("%VARNAME%"),variableName);
value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
value.replace(TQRegExp("%VARNAME%"),variableName);
value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName);
value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
TQString CPPCodeGenerationPolicy::getVectorMethodInit(const TQString & variableName, const TQString & itemClassName) {
TQString value = m_vectorMethodInitBase;
if(!variableName.isEmpty())
value.tqreplace(TQRegExp("%VARNAME%"),variableName);
value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
value.replace(TQRegExp("%VARNAME%"),variableName);
value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName);
value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
TQString CPPCodeGenerationPolicy::getObjectMethodInit(const TQString & variableName, const TQString & itemClassName) {
TQString value = m_objectMethodInitBase;
if(!variableName.isEmpty())
value.tqreplace(TQRegExp("%VARNAME%"),variableName);
value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
value.replace(TQRegExp("%VARNAME%"),variableName);
value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName);
value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}

@ -95,7 +95,7 @@ bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument * doc )
doc->setID(tag);
}
if(m_codeDocumentDictionary.tqfind(tag))
if(m_codeDocumentDictionary.find(tag))
return false; // return false, we already have some object with this tag in the list
else
m_codeDocumentDictionary.insert(tag, doc);

@ -412,7 +412,7 @@ void CPPHeaderCodeDocument::updateContent( )
CodeGenerator::findObjectsRelated(c,includes);
for(UMLPackage *con = includes.first(); con ; con = includes.next())
if (con->getBaseType() != Uml::ot_Datatype && !packageMap.tqcontains(con))
if (con->getBaseType() != Uml::ot_Datatype && !packageMap.contains(con))
{
packageMap.insert(con,con->getPackage());
if(con != getParentClassifier())

@ -63,10 +63,10 @@ TQString CPPMakefileCodeDocument::getPath ( )
path.simplifyWhiteSpace();
// Replace all blanks with underscore
path.tqreplace(TQRegExp(" "), "_");
path.replace(TQRegExp(" "), "_");
path.tqreplace(TQRegExp("\\."),"/");
path.tqreplace(TQRegExp("::"),"/");
path.replace(TQRegExp("\\."),"/");
path.replace(TQRegExp("::"),"/");
path.lower();

@ -113,7 +113,7 @@ void CppWriter::writeClass(UMLClassifier *c)
need_impl = false;
}
if (need_impl) {
fileName.tqreplace( TQRegExp(".h$"), ".cpp");
fileName.replace( TQRegExp(".h$"), ".cpp");
if( !openFile(filecpp, fileName)) {
emit codeGenerated(c, false);
return;
@ -141,13 +141,13 @@ void CppWriter::writeHeaderFile (UMLClassifier *c, TQFile &fileh) {
// write header blurb
TQString str = getHeadingFile(".h");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".h");
str.tqreplace(TQRegExp("%filepath%"),fileh.name());
str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".h");
str.replace(TQRegExp("%filepath%"),fileh.name());
h << str<< m_endl;
}
// Write the hash define stuff to prevent multiple parsing/inclusion of header
TQString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().tqreplace(TQRegExp(" "), "_");
TQString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().replace(TQRegExp(" "), "_");
writeBlankLine(h);
h << "#ifndef "<< hashDefine + "_H" << m_endl;
h << "#define "<< hashDefine + "_H" << m_endl;
@ -206,8 +206,8 @@ void CppWriter::writeSourceFile (UMLClassifier *c, TQFile &filecpp ) {
TQString str;
str = getHeadingFile(".cpp");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".cpp");
str.tqreplace(TQRegExp("%filepath%"),filecpp.name());
str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".cpp");
str.replace(TQRegExp("%filepath%"),filecpp.name());
cpp << str << m_endl;
}
@ -627,7 +627,7 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
// from what I can tell, this IS the default behavior for
// cleanName. I dunno why its not working -b.t.
methodBaseName = methodBaseName.stripWhiteSpace();
methodBaseName.tqreplace(0,1,methodBaseName.tqat(0).upper());
methodBaseName.replace(0,1,methodBaseName.tqat(0).upper());
writeSingleAttributeAccessorMethods(at->getTypeName(), varName,
methodBaseName, at->getDoc(), Uml::chg_Changeable, isHeaderMethod,
@ -641,7 +641,7 @@ void CppWriter::writeComment(const TQString &comment, const TQString &myIndent,
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
if (comment.tqcontains(TQRegExp("\n"))) {
if (comment.contains(TQRegExp("\n"))) {
TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
@ -736,14 +736,14 @@ void CppWriter::writeAssociationRoleDecl(TQString fieldClassName, TQString roleN
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$")))
if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
TQString fieldVarName = "m_" + roleName.lower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
if(ObjectFieldVariables.tqfindIndex(fieldVarName) == -1 &&
multi.tqcontains(TQRegExp("^1$"))
if(ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
multi.contains(TQRegExp("^1$"))
)
{
// ugh. UGLY. Storing variable name and its class in pairs.
@ -759,7 +759,7 @@ void CppWriter::writeAssociationRoleDecl(TQString fieldClassName, TQString roleN
// record unique occurrences for later when we want to check
// for initialization of this vector
if(VectorFieldVariables.tqfindIndex(fieldVarName) == -1)
if(VectorFieldVariables.findIndex(fieldVarName) == -1)
VectorFieldVariables.append(fieldVarName);
stream << indent << policyExt()->getVectorClassName() <<"<" << fieldClassName << "*";
@ -823,7 +823,7 @@ void CppWriter::writeAssociationRoleMethod (const TQString &fieldClassName,
const TQString &description, Uml::Changeability_Type change,
TQTextStream &stream)
{
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$")))
if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
TQString fieldVarName = "m_" + roleName.lower();
writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
@ -860,9 +860,9 @@ void CppWriter::writeVectorAttributeAccessorMethods (
stream << "add" << fldName << " ( " << className << " add_object )";
if (writeMethodBody) {
TQString method = VECTOR_METHOD_APPEND;
method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName);
method.tqreplace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
method.tqreplace(TQRegExp("%ITEMCLASS%"),className);
method.replace(TQRegExp("%VARNAME%"),fieldVarName);
method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
method.replace(TQRegExp("%ITEMCLASS%"),className);
stream << indent << " {" << m_endl;
m_indentLevel++;
printTextAsSeparateLinesWithIndent(method,getIndent(),stream);
@ -883,9 +883,9 @@ void CppWriter::writeVectorAttributeAccessorMethods (
stream << "remove" << fldName << " ( " << className << " remove_object )";
if (writeMethodBody) {
TQString method = VECTOR_METHOD_REMOVE;
method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName);
method.tqreplace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
method.tqreplace(TQRegExp("%ITEMCLASS%"),className);
method.replace(TQRegExp("%VARNAME%"),fieldVarName);
method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
method.replace(TQRegExp("%ITEMCLASS%"),className);
stream << indent << " {" << m_endl;
m_indentLevel++;
printTextAsSeparateLinesWithIndent(method,getIndent(),stream);
@ -1034,8 +1034,8 @@ void CppWriter::writeInitAttibuteMethod (TQTextStream &stream)
for( it = VectorFieldVariables.begin(); it != VectorFieldVariables.end(); ++it ) {
TQString fieldVarName = *it;
TQString method = VECTOR_METHOD_INIT;
method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName);
method.tqreplace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
method.replace(TQRegExp("%VARNAME%"),fieldVarName);
method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
stream << getIndent() << method << m_endl;
}
}
@ -1047,8 +1047,8 @@ void CppWriter::writeInitAttibuteMethod (TQTextStream &stream)
it++;
TQString fieldClassName = *it;
TQString method = OBJECT_METHOD_INIT;
method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName);
method.tqreplace(TQRegExp("%ITEMCLASS%"),fieldClassName);
method.replace(TQRegExp("%VARNAME%"),fieldVarName);
method.replace(TQRegExp("%ITEMCLASS%"),fieldClassName);
stream << getIndent() << method << m_endl;
}
}

@ -169,8 +169,8 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".cs");
if (!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),filecs.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),filecs.name());
cs<<str<<m_endl;
}
@ -199,7 +199,7 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
UMLClassifier *cl = dynamic_cast<UMLClassifier*>(p);
if (cl)
p = cl->getUMLPackage();
if (p != logicalView && m_seenIncludes.tqfindRef(p) == -1 && p != container) {
if (p != logicalView && m_seenIncludes.findRef(p) == -1 && p != container) {
cs << "using " << p->getFullyQualifiedName(".") << ";" << m_endl;
m_seenIncludes.append(p);
}
@ -470,7 +470,7 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
if (forceDoc() || !at->getDoc().isEmpty()) {
cs << m_container_indent << m_indentation << "/// <param name=\"" << cleanName(at->getName()) << "\">";
//removing newlines from parameter doc
cs << formatDoc(at->getDoc(), "").tqreplace("\n", " ").remove('\r').tqreplace(TQRegExp(" $"), "");
cs << formatDoc(at->getDoc(), "").replace("\n", " ").remove('\r').replace(TQRegExp(" $"), "");
cs << "</param>" << m_endl;
}
}
@ -693,7 +693,7 @@ void CSharpWriter::writeAttribute(TQString doc, Uml::Visibility visibility, bool
TQString CSharpWriter::makeLocalTypeName(UMLClassifierListItem *cl) {
UMLPackage *p = cl->getType()->getUMLPackage();
if (m_seenIncludes.tqfindRef(p) != -1) {
if (m_seenIncludes.findRef(p) != -1) {
return cl->getType()->getName();
}
else {

@ -114,8 +114,8 @@ void DWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".d");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),file.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),file.name());
d<<str<<m_endl;
}
@ -442,8 +442,8 @@ void DWriter::writeComment(const TQString &comment, const TQString &myIndent,
TQString tmp = lines[i];
while (tmp.length() > 77) {
uint l = tmp.left(77).tqfindRev(' ');
if (l < 1) l = tmp.tqfind(' ', 77);
uint l = tmp.left(77).findRev(' ');
if (l < 1) l = tmp.find(' ', 77);
if (l < 1 || l > tmp.length()) {
d << myIndent << (dDocStyle ? " * " : "// ") << tmp << m_endl;
break;
@ -527,7 +527,7 @@ void DWriter::writeAssociationRoleDecl(TQString fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) {
if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
d << m_indentation << fieldClassName << " ";
if (hasAccessors) d << "m_";
@ -584,7 +584,7 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
void DWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString roleName, TQString multi,
TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
TQTextStream &d) {
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) {
if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
TQString fieldVarName = "m_" + deCapitaliseFirstLetter(roleName);
writeSingleAttributeAccessorMethods(
@ -942,7 +942,7 @@ TQString DWriter::getUMLObjectName(UMLObject *obj) {
}
TQString DWriter::deCapitaliseFirstLetter(TQString string) {
string.tqreplace( 0, 1, string[0].lower());
string.replace( 0, 1, string[0].lower());
return string;
}

@ -129,8 +129,8 @@ void IDLWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".idl");
if (!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), fileName);
str.tqreplace(TQRegExp("%filepath%"), file.name());
str.replace(TQRegExp("%filename%"), fileName);
str.replace(TQRegExp("%filepath%"), file.name());
idl << str << m_endl;
}

@ -297,10 +297,10 @@ TQString JavaANTCodeDocument::getPath ( )
path.simplifyWhiteSpace();
// Replace all blanks with underscore
path.tqreplace(TQRegExp(" "), "_");
path.replace(TQRegExp(" "), "_");
path.tqreplace(TQRegExp("\\."),"/");
path.tqreplace(TQRegExp("::"), "/");
path.replace(TQRegExp("\\."),"/");
path.replace(TQRegExp("::"), "/");
path.lower();

@ -89,10 +89,10 @@ TQString JavaClassifierCodeDocument::getPath ( )
path.simplifyWhiteSpace();
// Replace all blanks with underscore
path.tqreplace(TQRegExp(" "), "_");
path.replace(TQRegExp(" "), "_");
path.tqreplace(TQRegExp("\\."),"/");
path.tqreplace(TQRegExp("::"), "/");
path.replace(TQRegExp("\\."),"/");
path.replace(TQRegExp("::"), "/");
path.lower();
@ -371,7 +371,7 @@ void JavaClassifierCodeDocument::updateContent( )
// PACKAGE CODE BLOCK
//
TQString pkgs = getPackage();
pkgs.tqreplace(TQRegExp("::"), ".");
pkgs.replace(TQRegExp("::"), ".");
TQString packageText = getPackage().isEmpty() ? "" : "package "+pkgs+';'+endLine;
CodeBlockWithComments * pblock = addOrUpdateTaggedCodeBlockWithComments("packages", packageText, "", 0, false);
if(packageText.isEmpty() && pblock->getContentType() == CodeBlock::AutoGenerated)
@ -397,7 +397,7 @@ void JavaClassifierCodeDocument::updateContent( )
// NO (default) datatypes in the import statement.. use defined
// ones whould be possible, but no idea how to do that...at least for now.
// Dynamic casting is slow..not an optimal way to do this.
if (!packageMap.tqcontains(con) && con->getBaseType() != Uml::ot_Datatype)
if (!packageMap.contains(con) && con->getBaseType() != Uml::ot_Datatype)
{
packageMap.insert(con, con->getPackage());

@ -68,7 +68,7 @@ TQString JavaCodeClassField::getFieldName() {
UMLRole * role = (UMLRole*) getParentObject();
TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.tqreplace(0, 1, roleName.left(1).lower());
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
return roleName.lower() + "Vector";
}

@ -115,7 +115,7 @@ TQString JavaCodeGenerator::getListFieldClassName () {
// Same thing again for "bool" to "boolean"
TQString JavaCodeGenerator::fixTypeName(const TQString &string)
{
if (string.isEmpty() || string.tqcontains(TQRegExp("^\\s+$")))
if (string.isEmpty() || string.contains(TQRegExp("^\\s+$")))
return "void";
if (string == "string")
return "String";

@ -137,8 +137,8 @@ void JavaWriter::writeClass(UMLClassifier *c)
TQString str;
str = getHeadingFile(".java");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),file.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),file.name());
java<<str<<m_endl;
}
@ -408,7 +408,7 @@ void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility
// from what I can tell, this IS the default behavior for
// cleanName. I dunno why its not working -b.t.
fieldName.stripWhiteSpace();
fieldName.tqreplace(0,1,fieldName.tqat(0).upper());
fieldName.replace(0,1,fieldName.tqat(0).upper());
writeSingleAttributeAccessorMethods(at->getTypeName(),
cleanName(at->getName()),
@ -425,7 +425,7 @@ void JavaWriter::writeComment(const TQString &comment, const TQString &myIndent,
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
if (comment.tqcontains(TQRegExp("\n"))) {
if (comment.contains(TQRegExp("\n"))) {
if(javaDocStyle)
java << myIndent << "/**" << m_endl;
@ -530,9 +530,9 @@ void JavaWriter::writeAssociationRoleDecl(TQString fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$")))
if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
TQString fieldVarName = "m_" + roleName.tqreplace(0, 1, roleName.left(1).lower());
TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
java<<startline<<scope<<" "<<fieldClassName<<" "<<fieldVarName<<";";
}
else
@ -589,9 +589,9 @@ void JavaWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString r
TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
TQTextStream &java)
{
if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$")))
if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
TQString fieldVarName = "m_" + roleName.tqreplace(0, 1, roleName.left(1).lower());
TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, visib, change, false, java);
}

@ -68,8 +68,8 @@ void JSWriter::writeClass(UMLClassifier *c)
str = getHeadingFile(".js");
if(!str.isEmpty())
{
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),filejs.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),filejs.name());
js << str << m_endl;
}

@ -129,7 +129,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
const bool isClass = !c->isInterface();
TQString classname = cleanName(c->getName());
TQString fileName = qualifiedName(c).lower();
fileName.tqreplace('.', '-');
fileName.replace('.', '-');
//find an appropriate name for our file
fileName = overwritableName(c, fileName, ".pas");
@ -151,8 +151,8 @@ void PascalWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".pas");
if (!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), fileName);
str.tqreplace(TQRegExp("%filepath%"), file.name());
str.replace(TQRegExp("%filename%"), fileName);
str.replace(TQRegExp("%filepath%"), file.name());
pas << str << endl;
}
@ -434,7 +434,7 @@ const TQStringList PascalWriter::reservedKeywords() const {
keywords.append( "class" );
keywords.append( "const" );
keywords.append( "constructor" );
keywords.append( "tqcontains" );
keywords.append( "contains" );
keywords.append( "default" );
keywords.append( "deprecated" );
keywords.append( "destructor" );

@ -54,7 +54,7 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, TQString &Ret,
TQString neatName = cleanName(conc->getName());
if (neatName != AV && neatName != SV && neatName != HV) {
TQString OtherPkgName = conc->getPackage(".");
OtherPkgName.tqreplace(TQRegExp("\\."),"::");
OtherPkgName.replace(TQRegExp("\\."),"::");
TQString OtherName = OtherPkgName + "::" + cleanName(conc->getName());
// Only print out the use statement if the other package isn't the
@ -75,7 +75,7 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, TQString &Ret,
for (UMLClassifier *obj = superclasses.first();
obj; obj = superclasses.next()) {
TQString packageName = obj->getPackage(".");
packageName.tqreplace(TQRegExp("\\."),"::");
packageName.replace(TQRegExp("\\."),"::");
Ret += packageName + "::" + cleanName(obj->getName()) + ' ';
}
@ -100,11 +100,11 @@ void PerlWriter::writeClass(UMLClassifier *c) {
packageName.simplifyWhiteSpace();
// Replace all blanks with underscore
packageName.tqreplace(TQRegExp(" "), "_");
packageName.replace(TQRegExp(" "), "_");
// Replace all dots (".") with double colon scope resolution operators
// ("::")
packageName.tqreplace(TQRegExp("\\."),"::");
packageName.replace(TQRegExp("\\."),"::");
// Store complete package name
TQString ThisPkgName = packageName + "::" + classname;
@ -118,7 +118,7 @@ void PerlWriter::writeClass(UMLClassifier *c) {
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
TQString curDir = pol->getOutputDirectory().absPath();
if (fileName.tqcontains("::")) {
if (fileName.contains("::")) {
// create new directories for each level
TQString newDir;
newDir = curDir;
@ -166,14 +166,14 @@ void PerlWriter::writeClass(UMLClassifier *c) {
str = getHeadingFile(".pm"); // what this mean?
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),fileperl.name());
str.tqreplace(TQRegExp("%year%"),TQDate::tqcurrentDate().toString("yyyy"));
str.tqreplace(TQRegExp("%date%"),TQDate::tqcurrentDate().toString());
str.tqreplace(TQRegExp("%time%"),TQTime::currentTime().toString());
str.tqreplace(TQRegExp("%package-name%"),ThisPkgName);
if(str.tqfind(TQRegExp("%PACKAGE-DECLARE%"))){
str.tqreplace(TQRegExp("%PACKAGE-DECLARE%"),
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),fileperl.name());
str.replace(TQRegExp("%year%"),TQDate::tqcurrentDate().toString("yyyy"));
str.replace(TQRegExp("%date%"),TQDate::tqcurrentDate().toString());
str.replace(TQRegExp("%time%"),TQTime::currentTime().toString());
str.replace(TQRegExp("%package-name%"),ThisPkgName);
if(str.find(TQRegExp("%PACKAGE-DECLARE%"))){
str.replace(TQRegExp("%PACKAGE-DECLARE%"),
"package " + ThisPkgName + ';'
+ m_endl + m_endl
+ "#UML_MODELER_BEGIN_PERSONAL_VARS_" + classname
@ -184,10 +184,10 @@ void PerlWriter::writeClass(UMLClassifier *c) {
bPackageDeclared = true;
}
if(str.tqfind(TQRegExp("%USE-STATEMENTS%"))){
if(str.find(TQRegExp("%USE-STATEMENTS%"))){
TQString UseStms;
if(GetUseStatements(c,UseStms,ThisPkgName)){
str.tqreplace(TQRegExp("%USE-STATEMENTS%"), UseStms);
str.replace(TQRegExp("%USE-STATEMENTS%"), UseStms);
bUseStmsWritten = true;
}
}

@ -345,7 +345,7 @@ static const char *php5words[] =
"dba_open",
"dba_optimize",
"dba_popen",
"dba_tqreplace",
"dba_replace",
"dbase_add_record",
"dbase_close",
"dbase_create",
@ -367,7 +367,7 @@ static const char *php5words[] =
"dbminsert",
"dbmnextkey",
"dbmopen",
"dbmtqreplace",
"dbmreplace",
"dbplus_add",
"dbplus_aql",
"dbplus_chdir",
@ -375,7 +375,7 @@ static const char *php5words[] =
"dbplus_curr",
"dbplus_errcode",
"dbplus_errno",
"dbplus_tqfind",
"dbplus_find",
"dbplus_first",
"dbplus_flush",
"dbplus_freealllocks",
@ -511,8 +511,8 @@ static const char *php5words[] =
"E_PARSE",
"ereg",
"eregi",
"eregi_tqreplace",
"ereg_tqreplace",
"eregi_replace",
"ereg_replace",
"error_log",
"error_reporting",
"escapeshellarg",
@ -646,7 +646,7 @@ static const char *php5words[] =
"_FILES",
"filesize",
"filetype",
"tqfind",
"find",
"first_child",
"floatval",
"flock",
@ -1293,7 +1293,7 @@ static const char *php5words[] =
"ldap_mod_add",
"ldap_mod_del",
"ldap_modify",
"ldap_mod_tqreplace",
"ldap_mod_replace",
"ldap_next_attribute",
"ldap_next_entry",
"ldap_next_reference",
@ -1350,9 +1350,9 @@ static const char *php5words[] =
"mb_encode_numericentity",
"mb_ereg",
"mb_eregi",
"mb_eregi_tqreplace",
"mb_eregi_replace",
"mb_ereg_match",
"mb_ereg_tqreplace",
"mb_ereg_replace",
"mb_ereg_search",
"mb_ereg_search_getpos",
"mb_ereg_search_getregs",
@ -1565,7 +1565,7 @@ static const char *php5words[] =
"msession_create",
"msession_destroy",
"msession_disconnect",
"msession_tqfind",
"msession_find",
"msession_get",
"msession_get_array",
"msession_getdata",
@ -2323,7 +2323,7 @@ static const char *php5words[] =
"preg_match",
"preg_match_all",
"preg_quote",
"preg_tqreplace",
"preg_replace",
"preg_replace_callback",
"preg_split",
"prev",
@ -2424,7 +2424,7 @@ static const char *php5words[] =
"remove_attribute",
"remove_child",
"rename",
"tqreplace",
"replace",
"replace_child",
"replace_node",
"_REQUEST",
@ -2661,7 +2661,7 @@ static const char *php5words[] =
"strpos",
"strrchr",
"str_repeat",
"str_tqreplace",
"str_replace",
"strrev",
"str_rot13",
"strrpos",
@ -2677,7 +2677,7 @@ static const char *php5words[] =
"str_word_count",
"substr",
"substr_count",
"substr_tqreplace",
"substr_replace",
"SWFAction",
"swf_actiongeturl",
"swf_actiongotoframe",
@ -2816,7 +2816,7 @@ static const char *php5words[] =
"udm_crc32",
"udm_errno",
"udm_error",
"udm_tqfind",
"udm_find",
"udm_free_agent",
"udm_free_ispell_data",
"udm_free_res",
@ -3024,8 +3024,8 @@ void Php5Writer::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".php");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),filephp.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),filephp.name());
php<<str<<m_endl;
}

@ -343,7 +343,7 @@ static const char *words[] =
"dba_open",
"dba_optimize",
"dba_popen",
"dba_tqreplace",
"dba_replace",
"dbase_add_record",
"dbase_close",
"dbase_create",
@ -365,7 +365,7 @@ static const char *words[] =
"dbminsert",
"dbmnextkey",
"dbmopen",
"dbmtqreplace",
"dbmreplace",
"dbplus_add",
"dbplus_aql",
"dbplus_chdir",
@ -373,7 +373,7 @@ static const char *words[] =
"dbplus_curr",
"dbplus_errcode",
"dbplus_errno",
"dbplus_tqfind",
"dbplus_find",
"dbplus_first",
"dbplus_flush",
"dbplus_freealllocks",
@ -509,8 +509,8 @@ static const char *words[] =
"E_PARSE",
"ereg",
"eregi",
"eregi_tqreplace",
"ereg_tqreplace",
"eregi_replace",
"ereg_replace",
"error_log",
"error_reporting",
"escapeshellarg",
@ -644,7 +644,7 @@ static const char *words[] =
"_FILES",
"filesize",
"filetype",
"tqfind",
"find",
"first_child",
"floatval",
"flock",
@ -1289,7 +1289,7 @@ static const char *words[] =
"ldap_mod_add",
"ldap_mod_del",
"ldap_modify",
"ldap_mod_tqreplace",
"ldap_mod_replace",
"ldap_next_attribute",
"ldap_next_entry",
"ldap_next_reference",
@ -1346,9 +1346,9 @@ static const char *words[] =
"mb_encode_numericentity",
"mb_ereg",
"mb_eregi",
"mb_eregi_tqreplace",
"mb_eregi_replace",
"mb_ereg_match",
"mb_ereg_tqreplace",
"mb_ereg_replace",
"mb_ereg_search",
"mb_ereg_search_getpos",
"mb_ereg_search_getregs",
@ -1561,7 +1561,7 @@ static const char *words[] =
"msession_create",
"msession_destroy",
"msession_disconnect",
"msession_tqfind",
"msession_find",
"msession_get",
"msession_get_array",
"msession_getdata",
@ -2319,7 +2319,7 @@ static const char *words[] =
"preg_match",
"preg_match_all",
"preg_quote",
"preg_tqreplace",
"preg_replace",
"preg_replace_callback",
"preg_split",
"prev",
@ -2420,7 +2420,7 @@ static const char *words[] =
"remove_attribute",
"remove_child",
"rename",
"tqreplace",
"replace",
"replace_child",
"replace_node",
"_REQUEST",
@ -2657,7 +2657,7 @@ static const char *words[] =
"strpos",
"strrchr",
"str_repeat",
"str_tqreplace",
"str_replace",
"strrev",
"str_rot13",
"strrpos",
@ -2673,7 +2673,7 @@ static const char *words[] =
"str_word_count",
"substr",
"substr_count",
"substr_tqreplace",
"substr_replace",
"SWFAction",
"swf_actiongeturl",
"swf_actiongotoframe",
@ -2812,7 +2812,7 @@ static const char *words[] =
"udm_crc32",
"udm_errno",
"udm_error",
"udm_tqfind",
"udm_find",
"udm_free_agent",
"udm_free_ispell_data",
"udm_free_res",
@ -3020,8 +3020,8 @@ void PhpWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".php");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),filephp.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),filephp.name());
php<<str<<m_endl;
}

@ -64,7 +64,7 @@ void PythonWriter::writeClass(UMLClassifier *c) {
//Replace the first letter of the filename because
//python class begin with an upper caracter (convention)
first = first.upper();
fileName = fileName.tqreplace(0, 1, first);
fileName = fileName.replace(0, 1, first);
TQFile fileh;
if( !openFile(fileh, fileName) ) {
@ -83,8 +83,8 @@ void PythonWriter::writeClass(UMLClassifier *c) {
str = getHeadingFile(".py");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), fileName);
str.tqreplace(TQRegExp("%filepath%"), fileh.name());
str.replace(TQRegExp("%filename%"), fileName);
str.replace(TQRegExp("%filepath%"), fileh.name());
h<<str<<m_endl;
}
@ -115,9 +115,9 @@ void PythonWriter::writeClass(UMLClassifier *c) {
headerName.remove(TQRegExp(".py$"));
first = headerName.at(0);
first = first.upper();
headerName = headerName.tqreplace(0, 1, first);
str = headerName.tqreplace(TQChar('/'),TQChar('.'));
if (includesList.tqfindIndex(str) < 0) // not yet imported
headerName = headerName.replace(0, 1, first);
str = headerName.replace(TQChar('/'),TQChar('.'));
if (includesList.findIndex(str) < 0) // not yet imported
h << "from " << str << " import *" << m_endl;
}
}

@ -79,10 +79,10 @@ void RubyClassDeclarationBlock::updateContent ( )
// COMMENT
TQString comment = c->getDoc();
comment.tqreplace("@ref ", "");
comment.tqreplace("@see", "_See_");
comment.tqreplace("@short", "_Summary_");
comment.tqreplace("@author", "_Author_");
comment.replace("@ref ", "");
comment.replace("@see", "_See_");
comment.replace("@short", "_Summary_");
comment.replace("@author", "_Author_");
if (isInterface)
getComment()->setText("Module " + RubyClassName + endLine + comment);

@ -86,10 +86,10 @@ TQString RubyClassifierCodeDocument::getPath ( )
path.simplifyWhiteSpace();
// Replace all blanks with underscore
path.tqreplace(TQRegExp(" "), "_");
path.replace(TQRegExp(" "), "_");
path.tqreplace(TQRegExp("\\."),"/");
path.tqreplace(TQRegExp("::"), "/");
path.replace(TQRegExp("\\."),"/");
path.replace(TQRegExp("::"), "/");
path.lower();

@ -153,9 +153,9 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
TQString endLine = p->getNewLineEndingChars();
TQString description = getParentObject()->getDoc();
description.tqreplace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.tqreplace("m_", "");
description.tqreplace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine);
description.replace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.replace("m_", "");
description.replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine);
// set scope of this accessor appropriately..if its an attribute,
// we need to be more sophisticated

@ -70,7 +70,7 @@ TQString RubyCodeClassField::getFieldName() {
UMLRole * role = (UMLRole*) getParentObject();
TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.tqreplace(0, 1, roleName.left(1).lower());
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
return roleName.lower() + "Array";
}

@ -90,25 +90,25 @@ TQString RubyCodeGenerator::getListFieldClassName () {
TQString RubyCodeGenerator::cppToRubyType(const TQString &typeStr) {
TQString type = cleanName(typeStr);
type.tqreplace("const ", "");
type.tqreplace(TQRegExp("[*&\\s]"), "");
type.tqreplace(TQRegExp("[<>]"), "_");
type.tqreplace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array");
type.tqreplace(TQRegExp("^string$"),"String");
type.tqreplace(TQSTRING_OBJECT_NAME_STRING, "String");
type.tqreplace("bool", "true|false");
type.tqreplace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
type.tqreplace(TQRegExp("^(float|double)$"), "Float");
type.tqreplace(TQRegExp("^Q(?=[A-Z])"), "TQt::");
type.tqreplace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
type.replace("const ", "");
type.replace(TQRegExp("[*&\\s]"), "");
type.replace(TQRegExp("[<>]"), "_");
type.replace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array");
type.replace(TQRegExp("^string$"),"String");
type.replace(TQSTRING_OBJECT_NAME_STRING, "String");
type.replace("bool", "true|false");
type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
type.replace(TQRegExp("^(float|double)$"), "Float");
type.replace(TQRegExp("^Q(?=[A-Z])"), "TQt::");
type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
return type;
}
TQString RubyCodeGenerator::cppToRubyName(const TQString &nameStr) {
TQString name = cleanName(nameStr);
name.tqreplace(TQRegExp("^m_"), "");
name.tqreplace(TQRegExp("^[pbn](?=[A-Z])"), "");
name.replace(TQRegExp("^m_"), "");
name.replace(TQRegExp("^[pbn](?=[A-Z])"), "");
name = name.mid(0, 1).lower() + name.mid(1);
return name;
}

@ -85,7 +85,7 @@ void RubyCodeOperation::updateMethodDeclaration()
methodName = "initialize";
}
methodName.tqreplace(TQRegExp("operator\\s*"), "");
methodName.replace(TQRegExp("operator\\s*"), "");
methodName = methodName.mid(0, 1).lower() + methodName.mid(1);
TQString paramStr = TQString("");
@ -131,7 +131,7 @@ void RubyCodeOperation::updateMethodDeclaration()
UMLAttributeList parameters = o->getParmList();
for(UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) {
comment += endLine + "* _" + iterator.current()->getName() + "_ ";
comment += (' ' + iterator.current()->getDoc().tqreplace( TQRegExp("[\\n\\r]+[\\t ]*"),
comment += (' ' + iterator.current()->getDoc().replace( TQRegExp("[\\n\\r]+[\\t ]*"),
endLine + " " ) );
}
// add a returns statement too
@ -140,15 +140,15 @@ void RubyCodeOperation::updateMethodDeclaration()
getComment()->setText(comment);
}
} else {
comment.tqreplace(TQRegExp("[\\n\\r]+ *"), endLine);
comment.tqreplace(TQRegExp("[\\n\\r]+\\t*"), endLine);
comment.replace(TQRegExp("[\\n\\r]+ *"), endLine);
comment.replace(TQRegExp("[\\n\\r]+\\t*"), endLine);
comment.tqreplace(" m_", " ");
comment.tqreplace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
comment.replace(" m_", " ");
comment.replace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
TQRegExp re_params("@param (\\w)(\\w*)");
int pos = re_params.search(comment);
while (pos != -1) {
comment.tqreplace( re_params.cap(0),
comment.replace( re_params.cap(0),
TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
commentedParams.append(re_params.cap(1).lower() + re_params.cap(2));
@ -160,28 +160,28 @@ void RubyCodeOperation::updateMethodDeclaration()
for (UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) {
// Only write an individual @param entry if one hasn't been found already
// in the main doc comment
if (commentedParams.tqcontains(RubyCodeGenerator::cppToRubyName(iterator.current()->getName())) == 0) {
if (commentedParams.contains(RubyCodeGenerator::cppToRubyName(iterator.current()->getName())) == 0) {
comment += (endLine + "@param _" + RubyCodeGenerator::cppToRubyName(iterator.current()->getName()) + '_');
if (iterator.current()->getDoc().isEmpty()) {
comment += (' ' + RubyCodeGenerator::cppToRubyType(iterator.current()->getTypeName()));
} else {
comment += (' ' + iterator.current()->getDoc().tqreplace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " "));
comment += (' ' + iterator.current()->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " "));
}
}
}
comment.tqreplace("@ref ", "");
comment.tqreplace("@param", "*");
comment.tqreplace("@return", "* _returns_");
comment.replace("@ref ", "");
comment.replace("@param", "*");
comment.replace("@return", "* _returns_");
// All lines after the first one starting with '*' in the doc comment
// must be indented correctly. If they aren't a list
// item starting with '*', then indent the text with
// two spaces, ' ', to line up with the list item.
pos = comment.tqfind(endLine + '*');
pos = comment.find(endLine + '*');
if (pos != -1) {
pos += endLine.length() + 1;
pos = comment.tqfind(endLine, pos);
pos = comment.find(endLine, pos);
}
while (pos > 0) {
@ -191,13 +191,13 @@ void RubyCodeOperation::updateMethodDeclaration()
pos += 2;
}
pos = comment.tqfind(endLine, pos);
pos = comment.find(endLine, pos);
}
TQString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName());
if ( !typeStr.isEmpty()
&& !TQRegExp("^void\\s*$").exactMatch(typeStr)
&& comment.tqcontains("_returns_") == 0 )
&& comment.contains("_returns_") == 0 )
{
comment += endLine + "* _returns_ " + typeStr;
}

@ -80,18 +80,18 @@ void RubyWriter::writeClass(UMLClassifier *c) {
str = getHeadingFile(".rb");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), fileName);
str.tqreplace(TQRegExp("%filepath%"), fileh.name());
str.replace(TQRegExp("%filename%"), fileName);
str.replace(TQRegExp("%filepath%"), fileh.name());
h<<str<<m_endl;
}
if(forceDoc() || !c->getDoc().isEmpty()) {
TQString docStr = c->getDoc();
docStr.tqreplace(TQRegExp("\\n"), "\n# ");
docStr.tqreplace("@ref ", "");
docStr.tqreplace("@see", "_See_");
docStr.tqreplace("@short", "_Summary_");
docStr.tqreplace("@author", "_Author_");
docStr.replace(TQRegExp("\\n"), "\n# ");
docStr.replace("@ref ", "");
docStr.replace("@see", "_See_");
docStr.replace("@short", "_Summary_");
docStr.replace("@author", "_Author_");
h<<"#"<<m_endl;
h<<"# "<<docStr<<m_endl;
h<<"#"<<m_endl<<m_endl;
@ -146,24 +146,24 @@ void RubyWriter::writeClass(UMLClassifier *c) {
TQString RubyWriter::cppToRubyType(const TQString &typeStr) {
TQString type = cleanName(typeStr);
type.tqreplace("const ", "");
type.tqreplace(TQRegExp("[*&\\s]"), "");
type.tqreplace(TQRegExp("[<>]"), "_");
type.tqreplace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array");
type.tqreplace(TQSTRING_OBJECT_NAME_STRING, "String");
type.tqreplace("bool", "true|false");
type.tqreplace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
type.tqreplace(TQRegExp("^(float|double)$"), "Float");
type.tqreplace(TQRegExp("^Q(?=[A-Z])"), "TQt::");
type.tqreplace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
type.replace("const ", "");
type.replace(TQRegExp("[*&\\s]"), "");
type.replace(TQRegExp("[<>]"), "_");
type.replace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array");
type.replace(TQSTRING_OBJECT_NAME_STRING, "String");
type.replace("bool", "true|false");
type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
type.replace(TQRegExp("^(float|double)$"), "Float");
type.replace(TQRegExp("^Q(?=[A-Z])"), "TQt::");
type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
return type;
}
TQString RubyWriter::cppToRubyName(const TQString &nameStr) {
TQString name = cleanName(nameStr);
name.tqreplace(TQRegExp("^m_"), "");
name.tqreplace(TQRegExp("^[pbn](?=[A-Z])"), "");
name.replace(TQRegExp("^m_"), "");
name.replace(TQRegExp("^[pbn](?=[A-Z])"), "");
name = name.mid(0, 1).lower() + name.mid(1);
return name;
}
@ -251,7 +251,7 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op
methodName = "initialize";
}
methodName.tqreplace("operator ", "");
methodName.replace("operator ", "");
methodName = methodName.mid(0, 1).lower() + methodName.mid(1);
UMLAttributeList atl = op->getParmList();
@ -267,15 +267,15 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op
h << m_indentation << "#" << m_endl;
TQString docStr = op->getDoc();
docStr.tqreplace(TQRegExp("[\\n\\r]+ *"), m_endl);
docStr.tqreplace(TQRegExp("[\\n\\r]+\\t*"), m_endl);
docStr.replace(TQRegExp("[\\n\\r]+ *"), m_endl);
docStr.replace(TQRegExp("[\\n\\r]+\\t*"), m_endl);
docStr.tqreplace(" m_", " ");
docStr.tqreplace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
docStr.replace(" m_", " ");
docStr.replace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
TQRegExp re_params("@param (\\w)(\\w*)");
int pos = re_params.search(docStr);
while (pos != -1) {
docStr.tqreplace( re_params.cap(0),
docStr.replace( re_params.cap(0),
TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
commentedParams.append(re_params.cap(1).lower() + re_params.cap(2));
@ -283,31 +283,31 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op
pos = re_params.search(docStr, pos);
}
docStr.tqreplace("\n", TQString("\n") + m_indentation + "# ");
docStr.replace("\n", TQString("\n") + m_indentation + "# ");
// Write parameter documentation
for (at = atl.first(); at ; at = atl.next()) {
// Only write an individual @param entry if one hasn't been found already
// in the main doc comment
if (commentedParams.tqcontains(cppToRubyName(at->getName())) == 0) {
if (commentedParams.contains(cppToRubyName(at->getName())) == 0) {
docStr += (m_endl + m_indentation + "# @param _" + cppToRubyName(at->getName()) + '_');
if (at->getDoc().isEmpty()) {
docStr += (' ' + cppToRubyType(at->getTypeName()));
} else {
docStr += (' ' + at->getDoc().tqreplace(TQRegExp("[\\n\\r]+[\\t ]*"), m_endl + " "));
docStr += (' ' + at->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), m_endl + " "));
}
}
}
docStr.tqreplace("@ref ", "");
docStr.tqreplace("@param", "*");
docStr.tqreplace("@return", "* _returns_");
docStr.replace("@ref ", "");
docStr.replace("@param", "*");
docStr.replace("@return", "* _returns_");
// All lines after the first '# *' in the doc comment
// must be indented correctly. If they aren't a list
// item starting with '# *', then indent the text with
// three spaces, '# ', to line up with the list item.
pos = docStr.tqfind("# *");
pos = docStr.find("# *");
TQRegExp re_linestart("# (?!\\*)");
pos = re_linestart.search(docStr, pos);
while (pos > 0) {
@ -320,7 +320,7 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op
h << m_indentation << "# "<< docStr << m_endl;
TQString typeStr = cppToRubyType(op->getTypeName());
if (!typeStr.isEmpty() && typeStr != "void" && docStr.tqcontains("_returns_") == 0) {
if (!typeStr.isEmpty() && typeStr != "void" && docStr.contains("_returns_") == 0) {
h << m_indentation << "# * _returns_ " << typeStr << m_endl;
}
}
@ -375,9 +375,9 @@ void RubyWriter::writeSingleAttributeAccessorMethods(
TQTextStream &h)
{
TQString description = descr;
description.tqreplace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.tqreplace("m_", "");
description.tqreplace("\n", TQString("\n") + m_indentation + "# ");
description.replace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.replace("m_", "");
description.replace("\n", TQString("\n") + m_indentation + "# ");
if (!description.isEmpty()) {
h << m_indentation << "# " << description << m_endl;

@ -77,7 +77,7 @@ TQString SimpleCodeGenerator::getIndent ()
TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString &ext) {
//if we already know to which file this class was written/should be written, just return it.
if (m_fileMap.tqcontains(concept))
if (m_fileMap.contains(concept))
return m_fileMap[concept];
//else, determine the "natural" file name
@ -89,16 +89,16 @@ TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString &
package.simplifyWhiteSpace();
// Replace all blanks with underscore
package.tqreplace(TQRegExp(" "), "_");
package.replace(TQRegExp(" "), "_");
// Convert all "::" to "/" : Platform-specific path separator
// package.tqreplace(TQRegExp("::"), "/");
// package.replace(TQRegExp("::"), "/");
// if package is given add this as a directory to the file name
if (!package.isEmpty() && m_createDirHierarchyForPackages) {
name = package + '.' + concept->getName();
name.tqreplace(TQRegExp("\\."),"/");
package.tqreplace(TQRegExp("\\."), "/");
name.replace(TQRegExp("\\."),"/");
package.replace(TQRegExp("\\."), "/");
package = '/' + package;
} else {
name = concept->getFullyQualifiedName("-");
@ -136,10 +136,10 @@ TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString &
name.simplifyWhiteSpace();
name.tqreplace(TQRegExp(" "),"_");
name.replace(TQRegExp(" "),"_");
TQString extension = ext.simplifyWhiteSpace();
extension.tqreplace(' ', '_');
extension.replace(' ', '_');
return overwritableName(concept, name, extension);
}

@ -65,8 +65,8 @@ void SQLWriter::writeClass(UMLClassifier *c) {
TQString str;
str = getHeadingFile(".sql");
if(!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"),fileName);
str.tqreplace(TQRegExp("%filepath%"),file.name());
str.replace(TQRegExp("%filename%"),fileName);
str.replace(TQRegExp("%filepath%"),file.name());
sql<<str<<m_endl;
}
@ -140,7 +140,7 @@ void SQLWriter::writeAttributes(UMLClassifier *c, TQTextStream &sql) {
}
// now print the attributes; they are sorted by there scope
// in front of the first attribute shouldn't be a , -> so we need to tqfind
// in front of the first attribute shouldn't be a , -> so we need to find
// out, when the first attribute was added
bool first = true;

@ -58,7 +58,7 @@ static const char *tclwords[] = {
"llength",
"load",
"lrange",
"ltqreplace",
"lreplace",
"method",
"namespace",
"private",
@ -165,8 +165,8 @@ TclWriter::writeHeaderFile(UMLClassifier * c, TQFile & fileh)
// write header blurb
TQString str = getHeadingFile(".tcl");
if (!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), classifierInfo->fileName);
str.tqreplace(TQRegExp("%filepath%"), fileh.name());
str.replace(TQRegExp("%filename%"), classifierInfo->fileName);
str.replace(TQRegExp("%filepath%"), fileh.name());
writeCode(str);
}
// set current namespace
@ -337,8 +337,8 @@ TclWriter::writeSourceFile(UMLClassifier * c, TQFile & filetcl)
TQString str;
str = getHeadingFile(".tclbody");
if (!str.isEmpty()) {
str.tqreplace(TQRegExp("%filename%"), classifierInfo->fileName + "body");
str.tqreplace(TQRegExp("%filepath%"), filetcl.name());
str.replace(TQRegExp("%filename%"), classifierInfo->fileName + "body");
str.replace(TQRegExp("%filepath%"), filetcl.name());
writeCode(str);
}
// Start body of class
@ -599,13 +599,13 @@ TclWriter::writeAssociationRoleDecl(const TQString &fieldClassName, const TQStri
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if (multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) {
if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
TQString fieldVarName = roleName.lower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
if (ObjectFieldVariables.tqfindIndex(fieldVarName) == -1 &&
multi.tqcontains(TQRegExp("^1$"))
if (ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
multi.contains(TQRegExp("^1$"))
) {
// ugh. UGLY. Storing variable name and its class in pairs.
ObjectFieldVariables.append(fieldVarName);
@ -619,7 +619,7 @@ TclWriter::writeAssociationRoleDecl(const TQString &fieldClassName, const TQStri
// record unique occurrences for later when we want to check
// for initialization of this vector
if (VectorFieldVariables.tqfindIndex(fieldVarName) == -1)
if (VectorFieldVariables.findIndex(fieldVarName) == -1)
VectorFieldVariables.append(fieldVarName);
writeDocu(m_endl + "@var" + scope + " variable <" + fieldClassName +
"*> " + fieldVarName + m_endl + doc);
@ -888,7 +888,7 @@ TclWriter::writeAssociationRoleSource(const TQString &fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if (multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) {
if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
TQString fieldVarName = roleName.lower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");

@ -87,8 +87,8 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
// 1. create the header
TQString headerText = getHeadingFile(".xsd");
if(!headerText.isEmpty()) {
headerText.tqreplace(TQRegExp("%filename%"),fileName);
headerText.tqreplace(TQRegExp("%filepath%"),file.name());
headerText.replace(TQRegExp("%filename%"),fileName);
headerText.replace(TQRegExp("%filepath%"),file.name());
}
if(!headerText.isEmpty())
XMLschema<<headerText<<m_endl;
@ -445,7 +445,7 @@ void XMLSchemaWriter::writeChildObjsInAssociation (UMLClassifier *c,
}
bool XMLSchemaWriter::hasBeenWritten(UMLClassifier *c) {
if (writtenClassifiers.tqcontains(c))
if (writtenClassifiers.contains(c))
return true;
else
return false;
@ -529,7 +529,7 @@ void XMLSchemaWriter::writeComment( const TQString &comment, TQTextStream &XMLsc
// need to resolve for using with MAC/WinDoze eventually I assume
TQString indent = getIndent();
XMLschema<<indent<<"<!-- ";
if (comment.tqcontains(TQRegExp("\n"))) {
if (comment.contains(TQRegExp("\n"))) {
XMLschema<<m_endl;
TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
@ -673,10 +673,10 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const TQString
{
// populate both with the actual value as long as our value isnt an asterix
// In that case, use special value (from above)
if(values[0].tqcontains(TQRegExp("\\d{1,}")))
if(values[0].contains(TQRegExp("\\d{1,}")))
minOccurs = values[0]; // use first number in sequence
if(values[values.count()-1].tqcontains(TQRegExp("\\d{1,}")))
if(values[values.count()-1].contains(TQRegExp("\\d{1,}")))
maxOccurs = values[values.count()-1]; // use only last number in sequence
}
}
@ -736,8 +736,8 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const TQString
// Same thing again for "bool" to "boolean"
TQString XMLSchemaWriter::fixTypeName(const TQString& string)
{
// string.tqreplace(TQRegExp("^string$"),schemaNamespaceTag+":string");
// string.tqreplace(TQRegExp("^bool$"),schemaNamespaceTag+":boolean");
// string.replace(TQRegExp("^string$"),schemaNamespaceTag+":string");
// string.replace(TQRegExp("^bool$"),schemaNamespaceTag+":boolean");
return schemaNamespaceTag + ':' + string;
}

@ -96,7 +96,7 @@ bool CodeGenObjectWithTextBlocks::addTextBlock(TextBlock* add_object ) {
}
}
if(m_textBlockTagMap.tqcontains(tag))
if(m_textBlockTagMap.contains(tag))
return false; // return false, we already have some object with this tag in the list
// if we get here, then the object is a "fresh" one, we havent
@ -136,7 +136,7 @@ bool CodeGenObjectWithTextBlocks::removeTextBlock ( TextBlock * remove_object )
TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const TQString &tag )
{
//if we already know to which file this class was written/should be written, just return it.
if(m_textBlockTagMap.tqcontains(tag))
if(m_textBlockTagMap.contains(tag))
return m_textBlockTagMap[tag];
return (TextBlock*) NULL;

@ -132,7 +132,7 @@ TQString AdaImport::expand(const TQString& name) {
return name;
TQString result = name;
TQString pfx = pfxRegExp.cap(1);
if (m_renaming.tqcontains(pfx)) {
if (m_renaming.contains(pfx)) {
result.remove(pfxRegExp);
result.prepend(m_renaming[pfx] + '.');
}
@ -146,7 +146,7 @@ void AdaImport::parseStems(const TQStringList& stems) {
uint i = 0;
while (1) {
TQString filename = base + ".ads";
if (! m_parsedFiles.tqcontains(filename)) {
if (! m_parsedFiles.contains(filename)) {
// Save current m_source and m_srcIndex.
TQStringList source(m_source);
uint srcIndex = m_srcIndex;
@ -332,7 +332,7 @@ bool AdaImport::parseStmt() {
}
m_isAbstract = false;
if (isTaggedType) {
if (! m_classesDefinedInThisScope.tqcontains(ns))
if (! m_classesDefinedInThisScope.contains(ns))
m_classesDefinedInThisScope.append(ns);
} else {
ns->setStereotype("record");
@ -478,7 +478,7 @@ bool AdaImport::parseStmt() {
Uml::Object_Type t = type->getBaseType();
if ((t != Uml::ot_Interface &&
(t != Uml::ot_Class || type->getStereotype() == "record")) ||
!m_classesDefinedInThisScope.tqcontains(type)) {
!m_classesDefinedInThisScope.contains(type)) {
// Not an instance bound method - we cannot represent it.
skipStmt(")");
break;

@ -47,7 +47,7 @@ ClassImport *ClassImport::createImporterByFileExt(const TQString &filename) {
classImporter = new PythonImport();
else if (filename.endsWith(".java"))
classImporter = new JavaImport();
else if (filename.tqcontains( TQRegExp("\\.ad[sba]$") ))
else if (filename.contains( TQRegExp("\\.ad[sba]$") ))
classImporter = new AdaImport();
else if (filename.endsWith(".pas"))
classImporter = new PascalImport();

@ -50,7 +50,7 @@ CppImport::CppImport() {
CppImport::~CppImport() {}
void CppImport::feedTheModel(const TQString& fileName) {
if (ms_seenFiles.tqfind(fileName) != ms_seenFiles.end())
if (ms_seenFiles.find(fileName) != ms_seenFiles.end())
return;
ms_seenFiles.append(fileName);
TQMap<TQString, Dependence> deps = ms_driver->dependences(fileName);
@ -66,7 +66,7 @@ void CppImport::feedTheModel(const TQString& fileName) {
continue;
}
kDebug() << fileName << ": " << includeFile << " => " << it.data().first << endl;
if (ms_seenFiles.tqfind(includeFile) == ms_seenFiles.end())
if (ms_seenFiles.find(includeFile) == ms_seenFiles.end())
feedTheModel(includeFile);
}
}
@ -101,7 +101,7 @@ void CppImport::initialize() {
}
void CppImport::parseFile(const TQString& fileName) {
if (ms_seenFiles.tqfind(fileName) != ms_seenFiles.end())
if (ms_seenFiles.find(fileName) != ms_seenFiles.end())
return;
ms_driver->parseFile( fileName );
feedTheModel(fileName);

@ -84,7 +84,7 @@ void IDLImport::fillSource(const TQString& word) {
}
void IDLImport::parseFile(const TQString& filename) {
if (filename.tqcontains('/')) {
if (filename.contains('/')) {
TQString path = filename;
path.remove( TQRegExp("/[^/]+$") );
kDebug() << "IDLImport::parseFile: adding path " << path << endl;
@ -290,13 +290,13 @@ bool IDLImport::parseStmt() {
// (of a member of struct or valuetype, or return type
// of an operation.) Up next is the name of the attribute
// or operation.
if (! keyword.tqcontains( TQRegExp("^\\w") )) {
if (! keyword.contains( TQRegExp("^\\w") )) {
kError() << "importIDL: ignoring " << keyword << endl;
return false;
}
TQString typeName = joinTypename();
TQString name = advance();
if (name.tqcontains( TQRegExp("\\W") )) {
if (name.contains( TQRegExp("\\W") )) {
kError() << "importIDL: expecting name in " << name << endl;
return false;
}

@ -97,9 +97,9 @@ TQString formatComment(const TQString &comment) {
lines.pop_front(); // nothing interesting on this line
}
TQString& last = lines.last();
int endpos = last.tqfind("*/");
int endpos = last.find("*/");
if (endpos != -1) {
if (last.tqcontains(wordex))
if (last.contains(wordex))
last = last.mid(0, endpos - 1); // remove comment end
else
lines.pop_back(); // nothing interesting on this line
@ -142,12 +142,12 @@ UMLObject *createUMLObject(Uml::Object_Type type,
bNewUMLObjectWasCreated = false;
if (o == NULL) {
// Strip possible adornments and look again.
int isConst = name.tqcontains(TQRegExp("^const "));
int isConst = name.contains(TQRegExp("^const "));
name.remove(TQRegExp("^const\\s+"));
TQString typeName(name);
const int isAdorned = typeName.tqcontains( TQRegExp("[^\\w:\\. ]") );
const int isPointer = typeName.tqcontains('*');
const int isRef = typeName.tqcontains('&');
const int isAdorned = typeName.contains( TQRegExp("[^\\w:\\. ]") );
const int isPointer = typeName.contains('*');
const int isRef = typeName.contains('&');
typeName.remove(TQRegExp("[^\\w:\\. ].*$"));
typeName = typeName.simplifyWhiteSpace();
UMLObject *origType = umldoc->findUMLObject(typeName, Uml::ot_UMLObject, parentPkg);
@ -157,9 +157,9 @@ UMLObject *createUMLObject(Uml::Object_Type type,
parentPkg = logicalView;
// Find, or create, the scopes.
TQStringList components;
if (typeName.tqcontains("::")) {
if (typeName.contains("::")) {
components = TQStringList::split("::", typeName);
} else if (typeName.tqcontains(".")) {
} else if (typeName.contains(".")) {
components = TQStringList::split(".", typeName);
}
if (components.count() > 1) {
@ -449,7 +449,7 @@ TQStringList includePathList() {
}
void addIncludePath(const TQString& path) {
if (! incPathList.tqcontains(path))
if (! incPathList.contains(path))
incPathList.append(path);
}

@ -86,7 +86,7 @@ void JavaImport::fillSource(const TQString& word) {
void JavaImport::spawnImport( TQString file ) {
// if the file is being parsed, don't bother
//
if (s_filesAlreadyParsed.tqcontains( file ) ) {
if (s_filesAlreadyParsed.contains( file ) ) {
return;
}
if (TQFile::exists(file)) {
@ -112,7 +112,7 @@ UMLObject* JavaImport::resolveClass (TQString className) {
kDebug() << "importJava trying to resolve " << className << endl;
// keep track if we are dealing with an array
//
bool isArray = className.tqcontains('[');
bool isArray = className.contains('[');
// remove any [] so that the class itself can be resolved
//
TQString baseClassName = className;
@ -271,7 +271,7 @@ bool JavaImport::parseStmt() {
}
while (1) {
const TQString arg = m_source[++start];
if (! arg.tqcontains( TQRegExp("^[A-Za-z_]") )) {
if (! arg.contains( TQRegExp("^[A-Za-z_]") )) {
kDebug() << "importJava(" << name << "): cannot handle template syntax ("
<< arg << ")" << endl;
break;
@ -420,7 +420,7 @@ bool JavaImport::parseStmt() {
// (of a member of class or interface, or return type
// of an operation.) Up next is the name of the attribute
// or operation.
if (! keyword.tqcontains( TQRegExp("^\\w") )) {
if (! keyword.contains( TQRegExp("^\\w") )) {
kError() << "importJava: ignoring " << keyword << endl;
return false;
}
@ -441,7 +441,7 @@ bool JavaImport::parseStmt() {
} else {
nextToken = advance();
}
if (name.tqcontains( TQRegExp("\\W") )) {
if (name.contains( TQRegExp("\\W") )) {
kError() << "importJava: expecting name in " << name << endl;
return false;
}

@ -830,7 +830,7 @@ public:
class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); }
void setParameterDeclarationClause( AUTO_PTR<class ParameterDeclarationClauseAST>& parameterDeclarationClause );
// ### tqreplace 'constant' with cvQualify
// ### replace 'constant' with cvQualify
AST* constant() { return m_constant.get(); }
void setConstant( AST::Node& constant );

@ -110,7 +110,7 @@ TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove
if( !typeSpec )
return TQString();
return typeSpec->text().tqreplace( TQRegExp(" :: "), "::" );
return typeSpec->text().replace( TQRegExp(" :: "), "::" );
}
TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp )
@ -171,6 +171,6 @@ TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, b
text += " const";
}
return text.tqreplace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace();
return text.replace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace();
}

@ -150,7 +150,7 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast )
*/
bool isDatatype = Import_Utils::isDatatype(typeId, m_currentNamespace[m_nsCnt]);
if (type.tqcontains('*') || isDatatype) {
if (type.contains('*') || isDatatype) {
UMLObject *inner =
Import_Utils::createUMLObject( Uml::ot_Class, typeId,
m_currentNamespace[m_nsCnt] );
@ -300,7 +300,7 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
UMLOperation *m = Import_Utils::makeOperation(c, id);
// if a class has no return type, it could be a constructor or
// a destructor
if (d && returnType.isEmpty() && id.tqfind("~") == -1)
if (d && returnType.isEmpty() && id.find("~") == -1)
isConstructor = true;
parseFunctionArguments( d, m );
@ -530,7 +530,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
UMLOperation *m = Import_Utils::makeOperation(c, id);
// if a class has no return type, it could be a constructor or
// a destructor
if (d && returnType.isEmpty() && id.tqfind("~") == -1)
if (d && returnType.isEmpty() && id.find("~") == -1)
isConstructor = true;
parseFunctionArguments( d, m );

@ -100,7 +100,7 @@ void Driver::remove( const TQString & fileName )
m_problems.remove( fileName );
removeAllMacrosInFile( fileName );
TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( fileName );
TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
if( it != m_parsedUnits.end() ){
TranslationUnitAST* unit = *it;
m_parsedUnits.remove( it );
@ -120,7 +120,7 @@ void Driver::removeAllMacrosInFile( const TQString& fileName )
TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName )
{
TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( fileName );
TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
TranslationUnitAST::Node unit( *it );
//m_parsedUnits.remove( it );
m_parsedUnits[ fileName] = 0;
@ -129,7 +129,7 @@ TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName )
TranslationUnitAST* Driver::translationUnit( const TQString& fileName ) const
{
TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.tqfind( fileName );
TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName );
return it != m_parsedUnits.end() ? *it : 0;
}
@ -146,7 +146,7 @@ void Driver::addDependence( const TQString & fileName, const Dependence & dep )
TQString file = findIncludeFile( dep );
findOrInsertDependenceList( fileName ).insert( file, dep );
if ( m_parsedUnits.tqfind(file) != m_parsedUnits.end() )
if ( m_parsedUnits.find(file) != m_parsedUnits.end() )
return;
if ( !TQFile::exists( file ) ) {
@ -176,7 +176,7 @@ void Driver::addProblem( const TQString & fileName, const Problem & problem )
TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQString & fileName )
{
TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.tqfind( fileName );
TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.find( fileName );
if( it != m_dependences.end() )
return it.data();
@ -187,7 +187,7 @@ TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQStrin
TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileName )
{
TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.tqfind( fileName );
TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.find( fileName );
if( it != m_problems.end() )
return it.data();
@ -198,7 +198,7 @@ TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileN
TQMap< TQString, Dependence > Driver::dependences( const TQString & fileName ) const
{
TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.tqfind( fileName );
TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.find( fileName );
if( it != m_dependences.end() )
return it.data();
return TQMap<TQString, Dependence>();
@ -211,7 +211,7 @@ TQMap< TQString, Macro > Driver::macros() const
TQValueList < Problem > Driver::problems( const TQString & fileName ) const
{
TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.tqfind( fileName );
TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.find( fileName );
if( it != m_problems.end() )
return it.data();
return TQValueList<Problem>();
@ -222,7 +222,7 @@ void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool forc
TQFileInfo fileInfo( fileName );
TQString absFilePath = fileInfo.absFilePath();
TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( absFilePath );
TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath );
if( force && it != m_parsedUnits.end() ){
takeTranslationUnit( absFilePath );

@ -185,7 +185,7 @@ public:
TQMap<TQString, Macro> macros() const;
TQValueList<Problem> problems( const TQString& fileName ) const;
bool hasMacro( const TQString& name ) const { return m_macros.tqcontains( name ); }
bool hasMacro( const TQString& name ) const { return m_macros.contains( name ); }
const Macro& macro( const TQString& name ) const { return m_macros[ name ]; }
Macro& macro( const TQString& name ) { return m_macros[ name ]; }

@ -83,7 +83,7 @@ struct LexerData
const Scope& scope = *it;
++it;
if( scope.tqcontains(name) )
if( scope.contains(name) )
return true;
}
@ -97,7 +97,7 @@ struct LexerData
const Scope& scope = *it;
++it;
if( scope.tqcontains(name) )
if( scope.contains(name) )
return scope[ name ];
}
@ -273,7 +273,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
int start = currentPosition();
readIdentifier();
TQString ide = m_source.mid( start, currentPosition() - start );
int k = Lookup::tqfind( &keyword, ide );
int k = Lookup::find( &keyword, ide );
if( m_preprocessorEnabled && m_driver->hasMacro(ide) &&
(k == -1 || !m_driver->macro(ide).body().isEmpty()) ){
@ -408,7 +408,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
tk.setStartPosition( startLine, startColumn );
tk.setEndPosition( m_currentLine, m_currentColumn );
} else if( m_skipWordsEnabled ){
TQMap< TQString, TQPair<SkipType, TQString> >::Iterator pos = m_words.tqfind( ide );
TQMap< TQString, TQPair<SkipType, TQString> >::Iterator pos = m_words.find( ide );
if( pos != m_words.end() ){
if( (*pos).first == SkipWordAndArguments ){
readWhiteSpaces();

@ -74,7 +74,7 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table,
return findEntry( table, s.tqunicode(), s.length() );
}
int Lookup::tqfind(const struct HashTable *table,
int Lookup::find(const struct HashTable *table,
const TQChar *c, unsigned int len)
{
const HashEntry *entry = findEntry( table, c, len );
@ -83,9 +83,9 @@ int Lookup::tqfind(const struct HashTable *table,
return -1;
}
int Lookup::tqfind(const struct HashTable *table, const TQString &s)
int Lookup::find(const struct HashTable *table, const TQString &s)
{
return tqfind(table, s.tqunicode(), s.length());
return find(table, s.tqunicode(), s.length());
}
unsigned int Lookup::hash(const TQChar *c, unsigned int len)

@ -95,8 +95,8 @@
/**
* Find an entry in the table, and return its value (i.e. the value field of HashEntry)
*/
static int tqfind(const struct HashTable *table, const TQString& s);
static int tqfind(const struct HashTable *table, const TQChar *c, unsigned int len);
static int find(const struct HashTable *table, const TQString& s);
static int find(const struct HashTable *table, const TQChar *c, unsigned int len);
/**
* Find an entry in the table, and return the entry

@ -40,14 +40,14 @@
///////////////////////////////////////////////////////////////////////////////
TQString URLUtil::filename(const TQString & name) {
int slashPos = name.tqfindRev("/");
int slashPos = name.findRev("/");
return slashPos<0 ? name : name.mid(slashPos+1);
}
///////////////////////////////////////////////////////////////////////////////
TQString URLUtil::directory(const TQString & name) {
int slashPos = name.tqfindRev("/");
int slashPos = name.findRev("/");
return slashPos<0 ? TQString("") : name.left(slashPos);
}
@ -74,7 +74,7 @@ TQString URLUtil::relativePath(const TQString & tqparent, const TQString & child
///////////////////////////////////////////////////////////////////////////////
TQString URLUtil::upDir(const TQString & path, bool slashSuffix) {
int slashPos = path.tqfindRev("/");
int slashPos = path.findRev("/");
if (slashPos<1) return TQString();
return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) );
}
@ -103,7 +103,7 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil
///////////////////////////////////////////////////////////////////////////////
TQString URLUtil::getExtension(const TQString & path) {
int dotPos = path.tqfindRev('.');
int dotPos = path.findRev('.');
if (dotPos<0) return TQString("");
return path.mid(dotPos+1);
}
@ -114,7 +114,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur
{
TQString absBase = extractPathNameAbsolute( baseDirUrl ),
absRef = extractPathNameAbsolute( url );
int i = absRef.tqfind( absBase, 0, true );
int i = absRef.find( absBase, 0, true );
if (i == -1)
return TQString();
@ -122,7 +122,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur
if (absRef == absBase)
return TQString( "." );
else
return absRef.tqreplace( 0, absBase.length(), TQString() );
return absRef.replace( 0, absBase.length(), TQString() );
}
///////////////////////////////////////////////////////////////////////////////
@ -289,7 +289,7 @@ TQString URLUtil::envExpand ( const TQString& str )
if (len > 1 && str[0] == '$')
{
int pos = str.tqfind ('/');
int pos = str.find ('/');
if (pos < 0)
pos = len;

@ -113,10 +113,10 @@ bool NativeImportBase::preprocess(TQString& line) {
// Check for end of multi line comment.
if (m_inComment) {
int delimiterLen = 0;
int pos = line.tqfind(m_multiLineCommentEnd);
int pos = line.find(m_multiLineCommentEnd);
if (pos == -1) {
if (! m_multiLineAltCommentEnd.isEmpty())
pos = line.tqfind(m_multiLineAltCommentEnd);
pos = line.find(m_multiLineAltCommentEnd);
if (pos == -1) {
m_comment += line + "\n";
return true; // done
@ -142,20 +142,20 @@ bool NativeImportBase::preprocess(TQString& line) {
// Check for start of multi line comment.
int delimIntroLen = 0;
int delimEndLen = 0;
int pos = line.tqfind(m_multiLineCommentIntro);
int pos = line.find(m_multiLineCommentIntro);
if (pos != -1) {
delimIntroLen = m_multiLineCommentIntro.length();
} else if (!m_multiLineAltCommentIntro.isEmpty()) {
pos = line.tqfind(m_multiLineAltCommentIntro);
pos = line.find(m_multiLineAltCommentIntro);
if (pos != -1)
delimIntroLen = m_multiLineAltCommentIntro.length();
}
if (pos != -1) {
int endpos = line.tqfind(m_multiLineCommentEnd);
int endpos = line.find(m_multiLineCommentEnd);
if (endpos != -1) {
delimEndLen = m_multiLineCommentEnd.length();
} else if (!m_multiLineAltCommentEnd.isEmpty()) {
endpos = line.tqfind(m_multiLineAltCommentEnd);
endpos = line.find(m_multiLineAltCommentEnd);
if (endpos != -1)
delimEndLen = m_multiLineAltCommentEnd.length();
}
@ -237,7 +237,7 @@ void NativeImportBase::scan(TQString line) {
if (preprocess(line))
return;
// Check for single line comment.
int pos = line.tqfind(m_singleLineCommentIntro);
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
TQString cmnt = line.mid(pos);
m_source.append(cmnt);
@ -245,7 +245,7 @@ void NativeImportBase::scan(TQString line) {
return;
line = line.left(pos);
}
if (line.tqcontains(TQRegExp("^\\s*$")))
if (line.contains(TQRegExp("^\\s*$")))
return;
TQStringList words = split(line);
for (TQStringList::Iterator it = words.begin(); it != words.end(); ++it) {
@ -263,12 +263,12 @@ void NativeImportBase::initVars() {
void NativeImportBase::parseFile(const TQString& filename) {
TQString nameWithoutPath = filename;
nameWithoutPath.remove(TQRegExp("^.*/"));
if (m_parsedFiles.tqcontains(nameWithoutPath))
if (m_parsedFiles.contains(nameWithoutPath))
return;
m_parsedFiles.append(nameWithoutPath);
TQString fname = filename;
const TQString msgPrefix = "NativeImportBase::parseFile(" + filename + "): ";
if (filename.tqcontains('/')) {
if (filename.contains('/')) {
TQString path = filename;
path.remove( TQRegExp("/[^/]+$") );
kDebug() << msgPrefix << "adding path " << path << endl;

@ -104,7 +104,7 @@ bool PascalImport::parseStmt() {
continue;
}
TQString filename = unit + ".pas";
if (! m_parsedFiles.tqcontains(unit)) {
if (! m_parsedFiles.contains(unit)) {
// Save current m_source and m_srcIndex.
TQStringList source(m_source);
uint srcIndex = m_srcIndex;

@ -45,7 +45,7 @@ bool PythonImport::preprocess(TQString& line) {
if (NativeImportBase::preprocess(line))
return true;
// Handle single line comment
int pos = line.tqfind(m_singleLineCommentIntro);
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
TQString cmnt = line.mid(pos);
m_source.append(cmnt);
@ -56,11 +56,11 @@ bool PythonImport::preprocess(TQString& line) {
line.remove( TQRegExp("\\s+$") );
}
// Transform changes in indentation into braces a la C++/Java/Perl/...
pos = line.tqfind( TQRegExp("\\S") );
pos = line.find( TQRegExp("\\S") );
if (pos == -1)
return true;
bool isContinuation = false;
int leadingWhite = line.left(pos).tqcontains( TQRegExp("\\s") );
int leadingWhite = line.left(pos).contains( TQRegExp("\\s") );
if (leadingWhite > m_srcIndent[m_srcIndentIndex]) {
if (m_srcIndex == 0) {
kError() << "PythonImport::preprocess(): internal error 1" << endl;
@ -80,7 +80,7 @@ bool PythonImport::preprocess(TQString& line) {
}
}
if (line.endsWith(":")) {
line.tqreplace( TQRegExp(":$"), "{" );
line.replace( TQRegExp(":$"), "{" );
m_braceWasOpened = true;
} else {
m_braceWasOpened = false;

@ -62,7 +62,7 @@ protected:
int m_srcIndent[100];
/**
* Index for m_srcIndent[]. Index 0 is reserved and tqcontains 0.
* Index for m_srcIndent[]. Index 0 is reserved and contains 0.
*/
int m_srcIndentIndex;

@ -247,7 +247,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
// now do 'paragraph' background highlighting
// int endLine = paragraphs()-2;
int endLine = text.tqcontains(TQRegExp("\n")) + startLine -1;
int endLine = text.contains(TQRegExp("\n")) + startLine -1;
if(m_isHighlighted)
for(int para=startLine;para<=endLine;para++)
setParagraphBackgroundColor(para,bgcolor);
@ -255,7 +255,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
// record paragraph information
// Did we already start recording info for this tqparent object?
TextBlockInfo * tbinfo;
if(m_tbInfoMap->tqcontains(tqparent))
if(m_tbInfoMap->contains(tqparent))
tbinfo = (*m_tbInfoMap)[tqparent];
else {
tbinfo = new TextBlockInfo();
@ -278,7 +278,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
// lastly, update the para info
// start position is relative to the FIRST tqparent position
int start = startLine - m_textBlockList.tqfindRef(tqparent);
int start = startLine - m_textBlockList.findRef(tqparent);
int size = endLine-startLine;
// create the object that records this particular "paragraph"
@ -302,7 +302,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
{
TextBlock * tblock = it.key();
TextBlockInfo * thisTbInfo = it.data();
int firstLoc = m_textBlockList.tqfindRef(tblock);
int firstLoc = m_textBlockList.findRef(tblock);
ParaInfo * lastPi = thisTbInfo->m_paraList.last();
for(ParaInfo * pi = thisTbInfo->m_paraList.first(); pi; pi = thisTbInfo->m_paraList.next())
@ -621,7 +621,7 @@ void CodeEditor::slotInsertCodeBlockBeforeSelected()
m_parentDoc->insertTextBlock(newBlock, tb, false);
int location = m_textBlockList.tqfindRef(m_selectedTextBlock); // find first para of selected block
int location = m_textBlockList.findRef(m_selectedTextBlock); // find first para of selected block
TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
@ -643,7 +643,7 @@ void CodeEditor::slotInsertCodeBlockAfterSelected()
// find last para of selected block
TextBlockInfo *tbinfo = (*m_tbInfoMap)[m_selectedTextBlock];
ParaInfo * lastpi = tbinfo->m_paraList.last();
int location = m_textBlockList.tqfindRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
int location = m_textBlockList.findRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
@ -833,7 +833,7 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
TextBlockInfo *info = (*m_tbInfoMap)[block];
UMLObject * parentObj = info->getParent();
int pstart = m_textBlockList.tqfindRef(block);
int pstart = m_textBlockList.findRef(block);
TQString content = "";
// Assemble content from editiable paras
@ -913,7 +913,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
int minPos = baseIndent.length();
// add indent chars to the current line, if missing
if(!m_backspacePressed && !currentParaText.tqcontains(TQRegExp('^'+baseIndent)))
if(!m_backspacePressed && !currentParaText.contains(TQRegExp('^'+baseIndent)))
{
insertAt(baseIndent,para,0);
setCursorPosition(para,pos+minPos);
@ -957,7 +957,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// furthermore, IF its nothing but indentation + whitespace
// we switch this back to Auto-Generated.
if(cmb && contents.tqcontains(TQRegExp('^'+baseIndent+"\\s$")))
if(cmb && contents.contains(TQRegExp('^'+baseIndent+"\\s$")))
{
cmb->setContentType(CodeBlock::AutoGenerated);
cmb->syncToParent();
@ -1006,7 +1006,7 @@ bool CodeEditor::paraIsNotSingleLine (int para)
TextBlock * tBlock = m_textBlockList.at(para);
if(tBlock)
{
int pstart = m_textBlockList.tqfindRef(tBlock);
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
@ -1030,7 +1030,7 @@ bool CodeEditor::isParaEditable (int para) {
int editEnd = tBlock->lastEditableLine();
bool hasEditableRange = (editStart > 0 || editEnd < 0) ? true : false;
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
int pstart = m_textBlockList.tqfindRef(tBlock);
int pstart = m_textBlockList.findRef(tBlock);
int relativeLine = para - pstart;
TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
@ -1055,7 +1055,7 @@ void CodeEditor::changeTextBlockHighlighting(TextBlock * tBlock, bool selected)
{
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.tqfindRef(tBlock);
int pstart = m_textBlockList.findRef(tBlock);
for(ParaInfo * item = list.first(); item; item=list.next())
for(int p=(item->start+pstart);p<=(item->start+pstart+item->size);p++)
if(selected)
@ -1113,7 +1113,7 @@ void CodeEditor::contractSelectedParagraph( int paraToRemove ) {
TextBlock * tBlock = m_textBlockList.at(paraToRemove);
if(tBlock)
{
int pstart = m_textBlockList.tqfindRef(tBlock);
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
@ -1149,7 +1149,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
m_textBlockList.insert(priorPara,tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.tqfindRef(tBlock);
int pstart = m_textBlockList.findRef(tBlock);
// now update the paragraph information
bool upStartPosition = false;

@ -125,7 +125,7 @@ void CodeGenerationWizard::generateCode() {
}
void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated) {
TQListViewItem* item = m_statusList->tqfindItem( concept->getFullyQualifiedName(), 0 );
TQListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 );
if( !item ) {
kError()<<"GenerationStatusPage::Error finding class in list view"<<endl;
} else if (generated) {
@ -232,7 +232,7 @@ void CodeGenerationWizard::moveSelectedItems(TQListView* fromList, TQListView* t
TQListViewItem* selectedItem = it.current();
TQString name = selectedItem->text(0);
if (!toList->tqfindItem(name, 0)) {
if (!toList->findItem(name, 0)) {
new TQListViewItem(toList, name);
}

@ -204,7 +204,7 @@ bool UMLAttributeDialog::apply() {
} else {
// If it's obviously a pointer type (C++) then create a datatype.
// Else we don't know what it is so as a compromise create a class.
Uml::Object_Type ot = (typeName.tqcontains('*') ? Uml::ot_Datatype : Uml::ot_Class);
Uml::Object_Type ot = (typeName.contains('*') ? Uml::ot_Datatype : Uml::ot_Class);
obj = Object_Factory::createUMLObject(ot, typeName);
}
if (obj == NULL)

@ -227,7 +227,7 @@ bool UMLEntityAttributeDialog::apply() {
if (classifier == NULL) {
// If it's obviously a pointer type (C++) then create a datatype.
// Else we don't know what it is so as a compromise create a class.
Uml::Object_Type ot = (typeName.tqcontains('*') ? Uml::ot_Datatype
Uml::Object_Type ot = (typeName.contains('*') ? Uml::ot_Datatype
: Uml::ot_Class);
obj = Object_Factory::createUMLObject(ot, typeName);
if (obj == NULL)

@ -54,7 +54,7 @@ bool DocbookGenerator::generateDocbookForProject()
UMLDoc* umlDoc = app->getDocument();
KURL url = umlDoc->URL();
TQString fileName = url.fileName();
fileName.tqreplace(TQRegExp(".xmi$"),"");
fileName.replace(TQRegExp(".xmi$"),"");
url.setFileName(fileName);
kDebug() << "Exporting to directory: " << url << endl;
generateDocbookForProjectInto(url);
@ -131,7 +131,7 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
KURL url = umlDoc->URL();
TQString fileName = url.fileName();
fileName.tqreplace(TQRegExp(".xmi$"),".docbook");
fileName.replace(TQRegExp(".xmi$"),".docbook");
url.setPath(destDir.path());
url.addPath(fileName);
kDebug() << "Copying result to: " << url << endl;

@ -55,7 +55,7 @@ bool XhtmlGenerator::generateXhtmlForProject()
UMLDoc* umlDoc = app->getDocument();
KURL url = umlDoc->URL();
TQString fileName = url.fileName();
fileName.tqreplace(TQRegExp(".xmi$"),"");
fileName.replace(TQRegExp(".xmi$"),"");
url.setFileName(fileName);
kDebug() << "Exporting to directory: " << url << endl;
return generateXhtmlForProjectInto(url);
@ -90,7 +90,7 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
const KURL& url = umlDoc->URL();
TQString docbookName = url.fileName();
docbookName.tqreplace(TQRegExp(".xmi$"),".docbook");
docbookName.replace(TQRegExp(".xmi$"),".docbook");
// KURL docbookUrl(TQString("file://")+m_tmpDir.name());
KURL docbookUrl = m_destDir;
docbookUrl.addPath(docbookName);
@ -115,7 +115,7 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
if (!localXsl.isEmpty())
{
localXsl = TQString("href=\"file://") + localXsl + "\"";
xslt.tqreplace(TQRegExp("href=\"http://[^\"]*\""),localXsl);
xslt.replace(TQRegExp("href=\"http://[^\"]*\""),localXsl);
}
KTempFile tmpXsl;
*tmpXsl.textStream() << xslt;
@ -145,7 +145,7 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
xmlCleanupParser();
TQString xhtmlName = url.fileName();
xhtmlName.tqreplace(TQRegExp(".xmi$"),".html");
xhtmlName.replace(TQRegExp(".xmi$"),".html");
KURL xhtmlUrl = m_destDir;
xhtmlUrl.addPath(xhtmlName);

@ -236,7 +236,7 @@ void FloatingTextWidget::setText(const TQString &t) {
m_pLink->getSeqNumAndOp(seqNum, op);
if (seqNum.length() > 0 || op.length() > 0) {
if (! m_pView->getShowOpSig())
op.tqreplace( TQRegExp("\\(.*\\)"), "()" );
op.replace( TQRegExp("\\(.*\\)"), "()" );
m_Text = seqNum.append(": ").append( op );
} else
m_Text = t;

@ -123,7 +123,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
if(!getParentDocument()->findTextBlockByTag(tag, true))
return false;
int index = m_textblockVector.tqfindRef(existingBlock);
int index = m_textblockVector.findRef(existingBlock);
if(index < 0)
{
// may be hiding in child hierarchical codeblock
@ -149,7 +149,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
newBlock->setTag(new_tag);
}
if(m_textBlockTagMap.tqcontains(new_tag))
if(m_textBlockTagMap.contains(new_tag))
return false; // return false, we already have some object with this tag in the list
else {
m_textBlockTagMap.insert(new_tag, newBlock);

@ -125,7 +125,7 @@ bool checkClosing(TQStringList& tokens) {
* or a quoted string.
*/
bool isImmediateValue(TQString s) {
return s.tqcontains(TQRegExp("^[\\d\\-\"]"));
return s.contains(TQRegExp("^[\\d\\-\"]"));
}
/**
@ -286,7 +286,7 @@ PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) {
TQStringList tokens = scan(line);
TQString stringOrNodeOpener = shift(tokens);
TQString name;
if (nt == PetalNode::nt_object && !stringOrNodeOpener.tqcontains(TQRegExp("^[A-Za-z]"))) {
if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(TQRegExp("^[A-Za-z]"))) {
kError() << loc() << "unexpected line " << line << endl;
return NULL;
}
@ -365,15 +365,15 @@ bool loadFromMDL(TQIODevice& file) {
linum = 0;
while (!(line = stream.readLine()).isNull()) {
linum++;
if (line.tqcontains( TQRegExp("^\\s*\\(object Petal") )) {
while (!(line = stream.readLine()).isNull() && !line.tqcontains(')')) {
if (line.contains( TQRegExp("^\\s*\\(object Petal") )) {
while (!(line = stream.readLine()).isNull() && !line.contains(')')) {
linum++; // CHECK: do we need petal version info?
}
if (line.isNull())
break;
} else {
TQRegExp objectRx("^\\s*\\(object ");
if (line.tqcontains(objectRx)) {
if (line.contains(objectRx)) {
nClosures = 0;
TQStringList initialArgs = scan(line);
initialArgs.pop_front(); // remove opening parenthesis

@ -50,7 +50,7 @@ void KPlayerPopupFrame::keyPressEvent (TQKeyEvent* ev)
void KPlayerPopupFrame::mousePressEvent (TQMouseEvent* ev)
{
TQFrame::mousePressEvent (ev);
//if ( ! rect().tqcontains (ev -> pos()) )
//if ( ! rect().contains (ev -> pos()) )
// m_outside_mouse_press = true;
}
@ -60,7 +60,7 @@ void KPlayerPopupFrame::mouseReleaseEvent (TQMouseEvent* ev)
if ( m_outside_mouse_press )
{
m_outside_mouse_press = false;
if ( ! rect().tqcontains (ev -> pos()) )
if ( ! rect().contains (ev -> pos()) )
close();
}
}*/

@ -297,7 +297,7 @@ int LinePath::onLinePath( const TQPoint &position ) {
TQCanvasItemList::iterator end(list.end());
for(TQCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
if( ( index = m_LineList.tqfindRef( (TQCanvasLine*)*item_it ) ) != -1 )
if( ( index = m_LineList.findRef( (TQCanvasLine*)*item_it ) ) != -1 )
break;
}//end for
return index;

@ -381,7 +381,7 @@ void MessageWidget::slotWidgetMoved(Uml::IDType id) {
setTextPosition();
}
bool MessageWidget::tqcontains(ObjectWidget * w) {
bool MessageWidget::contains(ObjectWidget * w) {
if(m_pOw[Uml::A] == w || m_pOw[Uml::B] == w)
return true;
else

@ -101,7 +101,7 @@ public:
* @param w The ObjectWidget to check for.
* @return true - if is contained, false - not contained.
*/
bool tqcontains(ObjectWidget * w);
bool contains(ObjectWidget * w);
/**
* Returns the related widget on the given side.

@ -113,14 +113,14 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
if (UMLApp::app()->getActiveLanguage() == Uml::pl_Cpp) {
if (name.endsWith("*"))
name.remove("*");
else if (name.tqcontains("&"))
else if (name.contains("&"))
name.remove("&");
}
#endif
TQString nameWithoutFirstPrefix;
if (name.tqcontains("::"))
if (name.contains("::"))
components = TQStringList::split("::", name);
else if (name.tqcontains("."))
else if (name.contains("."))
components = TQStringList::split(".", name);
if (components.size() > 1) {
name = components.front();
@ -146,7 +146,7 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
return pkg;
}
}
if (seenPkgs.tqfindRef(pkg) != -1) {
if (seenPkgs.findRef(pkg) != -1) {
kError() << "findUMLObject(" << name << "): "
<< "breaking out of cycle involving "
<< pkg->getName() << endl;
@ -438,7 +438,7 @@ Parse_tqStatus parseAttribute(TQString a, NameAndType& nmTp, UMLClassifier *owni
if (a.isEmpty())
return PS_Empty;
int colonPos = a.tqfind(':');
int colonPos = a.find(':');
if (colonPos < 0) {
nmTp = NameAndType(a, NULL);
return PS_OK;
@ -500,7 +500,7 @@ Parse_tqStatus parseOperation(TQString m, OpDescriptor& desc, UMLClassifier *own
m = m.simplifyWhiteSpace();
if (m.isEmpty())
return PS_Empty;
if (m.tqcontains(TQRegExp("operator *()"))) {
if (m.contains(TQRegExp("operator *()"))) {
// C++ special case: two sets of parentheses
desc.m_name = "operator()";
m.remove(TQRegExp("operator *()"));

@ -56,7 +56,7 @@ UMLObject * findObjectInList(Uml::IDType id, const UMLObjectList& inList);
*
* @param inList List in which to seek the object.
* @param name Name of the object to find.
* @param type Object_Type of the object to tqfind (optional.)
* @param type Object_Type of the object to find (optional.)
* When the given type is ot_UMLObject the type is
* disregarded, i.e. the given name is the only
* search criterion.

@ -322,7 +322,7 @@ int ObjectWidget::getEndLineY() {
}
void ObjectWidget::messageAdded(MessageWidget* message) {
if (messageWidgetList.tqcontainsRef(message) ) {
if (messageWidgetList.containsRef(message) ) {
kError() << "ObjectWidget::messageAdded("
<< message->getName() << ") : duplicate entry !"
<< endl;

@ -65,7 +65,7 @@ void UMLOperation::moveParmLeft(UMLAttribute * a) {
<< endl;
disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.tqfind( a )) == -1 ) {
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm left " << a->getName() << endl;
return;
}
@ -85,7 +85,7 @@ void UMLOperation::moveParmRight(UMLAttribute * a) {
<< endl;
disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.tqfind( a )) == -1 ) {
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm right " << a->getName() << endl;
return;
}

@ -100,7 +100,7 @@ bool UMLPackage::addObject(UMLObject *pObject) {
<< endl;
return false;
}
if (m_objects.tqfind(pObject) != -1) {
if (m_objects.find(pObject) != -1) {
kDebug() << "UMLPackage::addObject: " << pObject->getName()
<< " is already there" << endl;
return false;
@ -129,7 +129,7 @@ void UMLPackage::removeObject(UMLObject *pObject) {
UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
removeAssocFromConcepts(assoc);
}
if (m_objects.tqfindRef(pObject) == -1)
if (m_objects.findRef(pObject) == -1)
kDebug() << m_Name << " removeObject: object with id="
<< ID2STR(pObject->getID()) << "not found." << endl;
else

@ -77,7 +77,7 @@ TQString quidu(const PetalNode *node) {
Uml::Object_Type typeToCreate(const TQString& name) {
TQString n = name;
n.remove(TQRegExp("^.*::")); // don't consider the scope prefix, it may contain spaces
Uml::Object_Type t = (n.tqcontains(TQRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class);
Uml::Object_Type t = (n.contains(TQRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class);
return t;
}
@ -556,12 +556,12 @@ bool importView(PetalNode *root, const TQString& rootName,
const TQString& modelsName, UMLListViewItem *lvParent) {
PetalNode *viewRoot = root->findAttribute(rootName).node;
if (viewRoot == NULL) {
kDebug() << "importView: cannot tqfind " << rootName << endl;
kDebug() << "importView: cannot find " << rootName << endl;
return false;
}
PetalNode *models = viewRoot->findAttribute(modelsName).node;
if (models == NULL) {
kError() << "importView: cannot tqfind " << modelsName
kError() << "importView: cannot find " << modelsName
<< " of " << rootName << endl;
return false;
}

@ -63,7 +63,7 @@ PluginLoader::loadPlugin(const TQString &name)
// if the plugin has already been loaded, increment
// its reference and return.
if((it = _plugins.tqfind(name)) != _plugins.end()) {
if((it = _plugins.find(name)) != _plugins.end()) {
plugin = it.data();
plugin->ref();
return plugin;
@ -127,7 +127,7 @@ Plugin *
PluginLoader::findPlugin(const TQString &name)
{
Plugin *ret = NULL;
PluginMap::iterator it = _plugins.tqfind(name);
PluginMap::iterator it = _plugins.find(name);
if(it != _plugins.end()) {
ret = it.data();
}

@ -192,7 +192,7 @@ bool StateWidget::addActivity( const TQString &activity ) {
bool StateWidget::removeActivity( const TQString &activity ) {
int index = - 1;
if( ( index = m_Activities.tqfindIndex( activity ) ) == -1 )
if( ( index = m_Activities.findIndex( activity ) ) == -1 )
return false;
m_Activities.remove( m_Activities.at( index ) );
updateComponentSize();
@ -210,7 +210,7 @@ TQStringList & StateWidget::getActivityList() {
bool StateWidget::renameActivity( const TQString &activity, const TQString &newName ) {
int index = - 1;
if( ( index = m_Activities.tqfindIndex( activity ) ) == -1 )
if( ( index = m_Activities.findIndex( activity ) ) == -1 )
return false;
m_Activities[ index ] = newName;
return true;

@ -205,12 +205,12 @@ TQString TextBlock::formatMultiLineText ( const TQString &work, const TQString &
TQString output = "";
TQString text = work;
TQString endLine = getNewLineEndingChars();
int matches = text.tqcontains(TQRegExp(breakStr));
int matches = text.contains(TQRegExp(breakStr));
if(matches)
{
// check that last part of string matches, if not, then
// we have to tack on extra match
if(!text.tqcontains(TQRegExp(breakStr+"\\$")))
if(!text.contains(TQRegExp(breakStr+"\\$")))
matches++;
for(int i=0; i < matches; i++)
@ -280,7 +280,7 @@ void TextBlock::setAttributesFromNode (TQDomElement & root ) {
// entity.
TQString TextBlock::encodeText(const TQString& text, const TQString &endLine) {
TQString encoded = text;
encoded.tqreplace(TQRegExp(endLine),"&#010;");
encoded.replace(TQRegExp(endLine),"&#010;");
return encoded;
}
@ -289,7 +289,7 @@ TQString TextBlock::encodeText(const TQString& text, const TQString &endLine) {
// entity.
TQString TextBlock::decodeText(const TQString& text, const TQString &endLine) {
TQString decoded = text;
decoded.tqreplace(TQRegExp("&#010;"),endLine);
decoded.replace(TQRegExp("&#010;"),endLine);
return decoded;
}

@ -1616,7 +1616,7 @@ TQPopupMenu* UMLApp::findMenu(TQMenuData* menu, const TQString &name) {
for (int i=0; i<menuCount; i++) {
int idAt = menu->idAt(i);
TQPopupMenu* popupMenu = menu->tqfindItem(idAt)->popup();
TQPopupMenu* popupMenu = menu->findItem(idAt)->popup();
if (popupMenu) {
TQString menuName = popupMenu->name();
if( menuName == name) {
@ -1640,7 +1640,7 @@ void UMLApp::slotChangeTabLeft() {
}
UMLViewList views = m_doc->getViewIterator();
UMLView *currView = m_view;
if (views.tqfind(currView) < 0) {
if (views.find(currView) < 0) {
kError() << "UMLApp::slotChangeTabLeft(): currView not found in viewlist" << endl;
return;
}
@ -1657,7 +1657,7 @@ void UMLApp::slotChangeTabRight() {
}
UMLViewList views = m_doc->getViewIterator();
UMLView *currView = m_view;
if (views.tqfind(currView) < 0) {
if (views.find(currView) < 0) {
kError() << "UMLApp::slotChangeTabRight(): currView not found in viewlist" << endl;
return;
}

@ -80,7 +80,7 @@ bool UMLCanvasObject::addAssociationEnd(UMLAssociation* assoc) {
}
bool UMLCanvasObject::hasAssociation(UMLAssociation* assoc) {
if(m_List.tqcontainsRef(assoc) > 0)
if(m_List.containsRef(assoc) > 0)
return true;
return false;
}

@ -165,7 +165,7 @@ public:
* Find a child object with the given name.
*
* @param n The name of the object to find.
* @param t The type to tqfind (optional.) If not given then
* @param t The type to find (optional.) If not given then
* any object type will match.
* @return Pointer to the object found; NULL if none found.
*/

@ -365,10 +365,10 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
// check if the xmi file is a compressed archive like tar.bzip2 or tar.gz
TQString filetype = m_doc_url.fileName(true);
TQString mimetype = "";
if (filetype.tqfind(TQRegExp("\\.tgz$")) != -1)
if (filetype.find(TQRegExp("\\.tgz$")) != -1)
{
mimetype = "application/x-gzip";
} else if (filetype.tqfind(TQRegExp("\\.tar.bz2$")) != -1) {
} else if (filetype.find(TQRegExp("\\.tar.bz2$")) != -1) {
mimetype = "application/x-bzip2";
}
@ -572,9 +572,9 @@ bool UMLDoc::saveDocument(const KURL& url, const char * /* format */) {
TQString tmpTQString = url.fileName();
if (fileFormat == "tgz")
{
tmpTQString.tqreplace(TQRegExp("\\.tgz$"), "");
tmpTQString.replace(TQRegExp("\\.tgz$"), "");
} else {
tmpTQString.tqreplace(TQRegExp("\\.tar\\.bz2$"), "");
tmpTQString.replace(TQRegExp("\\.tar\\.bz2$"), "");
}
archive->addLocalFile(tmp_xmi_file.name(), tmpTQString);
archive->close();
@ -740,12 +740,12 @@ bool UMLDoc::addUMLObject(UMLObject* object) {
}
void UMLDoc::addStereotype(const UMLStereotype *s) {
if (! m_stereoList.tqcontains(s))
if (! m_stereoList.contains(s))
m_stereoList.append(s);
}
void UMLDoc::removeStereotype(const UMLStereotype *s) {
if (m_stereoList.tqcontains(s))
if (m_stereoList.contains(s))
m_stereoList.remove(s);
}
@ -1298,7 +1298,7 @@ void UMLDoc::saveToXMI(TQIODevice& file) {
for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
TQString stName = s->getName();
Uml::IDType stID = s->getID();
if (!stereoNames.tqcontains(stName) && !stereoIDs.tqcontains(stID)) {
if (!stereoNames.contains(stName) && !stereoIDs.contains(stID)) {
s->saveToXMI(doc, ownedNS);
stereoNames.append(stName);
stereoIDs.append(stID);
@ -2113,7 +2113,7 @@ void UMLDoc::slotAutoSave() {
// don't overwrite manually saved file with autosave content
TQString fileName = tempURL.fileName();
Settings::OptionState optionState = Settings::getOptionState();
fileName.tqreplace( ".xmi", optionState.generalState.autosavesuffix );
fileName.replace( ".xmi", optionState.generalState.autosavesuffix );
tempURL.setFileName( fileName );
// End Achim Spangler

@ -330,7 +330,7 @@ public:
* Used to find a @ref UMLObject by its type and name.
*
* @param name The name of the @ref UMLObject to find.
* @param type Object_Type of the object to tqfind (optional.)
* @param type Object_Type of the object to find (optional.)
* When the given type is ot_UMLObject the type is
* disregarded, i.e. the given name is the only
* search criterion.

@ -349,7 +349,7 @@ void UMLListView::popupMenuSel(int sel) {
fileDialog.setOperationMode(KFileDialog::Other);
// set a sensible default filename
TQString defaultFilename = current->getText().lower();
defaultFilename.tqreplace(TQRegExp("\\W+"), "_");
defaultFilename.replace(TQRegExp("\\W+"), "_");
defaultFilename.append(".xml"); // default extension
fileDialog.setSelection(defaultFilename);
fileDialog.exec();
@ -600,7 +600,7 @@ UMLListViewItem* UMLListView::determineParentItem(UMLObject* object) const {
if (pkg) {
UMLListViewItem* pkgItem = findUMLObject(pkg);
if (pkgItem == NULL)
kError() << "UMLListView::determineParentItem: could not tqfind "
kError() << "UMLListView::determineParentItem: could not find "
<< "tqparent package " << pkg->getName() << endl;
else
parentItem = pkgItem;
@ -1900,7 +1900,7 @@ bool UMLListView::itemRenamed( TQListViewItem * item , int /*col*/ ) {
renamedItem -> setCreating( false );
// If the type is empty then delete it.
if (newText.isEmpty() || newText.tqcontains(TQRegExp("^\\s+$"))) {
if (newText.isEmpty() || newText.contains(TQRegExp("^\\s+$"))) {
KMessageBox::error(
kapp -> mainWidget(),
i18n( "The name you entered was invalid.\nCreation process has been canceled." ),

@ -561,8 +561,8 @@ int UMLListViewItem::compare(TQListViewItem *other, int col, bool ascending) con
return retval;
}
UMLClassifierListItemList items = ourParent->getFilteredList(thisUmlItem->getBaseType());
int myIndex = items.tqfindRef(thisUmlItem);
int otherIndex = items.tqfindRef(otherUmlItem);
int myIndex = items.findRef(thisUmlItem);
int otherIndex = items.findRef(otherUmlItem);
if (myIndex < 0) {
retval = (subItem ? -1 : alphaOrder);
kError() << dbgPfx << retval << " because (myIndex < 0)" << endl;
@ -607,7 +607,7 @@ UMLListViewItem* UMLListViewItem::findUMLObject(const UMLObject *o) {
}
UMLListViewItem* UMLListViewItem::findChildObject(UMLClassifierListItem *cli) {
ChildObjectMap::iterator it = m_comap.tqfind(cli);
ChildObjectMap::iterator it = m_comap.find(cli);
if (it != m_comap.end()) {
return *it;
}

@ -18,7 +18,7 @@ bool tagEq (const TQString& inTag, const TQString& inPattern) {
TQString tag = inTag;
TQString pattern = inPattern;
tag.remove( TQRegExp("^\\w+:") ); // remove leading "UML:" or other
int patSections = pattern.tqcontains( '.' ) + 1;
int patSections = pattern.contains( '.' ) + 1;
TQString tagEnd = tag.section( '.', -patSections );
return (tagEnd.lower() == pattern.lower());
}

@ -343,7 +343,7 @@ TQString UMLObject::getPackage(const TQString& separator, bool includeRoot) {
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
TQString fqn = getFullyQualifiedName(tempSeparator, includeRoot);
if (!fqn.tqcontains(tempSeparator))
if (!fqn.contains(tempSeparator))
return "";
TQString scope = fqn.left(fqn.length() - tempSeparator.length() - m_Name.length());
return scope;
@ -448,7 +448,7 @@ bool UMLObject::resolveRef() {
}
// Work around Object_Factory::createUMLObject()'s incapability
// of on-the-fly scope creation:
if (m_SecondaryId.tqcontains("::")) {
if (m_SecondaryId.contains("::")) {
// TODO: Merge Import_Utils::createUMLObject() into Object_Factory::createUMLObject()
m_pSecondary = Import_Utils::createUMLObject(Uml::ot_UMLObject, m_SecondaryId, m_pUMLPackage);
if (m_pSecondary) {
@ -472,8 +472,8 @@ bool UMLObject::resolveRef() {
// This is very C++ specific - we rely on some '*' or
// '&' to decide it's a ref type. Plus, we don't recognize
// typedefs of ref types.
bool isReferenceType = ( m_SecondaryId.tqcontains('*') ||
m_SecondaryId.tqcontains('&') );
bool isReferenceType = ( m_SecondaryId.contains('*') ||
m_SecondaryId.contains('&') );
Uml::Object_Type ot = Uml::ot_Class;
if (isReferenceType) {
ot = Uml::ot_Datatype;

@ -687,7 +687,7 @@ void UMLView::checkMessages(ObjectWidget * w) {
MessageWidget *obj;
while ( (obj = it.current()) != 0 ) {
++it;
if(! obj -> tqcontains(w))
if(! obj -> contains(w))
continue;
//make sure message doesn't have any associations
removeAssociations(obj);
@ -1791,7 +1791,7 @@ void UMLView::removeAssociations(UMLWidget* Widget) {
AssociationWidget* assocwidget = 0;
while((assocwidget=assoc_it.current())) {
++assoc_it;
if(assocwidget->tqcontains(Widget)) {
if(assocwidget->contains(Widget)) {
removeAssoc(assocwidget);
}
}
@ -2060,7 +2060,7 @@ void UMLView::createAutoAssociations( UMLWidget * widget ) {
if (w->getID() != id)
continue;
// if the containedWidget is not physically located inside this widget
if (widget->rect().tqcontains(w->rect()))
if (widget->rect().contains(w->rect()))
continue;
// create the containment AssocWidget
AssociationWidget *a = new AssociationWidget(this, widget,
@ -2085,7 +2085,7 @@ void UMLView::createAutoAssociations( UMLWidget * widget ) {
if (pWidget->getID() == pkgID)
break;
}
if (pWidget == NULL || pWidget->rect().tqcontains(widget->rect()))
if (pWidget == NULL || pWidget->rect().contains(widget->rect()))
return;
// create the containment AssocWidget
AssociationWidget *a = new AssociationWidget(this, pWidget, at_Containment, widget);

@ -298,7 +298,7 @@ bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& r
const int pos = rx.search(fileContent);
if (pos < 0) {
kError() << "UMLViewImageExporterModel::fixEPS(" << fileName
<< "): cannot tqfind %%BoundingBox" << endl;
<< "): cannot find %%BoundingBox" << endl;
return false;
}
@ -319,7 +319,7 @@ bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& r
const int bottom = int(floor(epstop)) - rect.height() + 1;
// modify content
fileContent.tqreplace(pos,rx.cap(0).length(),
fileContent.replace(pos,rx.cap(0).length(),
TQString("%%BoundingBox: %1 %2 %3 %4").tqarg(left).tqarg(bottom).tqarg(right).tqarg(top));
ts << fileContent;

@ -537,7 +537,7 @@ void UMLWidget::setActivated(bool Active /*=true*/) {
}
void UMLWidget::addAssoc(AssociationWidget* pAssoc) {
if (pAssoc && !m_Assocs.tqcontains(pAssoc)) {
if (pAssoc && !m_Assocs.contains(pAssoc)) {
m_Assocs.append(pAssoc);
}
}

Loading…
Cancel
Save