diff options
Diffstat (limited to 'libk3b/projects/datacd')
25 files changed, 643 insertions, 638 deletions
diff --git a/libk3b/projects/datacd/k3bbootitem.cpp b/libk3b/projects/datacd/k3bbootitem.cpp index e94830e..f5a8725 100644 --- a/libk3b/projects/datacd/k3bbootitem.cpp +++ b/libk3b/projects/datacd/k3bbootitem.cpp @@ -19,10 +19,10 @@ #include <klocale.h> -#include <qptrlist.h> +#include <tqptrlist.h> -K3bBootItem::K3bBootItem( const QString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const QString& k3bName ) +K3bBootItem::K3bBootItem( const TQString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const TQString& k3bName ) : K3bFileItem( fileName, doc, dir, k3bName, FILE|BOOT_IMAGE ), m_noBoot(false), m_bootInfoTable(false), diff --git a/libk3b/projects/datacd/k3bbootitem.h b/libk3b/projects/datacd/k3bbootitem.h index 9dd8704..78478ea 100644 --- a/libk3b/projects/datacd/k3bbootitem.h +++ b/libk3b/projects/datacd/k3bbootitem.h @@ -21,7 +21,7 @@ class K3bBootItem : public K3bFileItem { public: - K3bBootItem( const QString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const QString& k3bName = 0 ); + K3bBootItem( const TQString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const TQString& k3bName = 0 ); K3bBootItem( const K3bBootItem& ); ~K3bBootItem(); @@ -39,7 +39,7 @@ class K3bBootItem : public K3bFileItem void setLoadSize( int s ) { m_loadSize = s; } void setImageType( int t ) { m_imageType = t; } - void setTempPath( const QString& p ) { m_tempPath = p; } + void setTempPath( const TQString& p ) { m_tempPath = p; } bool noBoot() const { return m_noBoot; } bool bootInfoTable() const { return m_bootInfoTable; } @@ -51,7 +51,7 @@ class K3bBootItem : public K3bFileItem * mkisofs changes boot images on disk. That is why the iso imager * buffers them and saves the path to the buffered copy here. */ - const QString& tempPath() const { return m_tempPath; } + const TQString& tempPath() const { return m_tempPath; } private: bool m_noBoot; @@ -60,7 +60,7 @@ class K3bBootItem : public K3bFileItem int m_loadSize; int m_imageType; - QString m_tempPath; + TQString m_tempPath; }; #endif diff --git a/libk3b/projects/datacd/k3bdatadoc.cpp b/libk3b/projects/datacd/k3bdatadoc.cpp index d12c8d2..44b6214 100644 --- a/libk3b/projects/datacd/k3bdatadoc.cpp +++ b/libk3b/projects/datacd/k3bdatadoc.cpp @@ -34,14 +34,14 @@ #include <k3bmultichoicedialog.h> #include <k3bvalidators.h> -#include <qdir.h> -#include <qstring.h> -#include <qfileinfo.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qtimer.h> -#include <qdom.h> -#include <qptrlist.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqfileinfo.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqtimer.h> +#include <tqdom.h> +#include <tqptrlist.h> #include <kstandarddirs.h> #include <kurl.h> @@ -67,8 +67,8 @@ * \li or create your own K3bDirItems and K3bFileItems. The doc will be properly updated * by the constructors of the items. */ -K3bDataDoc::K3bDataDoc( QObject* parent ) - : K3bDoc( parent ) +K3bDataDoc::K3bDataDoc( TQObject* tqparent ) + : K3bDoc( tqparent ) { m_root = 0; @@ -92,8 +92,8 @@ bool K3bDataDoc::newDocument() m_bExistingItemsReplaceAll = m_bExistingItemsIgnoreAll = false; if( m_root ) { - while( m_root->children().getFirst() ) - removeItem( m_root->children().getFirst() ); + while( m_root->tqchildren().getFirst() ) + removeItem( m_root->tqchildren().getFirst() ); } else m_root = new K3bRootItem( this ); @@ -109,7 +109,7 @@ bool K3bDataDoc::newDocument() } -QString K3bDataDoc::name() const +TQString K3bDataDoc::name() const { return m_isoOptions.volumeID(); } @@ -122,7 +122,7 @@ void K3bDataDoc::setIsoOptions( const K3bIsoOptions& o ) } -void K3bDataDoc::setVolumeID( const QString& v ) +void K3bDataDoc::setVolumeID( const TQString& v ) { m_isoOptions.setVolumeID( v ); emit changed(); @@ -144,8 +144,8 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir ) for( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it ) { const KURL& url = *it; - QFileInfo f( url.path() ); - QString k3bname = f.absFilePath().section( "/", -1 ); + TQFileInfo f( url.path() ); + TQString k3bname = f.absFilePath().section( "/", -1 ); // filenames cannot end in backslashes (mkisofs problem. See comments in k3bisoimager.cpp (escapeGraftPoint())) while( k3bname[k3bname.length()-1] == '\\' ) @@ -162,10 +162,10 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir ) bool ok = false; while( !ok ) { ok = true; - QString name( k3bname ); + TQString name( k3bname ); if( cnt > 0 ) - name += QString("_%1").arg(cnt); - if( K3bDataItem* oldItem = dir->find( name ) ) { + name += TQString("_%1").tqarg(cnt); + if( K3bDataItem* oldItem = dir->tqfind( name ) ) { if( f.isDir() && oldItem->isDir() ) { // ok, just reuse the dir newDirItem = static_cast<K3bDirItem*>(oldItem); @@ -182,9 +182,9 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir ) } } if( cnt > 0 ) - k3bname += QString("_%1").arg(cnt); + k3bname += TQString("_%1").tqarg(cnt); - // QFileInfo::exists and QFileInfo::isReadable return false for broken symlinks :( + // TQFileInfo::exists and TQFileInfo::isReadable return false for broken symlinks :( if( f.isDir() && !f.isSymLink() ) { if( !newDirItem ) { newDirItem = new K3bDirItem( k3bname, this, dir ); @@ -192,11 +192,11 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir ) } // recursively add all the files in the directory - QStringList dlist = QDir( f.absFilePath() ).entryList( QDir::All|QDir::System|QDir::Hidden ); + TQStringList dlist = TQDir( f.absFilePath() ).entryList( TQDir::All|TQDir::System|TQDir::Hidden ); dlist.remove("."); dlist.remove(".."); KURL::List newUrls; - for( QStringList::Iterator it = dlist.begin(); it != dlist.end(); ++it ) + for( TQStringList::Iterator it = dlist.begin(); it != dlist.end(); ++it ) newUrls.append( KURL::fromPathOrURL( f.absFilePath() + "/" + *it ) ); addUrls( newUrls, newDirItem ); } @@ -210,18 +210,18 @@ void K3bDataDoc::addUrls( const KURL::List& l, K3bDirItem* dir ) } -bool K3bDataDoc::nameAlreadyInDir( const QString& name, K3bDirItem* dir ) +bool K3bDataDoc::nameAlreadyInDir( const TQString& name, K3bDirItem* dir ) { if( !dir ) return false; else - return ( dir->find( name ) != 0 ); + return ( dir->tqfind( name ) != 0 ); } -K3bDirItem* K3bDataDoc::addEmptyDir( const QString& name, K3bDirItem* parent ) +K3bDirItem* K3bDataDoc::addEmptyDir( const TQString& name, K3bDirItem* tqparent ) { - K3bDirItem* item = new K3bDirItem( name, this, parent ); + K3bDirItem* item = new K3bDirItem( name, this, tqparent ); setModified( true ); @@ -261,21 +261,21 @@ K3b::Msf K3bDataDoc::burningLength() const } -QString K3bDataDoc::typeString() const +TQString K3bDataDoc::typeString() const { - return QString::fromLatin1("data"); + return TQString::tqfromLatin1("data"); } -bool K3bDataDoc::loadDocumentData( QDomElement* rootElem ) +bool K3bDataDoc::loadDocumentData( TQDomElement* rootElem ) { if( !root() ) newDocument(); - QDomNodeList nodes = rootElem->childNodes(); + TQDomNodeList nodes = rootElem->childNodes(); if( nodes.item(0).nodeName() != "general" ) { - kdDebug() << "(K3bDataDoc) could not find 'general' section." << endl; + kdDebug() << "(K3bDataDoc) could not tqfind 'general' section." << endl; return false; } if( !readGeneralDocumentData( nodes.item(0).toElement() ) ) @@ -285,7 +285,7 @@ bool K3bDataDoc::loadDocumentData( QDomElement* rootElem ) // parse options // ----------------------------------------------------------------- if( nodes.item(1).nodeName() != "options" ) { - kdDebug() << "(K3bDataDoc) could not find 'options' section." << endl; + kdDebug() << "(K3bDataDoc) could not tqfind 'options' section." << endl; return false; } if( !loadDocumentDataOptions( nodes.item(1).toElement() ) ) @@ -297,7 +297,7 @@ bool K3bDataDoc::loadDocumentData( QDomElement* rootElem ) // parse header // ----------------------------------------------------------------- if( nodes.item(2).nodeName() != "header" ) { - kdDebug() << "(K3bDataDoc) could not find 'header' section." << endl; + kdDebug() << "(K3bDataDoc) could not tqfind 'header' section." << endl; return false; } if( !loadDocumentDataHeader( nodes.item(2).toElement() ) ) @@ -309,17 +309,17 @@ bool K3bDataDoc::loadDocumentData( QDomElement* rootElem ) // parse files // ----------------------------------------------------------------- if( nodes.item(3).nodeName() != "files" ) { - kdDebug() << "(K3bDataDoc) could not find 'files' section." << endl; + kdDebug() << "(K3bDataDoc) could not tqfind 'files' section." << endl; return false; } if( m_root == 0 ) m_root = new K3bRootItem( this ); - QDomNodeList filesList = nodes.item(3).childNodes(); + TQDomNodeList filesList = nodes.item(3).childNodes(); for( uint i = 0; i < filesList.count(); i++ ) { - QDomElement e = filesList.item(i).toElement(); + TQDomElement e = filesList.item(i).toElement(); if( !loadDataItem( e, root() ) ) return false; } @@ -332,7 +332,7 @@ bool K3bDataDoc::loadDocumentData( QDomElement* rootElem ) // file we create a default one here. // if( !m_bootImages.isEmpty() && !m_bootCataloge ) - createBootCatalogeItem( m_bootImages.first()->parent() ); + createBootCatalogeItem( m_bootImages.first()->tqparent() ); informAboutNotFoundFiles(); @@ -341,12 +341,12 @@ bool K3bDataDoc::loadDocumentData( QDomElement* rootElem ) } -bool K3bDataDoc::loadDocumentDataOptions( QDomElement elem ) +bool K3bDataDoc::loadDocumentDataOptions( TQDomElement elem ) { - QDomNodeList headerList = elem.childNodes(); + TQDomNodeList headerList = elem.childNodes(); for( uint i = 0; i < headerList.count(); i++ ) { - QDomElement e = headerList.item(i).toElement(); + TQDomElement e = headerList.item(i).toElement(); if( e.isNull() ) return false; @@ -428,7 +428,7 @@ bool K3bDataDoc::loadDocumentDataOptions( QDomElement elem ) else if( e.text() == "extended" ) m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::extended ); else if( e.text() == "extended" ) - m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::replace ); + m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::tqreplace ); else m_isoOptions.setWhiteSpaceTreatment( K3bIsoOptions::noChange ); } @@ -446,7 +446,7 @@ bool K3bDataDoc::loadDocumentDataOptions( QDomElement elem ) } else if( e.nodeName() == "multisession" ) { - QString mode = e.text(); + TQString mode = e.text(); if( mode == "start" ) setMultiSessionMode( START ); else if( mode == "continue" ) @@ -470,12 +470,12 @@ bool K3bDataDoc::loadDocumentDataOptions( QDomElement elem ) } -bool K3bDataDoc::loadDocumentDataHeader( QDomElement headerElem ) +bool K3bDataDoc::loadDocumentDataHeader( TQDomElement headerElem ) { - QDomNodeList headerList = headerElem.childNodes(); + TQDomNodeList headerList = headerElem.childNodes(); for( uint i = 0; i < headerList.count(); i++ ) { - QDomElement e = headerList.item(i).toElement(); + TQDomElement e = headerList.item(i).toElement(); if( e.isNull() ) return false; @@ -511,31 +511,31 @@ bool K3bDataDoc::loadDocumentDataHeader( QDomElement headerElem ) } -bool K3bDataDoc::loadDataItem( QDomElement& elem, K3bDirItem* parent ) +bool K3bDataDoc::loadDataItem( TQDomElement& elem, K3bDirItem* tqparent ) { K3bDataItem* newItem = 0; if( elem.nodeName() == "file" ) { - QDomElement urlElem = elem.firstChild().toElement(); + TQDomElement urlElem = elem.firstChild().toElement(); if( urlElem.isNull() ) { kdDebug() << "(K3bDataDoc) file-element without url!" << endl; return false; } - QFileInfo f( urlElem.text() ); + TQFileInfo f( urlElem.text() ); // We canot use exists() here since this always disqualifies broken symlinks if( !f.isFile() && !f.isSymLink() ) m_notFoundFiles.append( urlElem.text() ); - // broken symlinks are not readable according to QFileInfo which is wrong in our case + // broken symlinks are not readable according to TQFileInfo which is wrong in our case else if( f.isFile() && !f.isReadable() ) m_noPermissionFiles.append( urlElem.text() ); else if( !elem.attribute( "bootimage" ).isEmpty() ) { K3bBootItem* bootItem = new K3bBootItem( urlElem.text(), this, - parent, + tqparent, elem.attributeNode( "name" ).value() ); if( elem.attribute( "bootimage" ) == "floppy" ) bootItem->setImageType( K3bBootItem::FLOPPY ); @@ -554,18 +554,18 @@ bool K3bDataDoc::loadDataItem( QDomElement& elem, K3bDirItem* parent ) else { newItem = new K3bFileItem( urlElem.text(), this, - parent, + tqparent, elem.attributeNode( "name" ).value() ); } } else if( elem.nodeName() == "special" ) { if( elem.attributeNode( "type" ).value() == "boot cataloge" ) - createBootCatalogeItem( parent )->setK3bName( elem.attributeNode( "name" ).value() ); + createBootCatalogeItem( tqparent )->setK3bName( elem.attributeNode( "name" ).value() ); } else if( elem.nodeName() == "directory" ) { // This is for the VideoDVD project which already contains the *_TS folders K3bDirItem* newDirItem = 0; - if( K3bDataItem* item = parent->find( elem.attributeNode( "name" ).value() ) ) { + if( K3bDataItem* item = tqparent->tqfind( elem.attributeNode( "name" ).value() ) ) { if( item->isDir() ) { newDirItem = static_cast<K3bDirItem*>(item); } @@ -576,11 +576,11 @@ bool K3bDataDoc::loadDataItem( QDomElement& elem, K3bDirItem* parent ) } if( !newDirItem ) - newDirItem = new K3bDirItem( elem.attributeNode( "name" ).value(), this, parent ); - QDomNodeList childNodes = elem.childNodes(); + newDirItem = new K3bDirItem( elem.attributeNode( "name" ).value(), this, tqparent ); + TQDomNodeList childNodes = elem.childNodes(); for( uint i = 0; i < childNodes.count(); i++ ) { - QDomElement e = childNodes.item(i).toElement(); + TQDomElement e = childNodes.item(i).toElement(); if( !loadDataItem( e, newDirItem ) ) return false; } @@ -600,31 +600,31 @@ bool K3bDataDoc::loadDataItem( QDomElement& elem, K3bDirItem* parent ) } -bool K3bDataDoc::saveDocumentData( QDomElement* docElem ) +bool K3bDataDoc::saveDocumentData( TQDomElement* docElem ) { - QDomDocument doc = docElem->ownerDocument(); + TQDomDocument doc = docElem->ownerDocument(); saveGeneralDocumentData( docElem ); // all options // ---------------------------------------------------------------------- - QDomElement optionsElem = doc.createElement( "options" ); + TQDomElement optionsElem = doc.createElement( "options" ); saveDocumentDataOptions( optionsElem ); docElem->appendChild( optionsElem ); // ---------------------------------------------------------------------- // the header stuff // ---------------------------------------------------------------------- - QDomElement headerElem = doc.createElement( "header" ); + TQDomElement headerElem = doc.createElement( "header" ); saveDocumentDataHeader( headerElem ); docElem->appendChild( headerElem ); // now do the "real" work: save the entries // ---------------------------------------------------------------------- - QDomElement topElem = doc.createElement( "files" ); + TQDomElement topElem = doc.createElement( "files" ); - QPtrListIterator<K3bDataItem> it( root()->children() ); + TQPtrListIterator<K3bDataItem> it( root()->tqchildren() ); for( ; it.current(); ++it ) { saveDataItem( it.current(), &doc, &topElem ); } @@ -636,11 +636,11 @@ bool K3bDataDoc::saveDocumentData( QDomElement* docElem ) } -void K3bDataDoc::saveDocumentDataOptions( QDomElement& optionsElem ) +void K3bDataDoc::saveDocumentDataOptions( TQDomElement& optionsElem ) { - QDomDocument doc = optionsElem.ownerDocument(); + TQDomDocument doc = optionsElem.ownerDocument(); - QDomElement topElem = doc.createElement( "rock_ridge" ); + TQDomElement topElem = doc.createElement( "rock_ridge" ); topElem.setAttribute( "activated", isoOptions().createRockRidge() ? "yes" : "no" ); optionsElem.appendChild( topElem ); @@ -709,7 +709,7 @@ void K3bDataDoc::saveDocumentDataOptions( QDomElement& optionsElem ) optionsElem.appendChild( topElem ); topElem = doc.createElement( "iso_level" ); - topElem.appendChild( doc.createTextNode( QString::number(isoOptions().ISOLevel()) ) ); + topElem.appendChild( doc.createTextNode( TQString::number(isoOptions().ISOLevel()) ) ); optionsElem.appendChild( topElem ); topElem = doc.createElement( "discard_symlinks" ); @@ -745,8 +745,8 @@ void K3bDataDoc::saveDocumentDataOptions( QDomElement& optionsElem ) case K3bIsoOptions::extended: topElem.appendChild( doc.createTextNode( "extended" ) ); break; - case K3bIsoOptions::replace: - topElem.appendChild( doc.createTextNode( "replace" ) ); + case K3bIsoOptions::tqreplace: + topElem.appendChild( doc.createTextNode( "tqreplace" ) ); break; default: topElem.appendChild( doc.createTextNode( "noChange" ) ); @@ -796,11 +796,11 @@ void K3bDataDoc::saveDocumentDataOptions( QDomElement& optionsElem ) } -void K3bDataDoc::saveDocumentDataHeader( QDomElement& headerElem ) +void K3bDataDoc::saveDocumentDataHeader( TQDomElement& headerElem ) { - QDomDocument doc = headerElem.ownerDocument(); + TQDomDocument doc = headerElem.ownerDocument(); - QDomElement topElem = doc.createElement( "volume_id" ); + TQDomElement topElem = doc.createElement( "volume_id" ); topElem.appendChild( doc.createTextNode( isoOptions().volumeID() ) ); headerElem.appendChild( topElem ); @@ -809,11 +809,11 @@ void K3bDataDoc::saveDocumentDataHeader( QDomElement& headerElem ) headerElem.appendChild( topElem ); topElem = doc.createElement( "volume_set_size" ); - topElem.appendChild( doc.createTextNode( QString::number(isoOptions().volumeSetSize()) ) ); + topElem.appendChild( doc.createTextNode( TQString::number(isoOptions().volumeSetSize()) ) ); headerElem.appendChild( topElem ); topElem = doc.createElement( "volume_set_number" ); - topElem.appendChild( doc.createTextNode( QString::number(isoOptions().volumeSetNumber()) ) ); + topElem.appendChild( doc.createTextNode( TQString::number(isoOptions().volumeSetNumber()) ) ); headerElem.appendChild( topElem ); topElem = doc.createElement( "system_id" ); @@ -835,23 +835,23 @@ void K3bDataDoc::saveDocumentDataHeader( QDomElement& headerElem ) } -void K3bDataDoc::saveDataItem( K3bDataItem* item, QDomDocument* doc, QDomElement* parent ) +void K3bDataDoc::saveDataItem( K3bDataItem* item, TQDomDocument* doc, TQDomElement* tqparent ) { if( K3bFileItem* fileItem = dynamic_cast<K3bFileItem*>( item ) ) { - if( m_oldSession.contains( fileItem ) ) { + if( m_oldSession.tqcontains( fileItem ) ) { kdDebug() << "(K3bDataDoc) ignoring fileitem " << fileItem->k3bName() << " from old session while saving..." << endl; } else { - QDomElement topElem = doc->createElement( "file" ); + TQDomElement topElem = doc->createElement( "file" ); topElem.setAttribute( "name", fileItem->k3bName() ); - QDomElement subElem = doc->createElement( "url" ); + TQDomElement subElem = doc->createElement( "url" ); subElem.appendChild( doc->createTextNode( fileItem->localPath() ) ); topElem.appendChild( subElem ); if( item->sortWeight() != 0 ) - topElem.setAttribute( "sort_weight", QString::number(item->sortWeight()) ); + topElem.setAttribute( "sort_weight", TQString::number(item->sortWeight()) ); - parent->appendChild( topElem ); + tqparent->appendChild( topElem ); // add boot options as attributes to preserve compatibility to older K3b versions if( K3bBootItem* bootItem = dynamic_cast<K3bBootItem*>( fileItem ) ) { @@ -864,31 +864,31 @@ void K3bDataDoc::saveDataItem( K3bDataItem* item, QDomDocument* doc, QDomElement topElem.setAttribute( "no_boot", bootItem->noBoot() ? "yes" : "no" ); topElem.setAttribute( "boot_info_table", bootItem->bootInfoTable() ? "yes" : "no" ); - topElem.setAttribute( "load_segment", QString::number( bootItem->loadSegment() ) ); - topElem.setAttribute( "load_size", QString::number( bootItem->loadSize() ) ); + topElem.setAttribute( "load_segment", TQString::number( bootItem->loadSegment() ) ); + topElem.setAttribute( "load_size", TQString::number( bootItem->loadSize() ) ); } } } else if( item == m_bootCataloge ) { - QDomElement topElem = doc->createElement( "special" ); + TQDomElement topElem = doc->createElement( "special" ); topElem.setAttribute( "name", m_bootCataloge->k3bName() ); topElem.setAttribute( "type", "boot cataloge" ); - parent->appendChild( topElem ); + tqparent->appendChild( topElem ); } else if( K3bDirItem* dirItem = dynamic_cast<K3bDirItem*>( item ) ) { - QDomElement topElem = doc->createElement( "directory" ); + TQDomElement topElem = doc->createElement( "directory" ); topElem.setAttribute( "name", dirItem->k3bName() ); if( item->sortWeight() != 0 ) - topElem.setAttribute( "sort_weight", QString::number(item->sortWeight()) ); + topElem.setAttribute( "sort_weight", TQString::number(item->sortWeight()) ); - QPtrListIterator<K3bDataItem> it( dirItem->children() ); + TQPtrListIterator<K3bDataItem> it( dirItem->tqchildren() ); for( ; it.current(); ++it ) { saveDataItem( it.current(), doc, &topElem ); } - parent->appendChild( topElem ); + tqparent->appendChild( topElem ); } } @@ -944,7 +944,7 @@ void K3bDataDoc::itemAddedToDir( K3bDirItem*, K3bDataItem* item ) void K3bDataDoc::moveItem( K3bDataItem* item, K3bDirItem* newParent ) { if( !item || !newParent ) { - kdDebug() << "(K3bDataDoc) item or parentitem was NULL while moving." << endl; + kdDebug() << "(K3bDataDoc) item or tqparentitem was NULL while moving." << endl; return; } @@ -957,14 +957,14 @@ void K3bDataDoc::moveItem( K3bDataItem* item, K3bDirItem* newParent ) } -void K3bDataDoc::moveItems( QPtrList<K3bDataItem> itemList, K3bDirItem* newParent ) +void K3bDataDoc::moveItems( TQPtrList<K3bDataItem> itemList, K3bDirItem* newParent ) { if( !newParent ) { kdDebug() << "(K3bDataDoc) tried to move items to nowhere...!" << endl; return; } - QPtrListIterator<K3bDataItem> it( itemList ); + TQPtrListIterator<K3bDataItem> it( itemList ); for( ; it.current(); ++it ) { // check if newParent is subdir of item if( K3bDirItem* dirItem = dynamic_cast<K3bDirItem*>( it.current() ) ) { @@ -979,13 +979,13 @@ void K3bDataDoc::moveItems( QPtrList<K3bDataItem> itemList, K3bDirItem* newParen } -K3bBurnJob* K3bDataDoc::newBurnJob( K3bJobHandler* hdl, QObject* parent ) +K3bBurnJob* K3bDataDoc::newBurnJob( K3bJobHandler* hdl, TQObject* tqparent ) { - return new K3bDataJob( this, hdl, parent ); + return new K3bDataJob( this, hdl, tqparent ); } -QString K3bDataDoc::treatWhitespace( const QString& path ) +TQString K3bDataDoc::treatWhitespace( const TQString& path ) { // TODO: @@ -996,10 +996,10 @@ QString K3bDataDoc::treatWhitespace( const QString& path ) if( isoOptions().whiteSpaceTreatment() != K3bIsoOptions::noChange ) { - QString result = path; + TQString result = path; - if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::replace ) { - result.replace( ' ', isoOptions().whiteSpaceTreatmentReplaceString() ); + if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::tqreplace ) { + result.tqreplace( ' ', isoOptions().whiteSpaceTreatmentReplaceString() ); } else if( isoOptions().whiteSpaceTreatment() == K3bIsoOptions::strip ) { result.remove( ' ' ); @@ -1064,8 +1064,8 @@ void K3bDataDoc::prepareFilenamesInDir( K3bDirItem* dir ) if( !dir ) return; - QPtrList<K3bDataItem> sortedChildren; - QPtrListIterator<K3bDataItem> it( dir->children() ); + TQPtrList<K3bDataItem> sortedChildren; + TQPtrListIterator<K3bDataItem> it( dir->tqchildren() ); for( it.toLast(); it.current(); --it ) { K3bDataItem* item = it.current(); @@ -1083,7 +1083,7 @@ void K3bDataDoc::prepareFilenamesInDir( K3bDirItem* dir ) if( isoOptions().createJoliet() || isoOptions().createRockRidge() ) { - QPtrList<K3bDataItem> sameNameList; + TQPtrList<K3bDataItem> sameNameList; while( !sortedChildren.isEmpty() ) { sameNameList.clear(); @@ -1105,7 +1105,7 @@ void K3bDataDoc::prepareFilenamesInDir( K3bDirItem* dir ) } int cnt = 1; - for( QPtrListIterator<K3bDataItem> it( sameNameList ); + for( TQPtrListIterator<K3bDataItem> it( sameNameList ); it.current(); ++it ) { it.current()->setWrittenName( K3b::appendNumberToFilename( it.current()->writtenName(), cnt++, maxlen ) ); } @@ -1118,13 +1118,13 @@ void K3bDataDoc::prepareFilenamesInDir( K3bDirItem* dir ) void K3bDataDoc::informAboutNotFoundFiles() { if( !m_notFoundFiles.isEmpty() ) { - KMessageBox::informationList( qApp->activeWindow(), i18n("Could not find the following files:"), + KMessageBox::informationList( TQT_TQWIDGET(tqApp->activeWindow()), i18n("Could not find the following files:"), m_notFoundFiles, i18n("Not Found") ); m_notFoundFiles.clear(); } if( !m_noPermissionFiles.isEmpty() ) { - KMessageBox::informationList( qApp->activeWindow(), i18n("No permission to read the following files:"), + KMessageBox::informationList( TQT_TQWIDGET(tqApp->activeWindow()), i18n("No permission to read the following files:"), m_noPermissionFiles, i18n("No Read Permission") ); m_noPermissionFiles.clear(); @@ -1188,7 +1188,7 @@ bool K3bDataDoc::importSession( K3bDevice::Device* device ) // TODO: also import some other pd fields const K3bIso9660Directory* rootDir = iso.firstRRDirEntry(); - // Jörg Schilling says that it is impossible to import the joliet tree for multisession + // J�rg Schilling says that it is impossible to import the joliet tree for multisession // if( !rootDir ) // rootDir = iso.firstJolietDirEntry(); if( !rootDir ) @@ -1211,16 +1211,16 @@ bool K3bDataDoc::importSession( K3bDevice::Device* device ) } -void K3bDataDoc::createSessionImportItems( const K3bIso9660Directory* importDir, K3bDirItem* parent ) +void K3bDataDoc::createSessionImportItems( const K3bIso9660Directory* importDir, K3bDirItem* tqparent ) { Q_ASSERT(importDir); - QStringList entries = importDir->entries(); + TQStringList entries = importDir->entries(); entries.remove( "." ); entries.remove( ".." ); - for( QStringList::const_iterator it = entries.begin(); + for( TQStringList::const_iterator it = entries.begin(); it != entries.end(); ++it ) { const K3bIso9660Entry* entry = importDir->entry( *it ); - K3bDataItem* oldItem = parent->find( entry->name() ); + K3bDataItem* oldItem = tqparent->tqfind( entry->name() ); if( entry->isDirectory() ) { K3bDirItem* dir = 0; if( oldItem && oldItem->isDir() ) { @@ -1230,7 +1230,7 @@ void K3bDataDoc::createSessionImportItems( const K3bIso9660Directory* importDir, // we overwrite without warning! if( oldItem ) removeItem( oldItem ); - dir = new K3bDirItem( entry->name(), this, parent ); + dir = new K3bDirItem( entry->name(), this, tqparent ); } dir->setRemoveable(false); @@ -1250,7 +1250,7 @@ void K3bDataDoc::createSessionImportItems( const K3bIso9660Directory* importDir, if( oldItem ) removeItem( oldItem ); - K3bSessionImportItem* item = new K3bSessionImportItem( file, this, parent ); + K3bSessionImportItem* item = new K3bSessionImportItem( file, this, tqparent ); item->setExtraInfo( i18n("From previous session") ); m_oldSession.append( item ); } @@ -1277,8 +1277,8 @@ void K3bDataDoc::clearImportedSession() delete dir; } else { - for( QPtrListIterator<K3bDataItem> it( dir->children() ); it.current(); ++it ) { - if( !m_oldSession.contains(it.current()) ) { + for( TQPtrListIterator<K3bDataItem> it( dir->tqchildren() ); it.current(); ++it ) { + if( !m_oldSession.tqcontains(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->find( "boot" ); + K3bDataItem* b = m_root->tqfind( "boot" ); if( !b ) { b = new K3bDirItem( "boot", this, m_root ); setModified( true ); @@ -1322,7 +1322,7 @@ K3bDirItem* K3bDataDoc::bootImageDir() } -K3bBootItem* K3bDataDoc::createBootItem( const QString& filename, K3bDirItem* dir ) +K3bBootItem* K3bDataDoc::createBootItem( const TQString& filename, K3bDirItem* dir ) { if( !dir ) dir = bootImageDir(); @@ -1339,11 +1339,11 @@ K3bBootItem* K3bDataDoc::createBootItem( const QString& filename, K3bDirItem* di K3bDataItem* K3bDataDoc::createBootCatalogeItem( K3bDirItem* dir ) { if( !m_bootCataloge ) { - QString newName = "boot.catalog"; + TQString newName = "boot.catalog"; int i = 0; while( dir->alreadyInDirectory( "boot.catalog" ) ) { ++i; - newName = QString( "boot%1.catalog" ).arg(i); + newName = TQString( "boot%1.catalog" ).tqarg(i); } K3bSpecialDataItem* b = new K3bSpecialDataItem( this, 0, dir, newName ); @@ -1361,10 +1361,10 @@ K3bDataItem* K3bDataDoc::createBootCatalogeItem( K3bDirItem* dir ) } -QValueList<K3bDataItem*> K3bDataDoc::findItemByLocalPath( const QString& path ) const +TQValueList<K3bDataItem*> K3bDataDoc::findItemByLocalPath( const TQString& path ) const { Q_UNUSED( path ); - return QValueList<K3bDataItem*>(); + return TQValueList<K3bDataItem*>(); } diff --git a/libk3b/projects/datacd/k3bdatadoc.h b/libk3b/projects/datacd/k3bdatadoc.h index e09177a..eccbde9 100644 --- a/libk3b/projects/datacd/k3bdatadoc.h +++ b/libk3b/projects/datacd/k3bdatadoc.h @@ -22,9 +22,9 @@ #include "k3bisooptions.h" -#include <qptrlist.h> -#include <qfileinfo.h> -#include <qstringlist.h> +#include <tqptrlist.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> #include <kurl.h> #include <kio/global.h> @@ -41,11 +41,11 @@ class K3bFileCompilationSizeHandler; class KProgressDialog; //class K3bView; class KConfig; -class QString; -class QStringList; -class QWidget; -class QDomDocument; -class QDomElement; +class TQString; +class TQStringList; +class TQWidget; +class TQDomDocument; +class TQDomElement; class K3bIso9660Directory; namespace K3bDevice { @@ -61,15 +61,16 @@ namespace K3bDevice { class LIBK3B_EXPORT K3bDataDoc : public K3bDoc { Q_OBJECT + TQ_OBJECT public: - K3bDataDoc( QObject* parent = 0 ); + K3bDataDoc( TQObject* tqparent = 0 ); virtual ~K3bDataDoc(); virtual int type() const { return DATA; } - virtual QString typeString() const; + virtual TQString typeString() const; - virtual QString name() const; + virtual TQString name() const; enum MultiSessionMode { /** @@ -108,13 +109,13 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc * Simply calls reparent. */ void moveItem( K3bDataItem* item, K3bDirItem* newParent ); - void moveItems( QPtrList<K3bDataItem> itemList, K3bDirItem* newParent ); + void moveItems( TQPtrList<K3bDataItem> itemList, K3bDirItem* newParent ); - K3bDirItem* addEmptyDir( const QString& name, K3bDirItem* parent ); + K3bDirItem* addEmptyDir( const TQString& name, K3bDirItem* tqparent ); - QString treatWhitespace( const QString& ); + TQString treatWhitespace( const TQString& ); - virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, QObject* parent = 0 ); + virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, TQObject* tqparent = 0 ); MultiSessionMode multiSessionMode() const { return m_multisessionMode; } void setMultiSessionMode( MultiSessionMode mode ); @@ -125,7 +126,7 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc void setVerifyData( bool b ) { m_verifyData = b; } bool verifyData() const { return m_verifyData; } - static bool nameAlreadyInDir( const QString&, K3bDirItem* ); + static bool nameAlreadyInDir( const TQString&, K3bDirItem* ); /** * Most of the options that map to the mkisofs parameters are grouped @@ -135,7 +136,7 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc const K3bIsoOptions& isoOptions() const { return m_isoOptions; } void setIsoOptions( const K3bIsoOptions& ); - const QPtrList<K3bBootItem>& bootImages() { return m_bootImages; } + const TQPtrList<K3bBootItem>& bootImages() { return m_bootImages; } K3bDataItem* bootCataloge() { return m_bootCataloge; } K3bDirItem* bootImageDir(); @@ -150,7 +151,7 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc * \return The new boot item on success or 0 in case a file with the same * name already exists. */ - K3bBootItem* createBootItem( const QString& filename, K3bDirItem* bootDir = 0 ); + K3bBootItem* createBootItem( const TQString& filename, K3bDirItem* bootDir = 0 ); /** * Create a new boot catalog item. @@ -178,7 +179,7 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc */ bool needToCutFilenames() const { return m_needToCutFilenames; } - const QValueList<K3bDataItem*>& needToCutFilenameItems() const { return m_needToCutFilenameItems; } + const TQValueList<K3bDataItem*>& needToCutFilenameItems() const { return m_needToCutFilenameItems; } /** * Imports a session into the project. This will create K3bSessionImportItems @@ -203,7 +204,7 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc * * \return The items that correspond to the specified local path. */ - QValueList<K3bDataItem*> findItemByLocalPath( const QString& path ) const; + TQValueList<K3bDataItem*> findItemByLocalPath( const TQString& path ) const; public slots: virtual void addUrls( const KURL::List& urls ); @@ -221,7 +222,7 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc * Just a convience method to prevent using setIsoOptions for this * often used value. */ - void setVolumeID( const QString& ); + void setVolumeID( const TQString& ); signals: void itemRemoved( K3bDataItem* ); @@ -229,14 +230,14 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc protected: /** reimplemented from K3bDoc */ - virtual bool loadDocumentData( QDomElement* root ); + virtual bool loadDocumentData( TQDomElement* root ); /** reimplemented from K3bDoc */ - virtual bool saveDocumentData( QDomElement* ); + virtual bool saveDocumentData( TQDomElement* ); - void saveDocumentDataOptions( QDomElement& optionsElem ); - void saveDocumentDataHeader( QDomElement& headerElem ); - bool loadDocumentDataOptions( QDomElement optionsElem ); - bool loadDocumentDataHeader( QDomElement optionsElem ); + void saveDocumentDataOptions( TQDomElement& optionsElem ); + void saveDocumentDataHeader( TQDomElement& headerElem ); + bool loadDocumentDataOptions( TQDomElement optionsElem ); + bool loadDocumentDataHeader( TQDomElement optionsElem ); K3bFileCompilationSizeHandler* m_sizeHandler; @@ -245,27 +246,27 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc private: void prepareFilenamesInDir( K3bDirItem* dir ); - void createSessionImportItems( const K3bIso9660Directory*, K3bDirItem* parent ); + void createSessionImportItems( const K3bIso9660Directory*, K3bDirItem* tqparent ); /** * used by K3bDirItem to inform about removed items. */ - void itemRemovedFromDir( K3bDirItem* parent, K3bDataItem* removedItem ); - void itemAddedToDir( K3bDirItem* parent, K3bDataItem* addedItem ); + void itemRemovedFromDir( K3bDirItem* tqparent, K3bDataItem* removedItem ); + void itemAddedToDir( K3bDirItem* tqparent, K3bDataItem* addedItem ); /** * load recursivly */ - bool loadDataItem( QDomElement& e, K3bDirItem* parent ); + bool loadDataItem( TQDomElement& e, K3bDirItem* tqparent ); /** * save recursivly */ - void saveDataItem( K3bDataItem* item, QDomDocument* doc, QDomElement* parent ); + void saveDataItem( K3bDataItem* item, TQDomDocument* doc, TQDomElement* tqparent ); void informAboutNotFoundFiles(); - QStringList m_notFoundFiles; - QStringList m_noPermissionFiles; + TQStringList m_notFoundFiles; + TQStringList m_noPermissionFiles; K3bRootItem* m_root; @@ -278,17 +279,17 @@ class LIBK3B_EXPORT K3bDataDoc : public K3bDoc K3bIsoOptions m_isoOptions; MultiSessionMode m_multisessionMode; - QPtrList<K3bDataItem> m_oldSession; + TQPtrList<K3bDataItem> m_oldSession; // boot cd stuff K3bDataItem* m_bootCataloge; - QPtrList<K3bBootItem> m_bootImages; + TQPtrList<K3bBootItem> m_bootImages; bool m_bExistingItemsReplaceAll; bool m_bExistingItemsIgnoreAll; bool m_needToCutFilenames; - QValueList<K3bDataItem*> m_needToCutFilenameItems; + TQValueList<K3bDataItem*> m_needToCutFilenameItems; friend class K3bMixedDoc; friend class K3bDirItem; diff --git a/libk3b/projects/datacd/k3bdataitem.cpp b/libk3b/projects/datacd/k3bdataitem.cpp index 6f2a861..ff6aa61 100644 --- a/libk3b/projects/datacd/k3bdataitem.cpp +++ b/libk3b/projects/datacd/k3bdataitem.cpp @@ -29,7 +29,7 @@ public: }; -K3bDataItem::K3bDataItem( K3bDataDoc* doc, K3bDataItem* parent, int flags ) +K3bDataItem::K3bDataItem( K3bDataDoc* doc, K3bDataItem* tqparent, int flags ) : m_bHideOnRockRidge(false), m_bHideOnJoliet(false), m_bRemoveable(true), @@ -45,8 +45,8 @@ K3bDataItem::K3bDataItem( K3bDataDoc* doc, K3bDataItem* parent, int flags ) m_doc = doc; m_bHideOnRockRidge = m_bHideOnJoliet = false; - if( parent ) - m_parentDir = parent->getDirItem(); + if( tqparent ) + m_parentDir = tqparent->getDirItem(); else m_parentDir = 0; } @@ -113,16 +113,16 @@ K3b::Msf K3bDataItem::itemBlocks( bool followSymbolicLinks ) const } -void K3bDataItem::setK3bName( const QString& name ) { +void K3bDataItem::setK3bName( const TQString& name ) { if ( name != m_k3bName ) { // test for not-allowed characters - if( name.contains('/') ) { + if( name.tqcontains('/') ) { kdDebug() << "(K3bDataItem) name contained invalid characters!" << endl; return; } - if( parent() ) { - K3bDataItem* item = parent()->find( name ); + if( tqparent() ) { + K3bDataItem* item = tqparent()->tqfind( name ); if( item && item != this ) { kdDebug() << "(K3bDataItem) item with that name already exists." << endl; return; @@ -135,7 +135,7 @@ void K3bDataItem::setK3bName( const QString& name ) { } -const QString& K3bDataItem::k3bName() const +const TQString& K3bDataItem::k3bName() const { return m_k3bName; } @@ -143,17 +143,17 @@ const QString& K3bDataItem::k3bName() const K3bDataItem* K3bDataItem::take() { - if( parent() ) - parent()->takeDataItem( this ); + if( tqparent() ) + tqparent()->takeDataItem( this ); return this; } -QString K3bDataItem::k3bPath() const +TQString K3bDataItem::k3bPath() const { if( !getParent() ) - return QString::null; // the root item is the only one not having a parent + return TQString(); // the root item is the only one not having a tqparent else if( isDir() ) return getParent()->k3bPath() + k3bName() + "/"; else @@ -161,10 +161,10 @@ QString K3bDataItem::k3bPath() const } -QString K3bDataItem::writtenPath() const +TQString K3bDataItem::writtenPath() const { if( !getParent() ) - return QString::null; // the root item is the only one not having a parent + return TQString(); // the root item is the only one not having a tqparent else if( isDir() ) return getParent()->writtenPath() + writtenName() + "/"; else @@ -172,10 +172,10 @@ QString K3bDataItem::writtenPath() const } -QString K3bDataItem::iso9660Path() const +TQString K3bDataItem::iso9660Path() const { if( !getParent() ) - return QString::null; // the root item is the only one not having a parent + return TQString(); // the root item is the only one not having a tqparent else if( isDir() ) return getParent()->iso9660Path() + iso9660Name() + "/"; else @@ -186,14 +186,14 @@ QString K3bDataItem::iso9660Path() const K3bDataItem* K3bDataItem::nextSibling() const { K3bDataItem* item = const_cast<K3bDataItem*>(this); // urg, but we know that we don't mess with it, so... - K3bDirItem* parentItem = getParent(); + K3bDirItem* tqparentItem = getParent(); - while( parentItem ) { - if( K3bDataItem* i = parentItem->nextChild( item ) ) + while( tqparentItem ) { + if( K3bDataItem* i = tqparentItem->nextChild( item ) ) return i; - item = parentItem; - parentItem = item->getParent(); + item = tqparentItem; + tqparentItem = item->getParent(); } return 0; @@ -232,7 +232,7 @@ bool K3bDataItem::hideOnJoliet() const void K3bDataItem::setHideOnRockRidge( bool b ) { // there is no use in changing the value if - // it is already set by the parent + // it is already set by the tqparent if( ( !getParent() || !getParent()->hideOnRockRidge() ) && b != m_bHideOnRockRidge ) { m_bHideOnRockRidge = b; @@ -245,7 +245,7 @@ void K3bDataItem::setHideOnRockRidge( bool b ) void K3bDataItem::setHideOnJoliet( bool b ) { // there is no use in changing the value if - // it is already set by the parent + // it is already set by the tqparent if( ( !getParent() || !getParent()->hideOnJoliet() ) && b != m_bHideOnJoliet ) { m_bHideOnJoliet = b; diff --git a/libk3b/projects/datacd/k3bdataitem.h b/libk3b/projects/datacd/k3bdataitem.h index 36cdf05..db7452b 100644 --- a/libk3b/projects/datacd/k3bdataitem.h +++ b/libk3b/projects/datacd/k3bdataitem.h @@ -21,7 +21,7 @@ class K3bDirItem; class K3bDataDoc; -#include <qstring.h> +#include <tqstring.h> #include <kio/global.h> @@ -35,12 +35,12 @@ class K3bDataDoc; class LIBK3B_EXPORT K3bDataItem { public: - K3bDataItem( K3bDataDoc* doc, K3bDataItem* parent = 0, int flags = 0 ); + K3bDataItem( K3bDataDoc* doc, K3bDataItem* tqparent = 0, int flags = 0 ); /** * Default copy constructor. * - * The result is an exact copy except that no parent dir it set and, thus, also no doc. + * The result is an exact copy except that no tqparent dir it set and, thus, also no doc. */ K3bDataItem( const K3bDataItem& ); @@ -49,44 +49,44 @@ class LIBK3B_EXPORT K3bDataItem /** * Return an exact copy of this data item. * - * The result is an exact copy except that no parent dir it set and, thus, also no doc. + * The result is an exact copy except that no tqparent dir it set and, thus, also no doc. * * Implementations should use the default constructor. */ virtual K3bDataItem* copy() const = 0; - K3bDirItem* parent() { return m_parentDir; } + K3bDirItem* tqparent() { return m_parentDir; } K3bDirItem* getParent() const { return m_parentDir; } /** - * Remove this item from it's parent and return a pointer to it. + * Remove this item from it's tqparent and return a pointer to it. */ K3bDataItem* take(); K3bDataDoc* doc() const { return m_doc; } - virtual const QString& k3bName() const; - virtual void setK3bName( const QString& ); + virtual const TQString& k3bName() const; + virtual void setK3bName( const TQString& ); /** * returns the path as defined by the k3b-hierachy, NOT starting with a slash * (since this is used for graft-points!) * directories have a trailing "/" */ - virtual QString k3bPath() const; + virtual TQString k3bPath() const; /** * Returns the name of the item as used on the CD or DVD image. * * This is only valid after a call to @p K3bDataDoc::prepareFilenames() */ - const QString& writtenName() const { return m_writtenName; } + const TQString& writtenName() const { return m_writtenName; } /** * \return the pure name used in the Iso9660 tree. * * This is only valid after a call to @p K3bDataDoc::prepareFilenames() */ - const QString& iso9660Name() const { return m_rawIsoName; } + const TQString& iso9660Name() const { return m_rawIsoName; } /** * Returns the path of the item as written to the CD or DVD image. @@ -95,24 +95,24 @@ class LIBK3B_EXPORT K3bDataItem * * This is only valid after a call to @p K3bDataDoc::prepareFilenames() */ - virtual QString writtenPath() const; + virtual TQString writtenPath() const; - virtual QString iso9660Path() const; + virtual TQString iso9660Path() const; /** * Used to set the written name by @p K3bDataDoc::prepareFilenames() */ - void setWrittenName( const QString& s ) { m_writtenName = s; } + void setWrittenName( const TQString& s ) { m_writtenName = s; } /** * Used to set the pure Iso9660 name by @p K3bDataDoc::prepareFilenames() */ - void setIso9660Name( const QString& s ) { m_rawIsoName = s; } + void setIso9660Name( const TQString& s ) { m_rawIsoName = s; } virtual K3bDataItem* nextSibling() const; /** returns the path to the file on the local filesystem */ - virtual QString localPath() const { return QString::null; } + virtual TQString localPath() const { return TQString(); } /** * The size of the item @@ -133,7 +133,7 @@ class LIBK3B_EXPORT K3bDataItem virtual void reparent( K3bDirItem* ); // FIXME: use all these flags and make the isXXX methods - // non-virtual. Then move the parent()->addDataItem call + // non-virtual. Then move the tqparent()->addDataItem call // to the K3bDataItem constructor enum ItemFlags { DIR = 0x1, @@ -173,14 +173,14 @@ class LIBK3B_EXPORT K3bDataItem virtual bool isRenameable() const { return m_bRenameable; } virtual bool isHideable() const { return m_bHideable; } virtual bool writeToCd() const { return m_bWriteToCd; } - virtual const QString& extraInfo() const { return m_extraInfo; } + virtual const TQString& extraInfo() const { return m_extraInfo; } void setRenameable( bool b ) { m_bRenameable = b; } void setMoveable( bool b ) { m_bMovable = b; } void setRemoveable( bool b ) { m_bRemoveable = b; } void setHideable( bool b ) { m_bHideable = b; } void setWriteToCd( bool b ) { m_bWriteToCd = b; } - void setExtraInfo( const QString& i ) { m_extraInfo = i; } + void setExtraInfo( const TQString& i ) { m_extraInfo = i; } protected: virtual KIO::filesize_t itemSize( bool followSymlinks ) const = 0; @@ -194,7 +194,7 @@ class LIBK3B_EXPORT K3bDataItem */ virtual K3b::Msf itemBlocks( bool followSymlinks ) const; - QString m_k3bName; + TQString m_k3bName; void setFlags( int flags ); @@ -202,8 +202,8 @@ class LIBK3B_EXPORT K3bDataItem class Private; Private* d; - QString m_writtenName; - QString m_rawIsoName; + TQString m_writtenName; + TQString m_rawIsoName; K3bDataDoc* m_doc; K3bDirItem* m_parentDir; @@ -215,7 +215,7 @@ class LIBK3B_EXPORT K3bDataItem bool m_bMovable; bool m_bHideable; bool m_bWriteToCd; - QString m_extraInfo; + TQString m_extraInfo; long m_sortWeight; diff --git a/libk3b/projects/datacd/k3bdatajob.cpp b/libk3b/projects/datacd/k3bdatajob.cpp index 7009a43..abceb3a 100644 --- a/libk3b/projects/datacd/k3bdatajob.cpp +++ b/libk3b/projects/datacd/k3bdatajob.cpp @@ -43,11 +43,11 @@ #include <kio/global.h> #include <kio/job.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qdatetime.h> -#include <qfile.h> -#include <qdatastream.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqdatastream.h> #include <kdebug.h> @@ -83,8 +83,8 @@ public: }; -K3bDataJob::K3bDataJob( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent ) - : K3bBurnJob( hdl, parent ) +K3bDataJob::K3bDataJob( K3bDataDoc* doc, K3bJobHandler* hdl, TQObject* tqparent ) + : K3bBurnJob( hdl, tqparent ) { d = new Private; @@ -95,10 +95,10 @@ K3bDataJob::K3bDataJob( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent ) m_isoImager = 0; m_msInfoFetcher = new K3bMsInfoFetcher( this, this ); - connect( m_msInfoFetcher, SIGNAL(finished(bool)), this, SLOT(slotMsInfoFetched(bool)) ); - connect( m_msInfoFetcher, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_msInfoFetcher, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( m_msInfoFetcher, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotMsInfoFetched(bool)) ); + connect( m_msInfoFetcher, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_msInfoFetcher, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); d->imageFinished = true; } @@ -179,7 +179,7 @@ void K3bDataJob::prepareWriting() m_msInfoFetcher->start(); } else { - m_isoImager->setMultiSessionInfo( QString::null ); + m_isoImager->setMultiSessionInfo( TQString() ); prepareData(); d->initializingImager = true; @@ -196,7 +196,7 @@ void K3bDataJob::slotMsInfoFetched(bool success) prepareData(); if( d->usedWritingApp == K3b::CDRDAO ) // cdrdao seems to write a 150 blocks pregap that is not used by cdrecord - m_isoImager->setMultiSessionInfo( QString("%1,%2").arg(m_msInfoFetcher->lastSessionStart()).arg(m_msInfoFetcher->nextSessionStart()+150), d->doc->burner() ); + m_isoImager->setMultiSessionInfo( TQString("%1,%2").tqarg(m_msInfoFetcher->lastSessionStart()).tqarg(m_msInfoFetcher->nextSessionStart()+150), d->doc->burner() ); else m_isoImager->setMultiSessionInfo( m_msInfoFetcher->msInfo(), d->doc->burner() ); @@ -226,7 +226,7 @@ void K3bDataJob::writeImage() emit newTask( i18n("Creating image file") ); emit newSubTask( i18n("Track 1 of 1") ); - emit infoMessage( i18n("Creating image file in %1").arg(d->doc->tempDir()), INFO ); + emit infoMessage( i18n("Creating image file in %1").tqarg(d->doc->tempDir()), INFO ); m_isoImager->writeToImageFile( d->doc->tempDir() ); m_isoImager->start(); @@ -324,7 +324,7 @@ void K3bDataJob::slotIsoImagerFinished( bool success ) d->doc->onlyCreateImages() ) { if( success ) { - emit infoMessage( i18n("Image successfully created in %1").arg(d->doc->tempDir()), K3bJob::SUCCESS ); + emit infoMessage( i18n("Image successfully created in %1").tqarg(d->doc->tempDir()), K3bJob::SUCCESS ); d->imageFinished = true; if( d->doc->onlyCreateImages() ) { @@ -370,7 +370,7 @@ bool K3bDataJob::startWriterJob() if( d->doc->dummy() ) emit newTask( i18n("Simulating") ); else if( d->copies > 1 ) - emit newTask( i18n("Writing Copy %1").arg(d->copiesDone+1) ); + emit newTask( i18n("Writing Copy %1").tqarg(d->copiesDone+1) ); else emit newTask( i18n("Writing") ); @@ -408,7 +408,7 @@ void K3bDataJob::slotWriterJobPercent( int p ) void K3bDataJob::slotWriterNextTrack( int t, int tt ) { - emit newSubTask( i18n("Writing Track %1 of %2").arg(t).arg(tt) ); + emit newSubTask( i18n("Writing Track %1 of %2").tqarg(t).tqarg(tt) ); } @@ -432,20 +432,20 @@ void K3bDataJob::slotWriterJobFinished( bool success ) if( d->doc->verifyData() ) { if( !d->verificationJob ) { d->verificationJob = new K3bVerificationJob( this, this ); - connect( d->verificationJob, SIGNAL(infoMessage(const QString&, int)), - this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->verificationJob, SIGNAL(newTask(const QString&)), - this, SIGNAL(newSubTask(const QString&)) ); - connect( d->verificationJob, SIGNAL(newSubTask(const QString&)), - this, SIGNAL(newSubTask(const QString&)) ); - connect( d->verificationJob, SIGNAL(percent(int)), - this, SLOT(slotVerificationProgress(int)) ); - connect( d->verificationJob, SIGNAL(percent(int)), - this, SIGNAL(subPercent(int)) ); - connect( d->verificationJob, SIGNAL(finished(bool)), - this, SLOT(slotVerificationFinished(bool)) ); - connect( d->verificationJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->verificationJob, TQT_SIGNAL(infoMessage(const TQString&, int)), + this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->verificationJob, TQT_SIGNAL(newTask(const TQString&)), + this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( d->verificationJob, TQT_SIGNAL(newSubTask(const TQString&)), + this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( d->verificationJob, TQT_SIGNAL(percent(int)), + this, TQT_SLOT(slotVerificationProgress(int)) ); + connect( d->verificationJob, TQT_SIGNAL(percent(int)), + this, TQT_SIGNAL(subPercent(int)) ); + connect( d->verificationJob, TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(slotVerificationFinished(bool)) ); + connect( d->verificationJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } d->verificationJob->clear(); @@ -541,19 +541,19 @@ void K3bDataJob::setWriterJob( K3bAbstractWriter* writer ) { // FIXME: progressedsize for multiple copies m_writerJob = writer; - connect( m_writerJob, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_writerJob, SIGNAL(percent(int)), this, SLOT(slotWriterJobPercent(int)) ); - connect( m_writerJob, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) ); - connect( m_writerJob, SIGNAL(subPercent(int)), this, SIGNAL(subPercent(int)) ); - connect( m_writerJob, SIGNAL(processedSubSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( m_writerJob, SIGNAL(nextTrack(int, int)), this, SLOT(slotWriterNextTrack(int, int)) ); - connect( m_writerJob, SIGNAL(buffer(int)), this, SIGNAL(bufferStatus(int)) ); - connect( m_writerJob, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( m_writerJob, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); - connect( m_writerJob, SIGNAL(finished(bool)), this, SLOT(slotWriterJobFinished(bool)) ); - connect( m_writerJob, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( m_writerJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( m_writerJob, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_writerJob, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotWriterJobPercent(int)) ); + connect( m_writerJob, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) ); + connect( m_writerJob, TQT_SIGNAL(subPercent(int)), this, TQT_SIGNAL(subPercent(int)) ); + connect( m_writerJob, TQT_SIGNAL(processedSubSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( m_writerJob, TQT_SIGNAL(nextTrack(int, int)), this, TQT_SLOT(slotWriterNextTrack(int, int)) ); + connect( m_writerJob, TQT_SIGNAL(buffer(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( m_writerJob, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( m_writerJob, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); + connect( m_writerJob, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotWriterJobFinished(bool)) ); + connect( m_writerJob, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( m_writerJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } @@ -572,11 +572,11 @@ void K3bDataJob::setImager( K3bIsoImager* imager ) void K3bDataJob::connectImager() { m_isoImager->disconnect( this ); - connect( m_isoImager, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_isoImager, SIGNAL(percent(int)), this, SLOT(slotIsoImagerPercent(int)) ); - connect( m_isoImager, SIGNAL(finished(bool)), this, SLOT(slotIsoImagerFinished(bool)) ); - connect( m_isoImager, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( m_isoImager, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_isoImager, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotIsoImagerPercent(int)) ); + connect( m_isoImager, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotIsoImagerFinished(bool)) ); + connect( m_isoImager, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } @@ -632,7 +632,7 @@ bool K3bDataJob::prepareWriterJob() writer->addArgument( "-xa1" ); } - writer->addArgument( QString("-tsize=%1s").arg(m_isoImager->size()) )->addArgument("-"); + writer->addArgument( TQString("-tsize=%1s").tqarg(m_isoImager->size()) )->addArgument("-"); setWriterJob( writer ); } @@ -648,10 +648,10 @@ bool K3bDataJob::prepareWriterJob() // now write the tocfile if( d->tocFile ) delete d->tocFile; - d->tocFile = new KTempFile( QString::null, "toc" ); + d->tocFile = new KTempFile( TQString(), "toc" ); d->tocFile->setAutoDelete(true); - if( QTextStream* s = d->tocFile->textStream() ) { + if( TQTextStream* s = d->tocFile->textStream() ) { if( d->usedDataMode == K3b::MODE1 ) { *s << "CD_ROM" << "\n"; *s << "\n"; @@ -790,9 +790,9 @@ void K3bDataJob::determineMultiSessionMode() else { // now we need to determine the media's size connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::NG_DISKINFO, d->doc->burner() ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotDetermineMultiSessionMode(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotDetermineMultiSessionMode(K3bDevice::DeviceHandler*)) ); } } else { @@ -905,7 +905,7 @@ bool K3bDataJob::waitForMedium() } -QString K3bDataJob::jobDescription() const +TQString K3bDataJob::jobDescription() const { if( d->doc->onlyCreateImages() ) { return i18n("Creating Data Image File"); @@ -914,19 +914,19 @@ QString K3bDataJob::jobDescription() const d->doc->multiSessionMode() == K3bDataDoc::AUTO ) { return i18n("Writing Data CD") + ( d->doc->isoOptions().volumeID().isEmpty() - ? QString::null - : QString( " (%1)" ).arg(d->doc->isoOptions().volumeID()) ); + ? TQString() + : TQString( " (%1)" ).tqarg(d->doc->isoOptions().volumeID()) ); } else { return i18n("Writing Multisession CD") + ( d->doc->isoOptions().volumeID().isEmpty() - ? QString::null - : QString( " (%1)" ).arg(d->doc->isoOptions().volumeID()) ); + ? TQString() + : TQString( " (%1)" ).tqarg(d->doc->isoOptions().volumeID()) ); } } -QString K3bDataJob::jobDetails() const +TQString K3bDataJob::jobDetails() const { if( d->doc->copies() > 1 && !d->doc->dummy() && @@ -935,10 +935,10 @@ QString K3bDataJob::jobDetails() const return i18n("ISO9660 Filesystem (Size: %1) - %n copy", "ISO9660 Filesystem (Size: %1) - %n copies", d->doc->copies() ) - .arg(KIO::convertSize( d->doc->size() )); + .tqarg(KIO::convertSize( d->doc->size() )); else return i18n("ISO9660 Filesystem (Size: %1)") - .arg(KIO::convertSize( d->doc->size() )); + .tqarg(KIO::convertSize( d->doc->size() )); } @@ -951,9 +951,9 @@ K3bDataDoc::MultiSessionMode K3bDataJob::usedMultiSessionMode() const void K3bDataJob::cleanup() { if( !d->doc->onTheFly() && d->doc->removeImages() ) { - if( QFile::exists( d->doc->tempDir() ) ) { + if( TQFile::exists( d->doc->tempDir() ) ) { d->imageFile.remove(); - emit infoMessage( i18n("Removed image file %1").arg(d->doc->tempDir()), K3bJob::SUCCESS ); + emit infoMessage( i18n("Removed image file %1").tqarg(d->doc->tempDir()), K3bJob::SUCCESS ); } } diff --git a/libk3b/projects/datacd/k3bdatajob.h b/libk3b/projects/datacd/k3bdatajob.h index 58de969..a55e2d9 100644 --- a/libk3b/projects/datacd/k3bdatajob.h +++ b/libk3b/projects/datacd/k3bdatajob.h @@ -20,10 +20,10 @@ #include <k3bjob.h> #include <k3bdatadoc.h> -#include <qfile.h> +#include <tqfile.h> -class QString; -class QDataStream; +class TQString; +class TQDataStream; class K3bAbstractWriter; class K3bIsoImager; class KTempFile; @@ -40,9 +40,10 @@ namespace K3bDevice { class K3bDataJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bDataJob( K3bDataDoc*, K3bJobHandler*, QObject* parent = 0 ); + K3bDataJob( K3bDataDoc*, K3bJobHandler*, TQObject* tqparent = 0 ); virtual ~K3bDataJob(); K3bDoc* doc() const; @@ -50,8 +51,8 @@ class K3bDataJob : public K3bBurnJob virtual bool hasBeenCanceled() const; - virtual QString jobDescription() const; - virtual QString jobDetails() const; + virtual TQString jobDescription() const; + virtual TQString jobDetails() const; public slots: void cancel(); diff --git a/libk3b/projects/datacd/k3bdatapreparationjob.cpp b/libk3b/projects/datacd/k3bdatapreparationjob.cpp index dd29d6d..d9d4893 100644 --- a/libk3b/projects/datacd/k3bdatapreparationjob.cpp +++ b/libk3b/projects/datacd/k3bdatapreparationjob.cpp @@ -26,8 +26,8 @@ #include <klocale.h> #include <kstringhandler.h> -#include <qfile.h> -#include <qvaluelist.h> +#include <tqfile.h> +#include <tqvaluelist.h> class K3bDataPreparationJob::Private : public K3bThread @@ -40,9 +40,9 @@ public: K3bDataDoc* doc; - QValueList<K3bDataItem*> nonExistingItems; - QString listOfRenamedItems; - QValueList<K3bDataItem*> folderSymLinkItems; + TQValueList<K3bDataItem*> nonExistingItems; + TQString listOfRenamedItems; + TQValueList<K3bDataItem*> folderSymLinkItems; K3bThreadJob* threadJob; @@ -71,14 +71,14 @@ void K3bDataPreparationJob::Private::run() // create the message string for the renamed files if( doc->needToCutFilenames() ) { int maxlines = 10; - QValueList<K3bDataItem*>::const_iterator it; + TQValueList<K3bDataItem*>::const_iterator it; for( it = doc->needToCutFilenameItems().begin(); maxlines > 0 && it != doc->needToCutFilenameItems().end(); ++it, --maxlines ) { K3bDataItem* item = *it; listOfRenamedItems += i18n("<em>%1</em> renamed to <em>%2</em>") - .arg( KStringHandler::csqueeze( item->k3bName(), 30 ) ) - .arg( KStringHandler::csqueeze( item->writtenName(), 30 ) ); + .tqarg( KStringHandler::csqueeze( item->k3bName(), 30 ) ) + .tqarg( KStringHandler::csqueeze( item->writtenName(), 30 ) ); listOfRenamedItems += "<br>"; } if( it != doc->needToCutFilenameItems().end() ) @@ -93,7 +93,7 @@ void K3bDataPreparationJob::Private::run() if( item->isSymLink() ) { if( doc->isoOptions().followSymbolicLinks() ) { - QFileInfo f( K3b::resolveLink( item->localPath() ) ); + TQFileInfo f( K3b::resolveLink( item->localPath() ) ); if( !f.exists() ) { nonExistingItems.append( item ); } @@ -102,7 +102,7 @@ void K3bDataPreparationJob::Private::run() } } } - else if( item->isFile() && !QFile::exists( item->localPath() ) ) { + else if( item->isFile() && !TQFile::exists( item->localPath() ) ) { nonExistingItems.append( item ); } @@ -126,11 +126,11 @@ void K3bDataPreparationJob::Private::cancel() -static QString createItemsString( const QValueList<K3bDataItem*>& items, unsigned int max ) +static TQString createItemsString( const TQValueList<K3bDataItem*>& items, unsigned int max ) { - QString s; + TQString s; unsigned int cnt = 0; - for( QValueList<K3bDataItem*>::const_iterator it = items.begin(); + for( TQValueList<K3bDataItem*>::const_iterator it = items.begin(); it != items.end(); ++it ) { s += KStringHandler::csqueeze( (*it)->localPath(), 60 ); @@ -149,12 +149,12 @@ static QString createItemsString( const QValueList<K3bDataItem*>& items, unsigne } -K3bDataPreparationJob::K3bDataPreparationJob( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent ) - : K3bJob( hdl, parent ) +K3bDataPreparationJob::K3bDataPreparationJob( K3bDataDoc* doc, K3bJobHandler* hdl, TQObject* tqparent ) + : K3bJob( hdl, tqparent ) { d = new Private( doc ); d->threadJob = new K3bThreadJob( d, this, this ); - connectSubJob( d->threadJob, SLOT(slotWorkDone(bool)), K3bJob::DEFAULT_SIGNAL_CONNECTION ); + connectSubJob( d->threadJob, TQT_SLOT(slotWorkDone(bool)), K3bJob::DEFAULT_SIGNAL_CONNECTION ); } @@ -182,7 +182,7 @@ void K3bDataPreparationJob::slotWorkDone( bool success ) "of the Joliet extensions. If the Joliet extensions are disabled filenames " "do not have to be shortened but long filenames will not be available on " "Windows systems.") - .arg( d->doc->isoOptions().jolietLong() ? 103 : 64 ) + .tqarg( d->doc->isoOptions().jolietLong() ? 103 : 64 ) + "<p>" + d->listOfRenamedItems, i18n("Warning"), i18n("Shorten Filenames"), @@ -207,7 +207,7 @@ void K3bDataPreparationJob::slotWorkDone( bool success ) "restrict the length of the volume descriptior (the name of the filesystem) " "to %1 characters. The selected descriptor '%2' is longer than that. Do you " "want it to be cut or do you want to go back and change it manually?") - .arg( 16 ).arg( d->doc->isoOptions().volumeID() ), + .tqarg( 16 ).tqarg( d->doc->isoOptions().volumeID() ), i18n("Warning"), i18n("Cut volume descriptor in the Joliet tree"), i18n("Cancel and go back") ) ) { @@ -228,7 +228,7 @@ void K3bDataPreparationJob::slotWorkDone( bool success ) i18n("Warning"), i18n("Remove missing files and continue"), i18n("Cancel and go back") ) ) { - for( QValueList<K3bDataItem*>::const_iterator it = d->nonExistingItems.begin(); + for( TQValueList<K3bDataItem*>::const_iterator it = d->nonExistingItems.begin(); it != d->nonExistingItems.end(); ++it ) { delete *it; } diff --git a/libk3b/projects/datacd/k3bdatapreparationjob.h b/libk3b/projects/datacd/k3bdatapreparationjob.h index 1c83a42..3ac7d7d 100644 --- a/libk3b/projects/datacd/k3bdatapreparationjob.h +++ b/libk3b/projects/datacd/k3bdatapreparationjob.h @@ -29,9 +29,10 @@ class K3bJobHandler; class K3bDataPreparationJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bDataPreparationJob( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent ); + K3bDataPreparationJob( K3bDataDoc* doc, K3bJobHandler* hdl, TQObject* tqparent ); ~K3bDataPreparationJob(); bool hasBeenCanceled() const; diff --git a/libk3b/projects/datacd/k3bdiritem.cpp b/libk3b/projects/datacd/k3bdiritem.cpp index 3ea3236..c36595e 100644 --- a/libk3b/projects/datacd/k3bdiritem.cpp +++ b/libk3b/projects/datacd/k3bdiritem.cpp @@ -19,14 +19,14 @@ #include "k3bsessionimportitem.h" #include "k3bfileitem.h" -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kdebug.h> -K3bDirItem::K3bDirItem(const QString& name, K3bDataDoc* doc, K3bDirItem* parentDir) - : K3bDataItem( doc, parentDir ), +K3bDirItem::K3bDirItem(const TQString& name, K3bDataDoc* doc, K3bDirItem* tqparentDir) + : K3bDataItem( doc, tqparentDir ), m_size(0), m_followSymlinksSize(0), m_blocks(0), @@ -37,8 +37,8 @@ K3bDirItem::K3bDirItem(const QString& name, K3bDataDoc* doc, K3bDirItem* parentD m_k3bName = name; // add automagically like a qlistviewitem - if( parent() ) - parent()->addDataItem( this ); + if( tqparent() ) + tqparent()->addDataItem( this ); } @@ -52,26 +52,26 @@ K3bDirItem::K3bDirItem( const K3bDirItem& item ) m_dirs(0), m_localPath( item.m_localPath ) { - for( QPtrListIterator<K3bDataItem> it( item.children() ); *it; ++it ) + for( TQPtrListIterator<K3bDataItem> it( item.tqchildren() ); *it; ++it ) addDataItem( (*it)->copy() ); } K3bDirItem::~K3bDirItem() { - // delete all children + // delete all tqchildren // doing this by hand is much saver than using the // auto-delete feature since some of the items' destructors // may change the list - K3bDataItem* i = m_children.first(); + K3bDataItem* i = m_tqchildren.first(); while( i ) { // it is important to use takeDataItem here to be sure // the size gets updated properly takeDataItem(i); delete i; - i = m_children.first(); + i = m_tqchildren.first(); } - // this has to be done after deleting the children + // this has to be done after deleting the tqchildren // because the directory itself has a size of 0 in K3b // and all it's files' sizes have already been substracted take(); @@ -99,14 +99,14 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item ) } } - if( m_children.findRef( item ) == -1 ) { + if( m_tqchildren.tqfindRef( item ) == -1 ) { if( item->isFile() ) { // do we replace an old item? - QString name = item->k3bName(); + TQString name = item->k3bName(); int cnt = 1; - while( K3bDataItem* oldItem = find( name ) ) { + while( K3bDataItem* oldItem = tqfind( name ) ) { if( !oldItem->isDir() && oldItem->isFromOldSession() ) { - // in this case we remove this item from it's parent and save it in the new one + // in this case we remove this item from it's tqparent and save it in the new one // to be able to recover it oldItem->take(); static_cast<K3bSessionImportItem*>(oldItem)->setReplaceItem( static_cast<K3bFileItem*>(item) ); @@ -118,15 +118,15 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item ) // add a counter to the filename // if( item->k3bName()[item->k3bName().length()-4] == '.' ) - name = item->k3bName().left( item->k3bName().length()-4 ) + QString::number(cnt++) + item->k3bName().right(4); + name = item->k3bName().left( item->k3bName().length()-4 ) + TQString::number(cnt++) + item->k3bName().right(4); else - name = item->k3bName() + QString::number(cnt++); + name = item->k3bName() + TQString::number(cnt++); } } item->setK3bName( name ); } - m_children.append( item->take() ); + m_tqchildren.append( item->take() ); updateSize( item, false ); if( item->isDir() ) updateFiles( ((K3bDirItem*)item)->numFiles(), ((K3bDirItem*)item)->numDirs()+1 ); @@ -146,9 +146,9 @@ K3bDirItem* K3bDirItem::addDataItem( K3bDataItem* item ) K3bDataItem* K3bDirItem::takeDataItem( K3bDataItem* item ) { - int x = m_children.findRef( item ); + int x = m_tqchildren.tqfindRef( item ); if( x > -1 ) { - K3bDataItem* item = m_children.take(); + K3bDataItem* item = m_tqchildren.take(); updateSize( item, true ); if( item->isDir() ) updateFiles( -1*((K3bDirItem*)item)->numFiles(), -1*((K3bDirItem*)item)->numDirs()-1 ); @@ -176,8 +176,8 @@ K3bDataItem* K3bDirItem::takeDataItem( K3bDataItem* item ) K3bDataItem* K3bDirItem::nextSibling() const { - if( !m_children.isEmpty() ) - return m_children.getFirst(); + if( !m_tqchildren.isEmpty() ) + return m_tqchildren.getFirst(); else return K3bDataItem::nextSibling(); } @@ -185,24 +185,24 @@ K3bDataItem* K3bDirItem::nextSibling() const K3bDataItem* K3bDirItem::nextChild( K3bDataItem* prev ) const { - // search for prev in children - if( m_children.findRef( prev ) < 0 ) { + // search for prev in tqchildren + if( m_tqchildren.tqfindRef( prev ) < 0 ) { return 0; } else - return m_children.next(); + return m_tqchildren.next(); } -bool K3bDirItem::alreadyInDirectory( const QString& filename ) const +bool K3bDirItem::alreadyInDirectory( const TQString& filename ) const { - return (find( filename ) != 0); + return (tqfind( filename ) != 0); } -K3bDataItem* K3bDirItem::find( const QString& filename ) const +K3bDataItem* K3bDirItem::tqfind( const TQString& filename ) const { - for( QPtrListIterator<K3bDataItem> it( m_children ); it.current(); ++it ) { + for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) { if( it.current()->k3bName() == filename ) return it.current(); } @@ -210,20 +210,20 @@ K3bDataItem* K3bDirItem::find( const QString& filename ) const } -K3bDataItem* K3bDirItem::findByPath( const QString& p ) +K3bDataItem* K3bDirItem::findByPath( const TQString& p ) { if( p.isEmpty() || p == "/" ) return this; - QString path = p; + TQString path = p; if( path.startsWith("/") ) path = path.mid(1); - int pos = path.find( "/" ); + int pos = path.tqfind( "/" ); if( pos < 0 ) - return find( path ); + return tqfind( path ); else { // do it recursivly - K3bDataItem* item = find( path.left(pos) ); + K3bDataItem* item = tqfind( path.left(pos) ); if( item && item->isDir() ) return ((K3bDirItem*)item)->findByPath( path.mid( pos+1 ) ); else @@ -232,14 +232,14 @@ K3bDataItem* K3bDirItem::findByPath( const QString& p ) } -bool K3bDirItem::mkdir( const QString& dirPath ) +bool K3bDirItem::mkdir( const TQString& dirPath ) { // // An absolut path always starts at the root item // if( dirPath[0] == '/' ) { - if( parent() ) - return parent()->mkdir( dirPath ); + if( tqparent() ) + return tqparent()->mkdir( dirPath ); else return mkdir( dirPath.mid( 1 ) ); } @@ -247,9 +247,9 @@ bool K3bDirItem::mkdir( const QString& dirPath ) if( findByPath( dirPath ) ) return false; - QString restPath; - QString dirName; - int pos = dirPath.find( '/' ); + TQString restPath; + TQString dirName; + int pos = dirPath.tqfind( '/' ); if( pos == -1 ) { dirName = dirPath; } @@ -258,7 +258,7 @@ bool K3bDirItem::mkdir( const QString& dirPath ) restPath = dirPath.mid( pos+1 ); } - K3bDataItem* dir = find( dirName ); + K3bDataItem* dir = tqfind( dirName ); if( !dir ) dir = new K3bDirItem( dirName, doc(), this ); else if( !dir->isDir() ) @@ -294,12 +294,12 @@ bool K3bDirItem::isSubItem( K3bDataItem* item ) const if( dynamic_cast<K3bDirItem*>(item) == this ) return true; - K3bDirItem* d = item->parent(); + K3bDirItem* d = item->tqparent(); while( d ) { if( d == this ) { return true; } - d = d->parent(); + d = d->tqparent(); } return false; @@ -323,7 +323,7 @@ bool K3bDirItem::isRemoveable() const if( !K3bDataItem::isRemoveable() ) return false; - for( QPtrListIterator<K3bDataItem> it( m_children ); it.current(); ++it ) { + for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) { if( !it.current()->isRemoveable() ) return false; } @@ -349,22 +349,22 @@ void K3bDirItem::updateSize( K3bDataItem* item, bool removed ) } } - if( parent() ) - parent()->updateSize( item, removed ); + if( tqparent() ) + tqparent()->updateSize( item, removed ); } void K3bDirItem::updateFiles( long files, long dirs ) { m_files += files; m_dirs += dirs; - if( parent() ) - parent()->updateFiles( files, dirs ); + if( tqparent() ) + tqparent()->updateFiles( files, dirs ); } bool K3bDirItem::isFromOldSession() const { - for( QPtrListIterator<K3bDataItem> it( m_children ); it.current(); ++it ) { + for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) { if( (*it)->isFromOldSession() ) return true; } @@ -375,7 +375,7 @@ bool K3bDirItem::isFromOldSession() const bool K3bDirItem::writeToCd() const { // check if this dir contains items to write - for( QPtrListIterator<K3bDataItem> it( m_children ); it.current(); ++it ) { + for( TQPtrListIterator<K3bDataItem> it( m_tqchildren ); it.current(); ++it ) { if( (*it)->writeToCd() ) return true; } @@ -394,13 +394,13 @@ K3bRootItem::~K3bRootItem() } -const QString& K3bRootItem::k3bName() const +const TQString& K3bRootItem::k3bName() const { return doc()->isoOptions().volumeID(); } -void K3bRootItem::setK3bName( const QString& text ) +void K3bRootItem::setK3bName( const TQString& text ) { doc()->setVolumeID( text ); } diff --git a/libk3b/projects/datacd/k3bdiritem.h b/libk3b/projects/datacd/k3bdiritem.h index a64b4fd..61b6c8a 100644 --- a/libk3b/projects/datacd/k3bdiritem.h +++ b/libk3b/projects/datacd/k3bdiritem.h @@ -18,8 +18,8 @@ #define K3BDIRITEM_H -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kio/global.h> @@ -34,11 +34,11 @@ class K3bDataDoc; class LIBK3B_EXPORT K3bDirItem : public K3bDataItem { public: - K3bDirItem( const QString& name, K3bDataDoc*, K3bDirItem* parentDir = 0 ); + K3bDirItem( const TQString& name, K3bDataDoc*, K3bDirItem* tqparentDir = 0 ); /** - * Default copy constructor. Copies the dir including all children. However, none of the - * children will have set a doc and the copy dir will not have set a parent dir. + * Default copy constructor. Copies the dir including all tqchildren. However, none of the + * tqchildren will have set a doc and the copy dir will not have set a tqparent dir. */ K3bDirItem( const K3bDirItem& ); @@ -48,16 +48,16 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem K3bDirItem* getDirItem() const; - const QPtrList<K3bDataItem>& children() const { return m_children; } + const TQPtrList<K3bDataItem>& tqchildren() const { return m_tqchildren; } K3bDirItem* addDataItem( K3bDataItem* item ); K3bDataItem* takeDataItem( K3bDataItem* item ); K3bDataItem* nextSibling() const; K3bDataItem* nextChild( K3bDataItem* ) const; - bool alreadyInDirectory( const QString& fileName ) const; - K3bDataItem* find( const QString& filename ) const; - K3bDataItem* findByPath( const QString& ); + bool alreadyInDirectory( const TQString& fileName ) const; + K3bDataItem* tqfind( const TQString& filename ) const; + K3bDataItem* findByPath( const TQString& ); long numFiles() const; long numDirs() const; @@ -83,10 +83,10 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem /** * Recursively creates a directory. */ - bool mkdir( const QString& dir ); + bool mkdir( const TQString& dir ); - void setLocalPath( const QString& p ) { m_localPath = p; } - QString localPath() const { return m_localPath; } + void setLocalPath( const TQString& p ) { m_localPath = p; } + TQString localPath() const { return m_localPath; } /** * \reimplemented @@ -111,7 +111,7 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem private: /** * this recursivly updates the size of the directories. - * The size of this dir and the parent dir is updated. + * The size of this dir and the tqparent dir is updated. * These values are just used for user information. */ void updateSize( K3bDataItem*, bool removed = false ); @@ -121,7 +121,7 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem */ void updateFiles( long files, long dirs ); - mutable QPtrList<K3bDataItem> m_children; + mutable TQPtrList<K3bDataItem> m_tqchildren; // size of the items simply added KIO::filesize_t m_size; @@ -136,7 +136,7 @@ class LIBK3B_EXPORT K3bDirItem : public K3bDataItem // HACK: store the original path to be able to use it's permissions // ´remove this once we have a backup project - QString m_localPath; + TQString m_localPath; }; @@ -146,8 +146,8 @@ class K3bRootItem : public K3bDirItem K3bRootItem( K3bDataDoc* ); ~K3bRootItem(); - const QString& k3bName() const; - void setK3bName( const QString& ); + const TQString& k3bName() const; + void setK3bName( const TQString& ); bool isMoveable() const { return false; } bool isRemoveable() const { return false; } diff --git a/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp b/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp index 0ddab76..7d92e7e 100644 --- a/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp +++ b/libk3b/projects/datacd/k3bfilecompilationsizehandler.cpp @@ -18,9 +18,9 @@ #include <kdebug.h> -#include <qfile.h> -#include <qmap.h> -#include <qptrlist.h> +#include <tqfile.h> +#include <tqmap.h> +#include <tqptrlist.h> // TODO: remove the items from the project if the savedSize differs @@ -71,7 +71,7 @@ public: */ K3b::Msf blocks() const { return K3b::Msf( usedBlocks(savedSize) ); } - QPtrList<K3bDataItem> items; + TQPtrList<K3bDataItem> items; }; @@ -114,7 +114,7 @@ public: void removeFile( K3bFileItem* item, bool followSymlinks ) { InodeInfo& inodeInfo = inodeMap[item->localId(followSymlinks)]; - if( inodeInfo.items.findRef( item ) == -1 ) { + if( inodeInfo.items.tqfindRef( 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.findRef( item ) == -1 ) { + if( specialItems.tqfindRef( item ) == -1 ) { kdError() << "(K3bFileCompilationSizeHandler) Special item " << item->k3bName() << " has been removed without being added!" << endl; @@ -152,12 +152,12 @@ public: /** * This maps from inodes to the number of occurrences of the inode. */ - QMap<K3bFileItem::Id, InodeInfo> inodeMap; + TQMap<K3bFileItem::Id, InodeInfo> inodeMap; KIO::filesize_t size; K3b::Msf blocks; - QPtrList<K3bDataItem> specialItems; + TQPtrList<K3bDataItem> specialItems; }; diff --git a/libk3b/projects/datacd/k3bfileitem.cpp b/libk3b/projects/datacd/k3bfileitem.cpp index d9e288f..cc71b3a 100644 --- a/libk3b/projects/datacd/k3bfileitem.cpp +++ b/libk3b/projects/datacd/k3bfileitem.cpp @@ -22,11 +22,11 @@ #include "k3bisooptions.h" #include <k3bglobals.h> -#include <qfileinfo.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qregexp.h> -#include <qfile.h> +#include <tqfileinfo.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqregexp.h> +#include <tqfile.h> #include <kurl.h> #include <kdebug.h> @@ -57,7 +57,7 @@ bool operator>( const K3bFileItem::Id& id1, const K3bFileItem::Id& id2 ) -K3bFileItem::K3bFileItem( const QString& filePath, K3bDataDoc* doc, K3bDirItem* dir, const QString& k3bName, int flags ) +K3bFileItem::K3bFileItem( const TQString& filePath, K3bDataDoc* doc, K3bDirItem* dir, const TQString& k3bName, int flags ) : K3bDataItem( doc, dir, flags ), m_replacedItemFromOldSession(0), m_localPath(filePath) @@ -71,7 +71,7 @@ K3bFileItem::K3bFileItem( const QString& filePath, K3bDataDoc* doc, K3bDirItem* // we need to use lstat here since for symlinks both KDE and QT return the size of the file pointed to // instead the size of the link. k3b_struct_stat statBuf; - if( k3b_lstat( QFile::encodeName(filePath), &statBuf ) ) { + if( k3b_lstat( TQFile::encodeName(filePath), &statBuf ) ) { m_size = K3b::filesize( filePath ); m_id.inode = 0; m_id.device = 0; @@ -104,7 +104,7 @@ K3bFileItem::K3bFileItem( const QString& filePath, K3bDataDoc* doc, K3bDirItem* if( isSymLink() ) { k3b_struct_stat statBuf; - if( k3b_stat( QFile::encodeName(filePath), &statBuf ) == 0 ) { + if( k3b_stat( TQFile::encodeName(filePath), &statBuf ) == 0 ) { m_idFollowed.inode = statBuf.st_ino; m_idFollowed.device = statBuf.st_dev; @@ -113,14 +113,14 @@ K3bFileItem::K3bFileItem( const QString& filePath, K3bDataDoc* doc, K3bDirItem* } // add automagically like a qlistviewitem - if( parent() ) - parent()->addDataItem( this ); + if( tqparent() ) + tqparent()->addDataItem( this ); } K3bFileItem::K3bFileItem( const k3b_struct_stat* stat, const k3b_struct_stat* followedStat, - const QString& filePath, K3bDataDoc* doc, K3bDirItem* dir, const QString& k3bName ) + const TQString& filePath, K3bDataDoc* doc, K3bDirItem* dir, const TQString& k3bName ) : K3bDataItem( doc, dir ), m_replacedItemFromOldSession(0), m_localPath(filePath) @@ -151,8 +151,8 @@ K3bFileItem::K3bFileItem( const k3b_struct_stat* stat, m_sizeFollowed = m_size; } - if( parent() ) - parent()->addDataItem( this ); + if( tqparent() ) + tqparent()->addDataItem( this ); } @@ -171,7 +171,7 @@ K3bFileItem::K3bFileItem( const K3bFileItem& item ) K3bFileItem::~K3bFileItem() { - // remove this from parentdir + // remove this from tqparentdir take(); } @@ -211,14 +211,14 @@ bool K3bFileItem::exists() const return true; } -QString K3bFileItem::absIsoPath() +TQString K3bFileItem::absIsoPath() { // return m_dir->absIsoPath() + m_isoName; - return QString::null; + return TQString(); } -QString K3bFileItem::localPath() const +TQString K3bFileItem::localPath() const { return m_localPath; } @@ -235,9 +235,9 @@ bool K3bFileItem::isSymLink() const } -QString K3bFileItem::linkDest() const +TQString K3bFileItem::linkDest() const { - return QFileInfo( localPath() ).readLink(); + return TQFileInfo( localPath() ).readLink(); } @@ -247,10 +247,10 @@ bool K3bFileItem::isValid() const // this link is not valid if we cannot follow it if we want to if( doc()->isoOptions().followSymbolicLinks() ) { - return QFile::exists( K3b::resolveLink( localPath() ) ); + return TQFile::exists( K3b::resolveLink( localPath() ) ); } - QString dest = linkDest(); + TQString dest = linkDest(); if( dest[0] == '/' ) return false; // absolut links can never be part of the compilation! @@ -258,7 +258,7 @@ bool K3bFileItem::isValid() const // parse the link K3bDirItem* dir = getParent(); - QStringList tokens = QStringList::split( QRegExp("/+"), dest ); // two slashes or more do the same as one does! + TQStringList tokens = TQStringList::split( TQRegExp("/+"), dest ); // two slashes or more do the same as one does! unsigned int i = 0; while( i < tokens.size() ) { @@ -267,13 +267,13 @@ bool K3bFileItem::isValid() const } else if( tokens[i] == ".." ) { // change the directory - dir = dir->parent(); + dir = dir->tqparent(); if( dir == 0 ) return false; } else { // search for the item in dir - K3bDataItem* d = dir->find( tokens[i] ); + K3bDataItem* d = dir->tqfind( tokens[i] ); if( d == 0 ) return false; diff --git a/libk3b/projects/datacd/k3bfileitem.h b/libk3b/projects/datacd/k3bfileitem.h index f23644f..68ee49d 100644 --- a/libk3b/projects/datacd/k3bfileitem.h +++ b/libk3b/projects/datacd/k3bfileitem.h @@ -22,7 +22,7 @@ #include <k3bglobals.h> #include <kio/global.h> -#include <qstring.h> +#include <tqstring.h> #include "k3b_export.h" @@ -39,7 +39,7 @@ public: /** * Creates a new K3bFileItem */ - K3bFileItem( const QString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const QString& k3bName = 0, int flags = 0 ); + K3bFileItem( const TQString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const TQString& k3bName = 0, int flags = 0 ); /** * Constructor for optimized file item creation which does no additional stat. @@ -48,12 +48,12 @@ public: */ K3bFileItem( const k3b_struct_stat* stat, const k3b_struct_stat* followedStat, - const QString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const QString& k3bName = 0 ); + const TQString& fileName, K3bDataDoc* doc, K3bDirItem* dir, const TQString& k3bName = 0 ); /** * Default copy constructor * Creates a copy of the fileitem. The copy, however, is not an exact duplicate of this item. - * The copy does not have a parent dir set and any old session items are set to 0. + * The copy does not have a tqparent dir set and any old session items are set to 0. */ K3bFileItem( const K3bFileItem& ); @@ -63,10 +63,10 @@ public: bool exists() const; - QString absIsoPath(); + TQString absIsoPath(); /** reimplemented from K3bDataItem */ - QString localPath() const; + TQString localPath() const; /** * Identification of the files on the local device. @@ -77,7 +77,7 @@ public: }; /** - * This is not the normal inode number but it also contains + * This is not the normal inode number but it also tqcontains * the device number. */ Id localId() const; @@ -90,7 +90,7 @@ public: K3bDirItem* getDirItem() const; bool isSymLink() const; - QString linkDest() const; + TQString linkDest() const; bool isFile() const { return true; } /** returns true if the item is not a link or @@ -113,7 +113,7 @@ public: Id m_id; Id m_idFollowed; - QString m_localPath; + TQString m_localPath; bool m_bSymLink; }; diff --git a/libk3b/projects/datacd/k3bisoimager.cpp b/libk3b/projects/datacd/k3bisoimager.cpp index f44d3ab..b7ff5ad 100644 --- a/libk3b/projects/datacd/k3bisoimager.cpp +++ b/libk3b/projects/datacd/k3bisoimager.cpp @@ -39,11 +39,11 @@ #include <kio/job.h> #include <kstringhandler.h> -#include <qfile.h> -#include <qregexp.h> -#include <qdir.h> -#include <qapplication.h> -#include <qvaluestack.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqapplication.h> +#include <tqvaluestack.h> #include <sys/types.h> #include <sys/stat.h> @@ -65,7 +65,7 @@ public: delete pipe; } - QString imagePath; + TQString imagePath; K3bFileSplitter imageFile; const K3bExternalBin* mkisofsBin; @@ -85,8 +85,8 @@ public: }; -K3bIsoImager::K3bIsoImager( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent, const char* name ) - : K3bJob( hdl, parent, name ), +K3bIsoImager::K3bIsoImager( K3bDataDoc* doc, K3bJobHandler* hdl, TQObject* tqparent, const char* name ) + : K3bJob( hdl, tqparent, name ), m_pathSpecFile(0), m_rrHideFile(0), m_jolietHideFile(0), @@ -103,7 +103,7 @@ K3bIsoImager::K3bIsoImager( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent d = new Private(); d->dataPreparationJob = new K3bDataPreparationJob( doc, this, this ); connectSubJob( d->dataPreparationJob, - SLOT(slotDataPreparationDone(bool)), + TQT_SLOT(slotDataPreparationDone(bool)), DEFAULT_SIGNAL_CONNECTION ); } @@ -127,14 +127,14 @@ void K3bIsoImager::writeToFd( int fd ) } -void K3bIsoImager::writeToImageFile( const QString& path ) +void K3bIsoImager::writeToImageFile( const TQString& path ) { d->imagePath = path; m_fdToWriteTo = -1; } -void K3bIsoImager::slotReceivedStderr( const QString& line ) +void K3bIsoImager::slotReceivedStderr( const TQString& line ) { parseMkisofsOutput( line ); emit debuggingOutput( "mkisofs", line ); @@ -147,7 +147,7 @@ void K3bIsoImager::handleMkisofsProgress( int p ) } -void K3bIsoImager::handleMkisofsInfoMessage( const QString& line, int type ) +void K3bIsoImager::handleMkisofsInfoMessage( const TQString& line, int type ) { emit infoMessage( line, type ); if( type == ERROR ) @@ -164,15 +164,15 @@ void K3bIsoImager::slotProcessExited( KProcess* p ) d->pipe->close(); emit debuggingOutput( "K3bIsoImager", - QString("Pipe throughput: %1 bytes read, %2 bytes written.") - .arg(d->pipe->bytesRead()).arg(d->pipe->bytesWritten()) ); + TQString("Pipe throughput: %1 bytes read, %2 bytes written.") + .tqarg(d->pipe->bytesRead()).tqarg(d->pipe->bytesWritten()) ); if( d->imageFile.isOpen() ) { d->imageFile.close(); if( m_canceled || p->exitStatus() != 0 ) { d->imageFile.remove(); - emit infoMessage( i18n("Removed incomplete image file %1.").arg(d->imageFile.name()), WARNING ); + emit infoMessage( i18n("Removed incomplete image file %1.").tqarg(d->imageFile.name()), WARNING ); } } @@ -210,7 +210,7 @@ void K3bIsoImager::slotProcessExited( KProcess* p ) default: if( !d->knownError && !mkisofsReadError() ) { - emit infoMessage( i18n("%1 returned an unknown error (code %2).").arg("mkisofs").arg(p->exitStatus()), + emit infoMessage( i18n("%1 returned an unknown error (code %2).").tqarg("mkisofs").tqarg(p->exitStatus()), K3bJob::ERROR ); emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR ); } @@ -220,7 +220,7 @@ void K3bIsoImager::slotProcessExited( KProcess* p ) } } else { - emit infoMessage( i18n("%1 did not exit cleanly.").arg("mkisofs"), ERROR ); + emit infoMessage( i18n("%1 did not exit cleanly.").tqarg("mkisofs"), ERROR ); jobFinished( false ); } } @@ -238,9 +238,9 @@ void K3bIsoImager::cleanup() delete m_sortWeightFile; // remove boot-images-temp files - for( QStringList::iterator it = m_tempFiles.begin(); + for( TQStringList::iterator it = m_tempFiles.begin(); it != m_tempFiles.end(); ++it ) - QFile::remove( *it ); + TQFile::remove( *it ); m_tempFiles.clear(); m_pathSpecFile = m_jolietHideFile = m_rrHideFile = m_sortWeightFile = 0; @@ -319,9 +319,9 @@ void K3bIsoImager::startSizeCalculation() // *m_process << dummyDir(); kdDebug() << "***** mkisofs calculate size parameters:\n"; - const QValueList<QCString>& args = m_process->args(); - QString s; - for( QValueList<QCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList<TQCString>& args = m_process->args(); + TQString s; + for( TQValueList<TQCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << endl << flush; @@ -340,23 +340,23 @@ void K3bIsoImager::startSizeCalculation() // TODO: use K3bProcess::OutputCollector instead iof our own two slots. - connect( m_process, SIGNAL(receivedStderr(KProcess*, char*, int)), - this, SLOT(slotCollectMkisofsPrintSizeStderr(KProcess*, char*, int)) ); - connect( m_process, SIGNAL(stdoutLine(const QString&)), - this, SLOT(slotCollectMkisofsPrintSizeStdout(const QString&)) ); - connect( m_process, SIGNAL(processExited(KProcess*)), - this, SLOT(slotMkisofsPrintSizeFinished()) ); + connect( m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + this, TQT_SLOT(slotCollectMkisofsPrintSizeStderr(KProcess*, char*, int)) ); + connect( m_process, TQT_SIGNAL(stdoutLine(const TQString&)), + this, TQT_SLOT(slotCollectMkisofsPrintSizeStdout(const TQString&)) ); + connect( m_process, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotMkisofsPrintSizeFinished()) ); // we also want error messages - connect( m_process, SIGNAL(stderrLine( const QString& )), - this, SLOT(slotReceivedStderr( const QString& )) ); + connect( m_process, TQT_SIGNAL(stderrLine( const TQString& )), + this, TQT_SLOT(slotReceivedStderr( const TQString& )) ); - m_collectedMkisofsPrintSizeStdout = QString::null; - m_collectedMkisofsPrintSizeStderr = QString::null; + m_collectedMkisofsPrintSizeStdout = TQString(); + m_collectedMkisofsPrintSizeStderr = TQString(); m_mkisofsPrintSizeResult = 0; if( !m_process->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { - emit infoMessage( i18n("Could not start %1.").arg("mkisofs"), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg("mkisofs"), K3bJob::ERROR ); cleanup(); jobFinished( false ); @@ -367,12 +367,12 @@ void K3bIsoImager::startSizeCalculation() void K3bIsoImager::slotCollectMkisofsPrintSizeStderr(KProcess*, char* data , int len) { - emit debuggingOutput( "mkisofs", QString::fromLocal8Bit( data, len ) ); - m_collectedMkisofsPrintSizeStderr.append( QString::fromLocal8Bit( data, len ) ); + emit debuggingOutput( "mkisofs", TQString::fromLocal8Bit( data, len ) ); + m_collectedMkisofsPrintSizeStderr.append( TQString::fromLocal8Bit( data, len ) ); } -void K3bIsoImager::slotCollectMkisofsPrintSizeStdout( const QString& line ) +void K3bIsoImager::slotCollectMkisofsPrintSizeStdout( const TQString& line ) { // newer versions of mkisofs outut additional lines of junk before the size :( // so we only use the last line @@ -400,7 +400,7 @@ void K3bIsoImager::slotMkisofsPrintSizeFinished() else { // parse the stderr output // I hope parsing the last line is enough! - int pos = m_collectedMkisofsPrintSizeStderr.findRev( "extents scheduled to be written" ); + int pos = m_collectedMkisofsPrintSizeStderr.tqfindRev( "extents scheduled to be written" ); if( pos == -1 ) success = false; @@ -409,9 +409,9 @@ void K3bIsoImager::slotMkisofsPrintSizeFinished() } emit debuggingOutput( "K3bIsoImager", - QString("mkisofs print size result: %1 (%2 bytes)") - .arg(m_mkisofsPrintSizeResult) - .arg(Q_UINT64(m_mkisofsPrintSizeResult)*2048ULL) ); + TQString("mkisofs print size result: %1 (%2 bytes)") + .tqarg(m_mkisofsPrintSizeResult) + .tqarg(TQ_UINT64(m_mkisofsPrintSizeResult)*2048ULL) ); cleanup(); @@ -485,18 +485,18 @@ void K3bIsoImager::start() return; } - connect( m_process, SIGNAL(processExited(KProcess*)), - this, SLOT(slotProcessExited(KProcess*)) ); + connect( m_process, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotProcessExited(KProcess*)) ); - connect( m_process, SIGNAL(stderrLine( const QString& )), - this, SLOT(slotReceivedStderr( const QString& )) ); + connect( m_process, TQT_SIGNAL(stderrLine( const TQString& )), + this, TQT_SLOT(slotReceivedStderr( const TQString& )) ); // // Check the image file if( m_fdToWriteTo == -1 ) { d->imageFile.setName( d->imagePath ); if( !d->imageFile.open( IO_WriteOnly ) ) { - emit infoMessage( i18n("Could not open %1 for writing").arg(d->imagePath), ERROR ); + emit infoMessage( i18n("Could not open %1 for writing").tqarg(d->imagePath), ERROR ); cleanup(); jobFinished(false); return; @@ -520,9 +520,9 @@ void K3bIsoImager::start() kdDebug() << "***** mkisofs parameters:\n"; - const QValueList<QCString>& args = m_process->args(); - QString s; - for( QValueList<QCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList<TQCString>& args = m_process->args(); + TQString s; + for( TQValueList<TQCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << endl << flush; @@ -532,7 +532,7 @@ void K3bIsoImager::start() // something went wrong when starting the program // it "should" be the executable kdDebug() << "(K3bIsoImager) could not start mkisofs" << endl; - emit infoMessage( i18n("Could not start %1.").arg("mkisofs"), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg("mkisofs"), K3bJob::ERROR ); jobFinished( false ); cleanup(); } @@ -553,7 +553,7 @@ void K3bIsoImager::cancel() } -void K3bIsoImager::setMultiSessionInfo( const QString& info, K3bDevice::Device* dev ) +void K3bIsoImager::setMultiSessionInfo( const TQString& info, K3bDevice::Device* dev ) { m_multiSessionInfo = info; m_device = dev; @@ -563,11 +563,11 @@ void K3bIsoImager::setMultiSessionInfo( const QString& info, K3bDevice::Device* // iso9660 + RR use some latin1 variant. So we need to cut the desc fields // counting 8bit chars. The GUI should take care of restricting the length // and the charset -static void truncateTheHardWay( QString& s, int max ) +static void truncateTheHardWay( TQString& s, int max ) { - QCString cs = s.utf8(); + TQCString cs = s.utf8(); cs.truncate(max); - s = QString::fromUtf8( cs ); + s = TQString::fromUtf8( cs ); } @@ -588,7 +588,7 @@ bool K3bIsoImager::addMkisofsParameters( bool printSize ) *m_process << "-print-size" << "-quiet"; if( !m_doc->isoOptions().volumeID().isEmpty() ) { - QString s = m_doc->isoOptions().volumeID(); + TQString s = m_doc->isoOptions().volumeID(); truncateTheHardWay(s, 32); // ensure max length *m_process << "-volid" << s; } @@ -597,7 +597,7 @@ bool K3bIsoImager::addMkisofsParameters( bool printSize ) *m_process << "-volid" << "CDROM"; } - QString s = m_doc->isoOptions().volumeSetId(); + TQString s = m_doc->isoOptions().volumeSetId(); truncateTheHardWay(s, 128); // ensure max length *m_process << "-volset" << s; @@ -639,8 +639,8 @@ bool K3bIsoImager::addMkisofsParameters( bool printSize ) << " with volume set size: " << volsetSize << endl; volsetSeqNo = volsetSize; } - *m_process << "-volset-size" << QString::number(volsetSize); - *m_process << "-volset-seqno" << QString::number(volsetSeqNo); + *m_process << "-volset-size" << TQString::number(volsetSize); + *m_process << "-volset-seqno" << TQString::number(volsetSeqNo); if( m_sortWeightFile ) { *m_process << "-sort" << m_sortWeightFile->name(); @@ -733,18 +733,18 @@ bool K3bIsoImager::addMkisofsParameters( bool printSize ) if( m_doc->isoOptions().hideTRANS_TBL() ) *m_process << "-hide-joliet-trans-tbl"; - *m_process << "-iso-level" << QString::number(m_doc->isoOptions().ISOLevel()); + *m_process << "-iso-level" << TQString::number(m_doc->isoOptions().ISOLevel()); if( m_doc->isoOptions().forceInputCharset() ) *m_process << "-input-charset" << m_doc->isoOptions().inputCharset(); - *m_process << "-path-list" << QFile::encodeName(m_pathSpecFile->name()); + *m_process << "-path-list" << TQFile::encodeName(m_pathSpecFile->name()).data(); // boot stuff if( !m_doc->bootImages().isEmpty() ) { bool first = true; - for( QPtrListIterator<K3bBootItem> it( m_doc->bootImages() ); + for( TQPtrListIterator<K3bBootItem> it( m_doc->bootImages() ); *it; ++it ) { if( !first ) *m_process << "-eltorito-alt-boot"; @@ -760,9 +760,9 @@ bool K3bIsoImager::addMkisofsParameters( bool printSize ) else if( bootItem->imageType() == K3bBootItem::NONE ) { *m_process << "-no-emul-boot"; if( bootItem->loadSegment() > 0 ) - *m_process << "-boot-load-seg" << QString::number(bootItem->loadSegment()); + *m_process << "-boot-load-seg" << TQString::number(bootItem->loadSegment()); if( bootItem->loadSize() > 0 ) - *m_process << "-boot-load-size" << QString::number(bootItem->loadSize()); + *m_process << "-boot-load-size" << TQString::number(bootItem->loadSize()); } if( bootItem->imageType() != K3bBootItem::NONE && bootItem->noBoot() ) @@ -778,8 +778,8 @@ bool K3bIsoImager::addMkisofsParameters( bool printSize ) // additional parameters from config - const QStringList& params = k3bcore->externalBinManager()->binObject( "mkisofs" )->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = k3bcore->externalBinManager()->binObject( "mkisofs" )->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *m_process << *it; return true; @@ -792,7 +792,7 @@ int K3bIsoImager::writePathSpec() m_pathSpecFile = new KTempFile(); m_pathSpecFile->setAutoDelete(true); - if( QTextStream* t = m_pathSpecFile->textStream() ) { + if( TQTextStream* t = m_pathSpecFile->textStream() ) { // recursive path spec writing int num = writePathSpecForDir( m_doc->root(), *t ); @@ -805,7 +805,7 @@ int K3bIsoImager::writePathSpec() } -int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream ) +int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, TQTextStream& stream ) { if( !m_noDeepDirectoryRelocation && dirItem->depth() > 7 ) { kdDebug() << "(K3bIsoImager) found directory depth > 7. Enabling no deep directory relocation." << endl; @@ -814,7 +814,7 @@ int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream // now create the graft points int num = 0; - for( QPtrListIterator<K3bDataItem> it( dirItem->children() ); it.current(); ++it ) { + for( TQPtrListIterator<K3bDataItem> it( dirItem->tqchildren() ); it.current(); ++it ) { K3bDataItem* item = it.current(); bool writeItem = item->writeToCd(); @@ -825,29 +825,29 @@ int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream writeItem = false; else if( d->usedLinkHandling == Private::FOLLOW ) { - QFileInfo f( K3b::resolveLink( item->localPath() ) ); + TQFileInfo f( K3b::resolveLink( item->localPath() ) ); if( !f.exists() ) { emit infoMessage( i18n("Could not follow link %1 to non-existing file %2. Skipping...") - .arg(item->k3bName()) - .arg(f.filePath()), WARNING ); + .tqarg(item->k3bName()) + .tqarg(f.filePath()), WARNING ); writeItem = false; } else if( f.isDir() ) { emit infoMessage( i18n("Ignoring link %1 to folder %2. K3b is unable to follow links to folders.") - .arg(item->k3bName()) - .arg(f.filePath()), WARNING ); + .tqarg(item->k3bName()) + .tqarg(f.filePath()), WARNING ); writeItem = false; } } } else if( item->isFile() ) { - QFileInfo f( item->localPath() ); + TQFileInfo f( item->localPath() ); if( !f.exists() ) { - emit infoMessage( i18n("Could not find file %1. Skipping...").arg(item->localPath()), WARNING ); + emit infoMessage( i18n("Could not find file %1. Skipping...").tqarg(item->localPath()), WARNING ); writeItem = false; } else if( !f.isReadable() ) { - emit infoMessage( i18n("Could not read file %1. Skipping...").arg(item->localPath()), WARNING ); + emit infoMessage( i18n("Could not read file %1. Skipping...").tqarg(item->localPath()), WARNING ); writeItem = false; } } @@ -857,7 +857,7 @@ int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream // some versions of mkisofs seem to have a bug that prevents to use filenames // that contain one or more backslashes - if( item->writtenPath().contains("\\") ) + if( item->writtenPath().tqcontains("\\") ) m_containsFilesWithMultibleBackslashes = true; @@ -882,20 +882,20 @@ int K3bIsoImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream } -void K3bIsoImager::writePathSpecForFile( K3bFileItem* item, QTextStream& stream ) +void K3bIsoImager::writePathSpecForFile( K3bFileItem* item, TQTextStream& stream ) { stream << escapeGraftPoint( item->writtenPath() ) << "="; - if( m_doc->bootImages().containsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack + if( m_doc->bootImages().tqcontainsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack // create temp file KTempFile temp; - QString tempPath = temp.name(); + TQString tempPath = temp.name(); temp.unlink(); if( !KIO::NetAccess::copy( KURL(item->localPath()), KURL::fromPathOrURL(tempPath) ) ) { - emit infoMessage( i18n("Failed to backup boot image file %1").arg(item->localPath()), ERROR ); + emit infoMessage( i18n("Failed to backup boot image file %1").tqarg(item->localPath()), ERROR ); return; } @@ -917,7 +917,7 @@ bool K3bIsoImager::writeRRHideFile() m_rrHideFile = new KTempFile(); m_rrHideFile->setAutoDelete(true); - if( QTextStream* t = m_rrHideFile->textStream() ) { + if( TQTextStream* t = m_rrHideFile->textStream() ) { K3bDataItem* item = m_doc->root(); while( item ) { @@ -942,7 +942,7 @@ bool K3bIsoImager::writeJolietHideFile() m_jolietHideFile = new KTempFile(); m_jolietHideFile->setAutoDelete(true); - if( QTextStream* t = m_jolietHideFile->textStream() ) { + if( TQTextStream* t = m_jolietHideFile->textStream() ) { K3bDataItem* item = m_doc->root(); while( item ) { @@ -967,7 +967,7 @@ bool K3bIsoImager::writeSortWeightFile() m_sortWeightFile = new KTempFile(); m_sortWeightFile->setAutoDelete(true); - if( QTextStream* t = m_sortWeightFile->textStream() ) { + if( TQTextStream* t = m_sortWeightFile->textStream() ) { // // We need to write the local path in combination with the sort weight // mkisofs will take care of multiple entries for one local file and always @@ -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().containsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack + if( m_doc->bootImages().tqcontainsRef( dynamic_cast<K3bBootItem*>(item) ) ) { // boot-image-backup-hack *t << escapeGraftPoint( static_cast<K3bBootItem*>(item)->tempPath() ) << " " << item->sortWeight() << endl; } else if( item->isDir() ) { @@ -999,9 +999,9 @@ bool K3bIsoImager::writeSortWeightFile() } -QString K3bIsoImager::escapeGraftPoint( const QString& str ) +TQString K3bIsoImager::escapeGraftPoint( const TQString& str ) { - QString enc = str; + TQString enc = str; // // mkisofs manpage (-graft-points) is incorrect (as of mkisofs 2.01.01) @@ -1018,8 +1018,8 @@ QString K3bIsoImager::escapeGraftPoint( const QString& str ) // // - // we do not use QString::replace to have full control - // this might be slow since QString::insert is slow but we don't care + // we do not use TQString::replace to have full control + // this might be slow since TQString::insert is slow but we don't care // since this is only called to prepare the iso creation which is not // time critical. :) // @@ -1049,8 +1049,8 @@ QString K3bIsoImager::escapeGraftPoint( const QString& str ) ++pos; } -// enc.replace( "\\\\", "\\\\\\\\" ); -// enc.replace( "=", "\\=" ); +// enc.tqreplace( "\\\\", "\\\\\\\\" ); +// enc.tqreplace( "=", "\\=" ); return enc; } @@ -1093,43 +1093,43 @@ bool K3bIsoImager::prepareMkisofsFiles() } -QString K3bIsoImager::dummyDir( K3bDirItem* dir ) +TQString K3bIsoImager::dummyDir( K3bDirItem* dir ) { // // since we use virtual folders in order to have folders with different weight factors and different // permissions we create different dummy dirs to be passed to mkisofs // - QDir _appDir( locateLocal( "appdata", "temp/" ) ); + TQDir _appDir( locateLocal( "appdata", "temp/" ) ); // // create a unique isoimager session id // This might become important in case we will allow multiple instances of the isoimager // to run at the same time. // - QString jobId = qApp->sessionId() + "_" + QString::number( m_sessionNumber ); + TQString jobId = tqApp->sessionId() + "_" + TQString::number( m_sessionNumber ); if( !_appDir.cd( jobId ) ) { _appDir.mkdir( jobId ); _appDir.cd( jobId ); } - QString name( "dummydir_" ); - name += QString::number( dir->sortWeight() ); + TQString name( "dummydir_" ); + name += TQString::number( dir->sortWeight() ); bool perm = false; k3b_struct_stat statBuf; if( !dir->localPath().isEmpty() ) { // permissions - if( k3b_stat( QFile::encodeName(dir->localPath()), &statBuf ) == 0 ) { + if( k3b_stat( TQFile::encodeName(dir->localPath()), &statBuf ) == 0 ) { name += "_"; - name += QString::number( statBuf.st_uid ); + name += TQString::number( statBuf.st_uid ); name += "_"; - name += QString::number( statBuf.st_gid ); + name += TQString::number( statBuf.st_gid ); name += "_"; - name += QString::number( statBuf.st_mode ); + name += TQString::number( statBuf.st_mode ); name += "_"; - name += QString::number( statBuf.st_mtime ); + name += TQString::number( statBuf.st_mtime ); perm = true; } @@ -1144,11 +1144,11 @@ QString K3bIsoImager::dummyDir( K3bDirItem* dir ) _appDir.cd( name ); if( perm ) { - ::chmod( QFile::encodeName( _appDir.absPath() ), statBuf.st_mode ); - ::chown( QFile::encodeName( _appDir.absPath() ), statBuf.st_uid, statBuf.st_gid ); + ::chmod( TQFile::encodeName( _appDir.absPath() ), statBuf.st_mode ); + ::chown( TQFile::encodeName( _appDir.absPath() ), statBuf.st_uid, statBuf.st_gid ); struct utimbuf tb; tb.actime = tb.modtime = statBuf.st_mtime; - ::utime( QFile::encodeName( _appDir.absPath() ), &tb ); + ::utime( TQFile::encodeName( _appDir.absPath() ), &tb ); } } @@ -1158,11 +1158,11 @@ QString K3bIsoImager::dummyDir( K3bDirItem* dir ) void K3bIsoImager::clearDummyDirs() { - QString jobId = qApp->sessionId() + "_" + QString::number( m_sessionNumber ); - QDir appDir( locateLocal( "appdata", "temp/" ) ); + TQString jobId = tqApp->sessionId() + "_" + TQString::number( m_sessionNumber ); + TQDir appDir( locateLocal( "appdata", "temp/" ) ); if( appDir.cd( jobId ) ) { - QStringList dummyDirEntries = appDir.entryList( "dummydir*", QDir::Dirs ); - for( QStringList::iterator it = dummyDirEntries.begin(); it != dummyDirEntries.end(); ++it ) + TQStringList dummyDirEntries = appDir.entryList( "dummydir*", TQDir::Dirs ); + for( TQStringList::iterator it = dummyDirEntries.begin(); it != dummyDirEntries.end(); ++it ) appDir.rmdir( *it ); appDir.cdUp(); appDir.rmdir( jobId ); @@ -1170,12 +1170,12 @@ void K3bIsoImager::clearDummyDirs() } -QCString K3bIsoImager::checksum() const +TQCString K3bIsoImager::checksum() const { if( K3bChecksumPipe* p = dynamic_cast<K3bChecksumPipe*>( d->pipe ) ) return p->checksum(); else - return QCString(); + return TQCString(); } diff --git a/libk3b/projects/datacd/k3bisoimager.h b/libk3b/projects/datacd/k3bisoimager.h index 82501ba..446fef8 100644 --- a/libk3b/projects/datacd/k3bisoimager.h +++ b/libk3b/projects/datacd/k3bisoimager.h @@ -19,14 +19,14 @@ #include <k3bjob.h> #include "k3bmkisofshandler.h" -#include <qptrqueue.h> -#include <qstringlist.h> +#include <tqptrqueue.h> +#include <tqstringlist.h> class K3bDataDoc; class K3bDirItem; class K3bDataItem; class K3bFileItem; -class QTextStream; +class TQTextStream; class K3bProcess; class KProcess; class K3bDevice::Device; @@ -36,9 +36,10 @@ class KTempFile; class K3bIsoImager : public K3bJob, public K3bMkisofsHandler { Q_OBJECT + TQ_OBJECT public: - K3bIsoImager( K3bDataDoc*, K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bIsoImager( K3bDataDoc*, K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bIsoImager(); virtual bool active() const; @@ -50,7 +51,7 @@ class K3bIsoImager : public K3bJob, public K3bMkisofsHandler /** * Get the checksum calculated during the creation of the image. */ - QCString checksum() const; + TQCString checksum() const; public slots: /** @@ -86,20 +87,20 @@ class K3bIsoImager : public K3bJob, public K3bMkisofsHandler */ void writeToFd( int fd ); - void writeToImageFile( const QString& path ); + void writeToImageFile( const TQString& path ); /** * If dev == 0 K3bIsoImager will ignore the data in the previous session. * This is usable for CD-Extra. */ - void setMultiSessionInfo( const QString&, K3bDevice::Device* dev = 0 ); + void setMultiSessionInfo( const TQString&, K3bDevice::Device* dev = 0 ); K3bDevice::Device* device() const { return m_device; } K3bDataDoc* doc() const { return m_doc; } protected: virtual void handleMkisofsProgress( int ); - virtual void handleMkisofsInfoMessage( const QString&, int ); + virtual void handleMkisofsInfoMessage( const TQString&, int ); virtual bool addMkisofsParameters( bool printSize = false ); @@ -113,7 +114,7 @@ class K3bIsoImager : public K3bJob, public K3bMkisofsHandler * * @return an empty dummy dir for use with K3bDirItems. */ - QString dummyDir( K3bDirItem* ); + TQString dummyDir( K3bDirItem* ); void outputData(); void initVariables(); @@ -129,9 +130,9 @@ class K3bIsoImager : public K3bJob, public K3bMkisofsHandler bool writeSortWeightFile(); // used by writePathSpec - virtual int writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream ); - virtual void writePathSpecForFile( K3bFileItem*, QTextStream& stream ); - QString escapeGraftPoint( const QString& str ); + virtual int writePathSpecForDir( K3bDirItem* dirItem, TQTextStream& stream ); + virtual void writePathSpecForFile( K3bFileItem*, TQTextStream& stream ); + TQString escapeGraftPoint( const TQString& str ); KTempFile* m_pathSpecFile; KTempFile* m_rrHideFile; @@ -144,12 +145,12 @@ class K3bIsoImager : public K3bJob, public K3bMkisofsHandler bool m_canceled; protected slots: - virtual void slotReceivedStderr( const QString& ); + virtual void slotReceivedStderr( const TQString& ); virtual void slotProcessExited( KProcess* ); private slots: void slotCollectMkisofsPrintSizeStderr(KProcess*, char*, int); - void slotCollectMkisofsPrintSizeStdout( const QString& ); + void slotCollectMkisofsPrintSizeStdout( const TQString& ); void slotMkisofsPrintSizeFinished(); void slotDataPreparationDone( bool success ); @@ -164,15 +165,15 @@ class K3bIsoImager : public K3bJob, public K3bMkisofsHandler bool m_noDeepDirectoryRelocation; bool m_importSession; - QString m_multiSessionInfo; + TQString m_multiSessionInfo; K3bDevice::Device* m_device; // used for mkisofs -print-size parsing - QString m_collectedMkisofsPrintSizeStdout; - QString m_collectedMkisofsPrintSizeStderr; + TQString m_collectedMkisofsPrintSizeStdout; + TQString m_collectedMkisofsPrintSizeStderr; int m_mkisofsPrintSizeResult; - QStringList m_tempFiles; + TQStringList m_tempFiles; int m_fdToWriteTo; diff --git a/libk3b/projects/datacd/k3bisooptions.cpp b/libk3b/projects/datacd/k3bisooptions.cpp index bd7314d..5adca1a 100644 --- a/libk3b/projects/datacd/k3bisooptions.cpp +++ b/libk3b/projects/datacd/k3bisooptions.cpp @@ -20,12 +20,12 @@ #include <kconfig.h> #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> K3bIsoOptions::K3bIsoOptions() : m_volumeID( "K3b data project" ), - m_applicationID( QString("K3B THE CD KREATOR (C) 1998-2006 SEBASTIAN TRUEG AND THE K3B TEAM") ), + m_applicationID( TQString("K3B THE CD KREATOR (C) 1998-2006 SEBASTIAN TRUEG AND THE K3B TEAM") ), m_systemId( K3b::systemName().upper() ), m_inputCharset( "iso8859-1" ), m_whiteSpaceTreatmentReplaceString( "_" ) @@ -118,8 +118,8 @@ void K3bIsoOptions::save( KConfigBase* c, bool saveVolumeDesc ) case extended: c->writeEntry( "white_space_treatment", "extended" ); break; - case replace: - c->writeEntry( "white_space_treatment", "replace" ); + case tqreplace: + c->writeEntry( "white_space_treatment", "tqreplace" ); break; default: c->writeEntry( "white_space_treatment", "noChange" ); @@ -188,9 +188,9 @@ K3bIsoOptions K3bIsoOptions::load( KConfigBase* c, bool loadVolumeDesc ) options.setDoNotCacheInodes( c->readBoolEntry( "do not cache inodes", options.doNotCacheInodes() ) ); - QString w = c->readEntry( "white_space_treatment", "noChange" ); - if( w == "replace" ) - options.setWhiteSpaceTreatment( replace ); + TQString w = c->readEntry( "white_space_treatment", "noChange" ); + if( w == "tqreplace" ) + options.setWhiteSpaceTreatment( tqreplace ); 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 254c998..570f3d3 100644 --- a/libk3b/projects/datacd/k3bisooptions.h +++ b/libk3b/projects/datacd/k3bisooptions.h @@ -16,7 +16,7 @@ #ifndef K3B_ISO_OPTIONS_H #define K3B_ISO_OPTIONS_H -#include <qstring.h> +#include <tqstring.h> #include "k3b_export.h" class KConfigBase; @@ -28,10 +28,10 @@ class LIBK3B_EXPORT K3bIsoOptions K3bIsoOptions(); bool forceInputCharset() const { return m_bForceInputCharset; } - const QString& inputCharset() const { return m_inputCharset; } + const TQString& inputCharset() const { return m_inputCharset; } void setForceInputCharset( bool b ) { m_bForceInputCharset = b; } - void setInputCharset( const QString& cs ) { m_inputCharset = cs; } + void setInputCharset( const TQString& cs ) { m_inputCharset = cs; } // -- mkisofs-options ---------------------------------------------------------------------- @@ -56,17 +56,17 @@ class LIBK3B_EXPORT K3bIsoOptions bool preserveFilePermissions() const { return m_preserveFilePermissions; } int ISOLevel() const { return m_isoLevel; } - const QString& systemId() const { return m_systemId; } - const QString& applicationID() const { return m_applicationID; } - const QString& volumeID() const { return m_volumeID; } - const QString& volumeSetId() const { return m_volumeSetId; } + const TQString& systemId() const { return m_systemId; } + const TQString& applicationID() const { return m_applicationID; } + const TQString& volumeID() const { return m_volumeID; } + const TQString& volumeSetId() const { return m_volumeSetId; } int volumeSetSize() const { return m_volumeSetSize; } int volumeSetNumber() const { return m_volumeSetNumber; } - const QString& publisher() const { return m_publisher; } - const QString& preparer() const { return m_preparer; } - const QString& abstractFile() const { return m_abstractFile; } - const QString& copyrightFile() const { return m_copyrightFile; } - const QString& bibliographFile() const { return m_bibliographFile; } + const TQString& publisher() const { return m_publisher; } + const TQString& preparer() const { return m_preparer; } + const TQString& abstractFile() const { return m_abstractFile; } + const TQString& copyrightFile() const { return m_copyrightFile; } + const TQString& bibliographFile() const { return m_bibliographFile; } void setCreateRockRidge( bool b ) { m_createRockRidge = b; } void setCreateJoliet( bool b ) { m_createJoliet = b; } @@ -87,33 +87,33 @@ class LIBK3B_EXPORT K3bIsoOptions void setJolietLong( bool b ) { m_jolietLong = b; } void setISOLevel( int i ) { m_isoLevel = i; } - void setSystemId( const QString& s ) { m_systemId = s; } - void setApplicationID( const QString& s ) { m_applicationID = s; } + void setSystemId( const TQString& s ) { m_systemId = s; } + void setApplicationID( const TQString& s ) { m_applicationID = s; } /** * Set the filesystems volume id. * * max length for this field is 32 chars. */ - void setVolumeID( const QString& s ) { m_volumeID = s; } - void setVolumeSetId( const QString& s ) { m_volumeSetId = s; } + void setVolumeID( const TQString& s ) { m_volumeID = s; } + void setVolumeSetId( const TQString& s ) { m_volumeSetId = s; } void setVolumeSetSize( int size ) { m_volumeSetSize = size; } void setVolumeSetNumber( int n ) { m_volumeSetNumber = n; } - void setPublisher( const QString& s ) { m_publisher = s; } - void setPreparer( const QString& s ) { m_preparer = s; } - void setAbstractFile( const QString& s ) { m_abstractFile = s; } - void setCoprightFile( const QString& s ) { m_copyrightFile = s; } - void setBibliographFile( const QString& s ) { m_bibliographFile = s; } + void setPublisher( const TQString& s ) { m_publisher = s; } + void setPreparer( const TQString& s ) { m_preparer = s; } + void setAbstractFile( const TQString& s ) { m_abstractFile = s; } + void setCoprightFile( const TQString& s ) { m_copyrightFile = s; } + void setBibliographFile( const TQString& s ) { m_bibliographFile = s; } void setPreserveFilePermissions( bool b ) { m_preserveFilePermissions = b; } // ----------------------------------------------------------------- mkisofs-options ----------- - enum whiteSpaceTreatments { noChange = 0, replace = 1, strip = 2, extended = 3 }; + enum whiteSpaceTreatments { noChange = 0, tqreplace = 1, strip = 2, extended = 3 }; void setWhiteSpaceTreatment( int i ) { m_whiteSpaceTreatment = i; } int whiteSpaceTreatment() const { return m_whiteSpaceTreatment; } - const QString& whiteSpaceTreatmentReplaceString() const { return m_whiteSpaceTreatmentReplaceString; } - void setWhiteSpaceTreatmentReplaceString( const QString& s ) { m_whiteSpaceTreatmentReplaceString = s; } + const TQString& whiteSpaceTreatmentReplaceString() const { return m_whiteSpaceTreatmentReplaceString; } + void setWhiteSpaceTreatmentReplaceString( const TQString& s ) { m_whiteSpaceTreatmentReplaceString = s; } bool discardSymlinks() const { return m_discardSymlinks; } void setDiscardSymlinks( bool b ) { m_discardSymlinks = b; } @@ -131,21 +131,21 @@ class LIBK3B_EXPORT K3bIsoOptions private: // volume descriptor - QString m_volumeID; - QString m_applicationID; - QString m_preparer; - QString m_publisher; - QString m_systemId; - QString m_volumeSetId; - QString m_abstractFile; - QString m_copyrightFile; - QString m_bibliographFile; + TQString m_volumeID; + TQString m_applicationID; + TQString m_preparer; + TQString m_publisher; + TQString m_systemId; + TQString m_volumeSetId; + TQString m_abstractFile; + TQString m_copyrightFile; + TQString m_bibliographFile; int m_volumeSetSize; int m_volumeSetNumber; bool m_bForceInputCharset; - QString m_inputCharset; + TQString m_inputCharset; // mkisofs options ------------------------------------- bool m_createRockRidge; // -r or -R @@ -174,7 +174,7 @@ class LIBK3B_EXPORT K3bIsoOptions int m_whiteSpaceTreatment; - QString m_whiteSpaceTreatmentReplaceString; + TQString m_whiteSpaceTreatmentReplaceString; bool m_discardSymlinks; bool m_discardBrokenSymlinks; diff --git a/libk3b/projects/datacd/k3bmkisofshandler.cpp b/libk3b/projects/datacd/k3bmkisofshandler.cpp index a3579ec..5fdb526 100644 --- a/libk3b/projects/datacd/k3bmkisofshandler.cpp +++ b/libk3b/projects/datacd/k3bmkisofshandler.cpp @@ -61,7 +61,7 @@ const K3bExternalBin* K3bMkisofsHandler::initMkisofs() if( d->mkisofsBin ) { if( !d->mkisofsBin->copyright.isEmpty() ) handleMkisofsInfoMessage( i18n("Using %1 %2 - Copyright (C) %3") - .arg("mkisofs").arg(d->mkisofsBin->version).arg(d->mkisofsBin->copyright), + .tqarg("mkisofs").tqarg(d->mkisofsBin->version).tqarg(d->mkisofsBin->copyright), K3bJob::INFO ); d->firstProgressValue = -1; @@ -76,14 +76,14 @@ const K3bExternalBin* K3bMkisofsHandler::initMkisofs() } -void K3bMkisofsHandler::parseMkisofsOutput( const QString& line ) +void K3bMkisofsHandler::parseMkisofsOutput( const TQString& line ) { if( !line.isEmpty() ) { if( line.startsWith( d->mkisofsBin->path ) ) { // error or warning - QString errorLine = line.mid( d->mkisofsBin->path.length() + 2 ); + TQString errorLine = line.mid( d->mkisofsBin->path.length() + 2 ); if( errorLine.startsWith( "Input/output error. Cannot read from" ) ) { - handleMkisofsInfoMessage( i18n("Read error from file '%1'").arg( errorLine.mid( 38, errorLine.length()-40 ) ), + handleMkisofsInfoMessage( i18n("Read error from file '%1'").tqarg( errorLine.mid( 38, errorLine.length()-40 ) ), K3bJob::ERROR ); d->readError = true; } @@ -93,17 +93,17 @@ void K3bMkisofsHandler::parseMkisofsOutput( const QString& line ) d->readError = true; } } - else if( line.contains( "done, estimate" ) ) { + else if( line.tqcontains( "done, estimate" ) ) { int p = parseMkisofsProgress( line ); if( p != -1 ) handleMkisofsProgress( p ); } - else if( line.contains( "extents written" ) ) { + else if( line.tqcontains( "extents written" ) ) { handleMkisofsProgress( 100 ); } else if( line.startsWith( "Incorrectly encoded string" ) ) { handleMkisofsInfoMessage( i18n("Encountered an incorrectly encoded filename '%1'") - .arg(line.section( QRegExp("[\\(\\)]"), 1, 1 )), K3bJob::ERROR ); + .tqarg(line.section( TQRegExp("[\\(\\)]"), 1, 1 )), K3bJob::ERROR ); handleMkisofsInfoMessage( i18n("This may be caused by a system update which changed the local character set."), K3bJob::ERROR ); handleMkisofsInfoMessage( i18n("You may use convmv (http://j3e.de/linux/convmv/) to fix the filename encoding."), K3bJob::ERROR ); d->readError = true; @@ -124,7 +124,7 @@ void K3bMkisofsHandler::parseMkisofsOutput( const QString& line ) } -int K3bMkisofsHandler::parseMkisofsProgress( const QString& line ) +int K3bMkisofsHandler::parseMkisofsProgress( const TQString& line ) { // // in multisession mode mkisofs' progress does not start at 0 but at (X+Y)/X @@ -133,8 +133,8 @@ int K3bMkisofsHandler::parseMkisofsProgress( const QString& line ) // We just save the first emitted progress value and to some math ;) // - QString perStr = line; - perStr.truncate( perStr.find('%') ); + TQString perStr = line; + perStr.truncate( perStr.tqfind('%') ); bool ok; double p = perStr.toDouble( &ok ); if( !ok ) { diff --git a/libk3b/projects/datacd/k3bmkisofshandler.h b/libk3b/projects/datacd/k3bmkisofshandler.h index 32576bc..0692b4e 100644 --- a/libk3b/projects/datacd/k3bmkisofshandler.h +++ b/libk3b/projects/datacd/k3bmkisofshandler.h @@ -16,7 +16,7 @@ #ifndef _K3B_MKISOfS_HANDLER_H_ #define _K3B_MKISOfS_HANDLER_H_ -#include <qstring.h> +#include <tqstring.h> class K3bExternalBin; @@ -45,13 +45,13 @@ class K3bMkisofsHandler */ const K3bExternalBin* initMkisofs(); - void parseMkisofsOutput( const QString& line ); + void parseMkisofsOutput( const TQString& line ); /** * Used internally by handleMkisofsOutput. * May be used in case handleMkisofsOutput is not sufficient. */ - int parseMkisofsProgress( const QString& line ); + int parseMkisofsProgress( const TQString& line ); /** * Called by handleMkisofsOutput @@ -63,7 +63,7 @@ class K3bMkisofsHandler * * Uses K3bJob::MessageType */ - virtual void handleMkisofsInfoMessage( const QString&, int ) = 0; + virtual void handleMkisofsInfoMessage( const TQString&, int ) = 0; private: class Private; diff --git a/libk3b/projects/datacd/k3bmsinfofetcher.cpp b/libk3b/projects/datacd/k3bmsinfofetcher.cpp index c30d0ff..14eca4f 100644 --- a/libk3b/projects/datacd/k3bmsinfofetcher.cpp +++ b/libk3b/projects/datacd/k3bmsinfofetcher.cpp @@ -27,11 +27,11 @@ #include <kprocess.h> #include <kdebug.h> -#include <qstringlist.h> +#include <tqstringlist.h> -K3bMsInfoFetcher::K3bMsInfoFetcher( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bJob( jh, parent, name ), +K3bMsInfoFetcher::K3bMsInfoFetcher( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bJob( jh, tqparent, name ), m_process(0), m_device(0), m_dvd(false) @@ -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 find %1 executable.").arg("cdrecord"), K3bJob::ERROR ); + emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), K3bJob::ERROR ); jobFinished(false); return; } @@ -70,9 +70,9 @@ void K3bMsInfoFetcher::start() // connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::NG_DISKINFO, m_device ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotMediaDetectionFinished(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotMediaDetectionFinished(K3bDevice::DeviceHandler*)) ); } @@ -89,7 +89,7 @@ void K3bMsInfoFetcher::getMsInfo() bin = k3bcore->externalBinManager()->binObject( "cdrecord" ); if( !bin ) { - emit infoMessage( i18n("Could not find %1 executable.").arg( m_dvd ? "dvdrecord" : "cdrecord" ), ERROR ); + emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg( m_dvd ? "dvdrecord" : "cdrecord" ), ERROR ); jobFinished(false); return; } @@ -97,38 +97,38 @@ void K3bMsInfoFetcher::getMsInfo() *m_process << bin->path; // add the device (e.g. /dev/sg1) - *m_process << QString("dev=%1").arg( K3b::externalBinDeviceParameter(m_device, bin) ); + *m_process << TQString("dev=%1").tqarg( K3b::externalBinDeviceParameter(m_device, bin) ); *m_process << "-msinfo"; // additional user parameters from config - const QStringList& params = bin->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = bin->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *m_process << *it; kdDebug() << "***** " << bin->name() << " parameters:\n"; - const QValueList<QCString>& args = m_process->args(); - QString s; - for( QValueList<QCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList<TQCString>& args = m_process->args(); + TQString s; + for( TQValueList<TQCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << flush << endl; emit debuggingOutput( "msinfo command:", s ); - // connect( m_process, SIGNAL(receivedStderr(KProcess*, char*, int)), - // this, SLOT(slotCollectOutput(KProcess*, char*, int)) ); - connect( m_process, SIGNAL(receivedStdout(KProcess*, char*, int)), - this, SLOT(slotCollectOutput(KProcess*, char*, int)) ); - connect( m_process, SIGNAL(processExited(KProcess*)), - this, SLOT(slotProcessExited()) ); + // connect( m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + // this, TQT_SLOT(slotCollectOutput(KProcess*, char*, int)) ); + connect( m_process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this, TQT_SLOT(slotCollectOutput(KProcess*, char*, int)) ); + connect( m_process, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotProcessExited()) ); - m_msInfo = QString::null; - m_collectedOutput = QString::null; + m_msInfo = TQString(); + m_collectedOutput = TQString(); m_canceled = false; if( !m_process->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { - emit infoMessage( i18n("Could not start %1.").arg(bin->name()), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg(bin->name()), K3bJob::ERROR ); jobFinished(false); } } @@ -161,7 +161,7 @@ void K3bMsInfoFetcher::slotMediaDetectionFinished( K3bDevice::DeviceHandler* h ) } else { emit infoMessage( i18n("Could not open Iso9660 filesystem in %1.") - .arg( m_device->vendor() + " " + m_device->description() ), ERROR ); + .tqarg( m_device->vendor() + " " + m_device->description() ), ERROR ); jobFinished( false ); } } @@ -190,8 +190,8 @@ void K3bMsInfoFetcher::slotProcessExited() kdDebug() << "(K3bMsInfoFetcher) msinfo fetched" << endl; // now parse the output - QString firstLine = m_collectedOutput.left( m_collectedOutput.find("\n") ); - QStringList list = QStringList::split( ",", firstLine ); + TQString firstLine = m_collectedOutput.left( m_collectedOutput.tqfind("\n") ); + TQStringList list = TQStringList::split( ",", firstLine ); if( list.count() == 2 ) { bool ok1, ok2; m_lastSessionStart = list.first().toInt( &ok1 ); @@ -199,10 +199,10 @@ void K3bMsInfoFetcher::slotProcessExited() if( ok1 && ok2 ) m_msInfo = firstLine.stripWhiteSpace(); else - m_msInfo = QString::null; + m_msInfo = TQString(); } else { - m_msInfo = QString::null; + m_msInfo = TQString(); } kdDebug() << "(K3bMsInfoFetcher) msinfo parsed: " << m_msInfo << endl; @@ -220,9 +220,9 @@ void K3bMsInfoFetcher::slotProcessExited() void K3bMsInfoFetcher::slotCollectOutput( KProcess*, char* output, int len ) { - emit debuggingOutput( "msinfo", QString::fromLocal8Bit( output, len ) ); + emit debuggingOutput( "msinfo", TQString::fromLocal8Bit( output, len ) ); - m_collectedOutput += QString::fromLocal8Bit( output, len ); + m_collectedOutput += TQString::fromLocal8Bit( output, len ); } diff --git a/libk3b/projects/datacd/k3bmsinfofetcher.h b/libk3b/projects/datacd/k3bmsinfofetcher.h index 593664f..da609cb 100644 --- a/libk3b/projects/datacd/k3bmsinfofetcher.h +++ b/libk3b/projects/datacd/k3bmsinfofetcher.h @@ -27,12 +27,13 @@ class KProcess; class K3bMsInfoFetcher : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bMsInfoFetcher( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bMsInfoFetcher( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bMsInfoFetcher(); - const QString& msInfo() const { return m_msInfo; } + const TQString& msInfo() const { return m_msInfo; } int lastSessionStart() const { return m_lastSessionStart; } int nextSessionStart() const { return m_nextSessionStart; } @@ -49,10 +50,10 @@ class K3bMsInfoFetcher : public K3bJob void getMsInfo(); private: - QString m_msInfo; + TQString m_msInfo; int m_lastSessionStart; int m_nextSessionStart; - QString m_collectedOutput; + TQString m_collectedOutput; KProcess* m_process; K3bDevice::Device* m_device; diff --git a/libk3b/projects/datacd/k3bsessionimportitem.cpp b/libk3b/projects/datacd/k3bsessionimportitem.cpp index 35f7936..9173d5e 100644 --- a/libk3b/projects/datacd/k3bsessionimportitem.cpp +++ b/libk3b/projects/datacd/k3bsessionimportitem.cpp @@ -29,8 +29,8 @@ K3bSessionImportItem::K3bSessionImportItem( const K3bIso9660File* isoF, K3bDataD setK3bName( isoF->name() ); // add automagically like a qlistviewitem - if( parent() ) - parent()->addDataItem( this ); + if( tqparent() ) + tqparent()->addDataItem( this ); } @@ -47,9 +47,9 @@ K3bSessionImportItem::~K3bSessionImportItem() if( m_replaceItem ) m_replaceItem->setReplacedItemFromOldSession(0); - // remove this from parentdir - if( parent() ) - parent()->takeDataItem( this ); + // remove this from tqparentdir + if( tqparent() ) + tqparent()->takeDataItem( this ); } diff --git a/libk3b/projects/datacd/k3bspecialdataitem.h b/libk3b/projects/datacd/k3bspecialdataitem.h index 05005ed..e2efa6c 100644 --- a/libk3b/projects/datacd/k3bspecialdataitem.h +++ b/libk3b/projects/datacd/k3bspecialdataitem.h @@ -29,15 +29,15 @@ class K3bSpecialDataItem : public K3bDataItem { public: - K3bSpecialDataItem( K3bDataDoc* doc, KIO::filesize_t size, K3bDirItem* parent = 0, const QString& k3bName = QString::null ) - : K3bDataItem( doc, parent ), + K3bSpecialDataItem( K3bDataDoc* doc, KIO::filesize_t size, K3bDirItem* tqparent = 0, const TQString& k3bName = TQString() ) + : K3bDataItem( doc, tqparent ), m_size( size ) { setK3bName( k3bName ); // add automagically like a qlistviewitem - if( parent ) - parent->addDataItem( this ); + if( tqparent ) + tqparent->addDataItem( this ); } K3bSpecialDataItem( const K3bSpecialDataItem& item ) @@ -47,17 +47,17 @@ class K3bSpecialDataItem : public K3bDataItem } ~K3bSpecialDataItem() { - // remove this from parentdir - if( parent() ) - parent()->takeDataItem( this ); + // remove this from tqparentdir + if( tqparent() ) + tqparent()->takeDataItem( this ); } K3bDataItem* copy() const { return new K3bSpecialDataItem( *this ); } - void setMimeType( const QString& s ) { m_mimeType = s; } - const QString& mimeType() const { return m_mimeType; } + void setMimeType( const TQString& s ) { m_mimeType = s; } + const TQString& mimeType() const { return m_mimeType; } bool isSpecialFile() const { return true; } @@ -68,7 +68,7 @@ class K3bSpecialDataItem : public K3bDataItem KIO::filesize_t itemSize( bool ) const { return m_size; } private: - QString m_mimeType; + TQString m_mimeType; KIO::filesize_t m_size; }; |