diff options
Diffstat (limited to 'khelpcenter')
-rw-r--r-- | khelpcenter/docentry.cpp | 2 | ||||
-rw-r--r-- | khelpcenter/docmetainfo.cpp | 4 | ||||
-rw-r--r-- | khelpcenter/formatter.cpp | 6 | ||||
-rw-r--r-- | khelpcenter/glossary.cpp | 2 | ||||
-rw-r--r-- | khelpcenter/history.cpp | 2 | ||||
-rw-r--r-- | khelpcenter/htmlsearch/htmlsearch.cpp | 10 | ||||
-rw-r--r-- | khelpcenter/htmlsearch/kcmhtmlsearch.cpp | 4 | ||||
-rw-r--r-- | khelpcenter/htmlsearch/ktagcombobox.cpp | 6 | ||||
-rw-r--r-- | khelpcenter/infotree.cpp | 8 | ||||
-rw-r--r-- | khelpcenter/kcmhelpcenter.cpp | 10 | ||||
-rw-r--r-- | khelpcenter/navigator.cpp | 6 | ||||
-rw-r--r-- | khelpcenter/scrollkeepertreebuilder.cpp | 2 | ||||
-rw-r--r-- | khelpcenter/searchengine.cpp | 38 | ||||
-rw-r--r-- | khelpcenter/searchhandler.cpp | 18 | ||||
-rw-r--r-- | khelpcenter/toc.cpp | 2 | ||||
-rw-r--r-- | khelpcenter/view.cpp | 4 |
16 files changed, 62 insertions, 62 deletions
diff --git a/khelpcenter/docentry.cpp b/khelpcenter/docentry.cpp index 03f9a7721..5b741bdf5 100644 --- a/khelpcenter/docentry.cpp +++ b/khelpcenter/docentry.cpp @@ -219,7 +219,7 @@ bool DocEntry::readFromFile( const TQString &fileName ) mIdentifier = fi.baseName( true ); } mIndexer = file.readEntry( "X-DOC-Indexer" ); - mIndexer.tqreplace( "%f", fileName ); + mIndexer.replace( "%f", fileName ); mIndexTestFile = file.readEntry( "X-DOC-IndexTestFile" ); mSearchEnabledDefault = file.readBoolEntry( "X-DOC-SearchEnabledDefault", false ); diff --git a/khelpcenter/docmetainfo.cpp b/khelpcenter/docmetainfo.cpp index cfdfa9f7e..3880ce2bc 100644 --- a/khelpcenter/docmetainfo.cpp +++ b/khelpcenter/docmetainfo.cpp @@ -60,7 +60,7 @@ DocEntry *DocMetaInfo::addDocEntry( const TQString &fileName ) lang = extensions[ extensions.count() - 2 ]; } - if ( !lang.isEmpty() && mLanguages.tqfind( lang ) == mLanguages.end() ) { + if ( !lang.isEmpty() && mLanguages.find( lang ) == mLanguages.end() ) { return 0; } @@ -77,7 +77,7 @@ DocEntry *DocMetaInfo::addDocEntry( const TQString &fileName ) mHtmlSearch->setupDocEntry( entry ); } TQString indexer = entry->indexer(); - indexer.tqreplace( "%f", fileName ); + indexer.replace( "%f", fileName ); entry->setIndexer( indexer ); addDocEntry( entry ); return entry; diff --git a/khelpcenter/formatter.cpp b/khelpcenter/formatter.cpp index 859d003c3..b9f394289 100644 --- a/khelpcenter/formatter.cpp +++ b/khelpcenter/formatter.cpp @@ -73,7 +73,7 @@ bool Formatter::readTemplates() switch ( state ) { case IDLE: if ( !line.isEmpty() && !line.startsWith( "#" ) ) { - int pos = line.tqfind( "<<" ); + int pos = line.find( "<<" ); if ( pos >= 0 ) { state = MULTILINE; symbol = line.left( pos ).stripWhiteSpace(); @@ -120,7 +120,7 @@ bool Formatter::readTemplates() bool success = true; TQStringList::ConstIterator it2; for( it2 = requiredSymbols.begin(); it2 != requiredSymbols.end(); ++it2 ) { - if ( !mSymbols.tqcontains( *it2 ) ) { + if ( !mSymbols.contains( *it2 ) ) { success = false; kdError() << "Symbol '" << *it2 << "' is missing from main template file." << endl; @@ -137,7 +137,7 @@ TQString Formatter::header( const TQString &title ) TQString s; if ( mHasTemplate ) { s = mSymbols[ "HEADER" ]; - s.tqreplace( "--TITLE:--", title ); + s.replace( "--TITLE:--", title ); } else { s = "<html><head><title>" + title + "</title></head>\n<body>\n"; } diff --git a/khelpcenter/glossary.cpp b/khelpcenter/glossary.cpp index 6538a77eb..148fe4dd9 100644 --- a/khelpcenter/glossary.cpp +++ b/khelpcenter/glossary.cpp @@ -303,7 +303,7 @@ TQString Glossary::entryToHtml( const GlossaryEntry &entry ) void Glossary::slotSelectGlossEntry( const TQString &id ) { - EntryItem *newItem = m_idDict.tqfind( id ); + EntryItem *newItem = m_idDict.find( id ); if ( newItem == 0 ) return; diff --git a/khelpcenter/history.cpp b/khelpcenter/history.cpp index 6f37884f4..62a434dd2 100644 --- a/khelpcenter/history.cpp +++ b/khelpcenter/history.cpp @@ -324,7 +324,7 @@ void History::fillHistoryPopup( TQPopupMenu *popup, bool onlyBack, bool onlyForw { TQString text = it.current()->title; text = KStringHandler::csqueeze(text, 50); //CT: squeeze - text.tqreplace( "&", "&&" ); + text.replace( "&", "&&" ); if ( checkCurrentItem && it.current() == current ) { int id = popup->insertItem( text ); // no pixmap if checked diff --git a/khelpcenter/htmlsearch/htmlsearch.cpp b/khelpcenter/htmlsearch/htmlsearch.cpp index 7a3483caf..5f93c39fd 100644 --- a/khelpcenter/htmlsearch/htmlsearch.cpp +++ b/khelpcenter/htmlsearch/htmlsearch.cpp @@ -43,7 +43,7 @@ void HTMLSearch::scanDir(const TQString& dir) for (it=list.begin(); it != list.end(); ++it) { file = adir + *it; - if ( !_files.tqcontains( file ) ) { + if ( !_files.contains( file ) ) { _files.append(file); progress->setFilesScanned(++_filesScanned); } @@ -375,13 +375,13 @@ void HTMLSearch::htdigStdout(KProcess *, char *buffer, int len) TQString line = TQString(buffer).left(len); int cnt=0, index=-1; - while ( (index = line.tqfind("file://", index+1)) > 0) + while ( (index = line.find("file://", index+1)) > 0) cnt++; _filesDigged += cnt; cnt=0; index=-1; - while ( (index = line.tqfind("not changed", index+1)) > 0) + while ( (index = line.find("not changed", index+1)) > 0) cnt++; _filesDigged -= cnt; @@ -467,8 +467,8 @@ TQString HTMLSearch::search(TQString _lang, TQString words, TQString method, int delete _proc; // modify the search result - _searchResult = _searchResult.tqreplace("http://localhost/", "file:/"); - _searchResult = _searchResult.tqreplace("Content-type: text/html", TQString::null); + _searchResult = _searchResult.replace("http://localhost/", "file:/"); + _searchResult = _searchResult.replace("Content-type: text/html", TQString::null); // dump the search result TQFile f(result); diff --git a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp index c2b1cd883..64a301be7 100644 --- a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp +++ b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp @@ -189,9 +189,9 @@ void KHTMLSearchConfig::loadLanguages() TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), KGlobal::locale()->translate("without name")); TQString path = *it; - int index = path.tqfindRev('/'); + int index = path.findRev('/'); path = path.left(index); - index = path.tqfindRev('/'); + index = path.findRev('/'); path = path.mid(index+1); language->insertLanguage(path, name); } diff --git a/khelpcenter/htmlsearch/ktagcombobox.cpp b/khelpcenter/htmlsearch/ktagcombobox.cpp index 9745d6066..cf259fa46 100644 --- a/khelpcenter/htmlsearch/ktagcombobox.cpp +++ b/khelpcenter/htmlsearch/ktagcombobox.cpp @@ -133,7 +133,7 @@ static inline void checkInsertPos(TQPopupMenu *popup, const TQString & str, int static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu) { - int pos = tags->tqfindIndex(submenu); + int pos = tags->findIndex(submenu); TQPopupMenu *pi = 0; if (pos != -1) @@ -206,7 +206,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) bool KTagComboBox::containsTag( const TQString &str ) const { - return tags-.tqcontains(str) > 0; + return tags-.contains(str) > 0; } TQString KTagComboBox::currentTag() const @@ -238,7 +238,7 @@ void KTagComboBox::setCurrentItem(int i) void KTagComboBox::setCurrentItem(const TQString &code) { - int i = tags->tqfindIndex(code); + int i = tags->findIndex(code); if (code.isNull()) i = 0; if (i != -1) diff --git a/khelpcenter/infotree.cpp b/khelpcenter/infotree.cpp index 6097a0b33..a23cce174 100644 --- a/khelpcenter/infotree.cpp +++ b/khelpcenter/infotree.cpp @@ -146,10 +146,10 @@ void InfoTree::parseInfoDirFile( const TQString &infoDirFileName ) while ( !stream.eof() && !s.stripWhiteSpace().isEmpty() ) { s = stream.readLine(); if ( s[ 0 ] == '*' ) { - const int colon = s.tqfind( ":" ); - const int openBrace = s.tqfind( "(", colon ); - const int closeBrace = s.tqfind( ")", openBrace ); - const int dot = s.tqfind( ".", closeBrace ); + const int colon = s.find( ":" ); + const int openBrace = s.find( "(", colon ); + const int closeBrace = s.find( ")", openBrace ); + const int dot = s.find( ".", closeBrace ); TQString appName = s.mid( 2, colon - 2 ); TQString url = "info:/" + s.mid( openBrace + 1, closeBrace - openBrace - 1 ); diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp index c88e7218a..a08722393 100644 --- a/khelpcenter/kcmhelpcenter.cpp +++ b/khelpcenter/kcmhelpcenter.cpp @@ -417,9 +417,9 @@ bool KCMHelpCenter::buildIndex() .arg( entry->documentType() ) ); hasError = true; } else { - indexer.tqreplace( TQRegExp( "%i" ), entry->identifier() ); - indexer.tqreplace( TQRegExp( "%d" ), Prefs::indexDirectory() ); - indexer.tqreplace( TQRegExp( "%p" ), entry->url() ); + indexer.replace( TQRegExp( "%i" ), entry->identifier() ); + indexer.replace( TQRegExp( "%d" ), Prefs::indexDirectory() ); + indexer.replace( TQRegExp( "%p" ), entry->url() ); kdDebug() << "INDEXER: " << indexer << endl; *ts << indexer << endl; @@ -611,7 +611,7 @@ void KCMHelpCenter::advanceProgress() void KCMHelpCenter::slotReceivedStdout( KProcess *, char *buffer, int buflen ) { TQString text = TQString::fromLocal8Bit( buffer, buflen ); - int pos = text.tqfindRev( '\n' ); + int pos = text.findRev( '\n' ); if ( pos < 0 ) { mStdOut.append( text ); } else { @@ -625,7 +625,7 @@ void KCMHelpCenter::slotReceivedStdout( KProcess *, char *buffer, int buflen ) void KCMHelpCenter::slotReceivedStderr( KProcess *, char *buffer, int buflen ) { TQString text = TQString::fromLocal8Bit( buffer, buflen ); - int pos = text.tqfindRev( '\n' ); + int pos = text.findRev( '\n' ); if ( pos < 0 ) { mStdErr.append( text ); } else { diff --git a/khelpcenter/navigator.cpp b/khelpcenter/navigator.cpp index 35ebf0218..07def94b2 100644 --- a/khelpcenter/navigator.cpp +++ b/khelpcenter/navigator.cpp @@ -407,9 +407,9 @@ void Navigator::slotItemSelected( TQListViewItem *currentItem ) // Enforce the original .docbook version, in case langLookup returns a // cached version if ( !doc.isNull() ) { - int pos = doc.tqfind( ".html" ); + int pos = doc.find( ".html" ); if ( pos >= 0 ) { - doc.tqreplace( pos, 5, ".docbook" ); + doc.replace( pos, 5, ".docbook" ); } kdDebug( 1400 ) << "slotItemSelected(): doc = " << doc << endl; @@ -563,7 +563,7 @@ void Navigator::slotSearch() void Navigator::slotShowSearchResult( const TQString &url ) { TQString u = url; - u.tqreplace( "%k", mSearchEdit->text() ); + u.replace( "%k", mSearchEdit->text() ); emit itemSelected( u ); } diff --git a/khelpcenter/scrollkeepertreebuilder.cpp b/khelpcenter/scrollkeepertreebuilder.cpp index 4ee28d21d..20a4b0851 100644 --- a/khelpcenter/scrollkeepertreebuilder.cpp +++ b/khelpcenter/scrollkeepertreebuilder.cpp @@ -180,7 +180,7 @@ void ScrollKeeperTreeBuilder::insertDoc( NavigatorItem *parent, if ( url.left( 5 ) == "file:" ) url = url.mid( 5 ); url.prepend( "ghelp:" ); #if 0 - url.tqreplace( TQRegExp( ".xml$" ), ".html" ); + url.replace( TQRegExp( ".xml$" ), ".html" ); #endif } else if ( mimeType == "text/sgml" ) { // GNOME docs use this type. We don't have a real viewer for this. diff --git a/khelpcenter/searchengine.cpp b/khelpcenter/searchengine.cpp index 58217c031..b779afc8e 100644 --- a/khelpcenter/searchengine.cpp +++ b/khelpcenter/searchengine.cpp @@ -93,7 +93,7 @@ void SearchTraverser::startProcess( DocEntry *entry ) void SearchTraverser::connectHandler( SearchHandler *handler ) { TQMap<SearchHandler *,int>::Iterator it; - it = mConnectCount.tqfind( handler ); + it = mConnectCount.find( handler ); int count = 0; if ( it != mConnectCount.end() ) count = *it; if ( count == 0 ) { @@ -108,7 +108,7 @@ void SearchTraverser::connectHandler( SearchHandler *handler ) void SearchTraverser::disconnectHandler( SearchHandler *handler ) { TQMap<SearchHandler *,int>::Iterator it; - it = mConnectCount.tqfind( handler ); + it = mConnectCount.find( handler ); if ( it == mConnectCount.end() ) { kdError() << "SearchTraverser::disconnectHandler() handler not connected." << endl; @@ -326,15 +326,15 @@ bool SearchEngine::search( TQString words, TQString method, int matches, lang = "en"; // if the string contains '&' replace with a '+' and set search method to and - if (mWords.tqfind("&") != -1) { - mWords.tqreplace("&", " "); + if (mWords.find("&") != -1) { + mWords.replace("&", " "); method = "and"; } // replace whitespace with a '+' mWords = mWords.stripWhiteSpace(); mWords = mWords.simplifyWhiteSpace(); - mWords.tqreplace(TQRegExp("\\s"), "+"); + mWords.replace(TQRegExp("\\s"), "+"); commonSearchProgram = substituteSearchQuery( commonSearchProgram ); @@ -379,8 +379,8 @@ bool SearchEngine::search( TQString words, TQString method, int matches, delete mProc; // modify the search result - mSearchResult = mSearchResult.tqreplace("http://localhost/", "file:/"); - mSearchResult = mSearchResult.mid( mSearchResult.tqfind( '<' ) ); + mSearchResult = mSearchResult.replace("http://localhost/", "file:/"); + mSearchResult = mSearchResult.mid( mSearchResult.find( '<' ) ); mView->beginSearchResult(); mView->writeSearchResult( mSearchResult ); @@ -395,11 +395,11 @@ bool SearchEngine::search( TQString words, TQString method, int matches, TQString SearchEngine::substituteSearchQuery( const TQString &query ) { TQString result = query; - result.tqreplace( "%k", mWords ); - result.tqreplace( "%n", TQString::number( mMatches ) ); - result.tqreplace( "%m", mMethod ); - result.tqreplace( "%l", mLang ); - result.tqreplace( "%s", mScope ); + result.replace( "%k", mWords ); + result.replace( "%n", TQString::number( mMatches ) ); + result.replace( "%m", mMethod ); + result.replace( "%l", mLang ); + result.replace( "%s", mScope ); return result; } @@ -409,15 +409,15 @@ TQString SearchEngine::substituteSearchQuery( const TQString &query, Operation operation, const TQString &lang ) { TQString result = query; - result.tqreplace( "%i", identifier ); - result.tqreplace( "%w", words.join( "+" ) ); - result.tqreplace( "%m", TQString::number( maxResults ) ); + result.replace( "%i", identifier ); + result.replace( "%w", words.join( "+" ) ); + result.replace( "%m", TQString::number( maxResults ) ); TQString o; if ( operation == Or ) o = "or"; else o = "and"; - result.tqreplace( "%o", o ); - result.tqreplace( "%d", Prefs::indexDirectory() ); - result.tqreplace( "%l", lang ); + result.replace( "%o", o ); + result.replace( "%d", Prefs::indexDirectory() ); + result.replace( "%l", lang ); return result; } @@ -458,7 +458,7 @@ bool SearchEngine::isRunning() const SearchHandler *SearchEngine::handler( const TQString &documentType ) const { TQMap<TQString,SearchHandler *>::ConstIterator it; - it = mHandlers.tqfind( documentType ); + it = mHandlers.find( documentType ); if ( it == mHandlers.end() ) return 0; else return *it; diff --git a/khelpcenter/searchhandler.cpp b/khelpcenter/searchhandler.cpp index 48f61e9e2..9c34d7399 100644 --- a/khelpcenter/searchhandler.cpp +++ b/khelpcenter/searchhandler.cpp @@ -62,9 +62,9 @@ TQStringList SearchHandler::documentTypes() const TQString SearchHandler::indexCommand( const TQString &identifier ) { TQString cmd = mIndexCommand; - cmd.tqreplace( "%i", identifier ); - cmd.tqreplace( "%d", Prefs::indexDirectory() ); - cmd.tqreplace( "%l", mLang ); + cmd.replace( "%i", identifier ); + cmd.replace( "%d", Prefs::indexDirectory() ); + cmd.replace( "%l", mLang ); return cmd; } @@ -83,7 +83,7 @@ bool SearchHandler::checkBinary( const TQString &cmd ) const { TQString binary; - int pos = cmd.tqfind( ' ' ); + int pos = cmd.find( ' ' ); if ( pos < 0 ) binary = cmd; else binary = cmd.left( pos ); @@ -166,7 +166,7 @@ void SearchHandler::searchStdout( KProcess *proc, char *buffer, int len ) p = strncpy( p, buffer, len ); p[len] = '\0'; - TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.tqfind( proc ); + TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc ); if ( it != mProcessJobs.end() ) { (*it)->mResult += bufferStr.fromUtf8( p ); } @@ -179,7 +179,7 @@ void SearchHandler::searchStderr( KProcess *proc, char *buffer, int len ) if ( !buffer || len == 0 ) return; - TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.tqfind( proc ); + TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc ); if ( it != mProcessJobs.end() ) { (*it)->mError += TQString::fromUtf8( buffer, len ); } @@ -193,7 +193,7 @@ void SearchHandler::searchExited( KProcess *proc ) TQString error; DocEntry *entry = 0; - TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.tqfind( proc ); + TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc ); if ( it != mProcessJobs.end() ) { SearchJob *j = *it; entry = j->mEntry; @@ -218,7 +218,7 @@ void SearchHandler::slotJobResult( KIO::Job *job ) TQString result; DocEntry *entry = 0; - TQMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.tqfind( job ); + TQMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.find( job ); if ( it != mKioJobs.end() ) { SearchJob *j = *it; @@ -240,7 +240,7 @@ void SearchHandler::slotJobData( KIO::Job *job, const TQByteArray &data ) { // kdDebug() << "SearchHandler::slotJobData()" << endl; - TQMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.tqfind( job ); + TQMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.find( job ); if ( it != mKioJobs.end() ) { (*it)->mResult += data.data(); } diff --git a/khelpcenter/toc.cpp b/khelpcenter/toc.cpp index c4eb13f3a..0f0e8af07 100644 --- a/khelpcenter/toc.cpp +++ b/khelpcenter/toc.cpp @@ -88,7 +88,7 @@ void TOC::build( const TQString &file ) } } - TQString cacheFile = fileName.tqreplace( TQDir::separator(), "__" ); + TQString cacheFile = fileName.replace( TQDir::separator(), "__" ); m_cacheFile = locateLocal( "cache", "help/" + cacheFile ); m_sourceFile = file; diff --git a/khelpcenter/view.cpp b/khelpcenter/view.cpp index 68470964d..68e7b3310 100644 --- a/khelpcenter/view.cpp +++ b/khelpcenter/view.cpp @@ -174,7 +174,7 @@ TQString View::langLookup( const TQString &fname ) // css etc) then look in other languages first. if ( ( *it ).endsWith( "docbook" ) ) { - TQString file = (*it).left((*it).tqfindRev('/')) + "/index.docbook"; + TQString file = (*it).left((*it).findRev('/')) + "/index.docbook"; info.setFile(file); if (info.exists() && info.isFile() && info.isReadable()) { @@ -361,7 +361,7 @@ KURL View::urlFromLinkNode( const DOM::Node &n ) const return href; TQString path = baseURL().path(); - path.truncate( path.tqfindRev( '/' ) + 1 ); + path.truncate( path.findRev( '/' ) + 1 ); path += href.url(); KURL url = baseURL(); |