diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 33881ea4441221b1ca0789a72c4c7249d923a0df (patch) | |
tree | ffe5603da373bb346bb29c8e0f533776f66560a5 /libk3b/projects | |
parent | 6d99e1e138ae5aafc10f14682c48221bf563152e (diff) | |
download | k3b-33881ea4441221b1ca0789a72c4c7249d923a0df.tar.gz k3b-33881ea4441221b1ca0789a72c4c7249d923a0df.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libk3b/projects')
27 files changed, 168 insertions, 168 deletions
diff --git a/libk3b/projects/audiocd/k3baudiodoc.cpp b/libk3b/projects/audiocd/k3baudiodoc.cpp index 817d5fa..0cd8ae1 100644 --- a/libk3b/projects/audiocd/k3baudiodoc.cpp +++ b/libk3b/projects/audiocd/k3baudiodoc.cpp @@ -382,7 +382,7 @@ K3bAudioDecoder* K3bAudioDoc::getDecoderForUrl( const KURL& url, bool* reused ) K3bAudioDecoder* decoder = 0; // check if we already have a proper decoder - if( m_decoderPresenceMap.tqcontains( url.path() ) ) { + if( m_decoderPresenceMap.contains( url.path() ) ) { decoder = m_decoderPresenceMap[url.path()]; *reused = true; } @@ -997,7 +997,7 @@ void K3bAudioDoc::slotTrackRemoved( K3bAudioTrack* track ) void K3bAudioDoc::increaseDecoderUsage( K3bAudioDecoder* decoder ) { kdDebug() << "(K3bAudioDoc::increaseDecoderUsage)" << endl; - if( !m_decoderUsageCounterMap.tqcontains( decoder ) ) { + if( !m_decoderUsageCounterMap.contains( decoder ) ) { m_decoderUsageCounterMap[decoder] = 1; m_decoderPresenceMap[decoder->filename()] = decoder; } diff --git a/libk3b/projects/audiocd/k3baudionormalizejob.cpp b/libk3b/projects/audiocd/k3baudionormalizejob.cpp index a732bb5..88c769b 100644 --- a/libk3b/projects/audiocd/k3baudionormalizejob.cpp +++ b/libk3b/projects/audiocd/k3baudionormalizejob.cpp @@ -121,13 +121,13 @@ void K3bAudioNormalizeJob::slotStdLine( const TQString& line ) } } - else if( line.tqcontains( "already normalized" ) ) { + else if( line.contains( "already normalized" ) ) { // no normalization necessary for the current track emit infoMessage( i18n("Track %1 is already normalized.").tqarg(m_currentTrack), INFO ); m_currentTrack++; } - else if( line.tqcontains( "--% done") ) { + else if( line.contains( "--% done") ) { if( m_currentAction == ADJUSTING_LEVELS ) { emit newTask( i18n("Adjusting volume level for track %1 of %2").tqarg(m_currentTrack).tqarg(m_files.count()) ); kdDebug() << "(K3bAudioNormalizeJob) adjusting level for track " @@ -148,7 +148,7 @@ void K3bAudioNormalizeJob::slotStdLine( const TQString& line ) m_currentTrack++; } - else if( int pos = line.tqfind( "% done" ) > 0 ) { + else if( int pos = line.find( "% done" ) > 0 ) { // parse progress: "XXX% done" and "batch XXX% done" pos -= 3; bool ok; diff --git a/libk3b/projects/datacd/k3bdatadoc.cpp b/libk3b/projects/datacd/k3bdatadoc.cpp index 17680d3..14a78a4 100644 --- a/libk3b/projects/datacd/k3bdatadoc.cpp +++ b/libk3b/projects/datacd/k3bdatadoc.cpp @@ -165,7 +165,7 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir ) TQString name( k3bname ); if( cnt > 0 ) name += TQString("_%1").tqarg(cnt); - if( K3bDataItem* oldItem = dir->tqfind( name ) ) { + if( K3bDataItem* oldItem = dir->find( name ) ) { if( f.isDir() && oldItem->isDir() ) { // ok, just reuse the dir newDirItem = static_cast<K3bDirItem*>(oldItem); @@ -215,7 +215,7 @@ bool K3bDataDoc::nameAlreadyInDir( const TQString& name, K3bDirItem* dir ) if( !dir ) return false; else - return ( dir->tqfind( name ) != 0 ); + return ( dir->find( name ) != 0 ); } @@ -275,7 +275,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem ) TQDomNodeList nodes = rootElem->childNodes(); if( nodes.item(0).nodeName() != "general" ) { - kdDebug() << "(K3bDataDoc) could not tqfind 'general' section." << endl; + kdDebug() << "(K3bDataDoc) could not find 'general' section." << endl; return false; } if( !readGeneralDocumentData( nodes.item(0).toElement() ) ) @@ -285,7 +285,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem ) // parse options // ----------------------------------------------------------------- if( nodes.item(1).nodeName() != "options" ) { - kdDebug() << "(K3bDataDoc) could not tqfind 'options' section." << endl; + kdDebug() << "(K3bDataDoc) could not find 'options' section." << endl; return false; } if( !loadDocumentDataOptions( nodes.item(1).toElement() ) ) @@ -297,7 +297,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem ) // parse header // ----------------------------------------------------------------- if( nodes.item(2).nodeName() != "header" ) { - kdDebug() << "(K3bDataDoc) could not tqfind 'header' section." << endl; + kdDebug() << "(K3bDataDoc) could not find 'header' section." << endl; return false; } if( !loadDocumentDataHeader( nodes.item(2).toElement() ) ) @@ -309,7 +309,7 @@ bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem ) // parse files // ----------------------------------------------------------------- if( nodes.item(3).nodeName() != "files" ) { - kdDebug() << "(K3bDataDoc) could not tqfind 'files' section." << endl; + kdDebug() << "(K3bDataDoc) could not find 'files' section." << endl; return false; } @@ -428,7 +428,7 @@ bool K3bDataDoc::loadDocumentDataOptions( TQDomElement elem ) else if( e.text() == "extended" ) m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::extended ); else if( e.text() == "extended" ) - m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::tqreplace ); + m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::replace ); else m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::noChange ); } @@ -565,7 +565,7 @@ bool K3bDataDoc::loadDataItem( TQDomElement& elem, K3bDirItem* tqparent ) else if( elem.nodeName() == "directory" ) { // This is for the VideoDVD project which already contains the *_TS folders K3bDirItem* newDirItem = 0; - if( K3bDataItem* item = tqparent->tqfind( elem.attributeNode( "name" ).value() ) ) { + if( K3bDataItem* item = tqparent->find( elem.attributeNode( "name" ).value() ) ) { if( item->isDir() ) { newDirItem = static_cast<K3bDirItem*>(item); } @@ -745,8 +745,8 @@ void K3bDataDoc::saveDocumentDataOptions( TQDomElement& optionsElem ) case K3bIsoOptions::extended: topElem.appendChild( doc.createTextNode( "extended" ) ); break; - case K3bIsoOptions::tqreplace: - topElem.appendChild( doc.createTextNode( "tqreplace" ) ); + case K3bIsoOptions::replace: + topElem.appendChild( doc.createTextNode( "replace" ) ); break; default: topElem.appendChild( doc.createTextNode( "noChange" ) ); @@ -838,7 +838,7 @@ void K3bDataDoc::saveDocumentDataHeader( TQDomElement& headerElem ) void K3bDataDoc::saveDataItem( K3bDataItem* item, TQDomDocument* doc, TQDomElement* tqparent ) { if( K3bFileItem* fileItem = dynamic_cast<K3bFileItem*>( item ) ) { - if( m_oldSession.tqcontains( fileItem ) ) { + if( m_oldSession.contains( fileItem ) ) { kdDebug() << "(K3bDataDoc) ignoring fileitem " << fileItem->k3bName() << " from old session while saving..." << endl; } else { @@ -998,8 +998,8 @@ TQString K3bDataDoc::treatWhitespace( const TQString& path ) if( isoOptions().whiteSpaceTreatment() != K3bIsoOptions::noChange ) { TQString result = path; - if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::tqreplace ) { - result.tqreplace( ' ', isoOptions().whiteSpaceTreatmentReplaceString() ); + if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::replace ) { + result.replace( ' ', isoOptions().whiteSpaceTreatmentReplaceString() ); } else if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::strip ) { result.remove( ' ' ); @@ -1220,7 +1220,7 @@ void K3bDataDoc::createSessionImportItems( const K3bIso9660Directory* importDir, for( TQStringList::const_iterator it = entries.begin(); it != entries.end(); ++it ) { const K3bIso9660Entry* entry = importDir->entry( *it ); - K3bDataItem* oldItem = tqparent->tqfind( entry->name() ); + K3bDataItem* oldItem = tqparent->find( entry->name() ); if( entry->isDirectory() ) { K3bDirItem* dir = 0; if( oldItem && oldItem->isDir() ) { @@ -1278,7 +1278,7 @@ void K3bDataDoc::clearImportedSession() } else { for( TQPtrListIterator<K3bDataItem> it( dir->tqchildren() ); it.current(); ++it ) { - if( !m_oldSession.tqcontains(it.current()) ) { + if( !m_oldSession.contains(it.current()) ) { m_oldSession.remove(); // now the dir becomes a totally normal dir dir->setRemoveable(true); @@ -1308,7 +1308,7 @@ void K3bDataDoc::clearImportedSession() K3bDirItem* K3bDataDoc::bootImageDir() { - K3bDataItem* b = m_root->tqfind( "boot" ); + K3bDataItem* b = m_root->find( "boot" ); if( !b ) { b = new K3bDirItem( "boot", this, m_root ); setModified( true ); diff --git a/libk3b/projects/datacd/k3bdataitem.cpp b/libk3b/projects/datacd/k3bdataitem.cpp index 4e53a8d..b2df008 100644 --- a/libk3b/projects/datacd/k3bdataitem.cpp +++ b/libk3b/projects/datacd/k3bdataitem.cpp @@ -116,13 +116,13 @@ K3b::Msf K3bDataItem::itemBlocks( bool followSymbolicLinks ) const void K3bDataItem::setK3bName( const TQString& name ) { if ( name != m_k3bName ) { // test for not-allowed characters - if( name.tqcontains('/') ) { + if( name.contains('/') ) { kdDebug() << "(K3bDataItem) name contained invalid characters!" << endl; return; } if( tqparent() ) { - K3bDataItem* item = tqparent()->tqfind( name ); + K3bDataItem* item = tqparent()->find( name ); if( item && item != this ) { kdDebug() << "(K3bDataItem) item with that name already exists." << endl; return; diff --git a/libk3b/projects/datacd/k3bdiritem.cpp b/libk3b/projects/datacd/k3bdiritem.cpp index b44037f..16627c7 100644 --- a/libk3b/projects/datacd/k3bdiritem.cpp +++ b/libk3b/projects/datacd/k3bdiritem.cpp @@ -99,12 +99,12 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item ) } } - if( m_tqchildren.tqfindRef( item ) == -1 ) { + if( m_tqchildren.findRef( item ) == -1 ) { if( item->isFile() ) { // do we replace an old item? TQString name = item->k3bName(); int cnt = 1; - while( K3bDataItem* oldItem = tqfind( name ) ) { + while( K3bDataItem* oldItem = find( name ) ) { if( !oldItem->isDir() && oldItem->isFromOldSession() ) { // in this case we remove this item from it's tqparent and save it in the new one // to be able to recover it @@ -146,7 +146,7 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item ) K3bDataItem* K3bDirItem::takeDataItem( K3bDataItem* item ) { - int x = m_tqchildren.tqfindRef( item ); + int x = m_tqchildren.findRef( item ); if( x > -1 ) { K3bDataItem* item = m_tqchildren.take(); updateSize( item, true ); @@ -186,7 +186,7 @@ K3bDataItem* K3bDirItem::nextSibling() const K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const { // search for prev in tqchildren - if( m_tqchildren.tqfindRef( prev ) < 0 ) { + if( m_tqchildren.findRef( prev ) < 0 ) { return 0; } else @@ -196,11 +196,11 @@ K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const bool K3bDirItem::alreadyInDirectory( const TQString& filename ) const { - return (tqfind( filename ) != 0); + return (find( filename ) != 0); } -K3bDataItem* K3bDirItem::tqfind( const TQString& filename ) const +K3bDataItem* K3bDirItem::find( const TQString& filename ) const { for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) { if( it.current()->k3bName() == filename ) @@ -218,12 +218,12 @@ K3bDataItem* K3bDirItem::findByPath( const TQString& p ) TQString path = p; if( path.startsWith("/") ) path = path.mid(1); - int pos = path.tqfind( "/" ); + int pos = path.find( "/" ); if( pos < 0 ) - return tqfind( path ); + return find( path ); else { // do it recursivly - K3bDataItem* item = tqfind( path.left(pos) ); + K3bDataItem* item = find( path.left(pos) ); if( item && item->isDir() ) return ((K3bDirItem*)item)->findByPath( path.mid( pos+1 ) ); else @@ -249,7 +249,7 @@ bool K3bDirItem::mkdir( const TQString& dirPath ) TQString restPath; TQString dirName; - int pos = dirPath.tqfind( '/' ); + int pos = dirPath.find( '/' ); if( pos == -1 ) { dirName = dirPath; } @@ -258,7 +258,7 @@ bool K3bDirItem::mkdir( const TQString& dirPath ) restPath = dirPath.mid( pos+1 ); } - K3bDataItem* dir = tqfind( dirName ); + K3bDataItem* dir = find( dirName ); if( !dir ) dir = new K3bDirItem( dirName, doc(), this ); else if( !dir->isDir() ) diff --git a/libk3b/projects/datacd/k3bdiritem.h b/libk3b/projects/datacd/k3bdiritem.h index 75fc20e..7ec0fba 100644 --- a/libk3b/projects/datacd/k3bdiritem.h +++ b/libk3b/projects/datacd/k3bdiritem.h @@ -56,7 +56,7 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem K3bDataItem* nextChild( K3bDataItem* ) const; bool alreadyInDirectory( const TQString& fileName ) const; - K3bDataItem* tqfind( const TQString& filename ) const; + K3bDataItem* find( const TQString& filename ) const; K3bDataItem* findByPath( const TQString& ); long numFiles() const; diff --git a/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp b/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp index 7d92e7e..2d4b2fb 100644 --- a/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp +++ b/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp @@ -114,7 +114,7 @@ public: void removeFile( K3bFileItem* item, bool followSymlinks ) { InodeInfo& inodeInfo = inodeMap[item->localId(followSymlinks)]; - if( inodeInfo.items.tqfindRef( item ) == -1 ) { + if( inodeInfo.items.findRef( item ) == -1 ) { kdError() << "(K3bFileCompilationSizeHandler) " << item->localPath() << " has been removed without being added!" << endl; @@ -136,7 +136,7 @@ public: void removeSpecialItem( K3bDataItem* item ) { // special files do not have a corresponding local file // so we just substract their k3bSize - if( specialItems.tqfindRef( item ) == -1 ) { + if( specialItems.findRef( item ) == -1 ) { kdError() << "(K3bFileCompilationSizeHandler) Special item " << item->k3bName() << " has been removed without being added!" << endl; diff --git a/libk3b/projects/datacd/k3bfileitem.cpp b/libk3b/projects/datacd/k3bfileitem.cpp index 337aad8..c6c7bb4 100644 --- a/libk3b/projects/datacd/k3bfileitem.cpp +++ b/libk3b/projects/datacd/k3bfileitem.cpp @@ -273,7 +273,7 @@ bool K3bFileItem::isValid() const } else { // search for the item in dir - K3bDataItem* d = dir->tqfind( tokens[i] ); + K3bDataItem* d = dir->find( tokens[i] ); if( d == 0 ) return false; diff --git a/libk3b/projects/datacd/k3bfileitem.h b/libk3b/projects/datacd/k3bfileitem.h index 68ee49d..e758d95 100644 --- a/libk3b/projects/datacd/k3bfileitem.h +++ b/libk3b/projects/datacd/k3bfileitem.h @@ -77,7 +77,7 @@ public: }; /** - * This is not the normal inode number but it also tqcontains + * This is not the normal inode number but it also contains * the device number. */ Id localId() const; diff --git a/libk3b/projects/datacd/k3bisoimager.cpp b/libk3b/projects/datacd/k3bisoimager.cpp index b7ff5ad..e511a30 100644 --- a/libk3b/projects/datacd/k3bisoimager.cpp +++ b/libk3b/projects/datacd/k3bisoimager.cpp @@ -400,7 +400,7 @@ void K3bIsoImager::slotMkisofsPrintSizeFinished() else { // parse the stderr output // I hope parsing the last line is enough! - int pos = m_collectedMkisofsPrintSizeStderr.tqfindRev( "extents scheduled to be written" ); + int pos = m_collectedMkisofsPrintSizeStderr.findRev( "extents scheduled to be written" ); if( pos == -1 ) success = false; @@ -857,7 +857,7 @@ int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, TQTextStream& stream // some versions of mkisofs seem to have a bug that prevents to use filenames // that contain one or more backslashes - if( item->writtenPath().tqcontains("\\") ) + if( item->writtenPath().contains("\\") ) m_containsFilesWithMultibleBackslashes = true; @@ -887,7 +887,7 @@ void K3bIsoImager::writePathSpecForFile( K3bFileItem* item, TQTextStream& stream stream << escapeGraftPoint( item->writtenPath() ) << "="; - if( m_doc->bootImages().tqcontainsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack + if( m_doc->bootImages().containsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack // create temp file KTempFile temp; @@ -976,7 +976,7 @@ bool K3bIsoImager::writeSortWeightFile() K3bDataItem* item = m_doc->root(); while( (item = item->nextSibling()) ) { // we skip the root here if( item->sortWeight() != 0 ) { - if( m_doc->bootImages().tqcontainsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack + if( m_doc->bootImages().containsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack *t << escapeGraftPoint( static_cast<K3bBootItem*>(item)->tempPath() ) << " " << item->sortWeight() << endl; } else if( item->isDir() ) { @@ -1049,8 +1049,8 @@ TQString K3bIsoImager::escapeGraftPoint( const TQString& str ) ++pos; } -// enc.tqreplace( "\\\\", "\\\\\\\\" ); -// enc.tqreplace( "=", "\\=" ); +// enc.replace( "\\\\", "\\\\\\\\" ); +// enc.replace( "=", "\\=" ); return enc; } diff --git a/libk3b/projects/datacd/k3bisooptions.cpp b/libk3b/projects/datacd/k3bisooptions.cpp index 5adca1a..f239f2a 100644 --- a/libk3b/projects/datacd/k3bisooptions.cpp +++ b/libk3b/projects/datacd/k3bisooptions.cpp @@ -118,8 +118,8 @@ void K3bIsoOptions::save( KConfigBase* c, bool saveVolumeDesc ) case extended: c->writeEntry( "white_space_treatment", "extended" ); break; - case tqreplace: - c->writeEntry( "white_space_treatment", "tqreplace" ); + case replace: + c->writeEntry( "white_space_treatment", "replace" ); break; default: c->writeEntry( "white_space_treatment", "noChange" ); @@ -189,8 +189,8 @@ K3bIsoOptions K3bIsoOptions::load( KConfigBase* c, bool loadVolumeDesc ) options.setDoNotCacheInodes( c->readBoolEntry( "do not cache inodes", options.doNotCacheInodes() ) ); TQString w = c->readEntry( "white_space_treatment", "noChange" ); - if( w == "tqreplace" ) - options.setWhiteSpaceTreatment( tqreplace ); + if( w == "replace" ) + options.setWhiteSpaceTreatment( replace ); else if( w == "strip" ) options.setWhiteSpaceTreatment( strip ); else if( w == "extended" ) diff --git a/libk3b/projects/datacd/k3bisooptions.h b/libk3b/projects/datacd/k3bisooptions.h index 570f3d3..3d51d3d 100644 --- a/libk3b/projects/datacd/k3bisooptions.h +++ b/libk3b/projects/datacd/k3bisooptions.h @@ -108,7 +108,7 @@ class LIBK3B_EXPORT K3bIsoOptions void setPreserveFilePermissions( bool b ) { m_preserveFilePermissions = b; } // ----------------------------------------------------------------- mkisofs-options ----------- - enum whiteSpaceTreatments { noChange = 0, tqreplace = 1, strip = 2, extended = 3 }; + enum whiteSpaceTreatments { noChange = 0, replace = 1, strip = 2, extended = 3 }; void setWhiteSpaceTreatment( int i ) { m_whiteSpaceTreatment = i; } int whiteSpaceTreatment() const { return m_whiteSpaceTreatment; } diff --git a/libk3b/projects/datacd/k3bmkisofshandler.cpp b/libk3b/projects/datacd/k3bmkisofshandler.cpp index 5fdb526..99c76bb 100644 --- a/libk3b/projects/datacd/k3bmkisofshandler.cpp +++ b/libk3b/projects/datacd/k3bmkisofshandler.cpp @@ -93,12 +93,12 @@ void K3bMkisofsHandler::parseMkisofsOutput( const TQString& line ) d->readError = true; } } - else if( line.tqcontains( "done, estimate" ) ) { + else if( line.contains( "done, estimate" ) ) { int p = parseMkisofsProgress( line ); if( p != -1 ) handleMkisofsProgress( p ); } - else if( line.tqcontains( "extents written" ) ) { + else if( line.contains( "extents written" ) ) { handleMkisofsProgress( 100 ); } else if( line.startsWith( "Incorrectly encoded string" ) ) { @@ -134,7 +134,7 @@ int K3bMkisofsHandler::parseMkisofsProgress( const TQString& line ) // TQString perStr = line; - perStr.truncate( perStr.tqfind('%') ); + perStr.truncate( perStr.find('%') ); bool ok; double p = perStr.toDouble( &ok ); if( !ok ) { diff --git a/libk3b/projects/datacd/k3bmsinfofetcher.cpp b/libk3b/projects/datacd/k3bmsinfofetcher.cpp index 14eca4f..a799374 100644 --- a/libk3b/projects/datacd/k3bmsinfofetcher.cpp +++ b/libk3b/projects/datacd/k3bmsinfofetcher.cpp @@ -53,7 +53,7 @@ void K3bMsInfoFetcher::start() if( !k3bcore->externalBinManager()->foundBin( "cdrecord" ) ) { kdDebug() << "(K3bMsInfoFetcher) could not find cdrecord executable" << endl; - emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), K3bJob::ERROR ); + emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrecord"), K3bJob::ERROR ); jobFinished(false); return; } @@ -89,7 +89,7 @@ void K3bMsInfoFetcher::getMsInfo() bin = k3bcore->externalBinManager()->binObject( "cdrecord" ); if( !bin ) { - emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg( m_dvd ? "dvdrecord" : "cdrecord" ), ERROR ); + emit infoMessage( i18n("Could not find %1 executable.").tqarg( m_dvd ? "dvdrecord" : "cdrecord" ), ERROR ); jobFinished(false); return; } @@ -190,7 +190,7 @@ void K3bMsInfoFetcher::slotProcessExited() kdDebug() << "(K3bMsInfoFetcher) msinfo fetched" << endl; // now parse the output - TQString firstLine = m_collectedOutput.left( m_collectedOutput.tqfind("\n") ); + TQString firstLine = m_collectedOutput.left( m_collectedOutput.find("\n") ); TQStringList list = TQStringList::split( ",", firstLine ); if( list.count() == 2 ) { bool ok1, ok2; diff --git a/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp b/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp index f5dea6b..795a314 100644 --- a/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp +++ b/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp @@ -285,7 +285,7 @@ void K3bDvdBooktypeJob::startBooktypeChange() d->dvdBooktypeBin = k3bcore->externalBinManager()->binObject( "dvd+rw-booktype" ); if( !d->dvdBooktypeBin ) { - emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("dvd+rw-booktype"), ERROR ); + emit infoMessage( i18n("Could not find %1 executable.").tqarg("dvd+rw-booktype"), ERROR ); d->running = false; jobFinished(false); return; diff --git a/libk3b/projects/k3bcdrdaowriter.cpp b/libk3b/projects/k3bcdrdaowriter.cpp index 3339581..9472079 100644 --- a/libk3b/projects/k3bcdrdaowriter.cpp +++ b/libk3b/projects/k3bcdrdaowriter.cpp @@ -475,7 +475,7 @@ void K3bCdrdaoWriter::start() m_cdrdaoBinObject = k3bcore->externalBinManager()->binObject("cdrdao"); if( !m_cdrdaoBinObject ) { - emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrdao"), ERROR ); + emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrdao"), ERROR ); jobFinished(false); return; } @@ -664,12 +664,12 @@ bool K3bCdrdaoWriter::cueSheet() if ( !ts.eof() ) { TQString line = ts.readLine(); f.close(); - int pos = line.tqfind( "FILE \"" ); + int pos = line.find( "FILE \"" ); if( pos < 0 ) return false; pos += 6; - int endPos = line.tqfind( "\" BINARY", pos+1 ); + int endPos = line.find( "\" BINARY", pos+1 ); if( endPos < 0 ) return false; @@ -802,11 +802,11 @@ void K3bCdrdaoWriter::slotProcessExited( KProcess* p ) void K3bCdrdaoWriter::unknownCdrdaoLine( const TQString& line ) { - if( line.tqcontains( "at speed" ) ) + if( line.contains( "at speed" ) ) { // parse the speed and inform the user if cdrdao switched it down - int pos = line.tqfind( "at speed" ); - int po2 = line.tqfind( TQRegExp("\\D"), pos + 9 ); + int pos = line.find( "at speed" ); + int po2 = line.find( TQRegExp("\\D"), pos + 9 ); int speed = line.mid( pos+9, po2-pos-9 ).toInt(); if( speed < d->usedSpeed ) { @@ -835,7 +835,7 @@ void K3bCdrdaoWriter::parseCdrdaoLine( const TQString& str ) { parseCdrdaoError( str ); } - else if( (str).startsWith( "Wrote" ) && !str.tqcontains("blocks") ) + else if( (str).startsWith( "Wrote" ) && !str.contains("blocks") ) { parseCdrdaoWrote( str ); } @@ -870,7 +870,7 @@ void K3bCdrdaoWriter::parseCdrdaoLine( const TQString& str ) } else if( str.startsWith( "Found pre-gap" ) ) { - emit infoMessage( i18n("Found pregap: %1").tqarg( str.mid(str.tqfind(":")+1) ), K3bJob::INFO ); + emit infoMessage( i18n("Found pregap: %1").tqarg( str.mid(str.find(":")+1) ), K3bJob::INFO ); } else unknownCdrdaoLine(str); @@ -880,52 +880,52 @@ void K3bCdrdaoWriter::parseCdrdaoError( const TQString& line ) { int pos = -1; - if( line.tqcontains( "No driver found" ) || - line.tqcontains( "use option --driver" ) ) + if( line.contains( "No driver found" ) || + line.contains( "use option --driver" ) ) { emit infoMessage( i18n("No cdrdao driver found."), K3bJob::ERROR ); emit infoMessage( i18n("Please select one manually in the device settings."), K3bJob::ERROR ); emit infoMessage( i18n("For most current drives this would be 'generic-mmc'."), K3bJob::ERROR ); m_knownError = true; } - else if( line.tqcontains( "Cannot setup device" ) ) + else if( line.contains( "Cannot setup device" ) ) { // no nothing... } - else if( line.tqcontains( "not ready") ) + else if( line.contains( "not ready") ) { emit infoMessage( i18n("Device not ready, waiting."),K3bJob::WARNING ); } - else if( line.tqcontains("Drive does not accept any cue sheet") ) + else if( line.contains("Drive does not accept any cue sheet") ) { emit infoMessage( i18n("Cue sheet not accepted."), K3bJob::ERROR ); m_knownError = true; } - else if( (pos = line.tqfind( "Illegal option" )) > 0 ) { + else if( (pos = line.find( "Illegal option" )) > 0 ) { // ERROR: Illegal option: -wurst emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrdaoBinObject->name()).tqarg(line.mid(pos+16)), ERROR ); m_knownError = true; } - else if( line.tqcontains( "exceeds capacity" ) ) { + else if( line.contains( "exceeds capacity" ) ) { emit infoMessage( i18n("Data does not fit on disk."), ERROR ); if( m_cdrdaoBinObject->hasFeature("overburn") ) emit infoMessage( i18n("Enable overburning in the advanced K3b settings to burn anyway."), INFO ); m_knownError = true; } - // else if( !line.tqcontains( "remote progress message" ) ) + // else if( !line.contains( "remote progress message" ) ) // emit infoMessage( line, K3bJob::ERROR ); } void K3bCdrdaoWriter::parseCdrdaoWrote( const TQString& line ) { int pos, po2; - pos = line.tqfind( "Wrote" ); - po2 = line.tqfind( " ", pos + 6 ); + pos = line.find( "Wrote" ); + po2 = line.find( " ", pos + 6 ); int processed = line.mid( pos+6, po2-pos-6 ).toInt(); - pos = line.tqfind( "of" ); - po2 = line.tqfind( " ", pos + 3 ); + pos = line.find( "of" ); + po2 = line.find( " ", pos + 3 ); m_size = line.mid( pos+3, po2-pos-3 ).toInt(); d->speedEst->dataWritten( processed*1024 ); @@ -1042,8 +1042,8 @@ TQString K3bCdrdaoWriter::findDriverFile( const K3bExternalBin* bin ) // cdrdao normally in (prefix)/bin and driver table in (prefix)/share/cdrdao TQString path = bin->path; - path.truncate( path.tqfindRev("/") ); - path.truncate( path.tqfindRev("/") ); + path.truncate( path.findRev("/") ); + path.truncate( path.findRev("/") ); path += "/share/cdrdao/drivers"; if( TQFile::exists(path) ) return path; diff --git a/libk3b/projects/k3bcdrecordwriter.cpp b/libk3b/projects/k3bcdrecordwriter.cpp index 1b02290..e42c977 100644 --- a/libk3b/projects/k3bcdrecordwriter.cpp +++ b/libk3b/projects/k3bcdrecordwriter.cpp @@ -293,7 +293,7 @@ void K3bCdrecordWriter::start() prepareProcess(); if( !m_cdrecordBinObject ) { - emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), ERROR ); + emit infoMessage( i18n("Could not find %1 executable.").tqarg("cdrecord"), ERROR ); jobFinished(false); return; } @@ -406,8 +406,8 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line ) m_totalTracks = tt; - int sizeStart = line.tqfind( TQRegExp("\\d"), 10 ); - int sizeEnd = line.tqfind( "MB", sizeStart ); + int sizeStart = line.find( TQRegExp("\\d"), 10 ); + int sizeEnd = line.find( "MB", sizeStart ); track.size = line.mid( sizeStart, sizeEnd-sizeStart ).toInt(&ok); if( ok ) { @@ -474,7 +474,7 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line ) line.startsWith( m_cdrecordBinObject->path ) || line.startsWith( m_cdrecordBinObject->path.left(m_cdrecordBinObject->path.length()-5) ) ) { // get rid of the path and the following colon and space - TQString errStr = line.mid( line.tqfind(':') + 2 ); + TQString errStr = line.mid( line.find(':') + 2 ); if( errStr.startsWith( "Drive does not support SAO" ) ) { emit infoMessage( i18n("DAO (Disk At Once) recording not supported with this writer"), K3bJob::ERROR ); @@ -508,7 +508,7 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line ) else if( errStr.startsWith("Bad Option") ) { m_cdrecordError = BAD_OPTION; // parse option - int pos = line.tqfind( "Bad Option" ) + 13; + int pos = line.find( "Bad Option" ) + 13; int len = line.length() - pos - 1; emit infoMessage( i18n("No valid %1 option: %2").tqarg(m_cdrecordBinObject->name()).tqarg(line.mid(pos, len)), ERROR ); @@ -556,10 +556,10 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line ) // All other messages // - else if( line.tqcontains( "at speed" ) ) { + else if( line.contains( "at speed" ) ) { // parse the speed and inform the user if cdrdao switched it down - int pos = line.tqfind( "at speed" ); - int pos2 = line.tqfind( "in", pos+9 ); + int pos = line.find( "at speed" ); + int pos2 = line.find( "in", pos+9 ); int speed = static_cast<int>( line.mid( pos+9, pos2-pos-10 ).toDouble() ); // cdrecord-dvd >= 2.01a25 uses 8.0 and stuff if( speed != d->usedSpeed ) { emit infoMessage( i18n("Medium or burner do not support writing at %1x speed").tqarg(d->usedSpeed), K3bJob::WARNING ); @@ -640,10 +640,10 @@ void K3bCdrecordWriter::slotStdLine( const TQString& line ) if( ok ) emit infoMessage( i18n("Buffer was low 1 time.", "Buffer was low %n times.", num), INFO ); } - else if( line.tqcontains("Medium Error") ) { + else if( line.contains("Medium Error") ) { m_cdrecordError = MEDIUM_ERROR; } - else if( line.startsWith( "Error trying to open" ) && line.tqcontains( "(Device or resource busy)" ) ) { + else if( line.startsWith( "Error trying to open" ) && line.contains( "(Device or resource busy)" ) ) { m_cdrecordError = DEVICE_BUSY; } else { diff --git a/libk3b/projects/k3bgrowisofshandler.cpp b/libk3b/projects/k3bgrowisofshandler.cpp index 926c959..a91d5c6 100644 --- a/libk3b/projects/k3bgrowisofshandler.cpp +++ b/libk3b/projects/k3bgrowisofshandler.cpp @@ -76,7 +76,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) if( line.startsWith( ":-[" ) ) { // Error - if( line.tqcontains( "ASC=30h" ) ) + if( line.contains( "ASC=30h" ) ) m_error = ERROR_MEDIA; // :-[ PERFORM OPC failed with SK=3h/ASC=73h/ASCQ=03h @@ -85,7 +85,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) // :-[ attempt -blank=full or re-run with -dvd-compat -dvd-compat to engage DAO ] else if( !m_dao && - ( line.tqcontains( "engage DAO" ) || line.tqcontains( "media is not formatted or unsupported" ) ) ) + ( line.contains( "engage DAO" ) || line.contains( "media is not formatted or unsupported" ) ) ) emit infoMessage( i18n("Please try again with writing mode DAO."), K3bJob::ERROR ); else if( line.startsWith( ":-[ Failed to change write speed" ) ) { @@ -93,10 +93,10 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) } } else if( line.startsWith( ":-(" ) ) { - if( line.tqcontains( "No space left on device" ) ) + if( line.contains( "No space left on device" ) ) m_error = ERROR_OVERSIZE; - else if( line.tqcontains( "blocks are free" ) && line.tqcontains( "to be written" ) ) { + else if( line.contains( "blocks are free" ) && line.contains( "to be written" ) ) { m_error = ERROR_OVERSIZE; if( k3bcore->globalSettings()->overburn() ) emit infoMessage( i18n("Trying to write more than the official disk capacity"), K3bJob::WARNING ); @@ -116,7 +116,7 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) else if( line.startsWith( "PERFORM OPC" ) ) { m_error = ERROR_OPC; } - else if( line.tqcontains( "flushing cache" ) ) { + else if( line.contains( "flushing cache" ) ) { // here is where we already should stop queriying the buffer fill // since the device is only used there so far... m_device = 0; @@ -131,34 +131,34 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) // line = line.mid( dev->blockDeviceName().length() ); // if( line.startsWith( "closing..... - else if( line.tqcontains( "closing track" ) ) { + else if( line.contains( "closing track" ) ) { emit newSubTask( i18n("Closing Track") ); } - else if( line.tqcontains( "closing disc" ) ) { + else if( line.contains( "closing disc" ) ) { emit newSubTask( i18n("Closing Disk") ); } - else if( line.tqcontains( "closing session" ) ) { + else if( line.contains( "closing session" ) ) { emit newSubTask( i18n("Closing Session") ); } - else if( line.tqcontains( "updating RMA" ) ) { + else if( line.contains( "updating RMA" ) ) { emit newSubTask( i18n("Updating RMA") ); emit infoMessage( i18n("Updating RMA") + "...", K3bJob::INFO ); } - else if( line.tqcontains( "closing session" ) ) { + else if( line.contains( "closing session" ) ) { emit newSubTask( i18n("Closing Session") ); emit infoMessage( i18n("Closing Session") + "...", K3bJob::INFO ); } - else if( line.tqcontains( "writing lead-out" ) ) { + else if( line.contains( "writing lead-out" ) ) { emit newSubTask( i18n("Writing Lead-out") ); emit infoMessage( i18n("Writing the lead-out may take some time."), K3bJob::INFO ); } - else if( line.tqcontains( "Quick Grow" ) ) { + else if( line.contains( "Quick Grow" ) ) { emit infoMessage( i18n("Removing reference to lead-out."), K3bJob::INFO ); } - else if( line.tqcontains( "copying volume descriptor" ) ) { + else if( line.contains( "copying volume descriptor" ) ) { emit infoMessage( i18n("Modifying ISO9660 volume descriptor"), K3bJob::INFO ); } - else if( line.tqcontains( "FEATURE 21h is not on" ) ) { + else if( line.contains( "FEATURE 21h is not on" ) ) { if( !m_dao ) { // FIXME: it's not only the writer. It may be the media: something like does not support it with this media // da war was mit: wenn einmal formattiert, dann geht nur noch dao oder wenn einmal als overwrite @@ -167,12 +167,12 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) emit infoMessage( i18n("Engaging DAO"), K3bJob::WARNING ); } } - else if( ( pos = line.tqfind( "Current Write Speed" ) ) > 0 ) { + else if( ( pos = line.find( "Current Write Speed" ) ) > 0 ) { // parse write speed // /dev/sr0: "Current Write Speed" is 2.4x1385KBps pos += 24; - int endPos = line.tqfind( 'x', pos+1 ); + int endPos = line.find( 'x', pos+1 ); bool ok = true; double speed = line.mid( pos, endPos-pos ).toDouble(&ok); if( ok ) @@ -182,13 +182,13 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) else kdDebug() << "(K3bGrowisofsHandler) parsing error: '" << line.mid( pos, endPos-pos ) << "'" << endl; } - else if( (pos = line.tqfind( "RBU" )) > 0 ) { + else if( (pos = line.find( "RBU" )) > 0 ) { // FIXME: use TQRegExp // parse ring buffer fill for growisofs >= 6.0 pos += 4; - int endPos = line.tqfind( '%', pos+1 ); + int endPos = line.find( '%', pos+1 ); bool ok = true; double val = line.mid( pos, endPos-pos ).toDouble( &ok ); if( ok ) { @@ -199,8 +199,8 @@ void K3bGrowisofsHandler::handleLine( const TQString& line ) } // device buffer for growisofs >= 7.0 - pos = line.tqfind( "UBU", pos ); - endPos = line.tqfind( '%', pos+5 ); + pos = line.find( "UBU", pos ); + endPos = line.find( '%', pos+5 ); if( pos > 0 ) { pos += 4; val = line.mid( pos, endPos-pos ).toDouble( &ok ); diff --git a/libk3b/projects/k3bgrowisofswriter.cpp b/libk3b/projects/k3bgrowisofswriter.cpp index 3480711..5af4599 100644 --- a/libk3b/projects/k3bgrowisofswriter.cpp +++ b/libk3b/projects/k3bgrowisofswriter.cpp @@ -155,7 +155,7 @@ bool K3bGrowisofsWriter::prepareProcess() { d->growisofsBin = k3bcore->externalBinManager()->binObject( "growisofs" ); if( !d->growisofsBin ) { - emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("growisofs"), ERROR ); + emit infoMessage( i18n("Could not find %1 executable.").tqarg("growisofs"), ERROR ); return false; } @@ -465,7 +465,7 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line ) { emit debuggingOutput( d->growisofsBin->name(), line ); - if( line.tqcontains( "remaining" ) ) { + if( line.contains( "remaining" ) ) { if( !d->writingStarted ) { d->writingStarted = true; @@ -473,10 +473,10 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line ) } // parse progress - int pos = line.tqfind( "/" ); + int pos = line.find( "/" ); unsigned long long done = line.left( pos ).toULongLong(); bool ok = true; - d->overallSizeFromOutput = line.mid( pos+1, line.tqfind( "(", pos ) - pos - 1 ).toULongLong( &ok ); + d->overallSizeFromOutput = line.mid( pos+1, line.find( "(", pos ) - pos - 1 ).toULongLong( &ok ); if( d->firstSizeFromOutput == -1 ) d->firstSizeFromOutput = done; done -= d->firstSizeFromOutput; @@ -495,10 +495,10 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line ) } // try parsing write speed (since growisofs 5.11) - pos = line.tqfind( '@' ); + pos = line.find( '@' ); if( pos != -1 ) { pos += 1; - double speed = line.mid( pos, line.tqfind( 'x', pos ) - pos ).toDouble(&ok); + double speed = line.mid( pos, line.find( 'x', pos ) - pos ).toDouble(&ok); if( ok ) { if( d->lastWritingSpeed != speed ) emit writeSpeed( (int)(speed*1385.0), 1385 ); @@ -506,7 +506,7 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line ) } else kdDebug() << "(K3bGrowisofsWriter) speed parsing failed: '" - << line.mid( pos, line.tqfind( 'x', pos ) - pos ) << "'" << endl; + << line.mid( pos, line.find( 'x', pos ) - pos ) << "'" << endl; } else { d->speedEst->dataWritten( done/1024 ); @@ -514,7 +514,7 @@ void K3bGrowisofsWriter::slotReceivedStderr( const TQString& line ) } else kdDebug() << "(K3bGrowisofsWriter) progress parsing failed: '" - << line.mid( pos+1, line.tqfind( "(", pos ) - pos - 1 ).stripWhiteSpace() << "'" << endl; + << line.mid( pos+1, line.find( "(", pos ) - pos - 1 ).stripWhiteSpace() << "'" << endl; } // else diff --git a/libk3b/projects/movixcd/k3bmovixdoc.cpp b/libk3b/projects/movixcd/k3bmovixdoc.cpp index 5b5ea82..d73e39a 100644 --- a/libk3b/projects/movixcd/k3bmovixdoc.cpp +++ b/libk3b/projects/movixcd/k3bmovixdoc.cpp @@ -121,7 +121,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem ) TQDomNodeList nodes = rootElem->childNodes(); if( nodes.item(0).nodeName() != "general" ) { - kdDebug() << "(K3bMovixDoc) could not tqfind 'general' section." << endl; + kdDebug() << "(K3bMovixDoc) could not find 'general' section." << endl; return false; } if( !readGeneralDocumentData( nodes.item(0).toElement() ) ) @@ -131,7 +131,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem ) // parse options // ----------------------------------------------------------------- if( nodes.item(1).nodeName() != "data_options" ) { - kdDebug() << "(K3bMovixDoc) could not tqfind 'data_options' section." << endl; + kdDebug() << "(K3bMovixDoc) could not find 'data_options' section." << endl; return false; } if( !loadDocumentDataOptions( nodes.item(1).toElement() ) ) @@ -143,7 +143,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem ) // parse header // ----------------------------------------------------------------- if( nodes.item(2).nodeName() != "data_header" ) { - kdDebug() << "(K3bMovixDoc) could not tqfind 'data_header' section." << endl; + kdDebug() << "(K3bMovixDoc) could not find 'data_header' section." << endl; return false; } if( !loadDocumentDataHeader( nodes.item(2).toElement() ) ) @@ -155,7 +155,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem ) // parse movix options // ----------------------------------------------------------------- if( nodes.item(3).nodeName() != "movix_options" ) { - kdDebug() << "(K3bMovixDoc) could not tqfind 'movix_options' section." << endl; + kdDebug() << "(K3bMovixDoc) could not find 'movix_options' section." << endl; return false; } @@ -203,7 +203,7 @@ bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem ) // parse files // ----------------------------------------------------------------- if( nodes.item(4).nodeName() != "movix_files" ) { - kdDebug() << "(K3bMovixDoc) could not tqfind 'movix_files' section." << endl; + kdDebug() << "(K3bMovixDoc) could not find 'movix_files' section." << endl; return false; } @@ -370,7 +370,7 @@ void K3bMovixDoc::slotDataItemRemoved( K3bDataItem* item ) { // check if it's a movix item if( K3bMovixFileItem* fi = dynamic_cast<K3bMovixFileItem*>(item) ) - if( m_movixFiles.tqcontainsRef( fi ) ) { + if( m_movixFiles.containsRef( fi ) ) { emit movixItemRemoved( fi ); m_movixFiles.removeRef( fi ); setModified(true); @@ -380,7 +380,7 @@ void K3bMovixDoc::slotDataItemRemoved( K3bDataItem* item ) int K3bMovixDoc::indexOf( K3bMovixFileItem* item ) { - return m_movixFiles.tqfindRef(item)+1; + return m_movixFiles.findRef(item)+1; } @@ -390,12 +390,12 @@ void K3bMovixDoc::moveMovixItem( K3bMovixFileItem* item, K3bMovixFileItem* itemA return; // set the current item to track - m_movixFiles.tqfindRef( item ); + m_movixFiles.findRef( item ); // take the current item item = m_movixFiles.take(); - // if after == 0 tqfindRef returnes -1 - int pos = m_movixFiles.tqfindRef( itemAfter ); + // if after == 0 findRef returnes -1 + int pos = m_movixFiles.findRef( itemAfter ); m_movixFiles.insert( pos+1, item ); emit newMovixFileItems(); diff --git a/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp b/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp index 04afd83..38d8f81 100644 --- a/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp +++ b/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp @@ -204,7 +204,7 @@ bool K3bMovixDocPreparer::writeIsolinuxConfigFile( const TQString& originalPath if( TQTextStream* s = d->isolinuxConfigFile->textStream() ) { - // now open the default isolinux.cfg and copy everything except the first line which tqcontains + // now open the default isolinux.cfg and copy everything except the first line which contains // the default boot label TQFile f( originalPath ); if( f.open( IO_ReadOnly ) ) { @@ -464,7 +464,7 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath ) TQStringList docPathSections = TQStringList::split( '/', docPath ); K3bDirItem* dir = d->doc->root(); for( TQStringList::iterator it = docPathSections.begin(); it != docPathSections.end(); ++it ) { - K3bDataItem* next = dir->tqfind( *it ); + K3bDataItem* next = dir->find( *it ); if( !next ) dir = new K3bDirItem( *it, d->doc, dir ); else if( next->isDir() ) @@ -480,7 +480,7 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath ) K3bDirItem* delDir = dir; while( delDir->tqparent() != d->doc->root() ) delDir = delDir->tqparent(); - if( d->newMovixItems.tqfindRef( delDir ) == -1 ) + if( d->newMovixItems.findRef( delDir ) == -1 ) d->newMovixItems.append( delDir ); } diff --git a/libk3b/projects/movixcd/k3bmovixfileitem.cpp b/libk3b/projects/movixcd/k3bmovixfileitem.cpp index b281bd4..5242061 100644 --- a/libk3b/projects/movixcd/k3bmovixfileitem.cpp +++ b/libk3b/projects/movixcd/k3bmovixfileitem.cpp @@ -60,7 +60,7 @@ TQString K3bMovixFileItem::subTitleFileName( const TQString& name ) { // remove ending from k3bName TQString subName = name; - int pos = subName.tqfindRev("."); + int pos = subName.findRev("."); if( pos > 0 ) subName.truncate( pos ); subName += ".sub"; diff --git a/libk3b/projects/movixcd/k3bmovixprogram.cpp b/libk3b/projects/movixcd/k3bmovixprogram.cpp index 522e700..4c609db 100644 --- a/libk3b/projects/movixcd/k3bmovixprogram.cpp +++ b/libk3b/projects/movixcd/k3bmovixprogram.cpp @@ -79,7 +79,7 @@ bool K3bMovixProgram::scanNewEMovix( K3bMovixBin* bin, const TQString& path ) TQStringList files = bin->files(); for( TQStringList::iterator it = files.begin(); it != files.end(); ++it ) { - if( (*it).tqcontains( "isolinux.cfg" ) ) { + if( (*it).contains( "isolinux.cfg" ) ) { bin->m_supportedBootLabels = determineSupportedBootLabels( TQStringList::split( " ", *it )[1] ); break; } @@ -105,22 +105,22 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const TQString& path ) // TQDir dir( bin->movixDataDir() ); TQStringList subdirs = dir.entryList( TQDir::Dirs ); - if( !subdirs.tqcontains( "boot-messages" ) ) { + if( !subdirs.contains( "boot-messages" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'boot-messages'" << endl; delete bin; return false; } - if( !subdirs.tqcontains( "isolinux" ) ) { + if( !subdirs.contains( "isolinux" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'isolinux'" << endl; delete bin; return false; } - if( !subdirs.tqcontains( "movix" ) ) { + if( !subdirs.contains( "movix" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'movix'" << endl; delete bin; return false; } - if( !subdirs.tqcontains( "mplayer-fonts" ) ) { + if( !subdirs.contains( "mplayer-fonts" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'mplayer-fonts'" << endl; delete bin; return false; @@ -241,7 +241,7 @@ TQString K3bMovixBin::subtitleFontDir( const TQString& font ) const { if( font == i18n("none" ) ) return ""; - else if( m_supportedSubtitleFonts.tqcontains( font ) ) + else if( m_supportedSubtitleFonts.contains( font ) ) return path + "/mplayer-fonts/" + font; else return ""; @@ -252,7 +252,7 @@ TQString K3bMovixBin::languageDir( const TQString& lang ) const { if( lang == i18n("default") ) return languageDir( "en" ); - else if( m_supportedLanguages.tqcontains( lang ) ) + else if( m_supportedLanguages.contains( lang ) ) return path + "/boot-messages/" + lang; else return ""; diff --git a/libk3b/projects/videocd/k3bvcddoc.cpp b/libk3b/projects/videocd/k3bvcddoc.cpp index 0898fdf..1695353 100644 --- a/libk3b/projects/videocd/k3bvcddoc.cpp +++ b/libk3b/projects/videocd/k3bvcddoc.cpp @@ -336,7 +336,7 @@ void K3bVcdDoc::removeTrack( K3bVcdTrack* track ) } // set the current item to track - if ( m_tracks->tqfindRef( track ) >= 0 ) { + if ( m_tracks->findRef( track ) >= 0 ) { // take the current item track = m_tracks->take(); @@ -374,12 +374,12 @@ void K3bVcdDoc::moveTrack( const K3bVcdTrack* track, const K3bVcdTrack* after ) return ; // set the current item to track - m_tracks->tqfindRef( track ); + m_tracks->findRef( track ); // take the current item track = m_tracks->take(); - // if after == 0 tqfindRef returnes -1 - int pos = m_tracks->tqfindRef( after ); + // if after == 0 findRef returnes -1 + int pos = m_tracks->findRef( after ); m_tracks->insert( pos + 1, track ); // reorder pbc tracks @@ -645,8 +645,8 @@ bool K3bVcdDoc::loadDocumentData( TQDomElement* root ) track ->setPlayTime( trackElem.attribute( "playtime", "1" ).toInt() ); track ->setWaitTime( trackElem.attribute( "waittime", "2" ).toInt() ); track ->setReactivity( trackElem.attribute( "reactivity", "0" ).toInt() ); - track -> setPbcNumKeys( ( trackElem.attribute( "numkeys", "yes" ).tqcontains( "yes" ) ) ? true : false ); - track -> setPbcNumKeysUserdefined( ( trackElem.attribute( "userdefinednumkeys", "no" ).tqcontains( "yes" ) ) ? true : false ); + track -> setPbcNumKeys( ( trackElem.attribute( "numkeys", "yes" ).contains( "yes" ) ) ? true : false ); + track -> setPbcNumKeysUserdefined( ( trackElem.attribute( "userdefinednumkeys", "no" ).contains( "yes" ) ) ? true : false ); addTrack( track, m_tracks->count() ); } @@ -667,7 +667,7 @@ bool K3bVcdDoc::loadDocumentData( TQDomElement* root ) for ( uint i = 0; i < trackNodes.length(); i++ ) { TQDomElement trackElem = trackNodes.item( i ).toElement(); TQString name = trackElem.tagName(); - if ( name.tqcontains( "pbc" ) ) { + if ( name.contains( "pbc" ) ) { if ( trackElem.hasAttribute ( "type" ) ) { type = trackElem.attribute ( "type" ).toInt(); if ( trackElem.hasAttribute ( "pbctrack" ) ) { @@ -688,7 +688,7 @@ bool K3bVcdDoc::loadDocumentData( TQDomElement* root ) } } } - } else if ( name.tqcontains( "numkeys" ) ) { + } else if ( name.contains( "numkeys" ) ) { if ( trackElem.hasAttribute ( "key" ) ) { int key = trackElem.attribute ( "key" ).toInt(); if ( trackElem.hasAttribute ( "val" ) ) { diff --git a/libk3b/projects/videocd/k3bvcdjob.cpp b/libk3b/projects/videocd/k3bvcdjob.cpp index 156c79a..bdeebec 100644 --- a/libk3b/projects/videocd/k3bvcdjob.cpp +++ b/libk3b/projects/videocd/k3bvcdjob.cpp @@ -133,7 +133,7 @@ void K3bVcdJob::start() emit burning( false ); m_canceled = false; - int pos = TQString( m_doc->vcdImage() ).tqfind( ".bin", TQString( m_doc->vcdImage() ).length() - 4 ); + int pos = TQString( m_doc->vcdImage() ).find( ".bin", TQString( m_doc->vcdImage() ).length() - 4 ); if ( pos > 0 ) { m_cueFile = m_doc->vcdImage().left( pos ) + ".cue"; } else { @@ -184,7 +184,7 @@ void K3bVcdJob::vcdxBuild() const K3bExternalBin* bin = k3bcore ->externalBinManager() ->binObject( "vcdxbuild" ); if ( !bin ) { kdDebug() << "(K3bVcdJob) could not find vcdxbuild executable" << endl; - emit infoMessage( i18n( "Could not tqfind %1 executable." ).tqarg( "vcdxbuild" ), K3bJob::ERROR ); + emit infoMessage( i18n( "Could not find %1 executable." ).tqarg( "vcdxbuild" ), K3bJob::ERROR ); emit infoMessage( i18n( "To create VideoCDs you must install VcdImager Version %1." ).tqarg( ">= 0.7.12" ), K3bJob::INFO ); emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO ); cancelAll(); @@ -287,7 +287,7 @@ void K3bVcdJob::slotParseVcdxBuildOutput( KProcess*, char* output, int len ) if ( oper == "scan" ) { // Scan Video Files if ( m_stage == stageUnknown || pos < m_bytesFinished ) { - const uint index = el.attribute( "id" ).tqreplace( TQRegExp( "sequence-" ), "" ).toUInt(); + const uint index = el.attribute( "id" ).replace( TQRegExp( "sequence-" ), "" ).toUInt(); m_currentWrittenTrack = m_doc->at( m_currentWrittenTrackNumber ); emit newSubTask( i18n( "Scanning video file %1 of %2 (%3)" ).tqarg( index + 1 ).tqarg( doc() ->numOfTracks() ).tqarg( m_currentWrittenTrack->fileName() ) ); @@ -509,28 +509,28 @@ void K3bVcdJob::slotWriterJobFinished( bool success ) void K3bVcdJob::parseInformation( const TQString &text ) { // parse warning - if ( text.tqcontains( "mpeg user scan data: one or more BCD fields out of range for" ) ) { - int index = text.tqfind( " for" ); + if ( text.contains( "mpeg user scan data: one or more BCD fields out of range for" ) ) { + int index = text.find( " for" ); emit infoMessage( i18n( "One or more BCD fields out of range for %1" ).tqarg( text.mid( index + 4 ).stripWhiteSpace() ), K3bJob::WARNING ); - } else if ( text.tqcontains( "mpeg user scan data: from now on, scan information data errors will not be reported anymore" ) ) { + } else if ( text.contains( "mpeg user scan data: from now on, scan information data errors will not be reported anymore" ) ) { emit infoMessage( i18n( "From now on, scan information data errors will not be reported anymore" ), K3bJob::INFO ); emit infoMessage( i18n( "Consider enabling the 'update scan offsets' option, if it is not enabled already." ), K3bJob::INFO ); - } else if ( text.tqcontains( "APS' pts seems out of order (actual pts" ) ) { - int index = text.tqfind( "(actual pts" ); - int index2 = text.tqfind( ", last seen pts" ); - int index3 = text.tqfind( ") -- ignoring this aps" ); + } else if ( text.contains( "APS' pts seems out of order (actual pts" ) ) { + int index = text.find( "(actual pts" ); + int index2 = text.find( ", last seen pts" ); + int index3 = text.find( ") -- ignoring this aps" ); emit infoMessage( i18n( "APS' pts seems out of order (actual pts %1, last seen pts %2)" ).tqarg( text.mid( index + 12, index2 - index - 12 ).stripWhiteSpace() ).tqarg( text.mid( index2 + 14, index3 - index2 - 14 ).stripWhiteSpace() ), K3bJob::WARNING ); emit infoMessage( i18n( "Ignoring this aps" ), K3bJob::INFO ); - } else if ( text.tqcontains( "bad packet at packet" ) ) { - int index = text.tqfind( "at packet #" ); - int index2 = text.tqfind( "(stream byte offset" ); - int index3 = text.tqfind( ") -- remaining " ); - int index4 = text.tqfind( "bytes of stream will be ignored" ); + } else if ( text.contains( "bad packet at packet" ) ) { + int index = text.find( "at packet #" ); + int index2 = text.find( "(stream byte offset" ); + int index3 = text.find( ") -- remaining " ); + int index4 = text.find( "bytes of stream will be ignored" ); emit infoMessage( i18n( "Bad packet at packet #%1 (stream byte offset %2)" ).tqarg( text.mid( index + 11, index2 - index - 11 ).stripWhiteSpace() ).tqarg( text.mid( index2 + 19, index3 - index2 - 19 ).stripWhiteSpace() ), K3bJob::WARNING ); emit infoMessage( i18n( "Remaining %1 bytes of stream will be ignored." ).tqarg( text.mid( index3 + 15, index4 - index3 - 15 ).stripWhiteSpace() ), K3bJob::WARNING ); diff --git a/libk3b/projects/videocd/k3bvcdtrack.cpp b/libk3b/projects/videocd/k3bvcdtrack.cpp index 68d04fd..e3939cc 100644 --- a/libk3b/projects/videocd/k3bvcdtrack.cpp +++ b/libk3b/projects/videocd/k3bvcdtrack.cpp @@ -65,7 +65,7 @@ KIO::filesize_t K3bVcdTrack::size() const int K3bVcdTrack::index() const { - int i = m_parent->tqfind( this ); + int i = m_parent->find( this ); if ( i < 0 ) kdDebug() << "(K3bVcdTrack) I'm not part of my tqparent!" << endl; return i; @@ -119,23 +119,23 @@ void K3bVcdTrack::delRefFromUs() void K3bVcdTrack::setPbcTrack( int which, K3bVcdTrack* pbctrack ) { kdDebug() << "K3bVcdTrack::setPbcTrack " << which << ", " << pbctrack << endl; - m_pbctrackmap.tqreplace( which, pbctrack ); + m_pbctrackmap.replace( which, pbctrack ); } void K3bVcdTrack::setPbcNonTrack( int which, int type ) { kdDebug() << "K3bVcdTrack::setNonPbcTrack " << which << ", " << type << endl; - m_pbcnontrackmap.tqreplace( which, type ); + m_pbcnontrackmap.replace( which, type ); } void K3bVcdTrack::setUserDefined( int which, bool ud ) { - m_pbcusrdefmap.tqreplace( which, ud ); + m_pbcusrdefmap.replace( which, ud ); } K3bVcdTrack* K3bVcdTrack::getPbcTrack( const int& which ) { - if ( m_pbctrackmap.tqfind( which ) == m_pbctrackmap.end() ) + if ( m_pbctrackmap.find( which ) == m_pbctrackmap.end() ) return 0; else return m_pbctrackmap[ which ]; @@ -143,7 +143,7 @@ K3bVcdTrack* K3bVcdTrack::getPbcTrack( const int& which ) int K3bVcdTrack::getNonPbcTrack( const int& which ) { - if ( m_pbcnontrackmap.tqfind( which ) == m_pbcnontrackmap.end() ) + if ( m_pbcnontrackmap.find( which ) == m_pbcnontrackmap.end() ) return 0; else return m_pbcnontrackmap[ which ]; diff --git a/libk3b/projects/videodvd/k3bvideodvdimager.cpp b/libk3b/projects/videodvd/k3bvideodvdimager.cpp index ab7c17a..7ac82ee 100644 --- a/libk3b/projects/videodvd/k3bvideodvdimager.cpp +++ b/libk3b/projects/videodvd/k3bvideodvdimager.cpp @@ -210,7 +210,7 @@ void K3bVideoDvdImager::cleanup() void K3bVideoDvdImager::slotReceivedStderr( const TQString& line ) { - if( line.tqcontains( "Unable to make a DVD-Video image" ) ) { + if( line.contains( "Unable to make a DVD-Video image" ) ) { emit infoMessage( i18n("The project does not contain all necessary VideoDVD files."), WARNING ); emit infoMessage( i18n("The resulting DVD will most likely not be playable on a Hifi DVD player."), WARNING ); } |