From d8cc8bdfa7fa624a526d5aa1626974e1444cb799 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 27 May 2011 19:21:21 +0000 Subject: TQt4 port k3b This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libk3b/Makefile.am | 2 + libk3b/cddb/k3bcddb.cpp | 80 ++-- libk3b/cddb/k3bcddb.h | 25 +- libk3b/cddb/k3bcddbhttpquery.cpp | 48 +-- libk3b/cddb/k3bcddbhttpquery.h | 29 +- libk3b/cddb/k3bcddblocalquery.cpp | 42 +- libk3b/cddb/k3bcddblocalquery.h | 15 +- libk3b/cddb/k3bcddblocalsubmit.cpp | 32 +- libk3b/cddb/k3bcddblocalsubmit.h | 9 +- libk3b/cddb/k3bcddbmultientriesdialog.cpp | 36 +- libk3b/cddb/k3bcddbmultientriesdialog.h | 7 +- libk3b/cddb/k3bcddbpquery.cpp | 66 +-- libk3b/cddb/k3bcddbpquery.h | 27 +- libk3b/cddb/k3bcddbquery.cpp | 88 ++-- libk3b/cddb/k3bcddbquery.h | 35 +- libk3b/cddb/k3bcddbresult.h | 32 +- libk3b/cddb/k3bcddbsubmit.cpp | 10 +- libk3b/cddb/k3bcddbsubmit.h | 11 +- libk3b/core/k3bcore.cpp | 52 +-- libk3b/core/k3bcore.h | 15 +- libk3b/core/k3bdataevent.h | 10 +- libk3b/core/k3bdefaultexternalprograms.cpp | 282 ++++++------- libk3b/core/k3bdefaultexternalprograms.h | 30 +- libk3b/core/k3bexternalbinmanager.cpp | 104 ++--- libk3b/core/k3bexternalbinmanager.h | 79 ++-- libk3b/core/k3bglobals.cpp | 160 ++++---- libk3b/core/k3bglobals.h | 54 +-- libk3b/core/k3bglobalsettings.cpp | 4 +- libk3b/core/k3bjob.cpp | 86 ++-- libk3b/core/k3bjob.h | 50 +-- libk3b/core/k3bjobhandler.h | 14 +- libk3b/core/k3bprocess.cpp | 70 ++-- libk3b/core/k3bprocess.h | 30 +- libk3b/core/k3bprogressinfoevent.h | 28 +- libk3b/core/k3bsimplejobhandler.cpp | 18 +- libk3b/core/k3bsimplejobhandler.h | 21 +- libk3b/core/k3bthread.cpp | 62 +-- libk3b/core/k3bthread.h | 24 +- libk3b/core/k3bthreadjob.cpp | 18 +- libk3b/core/k3bthreadjob.h | 13 +- libk3b/core/k3bversion.cpp | 48 +-- libk3b/core/k3bversion.h | 34 +- libk3b/jobs/k3baudiocuefilewritingjob.cpp | 52 +-- libk3b/jobs/k3baudiocuefilewritingjob.h | 15 +- libk3b/jobs/k3baudiosessionreadingjob.cpp | 14 +- libk3b/jobs/k3baudiosessionreadingjob.h | 7 +- libk3b/jobs/k3bbinimagewritingjob.cpp | 48 +-- libk3b/jobs/k3bbinimagewritingjob.h | 11 +- libk3b/jobs/k3bblankingjob.cpp | 24 +- libk3b/jobs/k3bblankingjob.h | 5 +- libk3b/jobs/k3bcdcopyjob.cpp | 182 ++++----- libk3b/jobs/k3bcdcopyjob.h | 11 +- libk3b/jobs/k3bcdda2wavreader.cpp | 44 +- libk3b/jobs/k3bcdda2wavreader.h | 9 +- libk3b/jobs/k3bclonejob.cpp | 78 ++-- libk3b/jobs/k3bclonejob.h | 13 +- libk3b/jobs/k3bclonetocreader.cpp | 14 +- libk3b/jobs/k3bclonetocreader.h | 2 +- libk3b/jobs/k3bdatatrackreader.cpp | 66 +-- libk3b/jobs/k3bdatatrackreader.h | 4 +- libk3b/jobs/k3bdvdcopyjob.cpp | 122 +++--- libk3b/jobs/k3bdvdcopyjob.h | 13 +- libk3b/jobs/k3bdvdformattingjob.cpp | 74 ++-- libk3b/jobs/k3bdvdformattingjob.h | 9 +- libk3b/jobs/k3biso9660imagewritingjob.cpp | 68 ++-- libk3b/jobs/k3biso9660imagewritingjob.h | 11 +- libk3b/jobs/k3breadcdreader.cpp | 74 ++-- libk3b/jobs/k3breadcdreader.h | 9 +- libk3b/jobs/k3bverificationjob.cpp | 62 +-- libk3b/jobs/k3bverificationjob.h | 5 +- libk3b/jobs/k3bvideodvdtitledetectclippingjob.cpp | 68 ++-- libk3b/jobs/k3bvideodvdtitledetectclippingjob.h | 5 +- libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp | 126 +++--- libk3b/jobs/k3bvideodvdtitletranscodingjob.h | 19 +- libk3b/k3bimage.xsd | 6 +- libk3b/plugin/k3baudiodecoder.cpp | 52 +-- libk3b/plugin/k3baudiodecoder.h | 32 +- libk3b/plugin/k3baudioencoder.cpp | 38 +- libk3b/plugin/k3baudioencoder.h | 37 +- libk3b/plugin/k3baudiooutputplugin.h | 11 +- libk3b/plugin/k3baudioserver.cpp | 18 +- libk3b/plugin/k3baudioserver.h | 15 +- libk3b/plugin/k3bplugin.cpp | 6 +- libk3b/plugin/k3bplugin.h | 57 +-- libk3b/plugin/k3bpluginconfigwidget.cpp | 4 +- libk3b/plugin/k3bpluginconfigwidget.h | 7 +- libk3b/plugin/k3bpluginfactory.h | 10 +- libk3b/plugin/k3bpluginmanager.cpp | 54 +-- libk3b/plugin/k3bpluginmanager.h | 21 +- libk3b/plugin/k3bprojectplugin.h | 51 +-- libk3b/plugin/libsamplerate/samplerate.h | 4 +- libk3b/plugin/libsamplerate/src_sinc.c | 12 +- libk3b/projects/audiocd/k3baudiocdtrackdrag.cpp | 30 +- libk3b/projects/audiocd/k3baudiocdtrackdrag.h | 20 +- libk3b/projects/audiocd/k3baudiocdtracksource.cpp | 26 +- libk3b/projects/audiocd/k3baudiocdtracksource.h | 8 +- libk3b/projects/audiocd/k3baudiodatasource.h | 6 +- .../projects/audiocd/k3baudiodatasourceiterator.h | 2 +- libk3b/projects/audiocd/k3baudiodoc.cpp | 174 ++++---- libk3b/projects/audiocd/k3baudiodoc.h | 75 ++-- libk3b/projects/audiocd/k3baudiofile.cpp | 6 +- libk3b/projects/audiocd/k3baudiofile.h | 6 +- libk3b/projects/audiocd/k3baudioimager.cpp | 18 +- libk3b/projects/audiocd/k3baudioimager.h | 5 +- libk3b/projects/audiocd/k3baudiojob.cpp | 136 +++---- libk3b/projects/audiocd/k3baudiojob.h | 11 +- libk3b/projects/audiocd/k3baudiojobtempdata.cpp | 46 +-- libk3b/projects/audiocd/k3baudiojobtempdata.h | 21 +- libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp | 14 +- libk3b/projects/audiocd/k3baudiomaxspeedjob.h | 3 +- libk3b/projects/audiocd/k3baudionormalizejob.cpp | 34 +- libk3b/projects/audiocd/k3baudionormalizejob.h | 11 +- libk3b/projects/audiocd/k3baudiotrack.cpp | 46 +-- libk3b/projects/audiocd/k3baudiotrack.h | 42 +- libk3b/projects/audiocd/k3baudiozerodata.cpp | 6 +- libk3b/projects/audiocd/k3baudiozerodata.h | 4 +- libk3b/projects/datacd/k3bbootitem.cpp | 4 +- libk3b/projects/datacd/k3bbootitem.h | 8 +- libk3b/projects/datacd/k3bdatadoc.cpp | 236 +++++------ libk3b/projects/datacd/k3bdatadoc.h | 75 ++-- libk3b/projects/datacd/k3bdataitem.cpp | 46 +-- libk3b/projects/datacd/k3bdataitem.h | 46 +-- libk3b/projects/datacd/k3bdatajob.cpp | 128 +++--- libk3b/projects/datacd/k3bdatajob.h | 13 +- libk3b/projects/datacd/k3bdatapreparationjob.cpp | 38 +- libk3b/projects/datacd/k3bdatapreparationjob.h | 3 +- libk3b/projects/datacd/k3bdiritem.cpp | 104 ++--- libk3b/projects/datacd/k3bdiritem.h | 34 +- .../datacd/k3bfilecompilationsizehandler.cpp | 16 +- libk3b/projects/datacd/k3bfileitem.cpp | 48 +-- libk3b/projects/datacd/k3bfileitem.h | 18 +- libk3b/projects/datacd/k3bisoimager.cpp | 218 +++++----- libk3b/projects/datacd/k3bisoimager.h | 37 +- libk3b/projects/datacd/k3bisooptions.cpp | 14 +- libk3b/projects/datacd/k3bisooptions.h | 70 ++-- libk3b/projects/datacd/k3bmkisofshandler.cpp | 20 +- libk3b/projects/datacd/k3bmkisofshandler.h | 8 +- libk3b/projects/datacd/k3bmsinfofetcher.cpp | 58 +-- libk3b/projects/datacd/k3bmsinfofetcher.h | 9 +- libk3b/projects/datacd/k3bsessionimportitem.cpp | 10 +- libk3b/projects/datacd/k3bspecialdataitem.h | 20 +- libk3b/projects/datadvd/k3bdvdbooktypejob.cpp | 44 +- libk3b/projects/datadvd/k3bdvdbooktypejob.h | 9 +- libk3b/projects/datadvd/k3bdvddoc.cpp | 8 +- libk3b/projects/datadvd/k3bdvddoc.h | 6 +- libk3b/projects/datadvd/k3bdvdjob.cpp | 42 +- libk3b/projects/datadvd/k3bdvdjob.h | 9 +- libk3b/projects/datadvd/k3bdvdview.cpp | 8 +- libk3b/projects/datadvd/k3bdvdview.h | 5 +- libk3b/projects/k3babstractwriter.cpp | 12 +- libk3b/projects/k3babstractwriter.h | 5 +- libk3b/projects/k3bcdrdaowriter.cpp | 218 +++++----- libk3b/projects/k3bcdrdaowriter.h | 35 +- libk3b/projects/k3bcdrecordwriter.cpp | 122 +++--- libk3b/projects/k3bcdrecordwriter.h | 19 +- libk3b/projects/k3bcuefileparser.cpp | 86 ++-- libk3b/projects/k3bcuefileparser.h | 8 +- libk3b/projects/k3bdoc.cpp | 32 +- libk3b/projects/k3bdoc.h | 43 +- libk3b/projects/k3bdvdrecordwriter.cpp | 26 +- libk3b/projects/k3bdvdrecordwriter.h | 3 +- libk3b/projects/k3bgrowisofshandler.cpp | 68 ++-- libk3b/projects/k3bgrowisofshandler.h | 15 +- libk3b/projects/k3bgrowisofswriter.cpp | 116 +++--- libk3b/projects/k3bgrowisofswriter.h | 11 +- libk3b/projects/k3bimagefilereader.cpp | 18 +- libk3b/projects/k3bimagefilereader.h | 10 +- libk3b/projects/k3binffilewriter.cpp | 20 +- libk3b/projects/k3binffilewriter.h | 50 +-- libk3b/projects/k3bpipebuffer.cpp | 10 +- libk3b/projects/k3bpipebuffer.h | 2 +- libk3b/projects/k3btocfilewriter.cpp | 28 +- libk3b/projects/k3btocfilewriter.h | 22 +- libk3b/projects/mixedcd/k3bmixeddoc.cpp | 52 +-- libk3b/projects/mixedcd/k3bmixeddoc.h | 19 +- libk3b/projects/mixedcd/k3bmixedjob.cpp | 186 ++++----- libk3b/projects/mixedcd/k3bmixedjob.h | 15 +- libk3b/projects/movixcd/k3bmovixdoc.cpp | 90 ++--- libk3b/projects/movixcd/k3bmovixdoc.h | 67 ++-- libk3b/projects/movixcd/k3bmovixdocpreparer.cpp | 100 ++--- libk3b/projects/movixcd/k3bmovixdocpreparer.h | 9 +- libk3b/projects/movixcd/k3bmovixfileitem.cpp | 18 +- libk3b/projects/movixcd/k3bmovixfileitem.h | 6 +- libk3b/projects/movixcd/k3bmovixjob.cpp | 48 +-- libk3b/projects/movixcd/k3bmovixjob.h | 7 +- libk3b/projects/movixcd/k3bmovixprogram.cpp | 112 +++--- libk3b/projects/movixcd/k3bmovixprogram.h | 54 +-- libk3b/projects/movixdvd/k3bmovixdvddoc.cpp | 8 +- libk3b/projects/movixdvd/k3bmovixdvddoc.h | 7 +- libk3b/projects/movixdvd/k3bmovixdvdjob.cpp | 46 +-- libk3b/projects/movixdvd/k3bmovixdvdjob.h | 7 +- libk3b/projects/videocd/cdi/cdi_imag.rtf | Bin 1314877 -> 1314875 bytes libk3b/projects/videocd/cdi/cdi_vcd.app | Bin 102400 -> 102402 bytes libk3b/projects/videocd/cdi/icdia.htm | 4 +- libk3b/projects/videocd/k3bvcddoc.cpp | 166 ++++---- libk3b/projects/videocd/k3bvcddoc.h | 55 +-- libk3b/projects/videocd/k3bvcdjob.cpp | 204 +++++----- libk3b/projects/videocd/k3bvcdjob.h | 21 +- libk3b/projects/videocd/k3bvcdoptions.cpp | 24 +- libk3b/projects/videocd/k3bvcdoptions.h | 52 +-- libk3b/projects/videocd/k3bvcdtrack.cpp | 106 ++--- libk3b/projects/videocd/k3bvcdtrack.h | 72 ++-- libk3b/projects/videocd/k3bvcdxmlview.cpp | 174 ++++---- libk3b/projects/videocd/k3bvcdxmlview.h | 26 +- libk3b/projects/videocd/mpeginfo/k3bmpeginfo.cpp | 40 +- libk3b/projects/videocd/mpeginfo/k3bmpeginfo.h | 6 +- libk3b/projects/videodvd/k3bvideodvddoc.cpp | 8 +- libk3b/projects/videodvd/k3bvideodvddoc.h | 6 +- libk3b/projects/videodvd/k3bvideodvdimager.cpp | 46 +-- libk3b/projects/videodvd/k3bvideodvdimager.h | 7 +- libk3b/projects/videodvd/k3bvideodvdjob.cpp | 18 +- libk3b/projects/videodvd/k3bvideodvdjob.h | 7 +- libk3b/tools/k3bactivepipe.cpp | 24 +- libk3b/tools/k3bactivepipe.h | 16 +- libk3b/tools/k3bbusywidget.cpp | 24 +- libk3b/tools/k3bbusywidget.h | 19 +- libk3b/tools/k3bcdparanoialib.cpp | 18 +- libk3b/tools/k3bcdparanoialib.h | 6 +- libk3b/tools/k3bcdtextvalidator.cpp | 6 +- libk3b/tools/k3bcdtextvalidator.h | 4 +- libk3b/tools/k3bchecksumpipe.cpp | 4 +- libk3b/tools/k3bchecksumpipe.h | 2 +- libk3b/tools/k3bcutcombobox.cpp | 76 ++-- libk3b/tools/k3bcutcombobox.h | 37 +- libk3b/tools/k3bdevicecombobox.cpp | 36 +- libk3b/tools/k3bdevicecombobox.h | 7 +- libk3b/tools/k3bdevicehandler.cpp | 14 +- libk3b/tools/k3bdevicehandler.h | 17 +- libk3b/tools/k3bdeviceselectiondialog.cpp | 40 +- libk3b/tools/k3bdeviceselectiondialog.h | 23 +- libk3b/tools/k3bdirsizejob.cpp | 28 +- libk3b/tools/k3bdirsizejob.h | 3 +- libk3b/tools/k3bexceptions.cpp | 4 +- libk3b/tools/k3bfilesplitter.cpp | 51 +-- libk3b/tools/k3bfilesplitter.h | 27 +- libk3b/tools/k3bfilesysteminfo.cpp | 22 +- libk3b/tools/k3bfilesysteminfo.h | 10 +- libk3b/tools/k3bintmapcombobox.cpp | 40 +- libk3b/tools/k3bintmapcombobox.h | 7 +- libk3b/tools/k3bintvalidator.cpp | 32 +- libk3b/tools/k3bintvalidator.h | 22 +- libk3b/tools/k3biso9660.cpp | 144 +++---- libk3b/tools/k3biso9660.h | 104 ++--- libk3b/tools/k3biso9660backend.cpp | 8 +- libk3b/tools/k3biso9660backend.h | 6 +- libk3b/tools/k3blibdvdcss.cpp | 18 +- libk3b/tools/k3blistview.cpp | 444 ++++++++++----------- libk3b/tools/k3blistview.h | 163 ++++---- libk3b/tools/k3blistviewitemanimator.cpp | 26 +- libk3b/tools/k3blistviewitemanimator.h | 31 +- libk3b/tools/k3bmd5job.cpp | 52 +-- libk3b/tools/k3bmd5job.h | 13 +- libk3b/tools/k3bmsfedit.cpp | 50 +-- libk3b/tools/k3bmsfedit.h | 21 +- libk3b/tools/k3bmultichoicedialog.cpp | 76 ++-- libk3b/tools/k3bmultichoicedialog.h | 23 +- libk3b/tools/k3bprogressdialog.cpp | 28 +- libk3b/tools/k3bprogressdialog.h | 17 +- libk3b/tools/k3bpushbutton.cpp | 54 +-- libk3b/tools/k3bpushbutton.h | 15 +- libk3b/tools/k3bradioaction.cpp | 52 +-- libk3b/tools/k3bradioaction.h | 53 +-- libk3b/tools/k3brichtextlabel.cpp | 52 +-- libk3b/tools/k3brichtextlabel.h | 21 +- libk3b/tools/k3bsignalwaiter.cpp | 16 +- libk3b/tools/k3bsignalwaiter.h | 7 +- libk3b/tools/k3bstdguiitems.cpp | 128 +++--- libk3b/tools/k3bstdguiitems.h | 38 +- libk3b/tools/k3bstringutils.cpp | 10 +- libk3b/tools/k3bstringutils.h | 8 +- libk3b/tools/k3btempfile.cpp | 12 +- libk3b/tools/k3btempfile.h | 4 +- libk3b/tools/k3bthreadwidget.cpp | 38 +- libk3b/tools/k3bthreadwidget.h | 17 +- libk3b/tools/k3bthroughputestimator.cpp | 10 +- libk3b/tools/k3bthroughputestimator.h | 7 +- libk3b/tools/k3btitlelabel.cpp | 86 ++-- libk3b/tools/k3btitlelabel.h | 29 +- libk3b/tools/k3btoolbox.cpp | 135 +++---- libk3b/tools/k3btoolbox.h | 50 +-- libk3b/tools/k3btoolbutton.cpp | 44 +- libk3b/tools/k3btoolbutton.h | 16 +- libk3b/tools/k3bvalidators.cpp | 58 +-- libk3b/tools/k3bvalidators.h | 52 +-- libk3b/tools/k3bwavefilewriter.cpp | 10 +- libk3b/tools/k3bwavefilewriter.h | 16 +- libk3b/tools/kcutlabel.cpp | 66 +-- libk3b/tools/kcutlabel.h | 21 +- libk3b/tools/libisofs/COPYING | 4 +- libk3b/tools/libisofs/iso_fs.h | 4 +- libk3b/tools/libisofs/isofs.h | 4 +- libk3b/videodvd/k3bvideodvd.cpp | 24 +- libk3b/videodvd/k3bvideodvd.h | 18 +- libk3b/videodvd/k3bvideodvdaudiostream.h | 16 +- libk3b/videodvd/k3bvideodvdsubpicturestream.h | 6 +- libk3b/videodvd/k3bvideodvdtime.cpp | 6 +- libk3b/videodvd/k3bvideodvdtime.h | 4 +- libk3b/videodvd/k3bvideodvdtitle.h | 10 +- 298 files changed, 5903 insertions(+), 5794 deletions(-) (limited to 'libk3b') diff --git a/libk3b/Makefile.am b/libk3b/Makefile.am index 4c74f7d..84efe35 100644 --- a/libk3b/Makefile.am +++ b/libk3b/Makefile.am @@ -1,3 +1,5 @@ +AM_CPPFLAGS = $(all_includes) + if include_videodvdrip VIDEODVDDIR = videodvd VIDEODVDLIB = videodvd/libvideodvd.la diff --git a/libk3b/cddb/k3bcddb.cpp b/libk3b/cddb/k3bcddb.cpp index a0e4fe1..d0131e8 100644 --- a/libk3b/cddb/k3bcddb.cpp +++ b/libk3b/cddb/k3bcddb.cpp @@ -15,10 +15,10 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,8 +36,8 @@ #include "k3bcddbmultientriesdialog.h" -K3bCddb::K3bCddb( QObject* parent, const char* name ) - : QObject( parent, name ) +K3bCddb::K3bCddb( TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ) { m_httpQuery = 0; m_cddbpQuery = 0; @@ -61,8 +61,8 @@ void K3bCddb::readConfig( KConfig* c ) m_bLocalCddbQuery = c->readBoolEntry( "use local cddb query", false ); // old config <= 0.7.3 - QStringList cddbpServer = c->readListEntry( "cddbp server" ); - QStringList httpServer = c->readListEntry( "http server" ); + TQStringList cddbpServer = c->readListEntry( "cddbp server" ); + TQStringList httpServer = c->readListEntry( "http server" ); // new config m_cddbServer = c->readListEntry( "cddb server" ); @@ -77,12 +77,12 @@ void K3bCddb::readConfig( KConfig* c ) // old config <= 0.7.3 if( !httpServer.isEmpty() ) { - for( QStringList::iterator it = httpServer.begin(); it != httpServer.end(); ++it ) { + for( TQStringList::iterator it = httpServer.begin(); it != httpServer.end(); ++it ) { m_cddbServer.append( "Http " + *it ); } } if( !cddbpServer.isEmpty() ) { - for( QStringList::iterator it = cddbpServer.begin(); it != cddbpServer.end(); ++it ) { + for( TQStringList::iterator it = cddbpServer.begin(); it != cddbpServer.end(); ++it ) { m_cddbServer.append( "Cddbp " + *it ); } } @@ -98,14 +98,14 @@ void K3bCddb::query( const K3bDevice::Toc& toc ) if( m_bLocalCddbQuery ) { m_iCurrentQueriedLocalDir = 0; - QTimer::singleShot( 0, this, SLOT(localQuery()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(localQuery()) ); } else if( m_bRemoteCddbQuery ) { m_iCurrentQueriedServer = 0; - QTimer::singleShot( 0, this, SLOT(remoteQuery()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(remoteQuery()) ); } else { - QTimer::singleShot( 0, this, SLOT(slotNoEntry()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotNoEntry()) ); } } @@ -141,7 +141,7 @@ void K3bCddb::slotQueryFinished( K3bCddbQuery* query ) m_lastResult = m_lastUsedQuery->result(); // make sure the result has the requested discid since otherwise local saving does not make much sense - m_lastResult.discid = QString::number( m_toc.discId(), 16 ).rightJustify( 8, '0' ); + m_lastResult.discid = TQString::number( m_toc.discId(), 16 ).rightJustify( 8, '0' ); emit queryFinished( K3bCddbQuery::SUCCESS ); } @@ -169,37 +169,37 @@ void K3bCddb::slotQueryFinished( K3bCddbQuery* query ) } -K3bCddbQuery* K3bCddb::getQuery( const QString& s ) +K3bCddbQuery* K3bCddb::getQuery( const TQString& s ) { - QStringList buf = QStringList::split( ":", s.mid( s.find(" ")+1 ) ); - QString server = buf[0]; + TQStringList buf = TQStringList::split( ":", s.mid( s.tqfind(" ")+1 ) ); + TQString server = buf[0]; int port = buf[1].toInt(); if( s.startsWith("Http") ) { if( !m_httpQuery ) { m_httpQuery = new K3bCddbHttpQuery( this ); - connect( m_httpQuery, SIGNAL(infoMessage(const QString&)), - this, SIGNAL(infoMessage(const QString&)) ); - connect( m_httpQuery, SIGNAL(queryFinished(K3bCddbQuery*)), - this, SLOT(slotQueryFinished(K3bCddbQuery*)) ); - connect( m_httpQuery, SIGNAL(inexactMatches(K3bCddbQuery*)), - this, SLOT(slotMultibleMatches(K3bCddbQuery*)) ); + connect( m_httpQuery, TQT_SIGNAL(infoMessage(const TQString&)), + this, TQT_SIGNAL(infoMessage(const TQString&)) ); + connect( m_httpQuery, TQT_SIGNAL(queryFinished(K3bCddbQuery*)), + this, TQT_SLOT(slotQueryFinished(K3bCddbQuery*)) ); + connect( m_httpQuery, TQT_SIGNAL(inexactMatches(K3bCddbQuery*)), + this, TQT_SLOT(slotMultibleMatches(K3bCddbQuery*)) ); } m_httpQuery->setServer( server, port ); - m_httpQuery->setCgiPath( m_bUseManualCgiPath ? m_cgiPath : QString::fromLatin1("/~cddb/cddb.cgi") ); + m_httpQuery->setCgiPath( m_bUseManualCgiPath ? m_cgiPath : TQString::tqfromLatin1("/~cddb/cddb.cgi") ); return m_httpQuery; } else { if( !m_cddbpQuery ) { m_cddbpQuery = new K3bCddbpQuery( this ); - connect( m_cddbpQuery, SIGNAL(infoMessage(const QString&)), - this, SIGNAL(infoMessage(const QString&)) ); - connect( m_cddbpQuery, SIGNAL(queryFinished(K3bCddbQuery*)), - this, SLOT(slotQueryFinished(K3bCddbQuery*)) ); - connect( m_cddbpQuery, SIGNAL(inexactMatches(K3bCddbQuery*)), - this, SLOT(slotMultibleMatches(K3bCddbQuery*)) ); + connect( m_cddbpQuery, TQT_SIGNAL(infoMessage(const TQString&)), + this, TQT_SIGNAL(infoMessage(const TQString&)) ); + connect( m_cddbpQuery, TQT_SIGNAL(queryFinished(K3bCddbQuery*)), + this, TQT_SLOT(slotQueryFinished(K3bCddbQuery*)) ); + connect( m_cddbpQuery, TQT_SIGNAL(inexactMatches(K3bCddbQuery*)), + this, TQT_SLOT(slotMultibleMatches(K3bCddbQuery*)) ); } m_cddbpQuery->setServer( server, port ); @@ -213,12 +213,12 @@ void K3bCddb::localQuery() { if( !m_localQuery ) { m_localQuery = new K3bCddbLocalQuery( this ); - connect( m_localQuery, SIGNAL(infoMessage(const QString&)), - this, SIGNAL(infoMessage(const QString&)) ); - connect( m_localQuery, SIGNAL(queryFinished(K3bCddbQuery*)), - this, SLOT(slotQueryFinished(K3bCddbQuery*)) ); - connect( m_localQuery, SIGNAL(inexactMatches(K3bCddbQuery*)), - this, SLOT(slotMultibleMatches(K3bCddbQuery*)) ); + connect( m_localQuery, TQT_SIGNAL(infoMessage(const TQString&)), + this, TQT_SIGNAL(infoMessage(const TQString&)) ); + connect( m_localQuery, TQT_SIGNAL(queryFinished(K3bCddbQuery*)), + this, TQT_SLOT(slotQueryFinished(K3bCddbQuery*)) ); + connect( m_localQuery, TQT_SIGNAL(inexactMatches(K3bCddbQuery*)), + this, TQT_SLOT(slotMultibleMatches(K3bCddbQuery*)) ); } m_localQuery->setCddbDir( m_localCddbDirs[m_iCurrentQueriedLocalDir] ); @@ -227,7 +227,7 @@ void K3bCddb::localQuery() } -QString K3bCddb::errorString() const +TQString K3bCddb::errorString() const { if( !m_lastUsedQuery ) return "no query"; @@ -241,7 +241,7 @@ QString K3bCddb::errorString() const return i18n("Error while connecting to host."); case K3bCddbQuery::WORKING: return i18n("Working..."); - case K3bCddbQuery::QUERY_ERROR: + case K3bCddbQuery::TQUERY_ERROR: case K3bCddbQuery::READ_ERROR: case K3bCddbQuery::FAILURE: default: @@ -261,8 +261,8 @@ void K3bCddb::saveEntry( const K3bCddbResultEntry& entry ) { if( !m_localSubmit ) { m_localSubmit = new K3bCddbLocalSubmit( this ); - connect( m_localSubmit, SIGNAL(submitFinished(K3bCddbSubmit*)), - this, SLOT(slotSubmitFinished(K3bCddbSubmit*)) ); + connect( m_localSubmit, TQT_SIGNAL(submitFinished(K3bCddbSubmit*)), + this, TQT_SLOT(slotSubmitFinished(K3bCddbSubmit*)) ); } m_localSubmit->setCddbDir( m_localCddbDirs[0] ); diff --git a/libk3b/cddb/k3bcddb.h b/libk3b/cddb/k3bcddb.h index 86b67c5..b7e5a47 100644 --- a/libk3b/cddb/k3bcddb.h +++ b/libk3b/cddb/k3bcddb.h @@ -17,9 +17,9 @@ #ifndef K3BCDDB_H #define K3BCDDB_H -#include -#include -#include +#include +#include +#include #include @@ -35,15 +35,16 @@ class K3bCddbSubmit; class K3bCddbLocalSubmit; -class LIBK3B_EXPORT K3bCddb : public QObject +class LIBK3B_EXPORT K3bCddb : public TQObject { Q_OBJECT + TQ_OBJECT public: - K3bCddb( QObject* parent = 0, const char* name = 0 ); + K3bCddb( TQObject* tqparent = 0, const char* name = 0 ); ~K3bCddb(); - QString errorString() const; + TQString errorString() const; /** * Do NOT call this before queryResult has @@ -60,7 +61,7 @@ class LIBK3B_EXPORT K3bCddb : public QObject signals: void queryFinished( int error ); void submitFinished( bool success ); - void infoMessage( const QString& ); + void infoMessage( const TQString& ); private slots: void localQuery(); @@ -71,7 +72,7 @@ class LIBK3B_EXPORT K3bCddb : public QObject void slotNoEntry(); private: - K3bCddbQuery* getQuery( const QString& ); + K3bCddbQuery* getQuery( const TQString& ); K3bCddbHttpQuery* m_httpQuery; K3bCddbpQuery* m_cddbpQuery; @@ -86,13 +87,13 @@ class LIBK3B_EXPORT K3bCddb : public QObject K3bCddbResultEntry m_lastResult; // config - QStringList m_cddbServer; - QString m_proxyServer; + TQStringList m_cddbServer; + TQString m_proxyServer; int m_proxyPort; - QString m_cgiPath; + TQString m_cgiPath; bool m_bUseProxyServer; bool m_bUseKdeSettings; - QStringList m_localCddbDirs; + TQStringList m_localCddbDirs; bool m_bSaveCddbEntriesLocally; bool m_bUseManualCgiPath; bool m_bRemoteCddbQuery; diff --git a/libk3b/cddb/k3bcddbhttpquery.cpp b/libk3b/cddb/k3bcddbhttpquery.cpp index a453c3e..c21460f 100644 --- a/libk3b/cddb/k3bcddbhttpquery.cpp +++ b/libk3b/cddb/k3bcddbhttpquery.cpp @@ -19,9 +19,9 @@ #include "k3bcddbresult.h" -#include -#include -#include +#include +#include +#include #include #include @@ -29,8 +29,8 @@ #include -K3bCddbHttpQuery::K3bCddbHttpQuery( QObject* parent, const char* name ) - : K3bCddbQuery( parent, name ) +K3bCddbHttpQuery::K3bCddbHttpQuery( TQObject* tqparent, const char* name ) + : K3bCddbQuery( tqparent, name ) { m_server = "freedb.org"; m_port = 80; @@ -46,7 +46,7 @@ K3bCddbHttpQuery::~K3bCddbHttpQuery() void K3bCddbHttpQuery::doQuery() { setError( WORKING ); - m_state = QUERY; + m_state = TQUERY; performCommand( queryString() ); } @@ -58,11 +58,11 @@ void K3bCddbHttpQuery::doMatchQuery() m_state = READ; m_parsingBuffer.truncate(0); - performCommand( QString( "cddb read %1 %2").arg( header().category ).arg( header().discid ) ); + performCommand( TQString( "cddb read %1 %2").tqarg( header().category ).tqarg( header().discid ) ); } -void K3bCddbHttpQuery::performCommand( const QString& cmd ) +void K3bCddbHttpQuery::performCommand( const TQString& cmd ) { KURL url; url.setProtocol( "http" ); @@ -82,23 +82,23 @@ void K3bCddbHttpQuery::performCommand( const QString& cmd ) if( !job ) { setError( CONNECTION_ERROR ); - emit infoMessage( i18n("Could not connect to host %1").arg(m_server) ); + emit infoMessage( i18n("Could not connect to host %1").tqarg(m_server) ); emitQueryFinished(); return; } - connect( job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(slotData(KIO::Job*, const QByteArray&)) ); - connect( job, SIGNAL(result(KIO::Job*)), - SLOT(slotResult(KIO::Job*)) ); + connect( job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(KIO::Job*, const TQByteArray&)) ); + connect( job, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotResult(KIO::Job*)) ); } -void K3bCddbHttpQuery::slotData( KIO::Job*, const QByteArray& data ) +void K3bCddbHttpQuery::slotData( KIO::Job*, const TQByteArray& data ) { if( data.size() ) { - QDataStream stream( m_data, IO_WriteOnly | IO_Append ); + TQDataStream stream( m_data, IO_WriteOnly | IO_Append ); stream.writeRawBytes( data.data(), data.size() ); } } @@ -113,16 +113,16 @@ void K3bCddbHttpQuery::slotResult( KIO::Job* job ) return; } - QStringList lines = QStringList::split( "\n", QString::fromUtf8( m_data.data(), m_data.size() ) ); + TQStringList lines = TQStringList::split( "\n", TQString::fromUtf8( m_data.data(), m_data.size() ) ); - for( QStringList::const_iterator it = lines.begin(); it != lines.end(); ++it ) { - QString line = *it; + for( TQStringList::const_iterator it = lines.begin(); it != lines.end(); ++it ) { + TQString line = *it; // kdDebug() << "(K3bCddbHttpQuery) line: " << line << endl; switch( m_state ) { - case QUERY: + case TQUERY: if( getCode( line ) == 200 ) { // parse exact match and send a read command K3bCddbResultHeader header; @@ -137,7 +137,7 @@ void K3bCddbHttpQuery::slotResult( KIO::Job* job ) emit infoMessage( i18n("Found multiple exact matches") ); - m_state = QUERY_DATA; + m_state = TQUERY_DATA; } else if( getCode( line ) == 211 ) { @@ -145,7 +145,7 @@ void K3bCddbHttpQuery::slotResult( KIO::Job* job ) emit infoMessage( i18n("Found inexact matches") ); - m_state = QUERY_DATA; + m_state = TQUERY_DATA; } else if( getCode( line ) == 202 ) { @@ -160,14 +160,14 @@ void K3bCddbHttpQuery::slotResult( KIO::Job* job ) else { kdDebug() << "(K3bCddbHttpQuery) Error while querying: " << line << endl; emit infoMessage( i18n("Error while querying") ); - setError(QUERY_ERROR); + setError(TQUERY_ERROR); m_state = FINISHED; emitQueryFinished(); return; } break; - case QUERY_DATA: + case TQUERY_DATA: if( line.startsWith( "." ) ) { // finished query // go on reading @@ -212,7 +212,7 @@ void K3bCddbHttpQuery::slotResult( KIO::Job* job ) kdDebug() << "(K3bCddbHttpQuery query finished." << endl; - QTextStream strStream( m_parsingBuffer, IO_ReadOnly ); + TQTextStream strStream( m_parsingBuffer, IO_ReadOnly ); parseEntry( strStream, result() ); setError(SUCCESS); diff --git a/libk3b/cddb/k3bcddbhttpquery.h b/libk3b/cddb/k3bcddbhttpquery.h index b1e544e..12a275e 100644 --- a/libk3b/cddb/k3bcddbhttpquery.h +++ b/libk3b/cddb/k3bcddbhttpquery.h @@ -14,13 +14,13 @@ */ -#ifndef K3BCDDB_HTTP_QUERY_H -#define K3BCDDB_HTTP_QUERY_H +#ifndef K3BCDDB_HTTP_TQUERY_H +#define K3BCDDB_HTTP_TQUERY_H #include "k3bcddbquery.h" #include "k3bcddbresult.h" -#include +#include namespace KIO { class Job; @@ -29,35 +29,36 @@ namespace KIO { class K3bCddbHttpQuery : public K3bCddbQuery { Q_OBJECT + TQ_OBJECT public: - K3bCddbHttpQuery( QObject* parent = 0, const char* name = 0 ); + K3bCddbHttpQuery( TQObject* tqparent = 0, const char* name = 0 ); ~K3bCddbHttpQuery(); public slots: - void setServer( const QString& s, int port = 80 ) { m_server = s; m_port = port; } - void setCgiPath( const QString& p ) { m_cgiPath = p; } + void setServer( const TQString& s, int port = 80 ) { m_server = s; m_port = port; } + void setCgiPath( const TQString& p ) { m_cgiPath = p; } protected slots: void doQuery(); void doMatchQuery(); void slotResult( KIO::Job* ); - void slotData( KIO::Job*, const QByteArray& data ); + void slotData( KIO::Job*, const TQByteArray& data ); private: - void performCommand( const QString& ); + void performCommand( const TQString& ); - enum State { QUERY, QUERY_DATA, READ, READ_DATA, FINISHED }; + enum State { TQUERY, TQUERY_DATA, READ, READ_DATA, FINISHED }; int m_state; - QString m_server; + TQString m_server; int m_port; - QString m_cgiPath; + TQString m_cgiPath; - QString m_currentlyConnectingServer; + TQString m_currentlyConnectingServer; - QByteArray m_data; - QString m_parsingBuffer; + TQByteArray m_data; + TQString m_parsingBuffer; }; #endif diff --git a/libk3b/cddb/k3bcddblocalquery.cpp b/libk3b/cddb/k3bcddblocalquery.cpp index b3a1264..f70b6d8 100644 --- a/libk3b/cddb/k3bcddblocalquery.cpp +++ b/libk3b/cddb/k3bcddblocalquery.cpp @@ -16,17 +16,17 @@ #include "k3bcddblocalquery.h" -#include -#include -#include +#include +#include +#include #include #include #include -K3bCddbLocalQuery::K3bCddbLocalQuery( QObject* parent , const char* name ) - : K3bCddbQuery( parent, name ) +K3bCddbLocalQuery::K3bCddbLocalQuery( TQObject* tqparent , const char* name ) + : K3bCddbQuery( tqparent, name ) { } @@ -38,33 +38,33 @@ K3bCddbLocalQuery::~K3bCddbLocalQuery() void K3bCddbLocalQuery::doQuery() { - emit infoMessage( i18n("Searching entry in %1").arg( m_cddbDir ) ); + emit infoMessage( i18n("Searching entry in %1").tqarg( m_cddbDir ) ); kapp->processEvents(); //BAD! - QString path = preparePath( m_cddbDir ); + TQString path = preparePath( m_cddbDir ); kdDebug() << "(K3bCddbLocalQuery) searching in dir " << path << " for " - << QString::number( toc().discId(), 16 ).rightJustify( 8, '0' ) << endl; + << TQString::number( toc().discId(), 16 ).rightJustify( 8, '0' ) << endl; - for( QStringList::const_iterator it = categories().begin(); + for( TQStringList::const_iterator it = categories().begin(); it != categories().end(); ++it ) { - QString file = path + *it + "/" + QString::number( toc().discId(), 16 ).rightJustify( 8, '0' ); + TQString file = path + *it + "/" + TQString::number( toc().discId(), 16 ).rightJustify( 8, '0' ); - if( QFile::exists( file ) ) { + if( TQFile::exists( file ) ) { // found file - QFile f( file ); + TQFile f( file ); if( !f.open( IO_ReadOnly ) ) { kdDebug() << "(K3bCddbLocalQuery) Could not open file" << endl; } else { - QTextStream t( &f ); + TQTextStream t( &f ); K3bCddbResultEntry entry; parseEntry( t, entry ); K3bCddbResultHeader header; - header.discid = QString::number( toc().discId(), 16 ).rightJustify( 8, '0' ); + header.discid = TQString::number( toc().discId(), 16 ).rightJustify( 8, '0' ); header.category = *it; header.title = entry.cdTitle; header.artist = entry.cdArtist; @@ -94,15 +94,15 @@ void K3bCddbLocalQuery::doQuery() void K3bCddbLocalQuery::doMatchQuery() { - QString path = preparePath( m_cddbDir ) + header().category + "/" + header().discid; + TQString path = preparePath( m_cddbDir ) + header().category + "/" + header().discid; - QFile f( path ); + TQFile f( path ); if( !f.open( IO_ReadOnly ) ) { kdDebug() << "(K3bCddbLocalQuery) Could not open file" << endl; setError( READ_ERROR ); } else { - QTextStream t( &f ); + TQTextStream t( &f ); parseEntry( t, result() ); result().discid = header().discid; @@ -113,13 +113,13 @@ void K3bCddbLocalQuery::doMatchQuery() } -QString K3bCddbLocalQuery::preparePath( const QString& p ) +TQString K3bCddbLocalQuery::preparePath( const TQString& p ) { - QString path = p; + TQString path = p; if( path.startsWith( "~" ) ) - path.replace( 0, 1, QDir::homeDirPath() ); + path.tqreplace( 0, 1, TQDir::homeDirPath() ); else if( !path.startsWith( "/" ) ) - path.prepend( QDir::homeDirPath() ); + path.prepend( TQDir::homeDirPath() ); if( path[path.length()-1] != '/' ) path.append( "/" ); diff --git a/libk3b/cddb/k3bcddblocalquery.h b/libk3b/cddb/k3bcddblocalquery.h index d68d379..f373698 100644 --- a/libk3b/cddb/k3bcddblocalquery.h +++ b/libk3b/cddb/k3bcddblocalquery.h @@ -15,34 +15,35 @@ -#ifndef K3BCDDB_LOCAL_QUERY_H -#define K3BCDDB_LOCAL_QUERY_H +#ifndef K3BCDDB_LOCAL_TQUERY_H +#define K3BCDDB_LOCAL_TQUERY_H #include "k3bcddbquery.h" #include "k3bcddbresult.h" -#include +#include class K3bCddbLocalQuery : public K3bCddbQuery { Q_OBJECT + TQ_OBJECT public: - K3bCddbLocalQuery( QObject* parent = 0, const char* name = 0 ); + K3bCddbLocalQuery( TQObject* tqparent = 0, const char* name = 0 ); ~K3bCddbLocalQuery(); public slots: - void setCddbDir( const QString& dir ) { m_cddbDir = dir; } + void setCddbDir( const TQString& dir ) { m_cddbDir = dir; } protected: void doQuery(); void doMatchQuery(); private: - QString preparePath( const QString& p ); + TQString preparePath( const TQString& p ); - QString m_cddbDir; + TQString m_cddbDir; }; #endif diff --git a/libk3b/cddb/k3bcddblocalsubmit.cpp b/libk3b/cddb/k3bcddblocalsubmit.cpp index f2d1e69..ed1fdcb 100644 --- a/libk3b/cddb/k3bcddblocalsubmit.cpp +++ b/libk3b/cddb/k3bcddblocalsubmit.cpp @@ -17,16 +17,16 @@ #include "k3bcddblocalsubmit.h" -#include -#include -#include +#include +#include +#include #include #include -K3bCddbLocalSubmit::K3bCddbLocalSubmit( QObject* parent, const char* name ) - : K3bCddbSubmit( parent, name ) +K3bCddbLocalSubmit::K3bCddbLocalSubmit( TQObject* tqparent, const char* name ) + : K3bCddbSubmit( tqparent, name ) { } @@ -38,29 +38,29 @@ K3bCddbLocalSubmit::~K3bCddbLocalSubmit() void K3bCddbLocalSubmit::doSubmit() { - QString path = m_cddbDir; + TQString path = m_cddbDir; if( path.startsWith( "~" ) ) - path.replace( 0, 1, QDir::homeDirPath() + "/" ); + path.tqreplace( 0, 1, TQDir::homeDirPath() + "/" ); else if( !path.startsWith( "/" ) ) - path.prepend( QDir::homeDirPath() + "/" ); + path.prepend( TQDir::homeDirPath() + "/" ); if( path[path.length()-1] != '/' ) path.append( "/" ); - if( !QFile::exists( path ) && !QDir().mkdir( path ) ) { + if( !TQFile::exists( path ) && !TQDir().mkdir( path ) ) { kdDebug() << "(K3bCddbLocalSubmit) could not create directory: " << path << endl; setError( IO_ERROR ); emit submitFinished( this ); return; } - if( QFile::exists( path ) ) { + if( TQFile::exists( path ) ) { // if the category dir does not exists // create it path += resultEntry().category; - if( !QFile::exists( path ) ) { - if( !QDir().mkdir( path ) ) { + if( !TQFile::exists( path ) ) { + if( !TQDir().mkdir( path ) ) { kdDebug() << "(K3bCddbLocalSubmit) could not create directory: " << path << endl; setError( IO_ERROR ); emit submitFinished( this ); @@ -70,7 +70,7 @@ void K3bCddbLocalSubmit::doSubmit() // we always overwrite existing entries path += "/" + resultEntry().discid; - QFile entryFile( path ); + TQFile entryFile( path ); if( entryFile.exists() ) { kdDebug() << "(K3bCddbLocalSubmit) file already exists: " << path << endl; } @@ -82,8 +82,8 @@ void K3bCddbLocalSubmit::doSubmit() } else { kdDebug() << "(K3bCddbLocalSubmit) creating file: " << path << endl; - QTextStream entryStream( &entryFile ); - entryStream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream entryStream( &entryFile ); + entryStream.setEncoding( TQTextStream::UnicodeUTF8 ); entryStream << resultEntry().rawData; entryFile.close(); @@ -94,7 +94,7 @@ void K3bCddbLocalSubmit::doSubmit() else { kdDebug() << "(K3bCddbLocalSubmit) could not find directory: " << path << endl; setError( IO_ERROR ); - emit infoMessage( i18n("Could not find directory: %1").arg(path) ); + emit infoMessage( i18n("Could not find directory: %1").tqarg(path) ); emit submitFinished( this ); } } diff --git a/libk3b/cddb/k3bcddblocalsubmit.h b/libk3b/cddb/k3bcddblocalsubmit.h index 8b7ea91..88f127c 100644 --- a/libk3b/cddb/k3bcddblocalsubmit.h +++ b/libk3b/cddb/k3bcddblocalsubmit.h @@ -19,25 +19,26 @@ #include "k3bcddbsubmit.h" -#include +#include class K3bCddbLocalSubmit : public K3bCddbSubmit { Q_OBJECT + TQ_OBJECT public: - K3bCddbLocalSubmit( QObject* parent = 0, const char* name = 0 ); + K3bCddbLocalSubmit( TQObject* tqparent = 0, const char* name = 0 ); ~K3bCddbLocalSubmit(); public slots: - void setCddbDir( const QString& dir ) { m_cddbDir = dir; } + void setCddbDir( const TQString& dir ) { m_cddbDir = dir; } protected slots: void doSubmit(); private: - QString m_cddbDir; + TQString m_cddbDir; }; #endif diff --git a/libk3b/cddb/k3bcddbmultientriesdialog.cpp b/libk3b/cddb/k3bcddbmultientriesdialog.cpp index 094176a..df5a938 100644 --- a/libk3b/cddb/k3bcddbmultientriesdialog.cpp +++ b/libk3b/cddb/k3bcddbmultientriesdialog.cpp @@ -16,42 +16,42 @@ #include "k3bcddbmultientriesdialog.h" -#include -#include -#include +#include +#include +#include #include #include -K3bCddbMultiEntriesDialog::K3bCddbMultiEntriesDialog( QWidget* parent, const char* name ) - : KDialogBase( Plain, i18n("CDDB Database Entry"), Ok|Cancel, Ok, parent, name ) +K3bCddbMultiEntriesDialog::K3bCddbMultiEntriesDialog( TQWidget* tqparent, const char* name ) + : KDialogBase( Plain, i18n("CDDB Database Entry"), Ok|Cancel, Ok, tqparent, name ) { - QFrame* frame = plainPage(); - QVBoxLayout* layout = new QVBoxLayout( frame ); - layout->setAutoAdd( true ); - layout->setSpacing( spacingHint() ); - layout->setMargin( 0 ); + TQFrame* frame = plainPage(); + TQVBoxLayout* tqlayout = new TQVBoxLayout( frame ); + tqlayout->setAutoAdd( true ); + tqlayout->setSpacing( spacingHint() ); + tqlayout->setMargin( 0 ); - QLabel* infoLabel = new QLabel( i18n("K3b found multiple inexact CDDB entries. Please select one."), frame ); - infoLabel->setAlignment( WordBreak ); + TQLabel* infoLabel = new TQLabel( i18n("K3b found multiple inexact CDDB entries. Please select one."), frame ); + infoLabel->tqsetAlignment( WordBreak ); m_listBox = new KListBox( frame, "list_box"); setMinimumSize( 280, 200 ); } -K3bCddbResultHeader K3bCddbMultiEntriesDialog::selectCddbEntry( K3bCddbQuery* query, QWidget* parent ) +K3bCddbResultHeader K3bCddbMultiEntriesDialog::selectCddbEntry( K3bCddbQuery* query, TQWidget* tqparent ) { - K3bCddbMultiEntriesDialog d( parent ); + K3bCddbMultiEntriesDialog d( tqparent ); - const QValueList headers = query->getInexactMatches(); + const TQValueList headers = query->getInexactMatches(); int i = 1; - for( QValueListConstIterator it = headers.begin(); + for( TQValueListConstIterator it = headers.begin(); it != headers.end(); ++it ) { - d.m_listBox->insertItem( QString::number(i) + " " + + d.m_listBox->insertItem( TQString::number(i) + " " + (*it).artist + " - " + (*it).title + " (" + (*it).category + ")" ); @@ -60,7 +60,7 @@ K3bCddbResultHeader K3bCddbMultiEntriesDialog::selectCddbEntry( K3bCddbQuery* qu d.m_listBox->setSelected( 0, true ); - if( d.exec() == QDialog::Accepted ) + if( d.exec() == TQDialog::Accepted ) return headers[ d.m_listBox->currentItem() >= 0 ? d.m_listBox->currentItem() : 0 ]; else return K3bCddbResultHeader(); diff --git a/libk3b/cddb/k3bcddbmultientriesdialog.h b/libk3b/cddb/k3bcddbmultientriesdialog.h index 15cc6f8..43c409e 100644 --- a/libk3b/cddb/k3bcddbmultientriesdialog.h +++ b/libk3b/cddb/k3bcddbmultientriesdialog.h @@ -23,7 +23,7 @@ #include "k3bcddbresult.h" -class QStringList; +class TQStringList; class KListBox; /** @@ -32,14 +32,15 @@ class KListBox; class K3bCddbMultiEntriesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ~K3bCddbMultiEntriesDialog(); - static K3bCddbResultHeader selectCddbEntry( K3bCddbQuery* query, QWidget* parent = 0 ); + static K3bCddbResultHeader selectCddbEntry( K3bCddbQuery* query, TQWidget* tqparent = 0 ); protected: - K3bCddbMultiEntriesDialog( QWidget* parent = 0, const char* name = 0); + K3bCddbMultiEntriesDialog( TQWidget* tqparent = 0, const char* name = 0); private: KListBox *m_listBox; diff --git a/libk3b/cddb/k3bcddbpquery.cpp b/libk3b/cddb/k3bcddbpquery.cpp index fefc8e4..15f3e18 100644 --- a/libk3b/cddb/k3bcddbpquery.cpp +++ b/libk3b/cddb/k3bcddbpquery.cpp @@ -15,9 +15,9 @@ #include "k3bcddbpquery.h" -#include -#include -#include +#include +#include +#include #include #include @@ -25,18 +25,18 @@ -K3bCddbpQuery::K3bCddbpQuery( QObject* parent, const char* name ) - :K3bCddbQuery( parent, name ) +K3bCddbpQuery::K3bCddbpQuery( TQObject* tqparent, const char* name ) + :K3bCddbQuery( tqparent, name ) { - m_socket = new QSocket( this ); + m_socket = new TQSocket( this ); m_stream.setDevice( m_socket ); - m_stream.setEncoding( QTextStream::UnicodeUTF8 ); + m_stream.setEncoding( TQTextStream::UnicodeUTF8 ); - connect( m_socket, SIGNAL(connected()), this, SLOT(slotConnected()) ); - connect( m_socket, SIGNAL(hostFound()), this, SLOT(slotHostFound()) ); - connect( m_socket, SIGNAL(connectionClosed()), this, SLOT(slotConnectionClosed()) ); - connect( m_socket, SIGNAL(error(int)), this, SLOT(slotError(int)) ); - connect( m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead()) ); + connect( m_socket, TQT_SIGNAL(connected()), this, TQT_SLOT(slotConnected()) ); + connect( m_socket, TQT_SIGNAL(hostFound()), this, TQT_SLOT(slotHostFound()) ); + connect( m_socket, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(slotConnectionClosed()) ); + connect( m_socket, TQT_SIGNAL(error(int)), this, TQT_SLOT(slotError(int)) ); + connect( m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead()) ); } @@ -54,7 +54,7 @@ void K3bCddbpQuery::doQuery() // connect to the server m_socket->connectToHost( m_server, m_port ); - emit infoMessage( i18n("Searching %1 on port %2").arg(m_server).arg(m_port) ); + emit infoMessage( i18n("Searching %1 on port %2").tqarg(m_server).tqarg(m_port) ); } @@ -63,7 +63,7 @@ void K3bCddbpQuery::doMatchQuery() // we should still be connected // TODO: check this - QString read = QString( "cddb read %1 %2").arg( header().category ).arg( header().discid ); + TQString read = TQString( "cddb read %1 %2").tqarg( header().category ).tqarg( header().discid ); m_state = READ; m_parsingBuffer = ""; @@ -95,7 +95,7 @@ void K3bCddbpQuery::slotConnectionClosed() void K3bCddbpQuery::cddbpQuit() { - m_state = QUIT; + m_state = TQUIT; m_stream << "quit" << endl << flush; } @@ -103,7 +103,7 @@ void K3bCddbpQuery::cddbpQuit() void K3bCddbpQuery::slotReadyRead() { while( m_socket->canReadLine() ) { - QString line = m_stream.readLine(); + TQString line = m_stream.readLine(); // kdDebug() << "(K3bCddbpQuery) line: " << line << endl; @@ -146,13 +146,13 @@ void K3bCddbpQuery::slotReadyRead() } // just ignore the reply since it's not important for the functionality - m_state = QUERY; + m_state = TQUERY; m_stream << queryString() << endl << flush; break; } - case QUERY: + case TQUERY: if( getCode( line ) == 200 ) { // parse exact match and send a read command K3bCddbResultHeader header; @@ -169,7 +169,7 @@ void K3bCddbpQuery::slotReadyRead() emit infoMessage( i18n("Found multiple exact matches") ); - m_state = QUERY_DATA; + m_state = TQUERY_DATA; } else if( getCode( line ) == 211 ) { @@ -177,7 +177,7 @@ void K3bCddbpQuery::slotReadyRead() emit infoMessage( i18n("Found inexact matches") ); - m_state = QUERY_DATA; + m_state = TQUERY_DATA; } else if( getCode( line ) == 202 ) { @@ -190,12 +190,12 @@ void K3bCddbpQuery::slotReadyRead() else { kdDebug() << "(K3bCddbpQuery) Error while querying: " << line << endl; emit infoMessage( i18n("Error while querying") ); - setError( QUERY_ERROR ); + setError( TQUERY_ERROR ); cddbpQuit(); } break; - case QUERY_DATA: + case TQUERY_DATA: if( line.startsWith( "." ) ) { // finished query // go on reading @@ -234,7 +234,7 @@ void K3bCddbpQuery::slotReadyRead() kdDebug() << "(K3bCddbpQuery) query finished." << endl; - QTextStream strStream( m_parsingBuffer, IO_ReadOnly ); + TQTextStream strStream( m_parsingBuffer, IO_ReadOnly ); parseEntry( strStream, result() ); setError( SUCCESS ); @@ -246,7 +246,7 @@ void K3bCddbpQuery::slotReadyRead() } break; - case QUIT: + case TQUIT: // no parsing needed break; } @@ -257,17 +257,17 @@ void K3bCddbpQuery::slotReadyRead() void K3bCddbpQuery::slotError( int e ) { switch(e) { - case QSocket::ErrConnectionRefused: - kdDebug() << i18n("Connection to %1 refused").arg( m_server ) << endl; - emit infoMessage( i18n("Connection to %1 refused").arg( m_server ) ); + case TQSocket::ErrConnectionRefused: + kdDebug() << i18n("Connection to %1 refused").tqarg( m_server ) << endl; + emit infoMessage( i18n("Connection to %1 refused").tqarg( m_server ) ); break; - case QSocket::ErrHostNotFound: - kdDebug() << i18n("Could not find host %1").arg( m_server ) << endl; - emit infoMessage( i18n("Could not find host %1").arg( m_server ) ); + case TQSocket::ErrHostNotFound: + kdDebug() << i18n("Could not find host %1").tqarg( m_server ) << endl; + emit infoMessage( i18n("Could not find host %1").tqarg( m_server ) ); break; - case QSocket::ErrSocketRead: - kdDebug() << i18n("Error while reading from %1").arg( m_server ) << endl; - emit infoMessage( i18n("Error while reading from %1").arg( m_server ) ); + case TQSocket::ErrSocketRead: + kdDebug() << i18n("Error while reading from %1").tqarg( m_server ) << endl; + emit infoMessage( i18n("Error while reading from %1").tqarg( m_server ) ); break; } diff --git a/libk3b/cddb/k3bcddbpquery.h b/libk3b/cddb/k3bcddbpquery.h index 78fe5df..423cad1 100644 --- a/libk3b/cddb/k3bcddbpquery.h +++ b/libk3b/cddb/k3bcddbpquery.h @@ -13,28 +13,29 @@ */ -#ifndef K3BCDDBP_QUERY_H -#define K3BCDDBP_QUERY_H +#ifndef K3BCDDBP_TQUERY_H +#define K3BCDDBP_TQUERY_H #include "k3bcddbquery.h" #include "k3bcddbresult.h" -#include -#include -#include +#include +#include +#include -class QSocket; +class TQSocket; class K3bCddbpQuery : public K3bCddbQuery { Q_OBJECT + TQ_OBJECT public: - K3bCddbpQuery( QObject* parent = 0, const char* name = 0 ); + K3bCddbpQuery( TQObject* tqparent = 0, const char* name = 0 ); ~K3bCddbpQuery(); public slots: - void setServer( const QString& s, int port = 8080 ) { m_server = s; m_port = port; } + void setServer( const TQString& s, int port = 8080 ) { m_server = s; m_port = port; } protected slots: void slotHostFound(); @@ -47,16 +48,16 @@ class K3bCddbpQuery : public K3bCddbQuery private: void cddbpQuit(); - enum State { GREETING, HANDSHAKE, PROTO, QUERY, QUERY_DATA, READ, READ_DATA, QUIT }; + enum State { GREETING, HANDSHAKE, PROTO, TQUERY, TQUERY_DATA, READ, READ_DATA, TQUIT }; int m_state; - QString m_server; + TQString m_server; int m_port; - QSocket* m_socket; - QTextStream m_stream; + TQSocket* m_socket; + TQTextStream m_stream; - QString m_parsingBuffer; + TQString m_parsingBuffer; }; #endif diff --git a/libk3b/cddb/k3bcddbquery.cpp b/libk3b/cddb/k3bcddbquery.cpp index 783f9a4..6cf8eb0 100644 --- a/libk3b/cddb/k3bcddbquery.cpp +++ b/libk3b/cddb/k3bcddbquery.cpp @@ -25,18 +25,18 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include -K3bCddbQuery::K3bCddbQuery( QObject* parent, const char* name ) - : QObject(parent, name) +K3bCddbQuery::K3bCddbQuery( TQObject* tqparent, const char* name ) + : TQObject(tqparent, name) { m_bQueryFinishedEmited = false; } @@ -53,7 +53,7 @@ void K3bCddbQuery::query( const K3bDevice::Toc& toc ) m_toc = toc; m_inexactMatches.clear(); - QTimer::singleShot( 0, this, SLOT(doQuery()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(doQuery()) ); } @@ -64,26 +64,26 @@ void K3bCddbQuery::queryMatch( const K3bCddbResultHeader& header ) m_result.category = header.category; m_result.discid = header.discid; - QTimer::singleShot( 0, this, SLOT(doMatchQuery()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(doMatchQuery()) ); } -const QStringList& K3bCddbQuery::categories() +const TQStringList& K3bCddbQuery::categories() { - static QStringList s_cat = QStringList::split( ",", "rock,blues,misc,classical," + static TQStringList s_cat = TQStringList::split( ",", "rock,blues,misc,classical," "country,data,folk,jazz,newage,reggae,soundtrack" ); return s_cat; } -bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) +bool K3bCddbQuery::parseEntry( TQTextStream& stream, K3bCddbResultEntry& entry ) { entry.rawData = ""; - stream.setEncoding( QTextStream::UnicodeUTF8 ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); // parse data - QString line; + TQString line; while( !(line = stream.readLine()).isNull() ) { entry.rawData.append(line + "\n"); @@ -94,7 +94,7 @@ bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) } else if( line.startsWith( "DYEAR" ) ) { - QString year = line.mid( 6 ); + TQString year = line.mid( 6 ); if( year.length() == 4 ) entry.year = year.toInt(); } @@ -108,7 +108,7 @@ bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) } else if( line.startsWith( "TTITLE" ) ) { - int eqSgnPos = line.find( "=" ); + int eqSgnPos = line.tqfind( "=" ); bool ok; uint trackNum = (uint)line.mid( 6, eqSgnPos - 6 ).toInt( &ok ); if( !ok ) @@ -129,7 +129,7 @@ bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) } else if( line.startsWith( "EXTT" ) ) { - int eqSgnPos = line.find( "=" ); + int eqSgnPos = line.tqfind( "=" ); bool ok; uint trackNum = (uint)line.mid( 4, eqSgnPos - 4 ).toInt( &ok ); if( !ok ) @@ -157,8 +157,8 @@ bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) // now split the titles in the last added match // if no " / " delimiter is present title and artist are the same // ------------------------------------------------------------------- - QString fullTitle = entry.cdTitle; - int splitPos = fullTitle.find( " / " ); + TQString fullTitle = entry.cdTitle; + int splitPos = fullTitle.tqfind( " / " ); if( splitPos < 0 ) entry.cdArtist = fullTitle; else { @@ -168,10 +168,10 @@ bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) } - for( QStringList::iterator it = entry.titles.begin(); + for( TQStringList::iterator it = entry.titles.begin(); it != entry.titles.end(); ++it ) { - QString fullTitle = *it; - int splitPos = fullTitle.find( " / " ); + TQString fullTitle = *it; + int splitPos = fullTitle.tqfind( " / " ); if( splitPos < 0 ) entry.artists.append( entry.cdArtist ); else { @@ -183,31 +183,31 @@ bool K3bCddbQuery::parseEntry( QTextStream& stream, K3bCddbResultEntry& entry ) // replace all "\\n" with "\n" - for( QStringList::iterator it = entry.titles.begin(); + for( TQStringList::iterator it = entry.titles.begin(); it != entry.titles.end(); ++it ) { - (*it).replace( "\\\\\\\\n", "\\n" ); + (*it).tqreplace( "\\\\\\\\n", "\\n" ); } - for( QStringList::iterator it = entry.artists.begin(); + for( TQStringList::iterator it = entry.artists.begin(); it != entry.artists.end(); ++it ) { - (*it).replace( "\\\\\\\\n", "\\n" ); + (*it).tqreplace( "\\\\\\\\n", "\\n" ); } - for( QStringList::iterator it = entry.extInfos.begin(); + for( TQStringList::iterator it = entry.extInfos.begin(); it != entry.extInfos.end(); ++it ) { - (*it).replace( "\\\\\\\\n", "\\n" ); + (*it).tqreplace( "\\\\\\\\n", "\\n" ); } - entry.cdTitle.replace( "\\\\\\\\n", "\\n" ); - entry.cdArtist.replace( "\\\\\\\\n", "\\n" ); - entry.cdExtInfo.replace( "\\\\\\\\n", "\\n" ); - entry.genre.replace( "\\\\\\\\n", "\\n" ); + entry.cdTitle.tqreplace( "\\\\\\\\n", "\\n" ); + entry.cdArtist.tqreplace( "\\\\\\\\n", "\\n" ); + entry.cdExtInfo.tqreplace( "\\\\\\\\n", "\\n" ); + entry.genre.tqreplace( "\\\\\\\\n", "\\n" ); return true; } -int K3bCddbQuery::getCode( const QString& line ) +int K3bCddbQuery::getCode( const TQString& line ) { bool ok; int code = line.left( 3 ).toInt( &ok ); @@ -217,44 +217,44 @@ int K3bCddbQuery::getCode( const QString& line ) } -QString K3bCddbQuery::handshakeString() const +TQString K3bCddbQuery::handshakeString() const { - QString user( getenv("USER") ); - QString host( getenv("HOST") ); + TQString user( getenv("USER") ); + TQString host( getenv("HOST") ); if( user.isEmpty() ) user = "kde-user"; if( host.isEmpty() ) host = "kde-host"; - return QString("%1 %2 K3b %3").arg(user).arg(host).arg(kapp->aboutData()->version()); + return TQString("%1 %2 K3b %3").tqarg(user).tqarg(host).tqarg(kapp->aboutData()->version()); } -QString K3bCddbQuery::queryString() const +TQString K3bCddbQuery::queryString() const { - QString query = "cddb query " - + QString::number( m_toc.discId(), 16 ).rightJustify( 8, '0' ) + TQString query = "cddb query " + + TQString::number( m_toc.discId(), 16 ).rightJustify( 8, '0' ) + " " - + QString::number( (unsigned int)m_toc.count() ); + + TQString::number( (unsigned int)m_toc.count() ); for( K3bDevice::Toc::const_iterator it = m_toc.begin(); it != m_toc.end(); ++it ) { - query.append( QString( " %1" ).arg( (*it).firstSector().lba() ) ); + query.append( TQString( " %1" ).tqarg( (*it).firstSector().lba() ) ); } - query.append( QString( " %1" ).arg( m_toc.length().lba() / 75 ) ); + query.append( TQString( " %1" ).tqarg( m_toc.length().lba() / 75 ) ); return query; } -bool K3bCddbQuery::parseMatchHeader( const QString& line, K3bCddbResultHeader& header ) +bool K3bCddbQuery::parseMatchHeader( const TQString& line, K3bCddbResultHeader& header ) { // format: category id title // where title could be artist and title splitted with a / header.category = line.section( ' ', 0, 0 ); header.discid = line.section( ' ', 1, 1 ); header.title = line.mid( header.category.length() + header.discid.length() + 2 ); - int slashPos = header.title.find( "/" ); + int slashPos = header.title.tqfind( "/" ); if( slashPos > 0 ) { header.artist = header.title.left(slashPos).stripWhiteSpace(); header.title = header.title.mid( slashPos+1 ).stripWhiteSpace(); diff --git a/libk3b/cddb/k3bcddbquery.h b/libk3b/cddb/k3bcddbquery.h index 569e882..eebc4cb 100644 --- a/libk3b/cddb/k3bcddbquery.h +++ b/libk3b/cddb/k3bcddbquery.h @@ -14,12 +14,12 @@ */ -#ifndef K3BCDDB_QUERY_H -#define K3BCDDB_QUERY_H +#ifndef K3BCDDB_TQUERY_H +#define K3BCDDB_TQUERY_H -#include -#include -#include +#include +#include +#include #include "k3bcddbresult.h" @@ -27,12 +27,13 @@ #include "k3b_export.h" -class LIBK3B_EXPORT K3bCddbQuery : public QObject +class LIBK3B_EXPORT K3bCddbQuery : public TQObject { Q_OBJECT + TQ_OBJECT public: - K3bCddbQuery( QObject* parent = 0, const char* name = 0 ); + K3bCddbQuery( TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bCddbQuery(); void query( const K3bDevice::Toc& ); @@ -48,15 +49,15 @@ class LIBK3B_EXPORT K3bCddbQuery : public QObject * After emitting the signal inexactMatches one has to choose one * of these entries and query it with queryInexactMatch */ - const QValueList& getInexactMatches() const { return m_inexactMatches; } + const TQValueList& getInexactMatches() const { return m_inexactMatches; } - static const QStringList& categories(); + static const TQStringList& categories(); enum Error { SUCCESS = 0, CANCELED, NO_ENTRY_FOUND, CONNECTION_ERROR, - QUERY_ERROR, + TQUERY_ERROR, READ_ERROR, FAILURE, WORKING }; @@ -76,7 +77,7 @@ class LIBK3B_EXPORT K3bCddbQuery : public QObject */ void inexactMatches( K3bCddbQuery* ); - void infoMessage( const QString& ); + void infoMessage( const TQString& ); protected slots: virtual void doQuery() = 0; @@ -88,11 +89,11 @@ class LIBK3B_EXPORT K3bCddbQuery : public QObject K3bCddbResultEntry& result() { return m_result; } void setError( int e ) { m_error = e; } - bool parseEntry( QTextStream&, K3bCddbResultEntry& ); - int getCode( const QString& ); - QString handshakeString() const; - QString queryString() const; - bool parseMatchHeader( const QString& line, K3bCddbResultHeader& header ); + bool parseEntry( TQTextStream&, K3bCddbResultEntry& ); + int getCode( const TQString& ); + TQString handshakeString() const; + TQString queryString() const; + bool parseMatchHeader( const TQString& line, K3bCddbResultHeader& header ); /** * since I'm not quite sure when the socket will emit connectionClosed @@ -101,7 +102,7 @@ class LIBK3B_EXPORT K3bCddbQuery : public QObject */ void emitQueryFinished(); - QValueList m_inexactMatches; + TQValueList m_inexactMatches; private: K3bDevice::Toc m_toc; diff --git a/libk3b/cddb/k3bcddbresult.h b/libk3b/cddb/k3bcddbresult.h index 46dcb9a..9486bff 100644 --- a/libk3b/cddb/k3bcddbresult.h +++ b/libk3b/cddb/k3bcddbresult.h @@ -19,17 +19,17 @@ #define K3B_CDDB_RESULT_H -#include +#include #include "k3b_export.h" class LIBK3B_EXPORT K3bCddbResultHeader { public: - QString category; - QString title; - QString artist; - QString discid; + TQString category; + TQString title; + TQString artist; + TQString discid; }; @@ -42,20 +42,20 @@ class LIBK3B_EXPORT K3bCddbResultEntry year(0) { } - QStringList titles; - QStringList artists; - QStringList extInfos; + TQStringList titles; + TQStringList artists; + TQStringList extInfos; - QString cdTitle; - QString cdArtist; - QString cdExtInfo; + TQString cdTitle; + TQString cdArtist; + TQString cdExtInfo; - QString genre; - QString category; + TQString genre; + TQString category; int year; - QString discid; + TQString discid; - QString rawData; + TQString rawData; }; @@ -71,7 +71,7 @@ class LIBK3B_EXPORT K3bCddbResult int foundEntries() const; private: - QValueList m_entries; + TQValueList m_entries; K3bCddbResultEntry m_emptyEntry; }; diff --git a/libk3b/cddb/k3bcddbsubmit.cpp b/libk3b/cddb/k3bcddbsubmit.cpp index a04dbcb..01aa7f8 100644 --- a/libk3b/cddb/k3bcddbsubmit.cpp +++ b/libk3b/cddb/k3bcddbsubmit.cpp @@ -16,11 +16,11 @@ #include "k3bcddbsubmit.h" -#include +#include -K3bCddbSubmit::K3bCddbSubmit( QObject* parent, const char* name ) - : QObject( parent, name ) +K3bCddbSubmit::K3bCddbSubmit( TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ) { } @@ -37,7 +37,7 @@ void K3bCddbSubmit::submit( const K3bCddbResultEntry& entry ) if( m_resultEntry.rawData.isEmpty() ) createDataStream( m_resultEntry ); - QTimer::singleShot( 0, this, SLOT(doSubmit()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(doSubmit()) ); } @@ -45,7 +45,7 @@ void K3bCddbSubmit::createDataStream( K3bCddbResultEntry& entry ) { entry.rawData.truncate(0); - QTextStream ts( &entry.rawData, IO_WriteOnly ); + TQTextStream ts( &entry.rawData, IO_WriteOnly ); ts << "#" << endl << "# Submitted via: K3b" << endl diff --git a/libk3b/cddb/k3bcddbsubmit.h b/libk3b/cddb/k3bcddbsubmit.h index ff57101..cb9906f 100644 --- a/libk3b/cddb/k3bcddbsubmit.h +++ b/libk3b/cddb/k3bcddbsubmit.h @@ -17,19 +17,20 @@ #ifndef K3BCDDB_SUBMIT_H #define K3BCDDB_SUBMIT_H -#include -#include +#include +#include #include "k3bcddbresult.h" -class K3bCddbSubmit : public QObject +class K3bCddbSubmit : public TQObject { Q_OBJECT + TQ_OBJECT public: - K3bCddbSubmit( QObject* parent = 0, const char* name = 0 ); + K3bCddbSubmit( TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bCddbSubmit(); int error() const { return m_error; } @@ -40,7 +41,7 @@ class K3bCddbSubmit : public QObject void submit( const K3bCddbResultEntry& ); signals: - void infoMessage( const QString& ); + void infoMessage( const TQString& ); void submitFinished( K3bCddbSubmit* ); protected slots: diff --git a/libk3b/core/k3bcore.cpp b/libk3b/core/k3bcore.cpp index c10fec0..38d3c07 100644 --- a/libk3b/core/k3bcore.cpp +++ b/libk3b/core/k3bcore.cpp @@ -37,14 +37,14 @@ #include #include -#include -#include -#include +#include +#include +#include -static Qt::HANDLE s_guiThreadHandle = QThread::currentThread(); +static TQt::HANDLE s_guiThreadHandle = TQThread::currentThread(); -// We cannot use QWaitCondition here since the event might be handled faster +// We cannot use TQWaitCondition here since the event might be handled faster // than the thread starts the waiting class DeviceBlockingEventDoneCondition { public: @@ -69,15 +69,15 @@ public: } private: - QMutex m_doneMutex; + TQMutex m_doneMutex; bool m_done; }; -class DeviceBlockingEvent : public QCustomEvent +class DeviceBlockingEvent : public TQCustomEvent { public: DeviceBlockingEvent( bool block_, K3bDevice::Device* dev, DeviceBlockingEventDoneCondition* cond_, bool* success_ ) - : QCustomEvent( QEvent::User + 33 ), + : TQCustomEvent( TQEvent::User + 33 ), block(block_), device(dev), cond(cond_), @@ -111,8 +111,8 @@ public: K3bPluginManager* pluginManager; K3bGlobalSettings* globalSettings; - QValueList runningJobs; - QValueList blockedDevices; + TQValueList runningJobs; + TQValueList blockedDevices; }; @@ -121,8 +121,8 @@ K3bCore* K3bCore::s_k3bCore = 0; -K3bCore::K3bCore( QObject* parent, const char* name ) - : QObject( parent, name ) +K3bCore::K3bCore( TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ) { d = new Private(); @@ -205,11 +205,11 @@ void K3bCore::init() externalBinManager()->search(); #ifdef HAVE_HAL - connect( K3bDevice::HalConnection::instance(), SIGNAL(deviceAdded(const QString&)), - deviceManager(), SLOT(addDevice(const QString&)) ); - connect( K3bDevice::HalConnection::instance(), SIGNAL(deviceRemoved(const QString&)), - deviceManager(), SLOT(removeDevice(const QString&)) ); - QStringList devList = K3bDevice::HalConnection::instance()->devices(); + connect( K3bDevice::HalConnection::instance(), TQT_SIGNAL(deviceAdded(const TQString&)), + deviceManager(), TQT_SLOT(addDevice(const TQString&)) ); + connect( K3bDevice::HalConnection::instance(), TQT_SIGNAL(deviceRemoved(const TQString&)), + deviceManager(), TQT_SLOT(removeDevice(const TQString&)) ); + TQStringList devList = K3bDevice::HalConnection::instance()->devices(); if( devList.isEmpty() ) deviceManager()->scanBus(); else @@ -257,7 +257,7 @@ void K3bCore::readSettings( KConfig* cnf ) if( !c ) c = config(); - QString oldGrp = c->group(); + TQString oldGrp = c->group(); globalSettings()->readSettings( c ); deviceManager()->readConfig( c ); @@ -273,7 +273,7 @@ void K3bCore::saveSettings( KConfig* cnf ) if( !c ) c = config(); - QString oldGrp = c->group(); + TQString oldGrp = c->group(); c->setGroup( "General Options" ); c->writeEntry( "config version", version() ); @@ -310,7 +310,7 @@ bool K3bCore::jobsRunning() const } -const QValueList& K3bCore::runningJobs() const +const TQValueList& K3bCore::runningJobs() const { return d->runningJobs; } @@ -318,13 +318,13 @@ const QValueList& K3bCore::runningJobs() const bool K3bCore::blockDevice( K3bDevice::Device* dev ) { - if( QThread::currentThread() == s_guiThreadHandle ) { + if( TQThread::currentThread() == s_guiThreadHandle ) { return internalBlockDevice( dev ); } else { bool success = false; DeviceBlockingEventDoneCondition w; - QApplication::postEvent( this, new DeviceBlockingEvent( true, dev, &w, &success ) ); + TQApplication::postEvent( this, new DeviceBlockingEvent( true, dev, &w, &success ) ); w.wait(); return success; } @@ -333,12 +333,12 @@ bool K3bCore::blockDevice( K3bDevice::Device* dev ) void K3bCore::unblockDevice( K3bDevice::Device* dev ) { - if( QThread::currentThread() == s_guiThreadHandle ) { + if( TQThread::currentThread() == s_guiThreadHandle ) { internalUnblockDevice( dev ); } else { DeviceBlockingEventDoneCondition w; - QApplication::postEvent( this, new DeviceBlockingEvent( false, dev, &w, 0 ) ); + TQApplication::postEvent( this, new DeviceBlockingEvent( false, dev, &w, 0 ) ); w.wait(); } } @@ -346,7 +346,7 @@ void K3bCore::unblockDevice( K3bDevice::Device* dev ) bool K3bCore::internalBlockDevice( K3bDevice::Device* dev ) { - if( !d->blockedDevices.contains( dev ) ) { + if( !d->blockedDevices.tqcontains( dev ) ) { d->blockedDevices.append( dev ); return true; } @@ -361,7 +361,7 @@ void K3bCore::internalUnblockDevice( K3bDevice::Device* dev ) } -void K3bCore::customEvent( QCustomEvent* e ) +void K3bCore::customEvent( TQCustomEvent* e ) { if( DeviceBlockingEvent* de = dynamic_cast(e) ) { if( de->block ) diff --git a/libk3b/core/k3bcore.h b/libk3b/core/k3bcore.h index ce73e32..f97430c 100644 --- a/libk3b/core/k3bcore.h +++ b/libk3b/core/k3bcore.h @@ -17,8 +17,8 @@ #ifndef _K3B_CORE_H_ #define _K3B_CORE_H_ -#include -#include +#include +#include #include "k3b_export.h" @@ -36,7 +36,7 @@ class K3bJob; class K3bBurnJob; class K3bGlobalSettings; class K3bPluginManager; -class QCustomEvent; +class TQCustomEvent; namespace K3bDevice { @@ -52,19 +52,20 @@ namespace K3bDevice { * This is the heart of the K3b system. Every plugin may use this * to get the information it needs. */ -class LIBK3B_EXPORT K3bCore : public QObject +class LIBK3B_EXPORT K3bCore : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Although K3bCore is a singlelton it's constructor is not private to make inheritance * possible. Just make sure to only create one instance. */ - K3bCore( QObject* parent = 0, const char* name = 0 ); + K3bCore( TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bCore(); - const QValueList& runningJobs() const; + const TQValueList& runningJobs() const; /** * Equals to !runningJobs().isEmpty() @@ -169,7 +170,7 @@ class LIBK3B_EXPORT K3bCore : public QObject virtual void initDeviceManager(); virtual void initPluginManager(); - virtual void customEvent( QCustomEvent* e ); + virtual void customEvent( TQCustomEvent* e ); private: class Private; diff --git a/libk3b/core/k3bdataevent.h b/libk3b/core/k3bdataevent.h index b6a4334..c88bfaa 100644 --- a/libk3b/core/k3bdataevent.h +++ b/libk3b/core/k3bdataevent.h @@ -16,23 +16,23 @@ #ifndef K3B_DATA_EVENT_H #define K3B_DATA_EVENT_H -#include +#include /** * Custom event class for posting events corresponding to the * K3bJob signals. This is useful for a threaded job since * in that case it's not possible to emit signals that directly - * change the GUI (see QThread docu). + * change the GUI (see TQThread docu). */ -class K3bDataEvent : public QCustomEvent +class K3bDataEvent : public TQCustomEvent { public: // make sure we get not in the way of K3bProgressInfoEvent - static const int EVENT_TYPE = QEvent::User + 100; + static const int EVENT_TYPE = TQEvent::User + 100; K3bDataEvent( const char* data, int len ) - : QCustomEvent( EVENT_TYPE ), + : TQCustomEvent( EVENT_TYPE ), m_data(data), m_length(len) {} diff --git a/libk3b/core/k3bdefaultexternalprograms.cpp b/libk3b/core/k3bdefaultexternalprograms.cpp index b654d22..94ff212 100644 --- a/libk3b/core/k3bdefaultexternalprograms.cpp +++ b/libk3b/core/k3bdefaultexternalprograms.cpp @@ -18,12 +18,12 @@ #include "k3bexternalbinmanager.h" #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -92,18 +92,18 @@ K3bCdrecordProgram::K3bCdrecordProgram( bool dvdPro ) // But since it may be that someone manually installed cdrecord // replacing the wrapper we check if cdrecord is a script. // -static QString& debianWeirdnessHack( QString& path ) +static TQString& debianWeirdnessHack( TQString& path ) { - if( QFile::exists( path + ".mmap" ) ) { + if( TQFile::exists( path + ".mmap" ) ) { kdDebug() << "(K3bCdrecordProgram) checking for Debian cdrecord wrapper script." << endl; - if( QFileInfo( path ).size() < 1024 ) { + if( TQFileInfo( path ).size() < 1024 ) { kdDebug() << "(K3bCdrecordProgram) Debian Wrapper script size fits. Checking file." << endl; - QFile f( path ); + TQFile f( path ); f.open( IO_ReadOnly ); - QString s = QTextStream( &f ).read(); - if( s.contains( "cdrecord.mmap" ) && s.contains( "cdrecord.shm" ) ) { + TQString s = TQTextStream( &f ).read(); + if( s.tqcontains( "cdrecord.mmap" ) && s.tqcontains( "cdrecord.shm" ) ) { kdDebug() << "(K3bCdrecordProgram) Found Debian Wrapper script." << endl; - QString ext; + TQString ext; if( K3b::kernelVersion().versionString().left(3) > "2.2" ) ext = ".mmap"; else @@ -120,23 +120,23 @@ static QString& debianWeirdnessHack( QString& path ) } -bool K3bCdrecordProgram::scan( const QString& p ) +bool K3bCdrecordProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; bool wodim = false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); - if( QFile::exists( path + "wodim" ) ) { + if( TQFile::exists( path + "wodim" ) ) { wodim = true; path += "wodim"; } - else if( QFile::exists( path + "cdrecord" ) ) { + else if( TQFile::exists( path + "cdrecord" ) ) { path += "cdrecord"; } else @@ -155,23 +155,23 @@ bool K3bCdrecordProgram::scan( const QString& p ) if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { int pos = -1; if( wodim ) { - pos = out.output().find( "Wodim" ); + pos = out.output().tqfind( "Wodim" ); } else if( m_dvdPro ) { - pos = out.output().find( "Cdrecord-ProDVD" ); + pos = out.output().tqfind( "Cdrecord-ProDVD" ); } else { - pos = out.output().find( "Cdrecord" ); + pos = out.output().tqfind( "Cdrecord" ); } if( pos < 0 ) return false; - pos = out.output().find( QRegExp("[0-9]"), pos ); + pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); if( pos < 0 ) return false; - int endPos = out.output().find( QRegExp("\\s"), pos+1 ); + int endPos = out.output().tqfind( TQRegExp("\\s"), pos+1 ); if( endPos < 0 ) return false; @@ -182,11 +182,11 @@ bool K3bCdrecordProgram::scan( const QString& p ) if( wodim ) bin->addFeature( "wodim" ); - pos = out.output().find( "Copyright") + 14; - endPos = out.output().find( "\n", pos ); + pos = out.output().tqfind( "Copyright") + 14; + endPos = out.output().tqfind( "\n", pos ); // cdrecord does not use local encoding for the copyright statement but plain latin1 - bin->copyright = QString::fromLatin1( out.output().mid( pos, endPos-pos ).local8Bit() ).stripWhiteSpace(); + bin->copyright = TQString::tqfromLatin1( out.output().mid( pos, endPos-pos ).local8Bit() ).stripWhiteSpace(); } else { kdDebug() << "(K3bCdrecordProgram) could not start " << path << endl; @@ -195,7 +195,7 @@ bool K3bCdrecordProgram::scan( const QString& p ) if( !m_dvdPro && bin->version.suffix().endsWith( "-dvd" ) ) { bin->addFeature( "dvd-patch" ); - bin->version = QString(bin->version.versionString()).remove("-dvd"); + bin->version = TQString(bin->version.versionString()).remove("-dvd"); } // probe features @@ -203,17 +203,17 @@ bool K3bCdrecordProgram::scan( const QString& p ) out.setProcess( &fp ); fp << path << "-help"; if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { - if( out.output().contains( "gracetime" ) ) + if( out.output().tqcontains( "gracetime" ) ) bin->addFeature( "gracetime" ); - if( out.output().contains( "-overburn" ) ) + if( out.output().tqcontains( "-overburn" ) ) bin->addFeature( "overburn" ); - if( out.output().contains( "-text" ) ) + if( out.output().tqcontains( "-text" ) ) bin->addFeature( "cdtext" ); - if( out.output().contains( "-clone" ) ) + if( out.output().tqcontains( "-clone" ) ) bin->addFeature( "clone" ); - if( out.output().contains( "-tao" ) ) + if( out.output().tqcontains( "-tao" ) ) bin->addFeature( "tao" ); - if( out.output().contains( "cuefile=" ) && + if( out.output().tqcontains( "cuefile=" ) && ( wodim || bin->version > K3bVersion( 2, 1, -1, "a14") ) ) // cuefile handling was still buggy in a14 bin->addFeature( "cuefile" ); @@ -222,14 +222,14 @@ bool K3bCdrecordProgram::scan( const QString& p ) // just double-checked and the help page is proper but there is no harm in having // two checks) // and the version check does not handle versions like 2.01-dvd properly - if( out.output().contains( "-xamix" ) || + if( out.output().tqcontains( "-xamix" ) || bin->version >= K3bVersion( 2, 1, -1, "a12" ) || wodim ) bin->addFeature( "xamix" ); // check if we run cdrecord as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } @@ -271,23 +271,23 @@ K3bMkisofsProgram::K3bMkisofsProgram() { } -bool K3bMkisofsProgram::scan( const QString& p ) +bool K3bMkisofsProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; bool genisoimage = false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); - if( QFile::exists( path + "genisoimage" ) ) { + if( TQFile::exists( path + "genisoimage" ) ) { genisoimage = true; path += "genisoimage"; } - else if( QFile::exists( path + "mkisofs" ) ) { + else if( TQFile::exists( path + "mkisofs" ) ) { path += "mkisofs"; } else @@ -303,18 +303,18 @@ bool K3bMkisofsProgram::scan( const QString& p ) if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { int pos = -1; if( genisoimage ) - pos = out.output().find( "genisoimage" ); + pos = out.output().tqfind( "genisoimage" ); else - pos = out.output().find( "mkisofs" ); + pos = out.output().tqfind( "mkisofs" ); if( pos < 0 ) return false; - pos = out.output().find( QRegExp("[0-9]"), pos ); + pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); if( pos < 0 ) return false; - int endPos = out.output().find( ' ', pos+1 ); + int endPos = out.output().tqfind( ' ', pos+1 ); if( endPos < 0 ) return false; @@ -337,20 +337,20 @@ bool K3bMkisofsProgram::scan( const QString& p ) fp << path << "-help"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { - if( out.output().contains( "-udf" ) ) + if( out.output().tqcontains( "-udf" ) ) bin->addFeature( "udf" ); - if( out.output().contains( "-dvd-video" ) ) + if( out.output().tqcontains( "-dvd-video" ) ) bin->addFeature( "dvd-video" ); - if( out.output().contains( "-joliet-long" ) ) + if( out.output().tqcontains( "-joliet-long" ) ) bin->addFeature( "joliet-long" ); - if( out.output().contains( "-xa" ) ) + if( out.output().tqcontains( "-xa" ) ) bin->addFeature( "xa" ); - if( out.output().contains( "-sectype" ) ) + if( out.output().tqcontains( "-sectype" ) ) bin->addFeature( "sectype" ); // check if we run mkisofs as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } @@ -383,30 +383,30 @@ K3bReadcdProgram::K3bReadcdProgram() { } -bool K3bReadcdProgram::scan( const QString& p ) +bool K3bReadcdProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; bool readom = false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); - if( QFile::exists( path + "readom" ) ) { + if( TQFile::exists( path + "readom" ) ) { readom = true; path += "readom"; } - else if( QFile::exists( path + "readcd" ) ) { + else if( TQFile::exists( path + "readcd" ) ) { path += "readcd"; } else return false; } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -418,17 +418,17 @@ bool K3bReadcdProgram::scan( const QString& p ) if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { int pos = -1; if( readom ) - pos = out.output().find( "readom" ); + pos = out.output().tqfind( "readom" ); else - pos = out.output().find( "readcd" ); + pos = out.output().tqfind( "readcd" ); if( pos < 0 ) return false; - pos = out.output().find( QRegExp("[0-9]"), pos ); + pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); if( pos < 0 ) return false; - int endPos = out.output().find( ' ', pos+1 ); + int endPos = out.output().tqfind( ' ', pos+1 ); if( endPos < 0 ) return false; @@ -451,12 +451,12 @@ bool K3bReadcdProgram::scan( const QString& p ) fp << path << "-help"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { - if( out.output().contains( "-clone" ) ) + if( out.output().tqcontains( "-clone" ) ) bin->addFeature( "clone" ); // check if we run mkisofs as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } @@ -484,20 +484,20 @@ K3bCdrdaoProgram::K3bCdrdaoProgram() { } -bool K3bCdrdaoProgram::scan( const QString& p ) +bool K3bCdrdaoProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append("cdrdao"); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -507,15 +507,15 @@ bool K3bCdrdaoProgram::scan( const QString& p ) vp << path ; K3bProcessOutputCollector out( &vp ); if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "Cdrdao version" ); + int pos = out.output().tqfind( "Cdrdao version" ); if( pos < 0 ) return false; - pos = out.output().find( QRegExp("[0-9]"), pos ); + pos = out.output().tqfind( TQRegExp("[0-9]"), pos ); if( pos < 0 ) return false; - int endPos = out.output().find( ' ', pos+1 ); + int endPos = out.output().tqfind( ' ', pos+1 ); if( endPos < 0 ) return false; @@ -523,8 +523,8 @@ bool K3bCdrdaoProgram::scan( const QString& p ) bin->path = path; bin->version = out.output().mid( pos, endPos-pos ); - pos = out.output().find( "(C)", endPos+1 ) + 4; - endPos = out.output().find( '\n', pos ); + pos = out.output().tqfind( "(C)", endPos+1 ) + 4; + endPos = out.output().tqfind( '\n', pos ); bin->copyright = out.output().mid( pos, endPos-pos ); } else { @@ -539,17 +539,17 @@ bool K3bCdrdaoProgram::scan( const QString& p ) fp << path << "write" << "-h"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { - if( out.output().contains( "--overburn" ) ) + if( out.output().tqcontains( "--overburn" ) ) bin->addFeature( "overburn" ); - if( out.output().contains( "--multi" ) ) + if( out.output().tqcontains( "--multi" ) ) bin->addFeature( "multisession" ); - if( out.output().contains( "--buffer-under-run-protection" ) ) + if( out.output().tqcontains( "--buffer-under-run-protection" ) ) bin->addFeature( "disable-burnproof" ); // check if we run cdrdao as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } @@ -578,24 +578,24 @@ bool K3bCdrdaoProgram::scan( const QString& p ) } -K3bTranscodeProgram::K3bTranscodeProgram( const QString& transcodeProgram ) +K3bTranscodeProgram::K3bTranscodeProgram( const TQString& transcodeProgram ) : K3bExternalProgram( transcodeProgram ), m_transcodeProgram( transcodeProgram ) { } -bool K3bTranscodeProgram::scan( const QString& p ) +bool K3bTranscodeProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; + TQString path = p; if( path[path.length()-1] != '/' ) path.append("/"); - QString appPath = path + m_transcodeProgram; + TQString appPath = path + m_transcodeProgram; - if( !QFile::exists( appPath ) ) + if( !TQFile::exists( appPath ) ) return false; K3bExternalBin* bin = 0; @@ -605,13 +605,13 @@ bool K3bTranscodeProgram::scan( const QString& p ) vp << appPath << "-v"; K3bProcessOutputCollector out( &vp ); if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "transcode v" ); + int pos = out.output().tqfind( "transcode v" ); if( pos < 0 ) return false; pos += 11; - int endPos = out.output().find( QRegExp("[\\s\\)]"), pos+1 ); + int endPos = out.output().tqfind( TQRegExp("[\\s\\)]"), pos+1 ); if( endPos < 0 ) return false; @@ -627,20 +627,20 @@ bool K3bTranscodeProgram::scan( const QString& p ) // // Check features // - QString modInfoBin = path + "tcmodinfo"; + TQString modInfoBin = path + "tcmodinfo"; KProcess modp; modp << modInfoBin << "-p"; out.setProcess( &modp ); if( modp.start( KProcess::Block, KProcess::AllOutput ) ) { - QString modPath = out.output().stripWhiteSpace(); - QDir modDir( modPath ); - if( !modDir.entryList( "*export_xvid*", QDir::Files ).isEmpty() ) + TQString modPath = out.output().stripWhiteSpace(); + TQDir modDir( modPath ); + if( !modDir.entryList( "*export_xvid*", TQDir::Files ).isEmpty() ) bin->addFeature( "xvid" ); - if( !modDir.entryList( "*export_lame*", QDir::Files ).isEmpty() ) + if( !modDir.entryList( "*export_lame*", TQDir::Files ).isEmpty() ) bin->addFeature( "lame" ); - if( !modDir.entryList( "*export_ffmpeg*", QDir::Files ).isEmpty() ) + if( !modDir.entryList( "*export_ffmpeg*", TQDir::Files ).isEmpty() ) bin->addFeature( "ffmpeg" ); - if( !modDir.entryList( "*export_ac3*", QDir::Files ).isEmpty() ) + if( !modDir.entryList( "*export_ac3*", TQDir::Files ).isEmpty() ) bin->addFeature( "ac3" ); } @@ -650,26 +650,26 @@ bool K3bTranscodeProgram::scan( const QString& p ) -K3bVcdbuilderProgram::K3bVcdbuilderProgram( const QString& p ) +K3bVcdbuilderProgram::K3bVcdbuilderProgram( const TQString& p ) : K3bExternalProgram( p ), m_vcdbuilderProgram( p ) { } -bool K3bVcdbuilderProgram::scan( const QString& p ) +bool K3bVcdbuilderProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append(m_vcdbuilderProgram); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -679,13 +679,13 @@ bool K3bVcdbuilderProgram::scan( const QString& p ) vp << path << "-V"; K3bProcessOutputCollector out( &vp ); if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "GNU VCDImager" ); + int pos = out.output().tqfind( "GNU VCDImager" ); if( pos < 0 ) return false; pos += 14; - int endPos = out.output().find( QRegExp("[\\n\\)]"), pos+1 ); + int endPos = out.output().tqfind( TQRegExp("[\\n\\)]"), pos+1 ); if( endPos < 0 ) return false; @@ -693,8 +693,8 @@ bool K3bVcdbuilderProgram::scan( const QString& p ) bin->path = path; bin->version = out.output().mid( pos, endPos-pos ).stripWhiteSpace(); - pos = out.output().find( "Copyright" ) + 14; - endPos = out.output().find( "\n", pos ); + pos = out.output().tqfind( "Copyright" ) + 14; + endPos = out.output().tqfind( "\n", pos ); bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace(); } else { @@ -713,20 +713,20 @@ K3bNormalizeProgram::K3bNormalizeProgram() } -bool K3bNormalizeProgram::scan( const QString& p ) +bool K3bNormalizeProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append("normalize-audio"); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -737,15 +737,15 @@ bool K3bNormalizeProgram::scan( const QString& p ) vp << path << "--version"; if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "normalize" ); + int pos = out.output().tqfind( "normalize" ); if( pos < 0 ) return false; - pos = out.output().find( QRegExp("\\d"), pos ); + pos = out.output().tqfind( TQRegExp("\\d"), pos ); if( pos < 0 ) return false; - int endPos = out.output().find( QRegExp("\\s"), pos+1 ); + int endPos = out.output().tqfind( TQRegExp("\\s"), pos+1 ); if( endPos < 0 ) return false; @@ -753,8 +753,8 @@ bool K3bNormalizeProgram::scan( const QString& p ) bin->path = path; bin->version = out.output().mid( pos, endPos-pos ); - pos = out.output().find( "Copyright" )+14; - endPos = out.output().find( "\n", pos ); + pos = out.output().tqfind( "Copyright" )+14; + endPos = out.output().tqfind( "\n", pos ); bin->copyright = out.output().mid( pos, endPos-pos ).stripWhiteSpace(); } else { @@ -772,20 +772,20 @@ K3bGrowisofsProgram::K3bGrowisofsProgram() { } -bool K3bGrowisofsProgram::scan( const QString& p ) +bool K3bGrowisofsProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append("growisofs"); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -796,15 +796,15 @@ bool K3bGrowisofsProgram::scan( const QString& p ) vp << path << "-version"; if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "growisofs" ); + int pos = out.output().tqfind( "growisofs" ); if( pos < 0 ) return false; - pos = out.output().find( QRegExp("\\d"), pos ); + pos = out.output().tqfind( TQRegExp("\\d"), pos ); if( pos < 0 ) return false; - int endPos = out.output().find( ",", pos+1 ); + int endPos = out.output().tqfind( ",", pos+1 ); if( endPos < 0 ) return false; @@ -822,7 +822,7 @@ bool K3bGrowisofsProgram::scan( const QString& p ) // check if we run growisofs as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } @@ -837,20 +837,20 @@ K3bDvdformatProgram::K3bDvdformatProgram() { } -bool K3bDvdformatProgram::scan( const QString& p ) +bool K3bDvdformatProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append("dvd+rw-format"); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -863,18 +863,18 @@ bool K3bDvdformatProgram::scan( const QString& p ) if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { // different locales make searching for the +- char difficult // so we simply ignore it. - int pos = out.output().find( QRegExp("DVD.*RAM format utility") ); + int pos = out.output().tqfind( TQRegExp("DVD.*RAM format utility") ); if( pos < 0 ) return false; - pos = out.output().find( "version", pos ); + pos = out.output().tqfind( "version", pos ); if( pos < 0 ) return false; pos += 8; // the version ends in a dot. - int endPos = out.output().find( QRegExp("\\.\\D"), pos ); + int endPos = out.output().tqfind( TQRegExp("\\.\\D"), pos ); if( endPos < 0 ) return false; @@ -892,7 +892,7 @@ bool K3bDvdformatProgram::scan( const QString& p ) // check if we run dvd+rw-format as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } @@ -907,20 +907,20 @@ K3bDvdBooktypeProgram::K3bDvdBooktypeProgram() { } -bool K3bDvdBooktypeProgram::scan( const QString& p ) +bool K3bDvdBooktypeProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append("dvd+rw-booktype"); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -931,7 +931,7 @@ bool K3bDvdBooktypeProgram::scan( const QString& p ) vp << path; if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "dvd+rw-booktype" ); + int pos = out.output().tqfind( "dvd+rw-booktype" ); if( pos < 0 ) return false; @@ -956,20 +956,20 @@ K3bCdda2wavProgram::K3bCdda2wavProgram() { } -bool K3bCdda2wavProgram::scan( const QString& p ) +bool K3bCdda2wavProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; - QFileInfo fi( path ); + TQString path = p; + TQFileInfo fi( path ); if( fi.isDir() ) { if( path[path.length()-1] != '/' ) path.append("/"); path.append("cdda2wav"); } - if( !QFile::exists( path ) ) + if( !TQFile::exists( path ) ) return false; K3bExternalBin* bin = 0; @@ -980,18 +980,18 @@ bool K3bCdda2wavProgram::scan( const QString& p ) vp << path << "-h"; if( vp.start( KProcess::Block, KProcess::AllOutput ) ) { - int pos = out.output().find( "cdda2wav" ); + int pos = out.output().tqfind( "cdda2wav" ); if( pos < 0 ) return false; - pos = out.output().find( "Version", pos ); + pos = out.output().tqfind( "Version", pos ); if( pos < 0 ) return false; pos += 8; // the version does not end in a space but the kernel info - int endPos = out.output().find( QRegExp("[^\\d\\.]"), pos ); + int endPos = out.output().tqfind( TQRegExp("[^\\d\\.]"), pos ); if( endPos < 0 ) return false; @@ -1001,15 +1001,15 @@ bool K3bCdda2wavProgram::scan( const QString& p ) // features (we do this since the cdda2wav help says that the short // options will disappear soon) - if( out.output().find( "-info-only" ) ) + if( out.output().tqfind( "-info-only" ) ) bin->addFeature( "info-only" ); // otherwise use the -J option - if( out.output().find( "-no-infofile" ) ) + if( out.output().tqfind( "-no-infofile" ) ) bin->addFeature( "no-infofile" ); // otherwise use the -H option - if( out.output().find( "-gui" ) ) + if( out.output().tqfind( "-gui" ) ) bin->addFeature( "gui" ); // otherwise use the -g option - if( out.output().find( "-bulk" ) ) + if( out.output().tqfind( "-bulk" ) ) bin->addFeature( "bulk" ); // otherwise use the -B option - if( out.output().find( "dev=" ) ) + if( out.output().tqfind( "dev=" ) ) bin->addFeature( "dev" ); // otherwise use the -B option } else { @@ -1019,7 +1019,7 @@ bool K3bCdda2wavProgram::scan( const QString& p ) // check if we run as root struct stat s; - if( !::stat( QFile::encodeName(path), &s ) ) { + if( !::stat( TQFile::encodeName(path), &s ) ) { if( (s.st_mode & S_ISUID) && s.st_uid == 0 ) bin->addFeature( "suidroot" ); } diff --git a/libk3b/core/k3bdefaultexternalprograms.h b/libk3b/core/k3bdefaultexternalprograms.h index 3212727..bc4d41c 100644 --- a/libk3b/core/k3bdefaultexternalprograms.h +++ b/libk3b/core/k3bdefaultexternalprograms.h @@ -35,7 +35,7 @@ class LIBK3B_EXPORT K3bCdrecordProgram : public K3bExternalProgram public: K3bCdrecordProgram( bool dvdPro ); - bool scan( const QString& ); + bool scan( const TQString& ); private: bool m_dvdPro; @@ -47,7 +47,7 @@ class LIBK3B_EXPORT K3bMkisofsProgram : public K3bExternalProgram public: K3bMkisofsProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; @@ -56,7 +56,7 @@ class LIBK3B_EXPORT K3bReadcdProgram : public K3bExternalProgram public: K3bReadcdProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; @@ -65,34 +65,34 @@ class LIBK3B_EXPORT K3bCdrdaoProgram : public K3bExternalProgram public: K3bCdrdaoProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; class LIBK3B_EXPORT K3bTranscodeProgram : public K3bExternalProgram { public: - K3bTranscodeProgram( const QString& transcodeProgram ); + K3bTranscodeProgram( const TQString& transcodeProgram ); - bool scan( const QString& ); + bool scan( const TQString& ); // no user parameters (yet) bool supportsUserParameters() const { return false; } private: - QString m_transcodeProgram; + TQString m_transcodeProgram; }; class LIBK3B_EXPORT K3bVcdbuilderProgram : public K3bExternalProgram { public: - K3bVcdbuilderProgram( const QString& ); + K3bVcdbuilderProgram( const TQString& ); - bool scan( const QString& ); + bool scan( const TQString& ); private: - QString m_vcdbuilderProgram; + TQString m_vcdbuilderProgram; }; @@ -101,7 +101,7 @@ class LIBK3B_EXPORT K3bNormalizeProgram : public K3bExternalProgram public: K3bNormalizeProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; @@ -110,7 +110,7 @@ class LIBK3B_EXPORT K3bGrowisofsProgram : public K3bExternalProgram public: K3bGrowisofsProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; @@ -119,7 +119,7 @@ class LIBK3B_EXPORT K3bDvdformatProgram : public K3bExternalProgram public: K3bDvdformatProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; @@ -128,7 +128,7 @@ class LIBK3B_EXPORT K3bDvdBooktypeProgram : public K3bExternalProgram public: K3bDvdBooktypeProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; @@ -137,7 +137,7 @@ class LIBK3B_EXPORT K3bCdda2wavProgram : public K3bExternalProgram public: K3bCdda2wavProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); }; #endif diff --git a/libk3b/core/k3bexternalbinmanager.cpp b/libk3b/core/k3bexternalbinmanager.cpp index 2b21a85..7afc81e 100644 --- a/libk3b/core/k3bexternalbinmanager.cpp +++ b/libk3b/core/k3bexternalbinmanager.cpp @@ -20,11 +20,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ -QString K3bExternalBinManager::m_noPath = ""; +TQString K3bExternalBinManager::m_noPath = ""; // /////////////////////////////////////////////////////////// @@ -53,25 +53,25 @@ bool K3bExternalBin::isEmpty() const } -const QString& K3bExternalBin::name() const +const TQString& K3bExternalBin::name() const { return m_program->name(); } -bool K3bExternalBin::hasFeature( const QString& f ) const +bool K3bExternalBin::hasFeature( const TQString& f ) const { - return m_features.contains( f ); + return m_features.tqcontains( f ); } -void K3bExternalBin::addFeature( const QString& f ) +void K3bExternalBin::addFeature( const TQString& f ) { m_features.append( f ); } -const QStringList& K3bExternalBin::userParameters() const +const TQStringList& K3bExternalBin::userParameters() const { return m_program->userParameters(); } @@ -85,7 +85,7 @@ const QStringList& K3bExternalBin::userParameters() const // /////////////////////////////////////////////////////////// -K3bExternalProgram::K3bExternalProgram( const QString& name ) +K3bExternalProgram::K3bExternalProgram( const TQString& name ) : m_name( name ) { m_bins.setAutoDelete( true ); @@ -99,7 +99,7 @@ K3bExternalProgram::~K3bExternalProgram() const K3bExternalBin* K3bExternalProgram::mostRecentBin() const { - QPtrListIterator it( m_bins ); + TQPtrListIterator it( m_bins ); K3bExternalBin* bin = *it; ++it; while( *it ) { @@ -113,7 +113,7 @@ const K3bExternalBin* K3bExternalProgram::mostRecentBin() const void K3bExternalProgram::addBin( K3bExternalBin* bin ) { - if( !m_bins.contains( bin ) ) { + if( !m_bins.tqcontains( bin ) ) { // insertion sort // the first bin in the list is always the one used // so we default to using the newest one @@ -127,17 +127,17 @@ void K3bExternalProgram::addBin( K3bExternalBin* bin ) void K3bExternalProgram::setDefault( const K3bExternalBin* bin ) { - if( m_bins.contains( bin ) ) - m_bins.take( m_bins.find( bin ) ); + if( m_bins.tqcontains( bin ) ) + m_bins.take( m_bins.tqfind( bin ) ); // the first bin in the list is always the one used m_bins.insert( 0, bin ); } -void K3bExternalProgram::setDefault( const QString& path ) +void K3bExternalProgram::setDefault( const TQString& path ) { - for( QPtrListIterator it( m_bins ); it.current(); ++it ) { + for( TQPtrListIterator it( m_bins ); it.current(); ++it ) { if( it.current()->path == path ) { setDefault( it.current() ); return; @@ -146,9 +146,9 @@ void K3bExternalProgram::setDefault( const QString& path ) } -void K3bExternalProgram::addUserParameter( const QString& p ) +void K3bExternalProgram::addUserParameter( const TQString& p ) { - if( !m_userParameters.contains( p ) ) + if( !m_userParameters.tqcontains( p ) ) m_userParameters.append(p); } @@ -161,8 +161,8 @@ void K3bExternalProgram::addUserParameter( const QString& p ) // /////////////////////////////////////////////////////////// -K3bExternalBinManager::K3bExternalBinManager( QObject* parent, const char* name ) - : QObject( parent, name ) +K3bExternalBinManager::K3bExternalBinManager( TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ) { } @@ -184,14 +184,14 @@ bool K3bExternalBinManager::readConfig( KConfig* c ) search(); - for ( QMap::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) { + for ( TQMap::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) { K3bExternalProgram* p = it.data(); if( c->hasKey( p->name() + " default" ) ) { p->setDefault( c->readEntry( p->name() + " default" ) ); } if( c->hasKey( p->name() + " user parameters" ) ) { - QStringList list = c->readListEntry( p->name() + " user parameters" ); - for( QStringList::iterator strIt = list.begin(); strIt != list.end(); ++strIt ) + TQStringList list = c->readListEntry( p->name() + " user parameters" ); + for( TQStringList::iterator strIt = list.begin(); strIt != list.end(); ++strIt ) p->addUserParameter( *strIt ); } if( c->hasKey( p->name() + " last seen newest version" ) ) { @@ -212,7 +212,7 @@ bool K3bExternalBinManager::saveConfig( KConfig* c ) c->setGroup( "External Programs" ); c->writePathEntry( "search path", m_searchPath ); - for ( QMap::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) { + for ( TQMap::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) { K3bExternalProgram* p = it.data(); if( p->defaultBin() ) c->writeEntry( p->name() + " default", p->defaultBin()->path ); @@ -228,18 +228,18 @@ bool K3bExternalBinManager::saveConfig( KConfig* c ) } -bool K3bExternalBinManager::foundBin( const QString& name ) +bool K3bExternalBinManager::foundBin( const TQString& name ) { - if( m_programs.find( name ) == m_programs.end() ) + if( m_programs.tqfind( name ) == m_programs.end() ) return false; else return (m_programs[name]->defaultBin() != 0); } -const QString& K3bExternalBinManager::binPath( const QString& name ) +const TQString& K3bExternalBinManager::binPath( const TQString& name ) { - if( m_programs.find( name ) == m_programs.end() ) + if( m_programs.tqfind( name ) == m_programs.end() ) return m_noPath; if( m_programs[name]->defaultBin() != 0 ) @@ -249,9 +249,9 @@ const QString& K3bExternalBinManager::binPath( const QString& name ) } -const K3bExternalBin* K3bExternalBinManager::binObject( const QString& name ) +const K3bExternalBin* K3bExternalBinManager::binObject( const TQString& name ) { - if( m_programs.find( name ) == m_programs.end() ) + if( m_programs.tqfind( name ) == m_programs.end() ) return 0; return m_programs[name]->defaultBin(); @@ -266,7 +266,7 @@ void K3bExternalBinManager::addProgram( K3bExternalProgram* p ) void K3bExternalBinManager::clear() { - for( QMap::Iterator it = m_programs.begin(); it != m_programs.end(); ++it ) + for( TQMap::Iterator it = m_programs.begin(); it != m_programs.end(); ++it ) delete it.data(); m_programs.clear(); } @@ -277,36 +277,36 @@ void K3bExternalBinManager::search() if( m_searchPath.isEmpty() ) loadDefaultSearchPath(); - for( QMap::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) { + for( TQMap::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) { it.data()->clear(); } // do not search one path twice - QStringList paths; - for( QStringList::const_iterator it = m_searchPath.begin(); it != m_searchPath.end(); ++it ) { - QString p = *it; + TQStringList paths; + for( TQStringList::const_iterator it = m_searchPath.begin(); it != m_searchPath.end(); ++it ) { + TQString p = *it; if( p[p.length()-1] == '/' ) p.truncate( p.length()-1 ); - if( !paths.contains( p ) && !paths.contains( p + "/" ) ) + if( !paths.tqcontains( p ) && !paths.tqcontains( p + "/" ) ) paths.append(p); } // get the environment path variable char* env_path = ::getenv("PATH"); if( env_path ) { - QStringList env_pathList = QStringList::split(":", QString::fromLocal8Bit(env_path)); - for( QStringList::const_iterator it = env_pathList.begin(); it != env_pathList.end(); ++it ) { - QString p = *it; + TQStringList env_pathList = TQStringList::split(":", TQString::fromLocal8Bit(env_path)); + for( TQStringList::const_iterator it = env_pathList.begin(); it != env_pathList.end(); ++it ) { + TQString p = *it; if( p[p.length()-1] == '/' ) p.truncate( p.length()-1 ); - if( !paths.contains( p ) && !paths.contains( p + "/" ) ) + if( !paths.tqcontains( p ) && !paths.tqcontains( p + "/" ) ) paths.append(p); } } - for( QStringList::const_iterator it = paths.begin(); it != paths.end(); ++it ) - for( QMap::iterator pit = m_programs.begin(); pit != m_programs.end(); ++pit ) + for( TQStringList::const_iterator it = paths.begin(); it != paths.end(); ++it ) + for( TQMap::iterator pit = m_programs.begin(); pit != m_programs.end(); ++pit ) pit.data()->scan(*it); // TESTING @@ -332,9 +332,9 @@ void K3bExternalBinManager::search() } -K3bExternalProgram* K3bExternalBinManager::program( const QString& name ) const +K3bExternalProgram* K3bExternalBinManager::program( const TQString& name ) const { - if( m_programs.find( name ) == m_programs.end() ) + if( m_programs.tqfind( name ) == m_programs.end() ) return 0; else return m_programs[name]; @@ -358,26 +358,26 @@ void K3bExternalBinManager::loadDefaultSearchPath() } -void K3bExternalBinManager::setSearchPath( const QStringList& list ) +void K3bExternalBinManager::setSearchPath( const TQStringList& list ) { loadDefaultSearchPath(); - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - if( !m_searchPath.contains( *it ) ) + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { + if( !m_searchPath.tqcontains( *it ) ) m_searchPath.append( *it ); } } -void K3bExternalBinManager::addSearchPath( const QString& path ) +void K3bExternalBinManager::addSearchPath( const TQString& path ) { - if( !m_searchPath.contains( path ) ) + if( !m_searchPath.tqcontains( path ) ) m_searchPath.append( path ); } -const K3bExternalBin* K3bExternalBinManager::mostRecentBinObject( const QString& name ) +const K3bExternalBin* K3bExternalBinManager::mostRecentBinObject( const TQString& name ) { if( K3bExternalProgram* p = program( name ) ) return p->mostRecentBin(); diff --git a/libk3b/core/k3bexternalbinmanager.h b/libk3b/core/k3bexternalbinmanager.h index e7fe601..11a8dcb 100644 --- a/libk3b/core/k3bexternalbinmanager.h +++ b/libk3b/core/k3bexternalbinmanager.h @@ -16,11 +16,11 @@ #ifndef K3B_EXTERNAL_BIN_MANAGER_H #define K3B_EXTERNAL_BIN_MANAGER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "k3b_export.h" #include "k3bversion.h" @@ -44,21 +44,21 @@ class LIBK3B_EXPORT K3bExternalBin virtual ~K3bExternalBin() {} K3bVersion version; - QString path; - QString copyright; + TQString path; + TQString copyright; - const QString& name() const; + const TQString& name() const; bool isEmpty() const; - const QStringList& userParameters() const; - const QStringList& features() const { return m_features; } + const TQStringList& userParameters() const; + const TQStringList& features() const { return m_features; } - bool hasFeature( const QString& ) const; - void addFeature( const QString& ); + bool hasFeature( const TQString& ) const; + void addFeature( const TQString& ); K3bExternalProgram* program() const { return m_program; } private: - QStringList m_features; + TQStringList m_features; K3bExternalProgram* m_program; }; @@ -72,31 +72,31 @@ class LIBK3B_EXPORT K3bExternalBin class LIBK3B_EXPORT K3bExternalProgram { public: - K3bExternalProgram( const QString& name ); + K3bExternalProgram( const TQString& name ); virtual ~K3bExternalProgram(); const K3bExternalBin* defaultBin() const { return m_bins.getFirst(); } const K3bExternalBin* mostRecentBin() const; - void addUserParameter( const QString& ); - void setUserParameters( const QStringList& list ) { m_userParameters = list; } + void addUserParameter( const TQString& ); + void setUserParameters( const TQStringList& list ) { m_userParameters = list; } - const QStringList& userParameters() const { return m_userParameters; } - const QString& name() const { return m_name; } + const TQStringList& userParameters() const { return m_userParameters; } + const TQString& name() const { return m_name; } void addBin( K3bExternalBin* ); void clear() { m_bins.clear(); } void setDefault( const K3bExternalBin* ); - void setDefault( const QString& path ); + void setDefault( const TQString& path ); - const QPtrList& bins() const { return m_bins; } + const TQPtrList& bins() const { return m_bins; } /** * this scans for the program in the given path, * adds the found bin object to the list and returnes true. * if nothing could be found false is returned. */ - virtual bool scan( const QString& ) {return false;}//= 0; + virtual bool scan( const TQString& ) {return false;}//= 0; /** * reimplement this if it does not make sense to have the user be able @@ -105,18 +105,19 @@ class LIBK3B_EXPORT K3bExternalProgram virtual bool supportsUserParameters() const { return true; } private: - QString m_name; - QStringList m_userParameters; - QPtrList m_bins; + TQString m_name; + TQStringList m_userParameters; + TQPtrList m_bins; }; -class LIBK3B_EXPORT K3bExternalBinManager : public QObject +class LIBK3B_EXPORT K3bExternalBinManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - K3bExternalBinManager( QObject* parent = 0, const char* name = 0 ); + K3bExternalBinManager( TQObject* tqparent = 0, const char* name = 0 ); ~K3bExternalBinManager(); void search(); @@ -132,31 +133,31 @@ class LIBK3B_EXPORT K3bExternalBinManager : public QObject */ bool saveConfig( KConfig* ); - bool foundBin( const QString& name ); - const QString& binPath( const QString& name ); - const K3bExternalBin* binObject( const QString& name ); - const K3bExternalBin* mostRecentBinObject( const QString& name ); + bool foundBin( const TQString& name ); + const TQString& binPath( const TQString& name ); + const K3bExternalBin* binObject( const TQString& name ); + const K3bExternalBin* mostRecentBinObject( const TQString& name ); - K3bExternalProgram* program( const QString& ) const; - const QMap& programs() const { return m_programs; } + K3bExternalProgram* program( const TQString& ) const; + const TQMap& programs() const { return m_programs; } /** always extends the default searchpath */ - void setSearchPath( const QStringList& ); - void addSearchPath( const QString& ); + void setSearchPath( const TQStringList& ); + void addSearchPath( const TQString& ); void loadDefaultSearchPath(); - const QStringList& searchPath() const { return m_searchPath; } + const TQStringList& searchPath() const { return m_searchPath; } void addProgram( K3bExternalProgram* ); void clear(); private: - QMap m_programs; - QStringList m_searchPath; + TQMap m_programs; + TQStringList m_searchPath; - static QString m_noPath; // used for binPath() to return const string + static TQString m_noPath; // used for binPath() to return const string - QString m_gatheredOutput; + TQString m_gatheredOutput; }; #endif diff --git a/libk3b/core/k3bglobals.cpp b/libk3b/core/k3bglobals.cpp index fc5a4e1..f5a9e29 100644 --- a/libk3b/core/k3bglobals.cpp +++ b/libk3b/core/k3bglobals.cpp @@ -38,9 +38,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -88,13 +88,13 @@ struct Sample { }; */ -QString K3b::framesToString( int h, bool showFrames ) +TQString K3b::framesToString( int h, bool showFrames ) { int m = h / 4500; int s = (h % 4500) / 75; int f = h % 75; - QString str; + TQString str; if( showFrames ) { // cdrdao needs the MSF format where 1 second has 75 frames! @@ -106,28 +106,28 @@ QString K3b::framesToString( int h, bool showFrames ) return str; } -/*QString K3b::sizeToTime(long size) +/*TQString K3b::sizeToTime(long size) { int h = size / sizeof(Sample) / 588; return framesToString(h, false); }*/ -Q_INT16 K3b::swapByteOrder( const Q_INT16& i ) +TQ_INT16 K3b::swapByteOrder( const TQ_INT16& i ) { return bswap_16( i ); //((i << 8) & 0xff00) | ((i >> 8 ) & 0xff); } -Q_INT32 K3b::swapByteOrder( const Q_INT32& i ) +TQ_INT32 K3b::swapByteOrder( const TQ_INT32& i ) { //return ((i << 24) & 0xff000000) | ((i << 8) & 0xff0000) | ((i >> 8) & 0xff00) | ((i >> 24) & 0xff ); return bswap_32( i ); } -Q_INT64 K3b::swapByteOrder( const Q_INT64& i ) +TQ_INT64 K3b::swapByteOrder( const TQ_INT64& i ) { return bswap_64( i ); } @@ -139,75 +139,75 @@ int K3b::round( double d ) } -QString K3b::findUniqueFilePrefix( const QString& _prefix, const QString& path ) +TQString K3b::findUniqueFilePrefix( const TQString& _prefix, const TQString& path ) { - QString url; - if( path.isEmpty() || !QFile::exists(path) ) + TQString url; + if( path.isEmpty() || !TQFile::exists(path) ) url = defaultTempPath(); else url = prepareDir( path ); - QString prefix = _prefix; + TQString prefix = _prefix; if( prefix.isEmpty() ) prefix = "k3b_"; // now create the unique prefix - QDir dir( url ); - QStringList entries = dir.entryList( QDir::DefaultFilter, QDir::Name ); + TQDir dir( url ); + TQStringList entries = dir.entryList( TQDir::DefaultFilter, TQDir::Name ); int i = 0; - for( QStringList::iterator it = entries.begin(); + for( TQStringList::iterator it = entries.begin(); it != entries.end(); ++it ) { - if( (*it).startsWith( prefix + QString::number(i) ) ) { + if( (*it).startsWith( prefix + TQString::number(i) ) ) { i++; it = entries.begin(); } } - return url + prefix + QString::number(i); + return url + prefix + TQString::number(i); } -QString K3b::findTempFile( const QString& ending, const QString& d ) +TQString K3b::findTempFile( const TQString& ending, const TQString& d ) { - return findUniqueFilePrefix( "k3b_", d ) + ( ending.isEmpty() ? QString::null : (QString::fromLatin1(".") + ending) ); + return findUniqueFilePrefix( "k3b_", d ) + ( ending.isEmpty() ? TQString() : (TQString::tqfromLatin1(".") + ending) ); } -QString K3b::defaultTempPath() +TQString K3b::defaultTempPath() { - QString oldGroup = kapp->config()->group(); + TQString oldGroup = kapp->config()->group(); kapp->config()->setGroup( "General Options" ); - QString url = kapp->config()->readPathEntry( "Temp Dir", KGlobal::dirs()->resourceDirs( "tmp" ).first() ); + TQString url = kapp->config()->readPathEntry( "Temp Dir", KGlobal::dirs()->resourceDirs( "tmp" ).first() ); kapp->config()->setGroup( oldGroup ); return prepareDir(url); } -QString K3b::prepareDir( const QString& dir ) +TQString K3b::prepareDir( const TQString& dir ) { return (dir + (dir[dir.length()-1] != '/' ? "/" : "")); } -QString K3b::parentDir( const QString& path ) +TQString K3b::tqparentDir( const TQString& path ) { - QString parent = path; + TQString tqparent = path; if( path[path.length()-1] == '/' ) - parent.truncate( parent.length()-1 ); + tqparent.truncate( tqparent.length()-1 ); - int pos = parent.findRev( '/' ); + int pos = tqparent.tqfindRev( '/' ); if( pos >= 0 ) - parent.truncate( pos+1 ); + tqparent.truncate( pos+1 ); else // relative path, do anything... - parent = "/"; + tqparent = "/"; - return parent; + return tqparent; } -QString K3b::fixupPath( const QString& path ) +TQString K3b::fixupPath( const TQString& path ) { - QString s; + TQString s; bool lastWasSlash = false; for( unsigned int i = 0; i < path.length(); ++i ) { if( path[i] == '/' ) { @@ -232,7 +232,7 @@ K3bVersion K3b::kernelVersion() K3bVersion v; utsname unameinfo; if( ::uname(&unameinfo) == 0 ) { - v = QString::fromLocal8Bit( unameinfo.release ); + v = TQString::fromLocal8Bit( unameinfo.release ); kdDebug() << "kernel version: " << v << endl; } else @@ -247,12 +247,12 @@ K3bVersion K3b::simpleKernelVersion() } -QString K3b::systemName() +TQString K3b::systemName() { - QString v; + TQString v; utsname unameinfo; if( ::uname(&unameinfo) == 0 ) { - v = QString::fromLocal8Bit( unameinfo.sysname ); + v = TQString::fromLocal8Bit( unameinfo.sysname ); } else kdError() << "could not determine system name." << endl; @@ -260,10 +260,10 @@ QString K3b::systemName() } -bool K3b::kbFreeOnFs( const QString& path, unsigned long& size, unsigned long& avail ) +bool K3b::kbFreeOnFs( const TQString& path, unsigned long& size, unsigned long& avail ) { struct statvfs fs; - if( ::statvfs( QFile::encodeName(path), &fs ) == 0 ) { + if( ::statvfs( TQFile::encodeName(path), &fs ) == 0 ) { unsigned long kBfak = fs.f_frsize/1024; size = fs.f_blocks*kBfak; @@ -280,7 +280,7 @@ KIO::filesize_t K3b::filesize( const KURL& url ) { if( url.isLocalFile() ) { k3b_struct_stat buf; - if ( !k3b_stat( QFile::encodeName( url.path() ), &buf ) ) { + if ( !k3b_stat( TQFile::encodeName( url.path() ), &buf ) ) { return (KIO::filesize_t)buf.st_size; } } @@ -301,19 +301,19 @@ KIO::filesize_t K3b::imageFilesize( const KURL& url ) { KIO::filesize_t size = K3b::filesize( url ); int cnt = 0; - while( KIO::NetAccess::exists( KURL::fromPathOrURL( url.url() + '.' + QString::number(cnt).rightJustify( 3, '0' ) ), true ) ) - size += K3b::filesize( KURL::fromPathOrURL( url.url() + '.' + QString::number(cnt++).rightJustify( 3, '0' ) ) ); + while( KIO::NetAccess::exists( KURL::fromPathOrURL( url.url() + '.' + TQString::number(cnt).rightJustify( 3, '0' ) ), true ) ) + size += K3b::filesize( KURL::fromPathOrURL( url.url() + '.' + TQString::number(cnt++).rightJustify( 3, '0' ) ) ); return size; } -QString K3b::cutFilename( const QString& name, unsigned int len ) +TQString K3b::cutFilename( const TQString& name, unsigned int len ) { if( name.length() > len ) { - QString ret = name; + TQString ret = name; // determine extension (we think of an extension to be at most 5 chars in length) - int pos = name.find( '.', -6 ); + int pos = name.tqfind( '.', -6 ); if( pos > 0 ) len -= (name.length() - pos); @@ -329,28 +329,28 @@ QString K3b::cutFilename( const QString& name, unsigned int len ) } -QString K3b::removeFilenameExtension( const QString& name ) +TQString K3b::removeFilenameExtension( const TQString& name ) { - QString v = name; - int dotpos = v.findRev( '.' ); + TQString v = name; + int dotpos = v.tqfindRev( '.' ); if( dotpos > 0 ) v.truncate( dotpos ); return v; } -QString K3b::appendNumberToFilename( const QString& name, int num, unsigned int maxlen ) +TQString K3b::appendNumberToFilename( const TQString& name, int num, unsigned int maxlen ) { // determine extension (we think of an extension to be at most 5 chars in length) - QString result = name; - QString ext; - int pos = name.find( '.', -6 ); + TQString result = name; + TQString ext; + int pos = name.tqfind( '.', -6 ); if( pos > 0 ) { ext = name.mid(pos); result.truncate( pos ); } - ext.prepend( QString::number(num) ); + ext.prepend( TQString::number(num) ); result.truncate( maxlen - ext.length() ); return result + ext; @@ -372,7 +372,7 @@ bool K3b::hackedAtapiSupport() } -QString K3b::externalBinDeviceParameter( K3bDevice::Device* dev, const K3bExternalBin* bin ) +TQString K3b::externalBinDeviceParameter( K3bDevice::Device* dev, const K3bExternalBin* bin ) { #ifdef Q_OS_LINUX // @@ -387,11 +387,11 @@ QString K3b::externalBinDeviceParameter( K3bDevice::Device* dev, const K3bExtern else if( (plainAtapiSupport() && bin->hasFeature("plain-atapi") ) ) return dev->blockDeviceName(); else - return QString("ATAPI:%1").arg(dev->blockDeviceName()); + return TQString("ATAPI:%1").tqarg(dev->blockDeviceName()); } -int K3b::writingAppFromString( const QString& s ) +int K3b::writingAppFromString( const TQString& s ) { if( s.lower() == "cdrdao" ) return K3b::CDRDAO; @@ -408,7 +408,7 @@ int K3b::writingAppFromString( const QString& s ) } -QString K3b::writingModeString( int mode ) +TQString K3b::writingModeString( int mode ) { if( mode == WRITING_MODE_AUTO ) return i18n("Auto"); @@ -417,16 +417,16 @@ QString K3b::writingModeString( int mode ) } -QString K3b::resolveLink( const QString& file ) +TQString K3b::resolveLink( const TQString& file ) { - QFileInfo f( file ); - QStringList steps( f.absFilePath() ); + TQFileInfo f( file ); + TQStringList steps( f.absFilePath() ); while( f.isSymLink() ) { - QString p = f.readLink(); + TQString p = f.readLink(); if( !p.startsWith( "/" ) ) p.prepend( f.dirPath(true) + "/" ); f.setFile( p ); - if( steps.contains( f.absFilePath() ) ) { + if( steps.tqcontains( f.absFilePath() ) ) { kdDebug() << "(K3b) symlink loop detected." << endl; break; } @@ -442,8 +442,8 @@ K3bDevice::Device* K3b::urlToDevice( const KURL& deviceUrl ) if( deviceUrl.protocol() == "media" || deviceUrl.protocol() == "system" ) { kdDebug() << "(K3b) Asking mediamanager for " << deviceUrl.fileName() << endl; DCOPRef mediamanager("kded", "mediamanager"); - DCOPReply reply = mediamanager.call("properties(QString)", deviceUrl.fileName()); - QStringList properties = reply; + DCOPReply reply = mediamanager.call("properties(TQString)", deviceUrl.fileName()); + TQStringList properties = reply; if( !reply.isValid() || properties.count() < 6 ) { kdError() << "(K3b) Invalid reply from mediamanager" << endl; return 0; @@ -493,40 +493,40 @@ KURL::List K3b::convertToLocalUrls( const KURL::List& urls ) } -Q_INT16 K3b::fromLe16( char* data ) +TQ_INT16 K3b::fromLe16( char* data ) { #ifdef WORDS_BIGENDIAN // __BYTE_ORDER == __BIG_ENDIAN - return swapByteOrder( *((Q_INT16*)data) ); + return swapByteOrder( *((TQ_INT16*)data) ); #else - return *((Q_INT16*)data); + return *((TQ_INT16*)data); #endif } -Q_INT32 K3b::fromLe32( char* data ) +TQ_INT32 K3b::fromLe32( char* data ) { #ifdef WORDS_BIGENDIAN // __BYTE_ORDER == __BIG_ENDIAN - return swapByteOrder( *((Q_INT32*)data) ); + return swapByteOrder( *((TQ_INT32*)data) ); #else - return *((Q_INT32*)data); + return *((TQ_INT32*)data); #endif } -Q_INT64 K3b::fromLe64( char* data ) +TQ_INT64 K3b::fromLe64( char* data ) { #ifdef WORDS_BIGENDIAN // __BYTE_ORDER == __BIG_ENDIAN - return swapByteOrder( *((Q_INT64*)data) ); + return swapByteOrder( *((TQ_INT64*)data) ); #else - return *((Q_INT64*)data); + return *((TQ_INT64*)data); #endif } -QString K3b::findExe( const QString& name ) +TQString K3b::findExe( const TQString& name ) { // first we search the path - QString bin = KStandardDirs::findExe( name ); + TQString bin = KStandardDirs::findExe( name ); // then go on with our own little list if( bin.isEmpty() ) @@ -550,7 +550,7 @@ bool K3b::unmount( K3bDevice::Device* dev ) if( !dev ) return false; - QString mntDev = dev->blockDeviceName(); + TQString mntDev = dev->blockDeviceName(); #if KDE_IS_VERSION(3,4,0) // first try to unmount it the standard way @@ -558,7 +558,7 @@ bool K3b::unmount( K3bDevice::Device* dev ) return true; #endif - QString umountBin = K3b::findExe( "umount" ); + TQString umountBin = K3b::findExe( "umount" ); if( !umountBin.isEmpty() ) { KProcess p; p << umountBin; @@ -570,7 +570,7 @@ bool K3b::unmount( K3bDevice::Device* dev ) } // now try pmount - QString pumountBin = K3b::findExe( "pumount" ); + TQString pumountBin = K3b::findExe( "pumount" ); if( !pumountBin.isEmpty() ) { KProcess p; p << pumountBin; @@ -594,7 +594,7 @@ bool K3b::mount( K3bDevice::Device* dev ) if( !dev ) return false; - QString mntDev = dev->blockDeviceName(); + TQString mntDev = dev->blockDeviceName(); #if KDE_IS_VERSION(3,4,0) // first try to mount it the standard way @@ -608,7 +608,7 @@ bool K3b::mount( K3bDevice::Device* dev ) #endif // now try pmount - QString pmountBin = K3b::findExe( "pmount" ); + TQString pmountBin = K3b::findExe( "pmount" ); if( !pmountBin.isEmpty() ) { KProcess p; p << pmountBin; diff --git a/libk3b/core/k3bglobals.h b/libk3b/core/k3bglobals.h index 2795630..56f7f1b 100644 --- a/libk3b/core/k3bglobals.h +++ b/libk3b/core/k3bglobals.h @@ -21,8 +21,8 @@ #include #endif -#include -#include +#include +#include #include #include #include @@ -62,7 +62,7 @@ namespace K3b DVD_RW_FORMAT = 32 }; - LIBK3B_EXPORT int writingAppFromString( const QString& ); + LIBK3B_EXPORT int writingAppFromString( const TQString& ); /** * DATA_MODE_AUTO - let K3b determine the best mode @@ -106,14 +106,14 @@ namespace K3b WRITING_MODE_RES_OVWR = K3bDevice::WRITINGMODE_RES_OVWR // Restricted Overwrite }; - LIBK3B_EXPORT QString writingModeString( int ); + LIBK3B_EXPORT TQString writingModeString( int ); - LIBK3B_EXPORT QString framesToString( int h, bool showFrames = true ); - /*LIBK3B_EXPORT QString sizeToTime( long size );*/ + LIBK3B_EXPORT TQString framesToString( int h, bool showFrames = true ); + /*LIBK3B_EXPORT TQString sizeToTime( long size );*/ - LIBK3B_EXPORT Q_INT16 swapByteOrder( const Q_INT16& i ); - LIBK3B_EXPORT Q_INT32 swapByteOrder( const Q_INT32& i ); - LIBK3B_EXPORT Q_INT64 swapByteOrder( const Q_INT64& i ); + LIBK3B_EXPORT TQ_INT16 swapByteOrder( const TQ_INT16& i ); + LIBK3B_EXPORT TQ_INT32 swapByteOrder( const TQ_INT32& i ); + LIBK3B_EXPORT TQ_INT64 swapByteOrder( const TQ_INT64& i ); int round( double ); @@ -122,61 +122,61 @@ namespace K3b * We use this since we encountered problems with the KDE version. * @returns true on success. */ - LIBK3B_EXPORT bool kbFreeOnFs( const QString& path, unsigned long& size, unsigned long& avail ); + LIBK3B_EXPORT bool kbFreeOnFs( const TQString& path, unsigned long& size, unsigned long& avail ); /** * Cut a filename preserving the extension */ - LIBK3B_EXPORT QString cutFilename( const QString& name, unsigned int len ); + LIBK3B_EXPORT TQString cutFilename( const TQString& name, unsigned int len ); - LIBK3B_EXPORT QString removeFilenameExtension( const QString& name ); + LIBK3B_EXPORT TQString removeFilenameExtension( const TQString& name ); /** * Append a number to a filename preserving the extension. * The resulting name's length will not exceed @p maxlen */ - LIBK3B_EXPORT QString appendNumberToFilename( const QString& name, int num, unsigned int maxlen ); + LIBK3B_EXPORT TQString appendNumberToFilename( const TQString& name, int num, unsigned int maxlen ); - LIBK3B_EXPORT QString findUniqueFilePrefix( const QString& _prefix = QString::null, const QString& path = QString::null ); + LIBK3B_EXPORT TQString findUniqueFilePrefix( const TQString& _prefix = TQString(), const TQString& path = TQString() ); /** * Find a unique filename in directory d (if d is empty the method uses the defaultTempPath) */ - LIBK3B_EXPORT QString findTempFile( const QString& ending = QString::null, const QString& d = QString::null ); + LIBK3B_EXPORT TQString findTempFile( const TQString& ending = TQString(), const TQString& d = TQString() ); /** * Wrapper around KStandardDirs::findExe which searches the PATH and some additional * directories to find system tools which are normally only in root's PATH. */ - LIBK3B_EXPORT QString findExe( const QString& name ); + LIBK3B_EXPORT TQString findExe( const TQString& name ); /** * get the default K3b temp path to store image files */ - LIBK3B_EXPORT QString defaultTempPath(); + LIBK3B_EXPORT TQString defaultTempPath(); /** * makes sure a path ends with a "/" */ - LIBK3B_EXPORT QString prepareDir( const QString& dir ); + LIBK3B_EXPORT TQString prepareDir( const TQString& dir ); /** - * returns the parent dir of a path. + * returns the tqparent dir of a path. * CAUTION: this does only work well with absolut paths. * * Example: /usr/share/doc -> /usr/share/ */ - QString parentDir( const QString& path ); + TQString tqparentDir( const TQString& path ); /** * For now this just replaces multiple occurrences of / with a single / */ - LIBK3B_EXPORT QString fixupPath( const QString& ); + LIBK3B_EXPORT TQString fixupPath( const TQString& ); /** * resolves a symlinks completely. Meaning it also handles links to links to links... */ - LIBK3B_EXPORT QString resolveLink( const QString& ); + LIBK3B_EXPORT TQString resolveLink( const TQString& ); LIBK3B_EXPORT K3bVersion kernelVersion(); @@ -185,7 +185,7 @@ namespace K3b */ LIBK3B_EXPORT K3bVersion simpleKernelVersion(); - QString systemName(); + TQString systemName(); LIBK3B_EXPORT KIO::filesize_t filesize( const KURL& ); @@ -214,7 +214,7 @@ namespace K3b * Used to create a parameter for cdrecord, cdrdao or readcd. * Takes care of SCSI and ATAPI. */ - QString externalBinDeviceParameter( K3bDevice::Device* dev, const K3bExternalBin* ); + TQString externalBinDeviceParameter( K3bDevice::Device* dev, const K3bExternalBin* ); /** * Convert an url pointing to a local device to a K3bDevice. @@ -228,9 +228,9 @@ namespace K3b LIBK3B_EXPORT KURL convertToLocalUrl( const KURL& url ); LIBK3B_EXPORT KURL::List convertToLocalUrls( const KURL::List& l ); - LIBK3B_EXPORT Q_INT16 fromLe16( char* ); - LIBK3B_EXPORT Q_INT32 fromLe32( char* ); - LIBK3B_EXPORT Q_INT64 fromLe64( char* ); + LIBK3B_EXPORT TQ_INT16 fromLe16( char* ); + LIBK3B_EXPORT TQ_INT32 fromLe32( char* ); + LIBK3B_EXPORT TQ_INT64 fromLe64( char* ); LIBK3B_EXPORT bool isMounted( K3bDevice::Device* ); diff --git a/libk3b/core/k3bglobalsettings.cpp b/libk3b/core/k3bglobalsettings.cpp index 6f58592..ac6a2f0 100644 --- a/libk3b/core/k3bglobalsettings.cpp +++ b/libk3b/core/k3bglobalsettings.cpp @@ -31,7 +31,7 @@ K3bGlobalSettings::K3bGlobalSettings() void K3bGlobalSettings::readSettings( KConfig* c ) { - QString lastG = c->group(); + TQString lastG = c->group(); c->setGroup( "General Options" ); m_eject = !c->readBoolEntry( "No cd eject", false ); @@ -47,7 +47,7 @@ void K3bGlobalSettings::readSettings( KConfig* c ) void K3bGlobalSettings::saveSettings( KConfig* c ) { - QString lastG = c->group(); + TQString lastG = c->group(); c->setGroup( "General Options" ); c->writeEntry( "No cd eject", !m_eject ); diff --git a/libk3b/core/k3bjob.cpp b/libk3b/core/k3bjob.cpp index b545107..046de06 100644 --- a/libk3b/core/k3bjob.cpp +++ b/libk3b/core/k3bjob.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include @@ -34,14 +34,14 @@ public: const char* K3bJob::DEFAULT_SIGNAL_CONNECTION = "K3bJobDefault"; -K3bJob::K3bJob( K3bJobHandler* handler, QObject* parent, const char* name ) - : QObject( parent, name ), +K3bJob::K3bJob( K3bJobHandler* handler, TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ), m_jobHandler( handler ), m_canceled(false), m_active(false) { - connect( this, SIGNAL(canceled()), - this, SLOT(slotCanceled()) ); + connect( this, TQT_SIGNAL(canceled()), + this, TQT_SLOT(slotCanceled()) ); } K3bJob::~K3bJob() @@ -97,24 +97,24 @@ void K3bJob::slotCanceled() int K3bJob::waitForMedia( K3bDevice::Device* device, int mediaState, int mediaType, - const QString& message ) + const TQString& message ) { // TODO: What about: emit newSubTask( i18n("Waiting for media") ); return m_jobHandler->waitForMedia( device, mediaState, mediaType, message ); } -bool K3bJob::questionYesNo( const QString& text, - const QString& caption, - const QString& yesText, - const QString& noText ) +bool K3bJob::questionYesNo( const TQString& text, + const TQString& caption, + const TQString& yesText, + const TQString& noText ) { return m_jobHandler->questionYesNo( text, caption, yesText, noText ); } -void K3bJob::blockingInformation( const QString& text, - const QString& caption ) +void K3bJob::blockingInformation( const TQString& text, + const TQString& caption ) { return m_jobHandler->blockingInformation( text, caption ); } @@ -128,23 +128,23 @@ void K3bJob::connectSubJob( K3bJob* subJob, const char* processedSizeSlot, const char* processedSubSizeSlot ) { - connect( subJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( subJob, SIGNAL(newSubTask(const QString&)), this, SLOT(slotNewSubTask(const QString&)) ); - connect( subJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); - connect( subJob, SIGNAL(infoMessage(const QString&, int)), - this, SIGNAL(infoMessage(const QString&, int)) ); - connect( subJob, SIGNAL(finished(bool)), this, finishedSlot ); + connect( subJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( subJob, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SLOT(slotNewSubTask(const TQString&)) ); + connect( subJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); + connect( subJob, TQT_SIGNAL(infoMessage(const TQString&, int)), + this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( subJob, TQT_SIGNAL(finished(bool)), this, finishedSlot ); if( connectProgress ) { - connect( subJob, SIGNAL(percent(int)), - this, progressSlot != 0 ? progressSlot : SIGNAL(subPercent(int)) ); + connect( subJob, TQT_SIGNAL(percent(int)), + this, progressSlot != 0 ? progressSlot : TQT_SIGNAL(subPercent(int)) ); if( subProgressSlot ) - connect( subJob, SIGNAL(subPercent(int)), this, subProgressSlot ); - connect( subJob, SIGNAL(processedSize(int, int)), - this, processedSizeSlot != 0 ? processedSizeSlot : SIGNAL(processedSubSize(int, int)) ); + connect( subJob, TQT_SIGNAL(subPercent(int)), this, subProgressSlot ); + connect( subJob, TQT_SIGNAL(processedSize(int, int)), + this, processedSizeSlot != 0 ? processedSizeSlot : TQT_SIGNAL(processedSubSize(int, int)) ); if( processedSubSizeSlot ) - connect( subJob, SIGNAL(processedSubSize(int, int)), this, processedSubSizeSlot ); + connect( subJob, TQT_SIGNAL(processedSubSize(int, int)), this, processedSubSizeSlot ); } } @@ -159,42 +159,42 @@ void K3bJob::connectSubJob( K3bJob* subJob, const char* processedSubSizeSlot ) { // standard connections - connect( subJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); - connect( subJob, SIGNAL(infoMessage(const QString&, int)), - this, SIGNAL(infoMessage(const QString&, int)) ); + connect( subJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); + connect( subJob, TQT_SIGNAL(infoMessage(const TQString&, int)), + this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); // task connections if( newTaskSlot == DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); + connect( subJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); else if( newTaskSlot ) - connect( subJob, SIGNAL(newTask(const QString&)), this, newTaskSlot ); + connect( subJob, TQT_SIGNAL(newTask(const TQString&)), this, newTaskSlot ); if( newSubTaskSlot == DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(newSubTask(const QString&)), this, SLOT(slotNewSubTask(const QString&)) ); + connect( subJob, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SLOT(slotNewSubTask(const TQString&)) ); else if( newSubTaskSlot ) - connect( subJob, SIGNAL(newSubTask(const QString&)), this, newSubTaskSlot ); + connect( subJob, TQT_SIGNAL(newSubTask(const TQString&)), this, newSubTaskSlot ); if( finishedSlot && finishedSlot != DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(finished(bool)), this, finishedSlot ); + connect( subJob, TQT_SIGNAL(finished(bool)), this, finishedSlot ); // progress if( progressSlot == DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(percent(int)), this, SIGNAL(subPercent(int)) ); + connect( subJob, TQT_SIGNAL(percent(int)), this, TQT_SIGNAL(subPercent(int)) ); else if( progressSlot ) - connect( subJob, SIGNAL(percent(int)), this, progressSlot ); + connect( subJob, TQT_SIGNAL(percent(int)), this, progressSlot ); if( subProgressSlot && subProgressSlot != DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(subPercent(int)), this, subProgressSlot ); + connect( subJob, TQT_SIGNAL(subPercent(int)), this, subProgressSlot ); // processed size if( processedSizeSlot == DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); + connect( subJob, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); else if( processedSizeSlot ) - connect( subJob, SIGNAL(processedSize(int, int)), this, processedSizeSlot ); + connect( subJob, TQT_SIGNAL(processedSize(int, int)), this, processedSizeSlot ); if( processedSubSizeSlot && processedSubSizeSlot != DEFAULT_SIGNAL_CONNECTION ) - connect( subJob, SIGNAL(processedSubSize(int, int)), this, processedSubSizeSlot ); + connect( subJob, TQT_SIGNAL(processedSubSize(int, int)), this, processedSubSizeSlot ); } @@ -204,7 +204,7 @@ unsigned int K3bJob::numRunningSubJobs() const } -void K3bJob::slotNewSubTask( const QString& str ) +void K3bJob::slotNewSubTask( const TQString& str ) { emit infoMessage( str, INFO ); } @@ -231,8 +231,8 @@ public: -K3bBurnJob::K3bBurnJob( K3bJobHandler* handler, QObject* parent, const char* name ) - : K3bJob( handler, parent, name ), +K3bBurnJob::K3bBurnJob( K3bJobHandler* handler, TQObject* tqparent, const char* name ) + : K3bJob( handler, tqparent, name ), m_writeMethod( K3b::DEFAULT ) { d = new Private; diff --git a/libk3b/core/k3bjob.h b/libk3b/core/k3bjob.h index 59e1f9b..c35118a 100644 --- a/libk3b/core/k3bjob.h +++ b/libk3b/core/k3bjob.h @@ -17,8 +17,8 @@ #ifndef K3BJOB_H #define K3BJOB_H -#include -#include +#include +#include #include "k3bjobhandler.h" #include "k3b_export.h" @@ -30,7 +30,7 @@ namespace K3bDevice { /** * This is the baseclass for all the jobs in K3b which actually do the work like burning a cd! - * The K3bJob object takes care of registering with the k3bcore or with a parent K3bJob. + * The K3bJob object takes care of registering with the k3bcore or with a tqparent K3bJob. * * Every job has a jobhandler which can be another job (in which case the job is handled as * a subjob) or an arbitrary class implementing the K3bJobHandler interface. @@ -40,9 +40,10 @@ namespace K3bDevice { * * @author Sebastian Trueg */ -class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler +class LIBK3B_EXPORT K3bJob : public TQObject, public K3bJobHandler { Q_OBJECT + TQ_OBJECT public: virtual ~K3bJob(); @@ -72,8 +73,8 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler */ virtual bool hasBeenCanceled() const { return m_canceled; } - virtual QString jobDescription() const { return "K3bJob"; } - virtual QString jobDetails() const { return QString::null; } + virtual TQString jobDescription() const { return "K3bJob"; } + virtual TQString jobDetails() const { return TQString(); } /** * @returns the number of running subjobs. @@ -81,7 +82,7 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler */ unsigned int numRunningSubJobs() const; - const QPtrList& runningSubJobs() const { return m_runningSubJobs; } + const TQPtrList& runningSubJobs() const { return m_runningSubJobs; } /** * \deprecated @@ -137,21 +138,21 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler int waitForMedia( K3bDevice::Device*, int mediaState = K3bDevice::STATE_EMPTY, int mediaType = K3bDevice::MEDIA_WRITABLE_CD, - const QString& message = QString::null ); + const TQString& message = TQString() ); /** * reimplemented from K3bJobHandler */ - bool questionYesNo( const QString& text, - const QString& caption = QString::null, - const QString& yesText = QString::null, - const QString& noText = QString::null ); + bool questionYesNo( const TQString& text, + const TQString& caption = TQString(), + const TQString& yesText = TQString(), + const TQString& noText = TQString() ); /** * reimplemented from K3bJobHandler */ - void blockingInformation( const QString& text, - const QString& caption = QString::null ); + void blockingInformation( const TQString& text, + const TQString& caption = TQString() ); public slots: /** @@ -176,14 +177,14 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler void setJobHandler( K3bJobHandler* ); signals: - void infoMessage( const QString& msg, int type ); + void infoMessage( const TQString& msg, int type ); void percent( int p ); void subPercent( int p ); void processedSize( int processed, int size ); void processedSubSize( int processed, int size ); - void newTask( const QString& job ); - void newSubTask( const QString& job ); - void debuggingOutput(const QString&, const QString&); + void newTask( const TQString& job ); + void newSubTask( const TQString& job ); + void debuggingOutput(const TQString&, const TQString&); void data( const char* data, int len ); void nextTrack( int track, int numTracks ); @@ -206,12 +207,12 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler * \param hdl the handler of the job. This allows for some user interaction without * specifying any details (like the GUI). * The job handler can also be another job. In that case this job is a sub job - * and will be part of the parents running sub jobs. + * and will be part of the tqparents running sub jobs. * * \see runningSubJobs() * \see numRunningSubJobs() */ - K3bJob( K3bJobHandler* hdl, QObject* parent = 0, const char* name = 0 ); + K3bJob( K3bJobHandler* hdl, TQObject* tqparent = 0, const char* name = 0 ); /** * Call this in start() to properly register the job and emit the started() signal. @@ -231,14 +232,14 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler private slots: void slotCanceled(); - void slotNewSubTask( const QString& str ); + void slotNewSubTask( const TQString& str ); private: void registerSubJob( K3bJob* ); void unregisterSubJob( K3bJob* ); K3bJobHandler* m_jobHandler; - QPtrList m_runningSubJobs; + TQPtrList m_runningSubJobs; bool m_canceled; bool m_active; @@ -256,9 +257,10 @@ class LIBK3B_EXPORT K3bJob : public QObject, public K3bJobHandler class LIBK3B_EXPORT K3bBurnJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bBurnJob( K3bJobHandler* hdl, QObject* parent = 0, const char* name = 0 ); + K3bBurnJob( K3bJobHandler* hdl, TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bBurnJob(); /** @@ -283,7 +285,7 @@ class LIBK3B_EXPORT K3bBurnJob : public K3bJob void setWritingApp( int w ) { m_writeMethod = w; } signals: - void bufferStatus( int ); + void buffertqStatus( int ); void deviceBuffer( int ); diff --git a/libk3b/core/k3bjobhandler.h b/libk3b/core/k3bjobhandler.h index 1262e0e..d4bff91 100644 --- a/libk3b/core/k3bjobhandler.h +++ b/libk3b/core/k3bjobhandler.h @@ -44,20 +44,20 @@ class K3bJobHandler virtual int waitForMedia( K3bDevice::Device*, int mediaState = K3bDevice::STATE_EMPTY, int mediaType = K3bDevice::MEDIA_WRITABLE_CD, - const QString& message = QString::null ) = 0; + const TQString& message = TQString() ) = 0; // FIXME: use KGuiItem - virtual bool questionYesNo( const QString& text, - const QString& caption = QString::null, - const QString& yesText = QString::null, - const QString& noText = QString::null ) = 0; + virtual bool questionYesNo( const TQString& text, + const TQString& caption = TQString(), + const TQString& yesText = TQString(), + const TQString& noText = TQString() ) = 0; /** * Use this if you need the user to do something before the job is able to continue. * In all other cases an infoMessage should be used. */ - virtual void blockingInformation( const QString& text, - const QString& caption = QString::null ) = 0; + virtual void blockingInformation( const TQString& text, + const TQString& caption = TQString() ) = 0; }; diff --git a/libk3b/core/k3bprocess.cpp b/libk3b/core/k3bprocess.cpp index 35ddff4..ca8d2e0 100644 --- a/libk3b/core/k3bprocess.cpp +++ b/libk3b/core/k3bprocess.cpp @@ -18,10 +18,10 @@ #include "k3bprocess.h" #include "k3bexternalbinmanager.h" -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -37,8 +37,8 @@ class K3bProcess::Data { public: - QString unfinishedStdoutLine; - QString unfinishedStderrLine; + TQString unfinishedStdoutLine; + TQString unfinishedStderrLine; int dupStdoutFd; int dupStdinFd; @@ -76,7 +76,7 @@ K3bProcess& K3bProcess::operator<<( const K3bExternalBin* bin ) return this->operator<<( bin->path ); } -K3bProcess& K3bProcess::operator<<( const QString& arg ) +K3bProcess& K3bProcess::operator<<( const TQString& arg ) { static_cast(this)->operator<<( arg ); return *this; @@ -88,13 +88,13 @@ K3bProcess& K3bProcess::operator<<( const char* arg ) return *this; } -K3bProcess& K3bProcess::operator<<( const QCString& arg ) +K3bProcess& K3bProcess::operator<<( const TQCString& arg ) { static_cast(this)->operator<<( arg ); return *this; } -K3bProcess& K3bProcess::operator<<( const QStringList& args ) +K3bProcess& K3bProcess::operator<<( const TQStringList& args ) { static_cast(this)->operator<<( args ); return *this; @@ -104,12 +104,12 @@ K3bProcess& K3bProcess::operator<<( const QStringList& args ) bool K3bProcess::start( RunMode run, Communication com ) { if( com & Stderr ) { - connect( this, SIGNAL(receivedStderr(KProcess*, char*, int)), - this, SLOT(slotSplitStderr(KProcess*, char*, int)) ); + connect( this, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + this, TQT_SLOT(slotSplitStderr(KProcess*, char*, int)) ); } if( com & Stdout ) { - connect( this, SIGNAL(receivedStdout(KProcess*, char*, int)), - this, SLOT(slotSplitStdout(KProcess*, char*, int)) ); + connect( this, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this, TQT_SLOT(slotSplitStdout(KProcess*, char*, int)) ); } return KProcess::start( run, com ); @@ -119,10 +119,10 @@ bool K3bProcess::start( RunMode run, Communication com ) void K3bProcess::slotSplitStdout( KProcess*, char* data, int len ) { if( m_bSplitStdout ) { - QStringList lines = splitOutput( data, len, d->unfinishedStdoutLine, d->suppressEmptyLines ); + TQStringList lines = splitOutput( data, len, d->unfinishedStdoutLine, d->suppressEmptyLines ); - for( QStringList::iterator it = lines.begin(); it != lines.end(); ++it ) { - QString& str = *it; + for( TQStringList::iterator it = lines.begin(); it != lines.end(); ++it ) { + TQString& str = *it; // just to be sure since something in splitOutput does not do this right if( d->suppressEmptyLines && str.isEmpty() ) @@ -136,10 +136,10 @@ void K3bProcess::slotSplitStdout( KProcess*, char* data, int len ) void K3bProcess::slotSplitStderr( KProcess*, char* data, int len ) { - QStringList lines = splitOutput( data, len, d->unfinishedStderrLine, d->suppressEmptyLines ); + TQStringList lines = splitOutput( data, len, d->unfinishedStderrLine, d->suppressEmptyLines ); - for( QStringList::iterator it = lines.begin(); it != lines.end(); ++it ) { - QString& str = *it; + for( TQStringList::iterator it = lines.begin(); it != lines.end(); ++it ) { + TQString& str = *it; // just to be sure since something in splitOutput does not do this right if( d->suppressEmptyLines && str.isEmpty() ) @@ -150,15 +150,15 @@ void K3bProcess::slotSplitStderr( KProcess*, char* data, int len ) } -QStringList K3bProcess::splitOutput( char* data, int len, - QString& unfinishedLine, bool suppressEmptyLines ) +TQStringList K3bProcess::splitOutput( char* data, int len, + TQString& unfinishedLine, bool suppressEmptyLines ) { // // The stderr splitting is mainly used for parsing of messages // That's why we simplify the data before proceeding // - QString buffer; + TQString buffer; for( int i = 0; i < len; i++ ) { if( data[i] == '\b' ) { while( data[i] == '\b' ) // we replace multiple backspaces with a single line feed @@ -173,12 +173,12 @@ QStringList K3bProcess::splitOutput( char* data, int len, buffer += data[i]; } - QStringList lines = QStringList::split( '\n', buffer, !suppressEmptyLines ); + TQStringList lines = TQStringList::split( '\n', buffer, !suppressEmptyLines ); // in case we suppress empty lines we need to handle the following separately // to make sure we join unfinished lines correctly if( suppressEmptyLines && buffer[0] == '\n' ) - lines.prepend( QString::null ); + lines.prepend( TQString() ); if( !unfinishedLine.isEmpty() ) { lines.first().prepend( unfinishedLine ); @@ -187,12 +187,12 @@ QStringList K3bProcess::splitOutput( char* data, int len, kdDebug() << "(K3bProcess) joined line: '" << (lines.first()) << "'" << endl; } - QStringList::iterator it; + TQStringList::iterator it; // check if line ends with a newline // if not save the last line because it is not finished - QChar c = buffer.right(1).at(0); - bool hasUnfinishedLine = ( c != '\n' && c != '\r' && c != QChar(46) ); // What is unicode 46?? It is printed as a point + TQChar c = buffer.right(1).at(0); + bool hasUnfinishedLine = ( c != '\n' && c != '\r' && c != TQChar(46) ); // What is tqunicode 46?? It is printed as a point if( hasUnfinishedLine ) { kdDebug() << "(K3bProcess) found unfinished line: '" << lines.last() << "'" << endl; kdDebug() << "(K3bProcess) last char: '" << buffer.right(1) << "'" << endl; @@ -425,10 +425,10 @@ void K3bProcessOutputCollector::setProcess( KProcess* p ) m_process = p; if( p ) { - connect( p, SIGNAL(receivedStdout(KProcess*, char*, int)), - this, SLOT(slotGatherStdout(KProcess*, char*, int)) ); - connect( p, SIGNAL(receivedStderr(KProcess*, char*, int)), - this, SLOT(slotGatherStderr(KProcess*, char*, int)) ); + connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this, TQT_SLOT(slotGatherStdout(KProcess*, char*, int)) ); + connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + this, TQT_SLOT(slotGatherStderr(KProcess*, char*, int)) ); } m_gatheredOutput.truncate( 0 ); @@ -438,14 +438,14 @@ void K3bProcessOutputCollector::setProcess( KProcess* p ) void K3bProcessOutputCollector::slotGatherStderr( KProcess*, char* data, int len ) { - m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) ); - m_stderrOutput.append( QString::fromLocal8Bit( data, len ) ); + m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) ); + m_stderrOutput.append( TQString::fromLocal8Bit( data, len ) ); } void K3bProcessOutputCollector::slotGatherStdout( KProcess*, char* data, int len ) { - m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) ); - m_stdoutOutput.append( QString::fromLocal8Bit( data, len ) ); + m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) ); + m_stdoutOutput.append( TQString::fromLocal8Bit( data, len ) ); } diff --git a/libk3b/core/k3bprocess.h b/libk3b/core/k3bprocess.h index 959bda1..5b585dd 100644 --- a/libk3b/core/k3bprocess.h +++ b/libk3b/core/k3bprocess.h @@ -19,7 +19,7 @@ #include -#include +#include #include "k3b_export.h" class K3bExternalBin; @@ -38,6 +38,7 @@ class K3bExternalBin; class LIBK3B_EXPORT K3bProcess : public KProcess { Q_OBJECT + TQ_OBJECT public: class OutputCollector; @@ -51,10 +52,10 @@ class LIBK3B_EXPORT K3bProcess : public KProcess */ K3bProcess& operator<<( const K3bExternalBin* ); - K3bProcess& operator<<( const QString& arg ); + K3bProcess& operator<<( const TQString& arg ); K3bProcess& operator<<( const char* arg ); - K3bProcess& operator<<( const QCString& arg ); - K3bProcess& operator<<( const QStringList& args ); + K3bProcess& operator<<( const TQCString& arg ); + K3bProcess& operator<<( const TQStringList& args ); bool start( RunMode run = NotifyOnExit, Communication com = NoCommunication ); @@ -138,8 +139,8 @@ class LIBK3B_EXPORT K3bProcess : public KProcess void slotSplitStdout( KProcess*, char*, int ); signals: - void stderrLine( const QString& line ); - void stdoutLine( const QString& line ); + void stderrLine( const TQString& line ); + void stdoutLine( const TQString& line ); /** * Gets emitted if raw stdout mode has been requested @@ -169,7 +170,7 @@ class LIBK3B_EXPORT K3bProcess : public KProcess void commClose(); private: - static QStringList splitOutput( char*, int, QString&, bool ); + static TQStringList splitOutput( char*, int, TQString&, bool ); class Data; Data* d; @@ -177,26 +178,27 @@ class LIBK3B_EXPORT K3bProcess : public KProcess bool m_bSplitStdout; }; -class LIBK3B_EXPORT K3bProcessOutputCollector: public QObject +class LIBK3B_EXPORT K3bProcessOutputCollector: public TQObject { Q_OBJECT + TQ_OBJECT public: K3bProcessOutputCollector( KProcess* ); void setProcess( KProcess* ); - const QString& output() const { return m_gatheredOutput; } - const QString& stderrOutput() const { return m_stderrOutput; } - const QString& stdoutOutput() const { return m_stdoutOutput; } + const TQString& output() const { return m_gatheredOutput; } + const TQString& stderrOutput() const { return m_stderrOutput; } + const TQString& stdoutOutput() const { return m_stdoutOutput; } private slots: void slotGatherStderr( KProcess*, char*, int ); void slotGatherStdout( KProcess*, char*, int ); private: - QString m_gatheredOutput; - QString m_stderrOutput; - QString m_stdoutOutput; + TQString m_gatheredOutput; + TQString m_stderrOutput; + TQString m_stdoutOutput; KProcess* m_process; }; diff --git a/libk3b/core/k3bprogressinfoevent.h b/libk3b/core/k3bprogressinfoevent.h index 0e77718..78e17a2 100644 --- a/libk3b/core/k3bprogressinfoevent.h +++ b/libk3b/core/k3bprogressinfoevent.h @@ -16,27 +16,27 @@ #ifndef K3B_PROGRESS_INFO_EVENT_H #define K3B_PROGRESS_INFO_EVENT_H -#include -#include +#include +#include /** * Custom event class for posting events corresponding to the * K3bJob signals. This is useful for a threaded job since * in that case it's not possible to emit signals that directly - * change the GUI (see QThread docu). + * change the GUI (see TQThread docu). */ -class K3bProgressInfoEvent : public QCustomEvent +class K3bProgressInfoEvent : public TQCustomEvent { public: K3bProgressInfoEvent( int type ) - : QCustomEvent( type ), + : TQCustomEvent( type ), m_type(type) {} - K3bProgressInfoEvent( int type, const QString& v1, const QString& v2 = QString::null, + K3bProgressInfoEvent( int type, const TQString& v1, const TQString& v2 = TQString(), int value1 = 0, int value2 = 0 ) - : QCustomEvent( type ), + : TQCustomEvent( type ), m_type( type), m_firstValue(value1), m_secondValue(value2), @@ -45,20 +45,20 @@ class K3bProgressInfoEvent : public QCustomEvent {} K3bProgressInfoEvent( int type, int value1, int value2 = 0 ) - : QCustomEvent( type ), + : TQCustomEvent( type ), m_type( type), m_firstValue(value1), m_secondValue(value2) {} int type() const { return m_type; } - const QString& firstString() const { return m_firstString; } - const QString& secondString() const { return m_secondString; } + const TQString& firstString() const { return m_firstString; } + const TQString& secondString() const { return m_secondString; } int firstValue() const { return m_firstValue; } int secondValue() const { return m_secondValue; } enum K3bProgressInfoEventType { - Progress = QEvent::User + 1, + Progress = TQEvent::User + 1, SubProgress, ProcessedSize, ProcessedSubSize, @@ -69,7 +69,7 @@ class K3bProgressInfoEvent : public QCustomEvent NewTask, NewSubTask, DebuggingOutput, - BufferStatus, + BuffertqStatus, WriteSpeed, NextTrack }; @@ -78,8 +78,8 @@ class K3bProgressInfoEvent : public QCustomEvent int m_type; int m_firstValue; int m_secondValue; - QString m_firstString; - QString m_secondString; + TQString m_firstString; + TQString m_secondString; }; #endif diff --git a/libk3b/core/k3bsimplejobhandler.cpp b/libk3b/core/k3bsimplejobhandler.cpp index eaf7cd6..d48349e 100644 --- a/libk3b/core/k3bsimplejobhandler.cpp +++ b/libk3b/core/k3bsimplejobhandler.cpp @@ -16,8 +16,8 @@ #include "k3bsimplejobhandler.h" -K3bSimpleJobHandler::K3bSimpleJobHandler( QObject* parent ) - : QObject( parent ), +K3bSimpleJobHandler::K3bSimpleJobHandler( TQObject* tqparent ) + : TQObject( tqparent ), K3bJobHandler() { } @@ -29,7 +29,7 @@ K3bSimpleJobHandler::~K3bSimpleJobHandler() int K3bSimpleJobHandler::waitForMedia( K3bDevice::Device* dev, int mediaState, int mediaType, - const QString& message ) + const TQString& message ) { Q_UNUSED( dev ); Q_UNUSED( mediaState ); @@ -39,10 +39,10 @@ int K3bSimpleJobHandler::waitForMedia( K3bDevice::Device* dev, return 0; } -bool K3bSimpleJobHandler::questionYesNo( const QString& text, - const QString& caption, - const QString& yesText, - const QString& noText ) +bool K3bSimpleJobHandler::questionYesNo( const TQString& text, + const TQString& caption, + const TQString& yesText, + const TQString& noText ) { Q_UNUSED( text ); Q_UNUSED( caption ); @@ -52,8 +52,8 @@ bool K3bSimpleJobHandler::questionYesNo( const QString& text, return true; } -void K3bSimpleJobHandler::blockingInformation( const QString& text, - const QString& caption ) +void K3bSimpleJobHandler::blockingInformation( const TQString& text, + const TQString& caption ) { Q_UNUSED( text ); Q_UNUSED( caption ); diff --git a/libk3b/core/k3bsimplejobhandler.h b/libk3b/core/k3bsimplejobhandler.h index f84064e..60d4bf9 100644 --- a/libk3b/core/k3bsimplejobhandler.h +++ b/libk3b/core/k3bsimplejobhandler.h @@ -18,7 +18,7 @@ #include -#include +#include #include @@ -28,12 +28,13 @@ * Use it for very simple jobs that don't need the job handler * methods. */ -class LIBK3B_EXPORT K3bSimpleJobHandler : public QObject, public K3bJobHandler +class LIBK3B_EXPORT K3bSimpleJobHandler : public TQObject, public K3bJobHandler { Q_OBJECT + TQ_OBJECT public: - K3bSimpleJobHandler( QObject* parent = 0 ); + K3bSimpleJobHandler( TQObject* tqparent = 0 ); ~K3bSimpleJobHandler(); /* @@ -42,20 +43,20 @@ class LIBK3B_EXPORT K3bSimpleJobHandler : public QObject, public K3bJobHandler int waitForMedia( K3bDevice::Device*, int mediaState = K3bDevice::STATE_EMPTY, int mediaType = K3bDevice::MEDIA_WRITABLE_CD, - const QString& message = QString::null ); + const TQString& message = TQString() ); /** * \return true */ - bool questionYesNo( const QString& text, - const QString& caption = QString::null, - const QString& yesText = QString::null, - const QString& noText = QString::null ); + bool questionYesNo( const TQString& text, + const TQString& caption = TQString(), + const TQString& yesText = TQString(), + const TQString& noText = TQString() ); /** * Does nothing */ - void blockingInformation( const QString& text, - const QString& caption = QString::null ); + void blockingInformation( const TQString& text, + const TQString& caption = TQString() ); }; #endif diff --git a/libk3b/core/k3bthread.cpp b/libk3b/core/k3bthread.cpp index 07414ad..54b2218 100644 --- a/libk3b/core/k3bthread.cpp +++ b/libk3b/core/k3bthread.cpp @@ -20,15 +20,15 @@ #include -#include +#include -static QPtrList s_threads; +static TQPtrList s_threads; void K3bThread::waitUntilFinished() { - QPtrListIterator it( s_threads ); + TQPtrListIterator it( s_threads ); while( it.current() ) { kdDebug() << "Waiting for thread " << it.current() << endl; it.current()->wait(); @@ -46,12 +46,12 @@ public: : eventHandler( 0 ) { } - QObject* eventHandler; + TQObject* eventHandler; }; -K3bThread::K3bThread( QObject* eventHandler ) - : QThread() +K3bThread::K3bThread( TQObject* eventHandler ) + : TQThread() { d = new Private; d->eventHandler = eventHandler; @@ -60,8 +60,8 @@ K3bThread::K3bThread( QObject* eventHandler ) } -K3bThread::K3bThread( unsigned int stackSize, QObject* eventHandler ) - : QThread( stackSize ) +K3bThread::K3bThread( unsigned int stackSize, TQObject* eventHandler ) + : TQThread( stackSize ) { d = new Private; d->eventHandler = eventHandler; @@ -77,20 +77,20 @@ K3bThread::~K3bThread() } -void K3bThread::setProgressInfoEventHandler( QObject* eventHandler ) +void K3bThread::setProgressInfoEventHandler( TQObject* eventHandler ) { d->eventHandler = eventHandler; } -QString K3bThread::jobDescription() const +TQString K3bThread::jobDescription() const { - return QString::null; + return TQString(); } -QString K3bThread::jobDetails() const +TQString K3bThread::jobDetails() const { - return QString::null; + return TQString(); } @@ -112,11 +112,11 @@ void K3bThread::cancel() } -void K3bThread::emitInfoMessage( const QString& msg, int type ) +void K3bThread::emitInfoMessage( const TQString& msg, int type ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, - new K3bProgressInfoEvent( K3bProgressInfoEvent::InfoMessage, msg, QString::null, type ) ); + TQApplication::postEvent( d->eventHandler, + new K3bProgressInfoEvent( K3bProgressInfoEvent::InfoMessage, msg, TQString(), type ) ); else kdWarning() << "(K3bThread) call to emitInfoMessage() without eventHandler." << endl; } @@ -124,7 +124,7 @@ void K3bThread::emitInfoMessage( const QString& msg, int type ) void K3bThread::emitPercent( int p ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Progress, p ) ); else kdWarning() << "(K3bThread) call to emitPercent() without eventHandler." << endl; @@ -133,7 +133,7 @@ void K3bThread::emitPercent( int p ) void K3bThread::emitSubPercent( int p ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::SubProgress, p ) ); else kdWarning() << "(K3bThread) call to emitSubPercent() without eventHandler." << endl; @@ -142,7 +142,7 @@ void K3bThread::emitSubPercent( int p ) void K3bThread::emitStarted() { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Started ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Started ) ); else kdWarning() << "(K3bThread) call to emitStarted() without eventHandler." << endl; } @@ -150,7 +150,7 @@ void K3bThread::emitStarted() void K3bThread::emitCanceled() { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Canceled ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Canceled ) ); else kdWarning() << "(K3bThread) call to emitCanceled() without eventHandler." << endl; } @@ -158,7 +158,7 @@ void K3bThread::emitCanceled() void K3bThread::emitFinished( bool success ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Finished, success ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::Finished, success ) ); else kdWarning() << "(K3bThread) call to emitFinished() without eventHandler." << endl; } @@ -166,7 +166,7 @@ void K3bThread::emitFinished( bool success ) void K3bThread::emitProcessedSize( int p, int size ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::ProcessedSize, p, size ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::ProcessedSize, p, size ) ); else kdWarning() << "(K3bThread) call to emitProcessedSize() without eventHandler." << endl; } @@ -174,31 +174,31 @@ void K3bThread::emitProcessedSize( int p, int size ) void K3bThread::emitProcessedSubSize( int p, int size ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::ProcessedSubSize, p, size ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::ProcessedSubSize, p, size ) ); else kdWarning() << "(K3bThread) call to emitProcessedSubSize() without eventHandler." << endl; } -void K3bThread::emitNewTask( const QString& job ) +void K3bThread::emitNewTask( const TQString& job ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::NewTask, job ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::NewTask, job ) ); else kdWarning() << "(K3bThread) call to emitNewTask() without eventHandler." << endl; } -void K3bThread::emitNewSubTask( const QString& job ) +void K3bThread::emitNewSubTask( const TQString& job ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::NewSubTask, job ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::NewSubTask, job ) ); else kdWarning() << "(K3bThread) call to emitNewSubTask() without eventHandler." << endl; } -void K3bThread::emitDebuggingOutput(const QString& group, const QString& text) +void K3bThread::emitDebuggingOutput(const TQString& group, const TQString& text) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::DebuggingOutput, group, text ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::DebuggingOutput, group, text ) ); else kdWarning() << "(K3bThread) call to emitDebuggingOutput() without eventHandler." << endl; } @@ -206,7 +206,7 @@ void K3bThread::emitDebuggingOutput(const QString& group, const QString& text) void K3bThread::emitData( const char* data, int len ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bDataEvent( data, len ) ); + TQApplication::postEvent( d->eventHandler, new K3bDataEvent( data, len ) ); else kdWarning() << "(K3bThread) call to emitData() without eventHandler." << endl; } @@ -214,7 +214,7 @@ void K3bThread::emitData( const char* data, int len ) void K3bThread::emitNextTrack( int t, int n ) { if( d->eventHandler ) - QApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::NextTrack, t, n ) ); + TQApplication::postEvent( d->eventHandler, new K3bProgressInfoEvent( K3bProgressInfoEvent::NextTrack, t, n ) ); else kdWarning() << "(K3bThread) call to emitNextTrack() without eventHandler." << endl; } diff --git a/libk3b/core/k3bthread.h b/libk3b/core/k3bthread.h index f7e68fc..c57ab67 100644 --- a/libk3b/core/k3bthread.h +++ b/libk3b/core/k3bthread.h @@ -17,10 +17,10 @@ #ifndef _K3B_THREAD_H_ #define _K3B_THREAD_H_ -#include +#include #include "k3b_export.h" -class QObject; +class TQObject; /** * The threaded couterpart to K3bJob @@ -34,14 +34,14 @@ class QObject; * * See K3bThreadJob for more information. */ -class LIBK3B_EXPORT K3bThread : public QThread +class LIBK3B_EXPORT K3bThread : public TQThread { public: - K3bThread( QObject* eventHandler = 0 ); - K3bThread( unsigned int stackSize, QObject* eventHandler = 0 ); + K3bThread( TQObject* eventHandler = 0 ); + K3bThread( unsigned int stackSize, TQObject* eventHandler = 0 ); virtual ~K3bThread(); - void setProgressInfoEventHandler( QObject* eventHandler ); + void setProgressInfoEventHandler( TQObject* eventHandler ); /** * Initialize the thread before starting it in the GUi thread. @@ -58,8 +58,8 @@ class LIBK3B_EXPORT K3bThread : public QThread */ virtual void cancel(); - virtual QString jobDescription() const; - virtual QString jobDetails() const; + virtual TQString jobDescription() const; + virtual TQString jobDetails() const; /** * waits until all running K3bThread have finished. @@ -73,7 +73,7 @@ class LIBK3B_EXPORT K3bThread : public QThread /** * uses the K3bJob::MessageType enum */ - void emitInfoMessage( const QString& msg, int type ); + void emitInfoMessage( const TQString& msg, int type ); void emitPercent( int p ); void emitSubPercent( int p ); void emitStarted(); @@ -81,9 +81,9 @@ class LIBK3B_EXPORT K3bThread : public QThread void emitFinished( bool success ); void emitProcessedSize( int processed, int size ); void emitProcessedSubSize( int processed, int size ); - void emitNewTask( const QString& job ); - void emitNewSubTask( const QString& job ); - void emitDebuggingOutput(const QString&, const QString&); + void emitNewTask( const TQString& job ); + void emitNewSubTask( const TQString& job ); + void emitDebuggingOutput(const TQString&, const TQString&); void emitData( const char* data, int len ); void emitNextTrack( int track, int trackNum ); diff --git a/libk3b/core/k3bthreadjob.cpp b/libk3b/core/k3bthreadjob.cpp index a13f10a..fcc192e 100644 --- a/libk3b/core/k3bthreadjob.cpp +++ b/libk3b/core/k3bthreadjob.cpp @@ -23,15 +23,15 @@ -K3bThreadJob::K3bThreadJob( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bJob( jh, parent, name ), +K3bThreadJob::K3bThreadJob( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bJob( jh, tqparent, name ), m_running(false) { } -K3bThreadJob::K3bThreadJob( K3bThread* thread, K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bJob( jh, parent, name ), +K3bThreadJob::K3bThreadJob( K3bThread* thread, K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bJob( jh, tqparent, name ), m_running(false) { setThread(thread); @@ -43,21 +43,21 @@ K3bThreadJob::~K3bThreadJob() } -QString K3bThreadJob::jobDescription() const +TQString K3bThreadJob::jobDescription() const { if( m_thread ) return m_thread->jobDescription(); else - return QString::null; + return TQString(); } -QString K3bThreadJob::jobDetails() const +TQString K3bThreadJob::jobDetails() const { if( m_thread ) return m_thread->jobDetails(); else - return QString::null; + return TQString(); } @@ -101,7 +101,7 @@ void K3bThreadJob::cleanupJob( bool success ) } -void K3bThreadJob::customEvent( QCustomEvent* e ) +void K3bThreadJob::customEvent( TQCustomEvent* e ) { if( K3bDataEvent* de = dynamic_cast(e) ) { emit data( de->data(), de->length() ); diff --git a/libk3b/core/k3bthreadjob.h b/libk3b/core/k3bthreadjob.h index 25919f1..34b43fd 100644 --- a/libk3b/core/k3bthreadjob.h +++ b/libk3b/core/k3bthreadjob.h @@ -19,7 +19,7 @@ #include "k3bjob.h" #include "k3b_export.h" -class QCustomEvent; +class TQCustomEvent; class K3bThread; @@ -40,10 +40,11 @@ class K3bThread; class LIBK3B_EXPORT K3bThreadJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bThreadJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); - K3bThreadJob( K3bThread*, K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bThreadJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); + K3bThreadJob( K3bThread*, K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bThreadJob(); void setThread( K3bThread* t ); @@ -57,8 +58,8 @@ class LIBK3B_EXPORT K3bThreadJob : public K3bJob */ virtual bool active() const { return m_running; } - virtual QString jobDescription() const; - virtual QString jobDetails() const; + virtual TQString jobDescription() const; + virtual TQString jobDetails() const; public slots: virtual void start(); @@ -68,7 +69,7 @@ class LIBK3B_EXPORT K3bThreadJob : public K3bJob /** * converts K3bThread events to K3bJob signals */ - virtual void customEvent( QCustomEvent* ); + virtual void customEvent( TQCustomEvent* ); /** * Reimplement this method to do some housekeeping once diff --git a/libk3b/core/k3bversion.cpp b/libk3b/core/k3bversion.cpp index f7af248..e7ae9b0 100644 --- a/libk3b/core/k3bversion.cpp +++ b/libk3b/core/k3bversion.cpp @@ -15,7 +15,7 @@ #include "k3bversion.h" -#include +#include #include @@ -35,7 +35,7 @@ K3bVersion::K3bVersion( const K3bVersion& v ) { } -K3bVersion::K3bVersion( const QString& version ) +K3bVersion::K3bVersion( const TQString& version ) { setVersion( version ); } @@ -43,14 +43,14 @@ K3bVersion::K3bVersion( const QString& version ) K3bVersion::K3bVersion( int majorVersion, int minorVersion, int patchlevel, - const QString& suffix ) + const TQString& suffix ) { setVersion( majorVersion, minorVersion, patchlevel, suffix ); } -void K3bVersion::setVersion( const QString& v ) +void K3bVersion::setVersion( const TQString& v ) { - QString suffix; + TQString suffix; splitVersionString( v.stripWhiteSpace(), m_majorVersion, suffix ); if( m_majorVersion >= 0 ) { if( suffix.startsWith(".") ) { @@ -99,9 +99,9 @@ void K3bVersion::setVersion( const QString& v ) // the dot is removed and the rest put in suffix // if s does not start with a digit or the first non-digit char is not a dot // suffix = s and num = -1 is returned -void K3bVersion::splitVersionString( const QString& s, int& num, QString& suffix ) +void K3bVersion::splitVersionString( const TQString& s, int& num, TQString& suffix ) { - int pos = s.find( QRegExp("\\D") ); + int pos = s.tqfind( TQRegExp("\\D") ); if( pos < 0 ) { num = s.toInt(); suffix = ""; @@ -126,7 +126,7 @@ bool K3bVersion::isValid() const void K3bVersion::setVersion( int majorVersion, int minorVersion, int patchlevel, - const QString& suffix ) + const TQString& suffix ) { m_majorVersion = majorVersion; m_minorVersion = minorVersion; @@ -135,7 +135,7 @@ void K3bVersion::setVersion( int majorVersion, m_versionString = createVersionString( majorVersion, minorVersion, patchlevel, suffix ); } -K3bVersion& K3bVersion::operator=( const QString& v ) +K3bVersion& K3bVersion::operator=( const TQString& v ) { setVersion( v ); return *this; @@ -148,18 +148,18 @@ K3bVersion K3bVersion::simplify() const return v; } -QString K3bVersion::createVersionString( int majorVersion, +TQString K3bVersion::createVersionString( int majorVersion, int minorVersion, int patchlevel, - const QString& suffix ) + const TQString& suffix ) { if( majorVersion >= 0 ) { - QString s = QString::number(majorVersion); + TQString s = TQString::number(majorVersion); if( minorVersion > -1 ) { - s.append( QString(".%1").arg(minorVersion) ); + s.append( TQString(".%1").tqarg(minorVersion) ); if( patchlevel > -1 ) - s.append( QString(".%1").arg(patchlevel) ); + s.append( TQString(".%1").tqarg(patchlevel) ); } if( !suffix.isNull() ) @@ -172,12 +172,12 @@ QString K3bVersion::createVersionString( int majorVersion, } -int K3bVersion::compareSuffix( const QString& suffix1, const QString& suffix2 ) +int K3bVersion::compareSuffix( const TQString& suffix1, const TQString& suffix2 ) { - static QRegExp rcRx( "rc(\\d+)" ); - static QRegExp preRx( "pre(\\d+)" ); - static QRegExp betaRx( "beta(\\d+)" ); - static QRegExp alphaRx( "a(?:lpha)?(\\d+)" ); + static TQRegExp rcRx( "rc(\\d+)" ); + static TQRegExp preRx( "pre(\\d+)" ); + static TQRegExp betaRx( "beta(\\d+)" ); + static TQRegExp alphaRx( "a(?:lpha)?(\\d+)" ); // first we check if one of the suffixes (or both are empty) becasue that case if simple if( suffix1.isEmpty() ) { @@ -202,7 +202,7 @@ int K3bVersion::compareSuffix( const QString& suffix1, const QString& suffix2 ) alphaRx.exactMatch( suffix2 ) ) return 1; // rc > than all the others else - return QString::compare( suffix1, suffix2 ); + return TQString::compare( suffix1, suffix2 ); } else if( preRx.exactMatch( suffix1 ) ) { @@ -219,7 +219,7 @@ int K3bVersion::compareSuffix( const QString& suffix1, const QString& suffix2 ) alphaRx.exactMatch( suffix2 ) ) return 1; // pre is greater than beta or alpha else - return QString::compare( suffix1, suffix2 ); + return TQString::compare( suffix1, suffix2 ); } else if( betaRx.exactMatch( suffix1 ) ) { @@ -235,7 +235,7 @@ int K3bVersion::compareSuffix( const QString& suffix1, const QString& suffix2 ) else if( alphaRx.exactMatch( suffix2 ) ) return 1; // beta is greater then alpha else - return QString::compare( suffix1, suffix2 ); + return TQString::compare( suffix1, suffix2 ); } else if( alphaRx.exactMatch( suffix1 ) ) { @@ -250,11 +250,11 @@ int K3bVersion::compareSuffix( const QString& suffix1, const QString& suffix2 ) return ( v1 == v2 ? 0 : ( v1 < v2 ? -1 : 1 ) ); } else - return QString::compare( suffix1, suffix2 ); + return TQString::compare( suffix1, suffix2 ); } else - return QString::compare( suffix1, suffix2 ); + return TQString::compare( suffix1, suffix2 ); } diff --git a/libk3b/core/k3bversion.h b/libk3b/core/k3bversion.h index a6e3aee..f1bffba 100644 --- a/libk3b/core/k3bversion.h +++ b/libk3b/core/k3bversion.h @@ -17,7 +17,7 @@ #ifndef _K3B_VERSION_H_ #define _K3B_VERSION_H_ -#include +#include #include "k3b_export.h" /** * \brief Representation of a version. @@ -32,7 +32,7 @@ * K3bVersion tries to treat version suffixes in an "intelligent" way to properly compare versions * (see compareSuffix() for more details). * - * K3bVersion may also be used everywhere a QString is needed as it automatically converts to a + * K3bVersion may also be used everywhere a TQString is needed as it automatically converts to a * string representation using createVersionString(). */ class LIBK3B_EXPORT K3bVersion @@ -53,18 +53,18 @@ class LIBK3B_EXPORT K3bVersion /** * this constructor tries to parse the given version string */ - K3bVersion( const QString& version ); + K3bVersion( const TQString& version ); /** * sets the version and generates a version string from it */ - K3bVersion( int majorVersion, int minorVersion, int pachlevel = -1, const QString& suffix = QString::null ); + K3bVersion( int majorVersion, int minorVersion, int pachlevel = -1, const TQString& suffix = TQString() ); /** * tries to parse the version string * used by the constructor */ - void setVersion( const QString& ); + void setVersion( const TQString& ); bool isValid() const; @@ -74,19 +74,19 @@ class LIBK3B_EXPORT K3bVersion * * If minorVersion or pachlevel are -1 they will not be used when generating the version string. */ - void setVersion( int majorVersion, int minorVersion = -1, int patchlevel = -1, const QString& suffix = QString::null ); + void setVersion( int majorVersion, int minorVersion = -1, int patchlevel = -1, const TQString& suffix = TQString() ); - const QString& versionString() const { return m_versionString; } + const TQString& versionString() const { return m_versionString; } int majorVersion() const { return m_majorVersion; } int minorVersion() const { return m_minorVersion; } int patchLevel() const { return m_patchLevel; } - const QString& suffix() const { return m_suffix; } + const TQString& suffix() const { return m_suffix; } /** - * just to make it possible to use as a QString + * just to make it possible to use as a TQString */ - operator const QString& () const { return m_versionString; } - K3bVersion& operator=( const QString& v ); + operator const TQString& () const { return m_versionString; } + K3bVersion& operator=( const TQString& v ); /** * \return A new K3bVersion object which equals this one except that the suffix is empty. @@ -97,10 +97,10 @@ class LIBK3B_EXPORT K3bVersion * If minorVersion or pachlevel are -1 they will not be used when generating the version string. * If minorVersion is -1 patchlevel will be ignored. */ - static QString createVersionString( int majorVersion, + static TQString createVersionString( int majorVersion, int minorVersion = -1, int patchlevel = -1, - const QString& suffix = QString::null ); + const TQString& suffix = TQString() ); /** * "Intelligent" comparison of two version suffixes. @@ -118,16 +118,16 @@ class LIBK3B_EXPORT K3bVersion * alphaX equals aX in this case.) * \li 1 if suffix1 is greater than suffix2 */ - static int compareSuffix( const QString& suffix1, const QString& suffix2 ); + static int compareSuffix( const TQString& suffix1, const TQString& suffix2 ); private: - static void splitVersionString( const QString& s, int& num, QString& suffix ); + static void splitVersionString( const TQString& s, int& num, TQString& suffix ); - QString m_versionString; + TQString m_versionString; int m_majorVersion; int m_minorVersion; int m_patchLevel; - QString m_suffix; + TQString m_suffix; }; diff --git a/libk3b/jobs/k3baudiocuefilewritingjob.cpp b/libk3b/jobs/k3baudiocuefilewritingjob.cpp index 0c5cd9a..9b88345 100644 --- a/libk3b/jobs/k3baudiocuefilewritingjob.cpp +++ b/libk3b/jobs/k3baudiocuefilewritingjob.cpp @@ -50,35 +50,35 @@ private: }; -K3bAudioCueFileWritingJob::K3bAudioCueFileWritingJob( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bBurnJob( jh, parent, name ), +K3bAudioCueFileWritingJob::K3bAudioCueFileWritingJob( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bBurnJob( jh, tqparent, name ), m_decoder(0) { m_analyserThread = new AnalyserThread(); m_analyserJob = new K3bThreadJob( m_analyserThread, this, this ); - connect( m_analyserJob, SIGNAL(finished(bool)), this, SLOT(slotAnalyserThreadFinished(bool)) ); + connect( m_analyserJob, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotAnalyserThreadFinished(bool)) ); m_audioDoc = new K3bAudioDoc( this ); m_audioDoc->newDocument(); m_audioJob = new K3bAudioJob( m_audioDoc, this, this ); // just loop all through - connect( m_audioJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - connect( m_audioJob, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( m_audioJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); - connect( m_audioJob, SIGNAL(infoMessage(const QString&, int)), - this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_audioJob, SIGNAL(finished(bool)), this, SIGNAL(finished(bool)) ); - connect( m_audioJob, SIGNAL(canceled()), this, SIGNAL(canceled()) ); - connect( m_audioJob, SIGNAL(percent(int)), this, SIGNAL(percent(int)) ); - connect( m_audioJob, SIGNAL(subPercent(int)), this, SIGNAL(subPercent(int)) ); - connect( m_audioJob, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( m_audioJob, SIGNAL(processedSubSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( m_audioJob, SIGNAL(burning(bool)), this, SIGNAL(burning(bool)) ); - connect( m_audioJob, SIGNAL(bufferStatus(int)), this, SIGNAL(bufferStatus(int)) ); - connect( m_audioJob, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( m_audioJob, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); + connect( m_audioJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + connect( m_audioJob, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( m_audioJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); + connect( m_audioJob, TQT_SIGNAL(infoMessage(const TQString&, int)), + this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_audioJob, TQT_SIGNAL(finished(bool)), this, TQT_SIGNAL(finished(bool)) ); + connect( m_audioJob, TQT_SIGNAL(canceled()), this, TQT_SIGNAL(canceled()) ); + connect( m_audioJob, TQT_SIGNAL(percent(int)), this, TQT_SIGNAL(percent(int)) ); + connect( m_audioJob, TQT_SIGNAL(subPercent(int)), this, TQT_SIGNAL(subPercent(int)) ); + connect( m_audioJob, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( m_audioJob, TQT_SIGNAL(processedSubSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( m_audioJob, TQT_SIGNAL(burning(bool)), this, TQT_SIGNAL(burning(bool)) ); + connect( m_audioJob, TQT_SIGNAL(buffertqStatus(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( m_audioJob, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( m_audioJob, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); m_canceled = false; m_audioJobRunning = false; @@ -98,13 +98,13 @@ K3bDevice::Device* K3bAudioCueFileWritingJob::writer() const } -QString K3bAudioCueFileWritingJob::jobDescription() const +TQString K3bAudioCueFileWritingJob::jobDescription() const { return i18n("Writing Audio Cue File"); } -QString K3bAudioCueFileWritingJob::jobDetails() const +TQString K3bAudioCueFileWritingJob::jobDetails() const { return m_cueFile.section( '/', -1 ); } @@ -131,7 +131,7 @@ void K3bAudioCueFileWritingJob::cancel() } -void K3bAudioCueFileWritingJob::setCueFile( const QString& s ) +void K3bAudioCueFileWritingJob::setCueFile( const TQString& s ) { m_cueFile = s; } @@ -173,7 +173,7 @@ void K3bAudioCueFileWritingJob::setCopies( int c ) } -void K3bAudioCueFileWritingJob::setTempDir( const QString& s ) +void K3bAudioCueFileWritingJob::setTempDir( const TQString& s ) { m_audioDoc->setTempDir( s ); } @@ -252,19 +252,19 @@ void K3bAudioCueFileWritingJob::importCueInProject() // now analyze the source emit newTask( i18n("Analysing the audio file") ); - emit newSubTask( i18n("Analysing %1").arg( parser.imageFilename() ) ); + emit newSubTask( i18n("Analysing %1").tqarg( parser.imageFilename() ) ); // start the analyser thread m_analyserThread->setDecoder( m_decoder ); m_analyserJob->start(); } else { - emit infoMessage( i18n("Unable to handle '%1' due to an unsupported format.").arg( m_cueFile ), ERROR ); + emit infoMessage( i18n("Unable to handle '%1' due to an unsupported format.").tqarg( m_cueFile ), ERROR ); jobFinished(false); } } else { - emit infoMessage( i18n("No valid audio cue file: '%1'").arg( m_cueFile ), ERROR ); + emit infoMessage( i18n("No valid audio cue file: '%1'").tqarg( m_cueFile ), ERROR ); jobFinished(false); } } diff --git a/libk3b/jobs/k3baudiocuefilewritingjob.h b/libk3b/jobs/k3baudiocuefilewritingjob.h index 6e0a3c2..a59dcb0 100644 --- a/libk3b/jobs/k3baudiocuefilewritingjob.h +++ b/libk3b/jobs/k3baudiocuefilewritingjob.h @@ -30,30 +30,31 @@ namespace K3bDevice { class LIBK3B_EXPORT K3bAudioCueFileWritingJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bAudioCueFileWritingJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bAudioCueFileWritingJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bAudioCueFileWritingJob(); K3bDevice::Device* writer() const; - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; - const QString& cueFile() const { return m_cueFile; } + const TQString& cueFile() const { return m_cueFile; } public slots: void start(); void cancel(); - void setCueFile( const QString& ); + void setCueFile( const TQString& ); void setSpeed( int s ); void setBurnDevice( K3bDevice::Device* dev ); void setWritingMode( int mode ); void setSimulate( bool b ); void setCopies( int c ); void setOnTheFly( bool b ); - void setTempDir( const QString& ); + void setTempDir( const TQString& ); private slots: void slotAnalyserThreadFinished(bool); @@ -63,7 +64,7 @@ class LIBK3B_EXPORT K3bAudioCueFileWritingJob : public K3bBurnJob K3bDevice::Device* m_device; - QString m_cueFile; + TQString m_cueFile; K3bAudioDoc* m_audioDoc; K3bAudioJob* m_audioJob; K3bAudioDecoder* m_decoder; diff --git a/libk3b/jobs/k3baudiosessionreadingjob.cpp b/libk3b/jobs/k3baudiosessionreadingjob.cpp index f4ac550..acf7e9d 100644 --- a/libk3b/jobs/k3baudiosessionreadingjob.cpp +++ b/libk3b/jobs/k3baudiosessionreadingjob.cpp @@ -46,7 +46,7 @@ public: K3bDevice::Device* device; K3bDevice::Toc toc; K3bWaveFileWriter* waveFileWriter; - QStringList filenames; + TQStringList filenames; int paranoiaMode; int retries; bool neverSkip; @@ -93,7 +93,7 @@ void K3bAudioSessionReadingJob::WorkThread::run() toc = device->readToc(); if( !paranoia->initParanoia( device, toc ) ) { - emitInfoMessage( i18n("Could not open device %1").arg(device->blockDeviceName()), + emitInfoMessage( i18n("Could not open device %1").tqarg(device->blockDeviceName()), K3bJob::ERROR ); emitFinished(false); return; @@ -154,7 +154,7 @@ void K3bAudioSessionReadingJob::WorkThread::run() } if( !waveFileWriter->open( filenames[currentTrack-1] ) ) { - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(filenames[currentTrack-1]), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(filenames[currentTrack-1]), K3bJob::ERROR ); writeError = true; break; } @@ -188,7 +188,7 @@ void K3bAudioSessionReadingJob::WorkThread::run() device->block( false ); if( status != K3bCdparanoiaLib::S_OK ) { - emitInfoMessage( i18n("Unrecoverable error while ripping track %1.").arg(trackNum), K3bJob::ERROR ); + emitInfoMessage( i18n("Unrecoverable error while ripping track %1.").tqarg(trackNum), K3bJob::ERROR ); emitFinished(false); return; } @@ -206,8 +206,8 @@ void K3bAudioSessionReadingJob::WorkThread::cancel() -K3bAudioSessionReadingJob::K3bAudioSessionReadingJob( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bThreadJob( jh, parent, name ) +K3bAudioSessionReadingJob::K3bAudioSessionReadingJob( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bThreadJob( jh, tqparent, name ) { m_thread = new WorkThread(); setThread( m_thread ); @@ -238,7 +238,7 @@ void K3bAudioSessionReadingJob::writeToFd( int fd ) m_thread->fd = fd; } -void K3bAudioSessionReadingJob::setImageNames( const QStringList& l ) +void K3bAudioSessionReadingJob::setImageNames( const TQStringList& l ) { m_thread->filenames = l; m_thread->fd = -1; diff --git a/libk3b/jobs/k3baudiosessionreadingjob.h b/libk3b/jobs/k3baudiosessionreadingjob.h index 21f3d50..53ae7fa 100644 --- a/libk3b/jobs/k3baudiosessionreadingjob.h +++ b/libk3b/jobs/k3baudiosessionreadingjob.h @@ -18,7 +18,7 @@ #include -#include +#include namespace K3bDevice { @@ -30,9 +30,10 @@ namespace K3bDevice { class K3bAudioSessionReadingJob : public K3bThreadJob { Q_OBJECT + TQ_OBJECT public: - K3bAudioSessionReadingJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bAudioSessionReadingJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bAudioSessionReadingJob(); /** @@ -55,7 +56,7 @@ class K3bAudioSessionReadingJob : public K3bThreadJob /** * Used if fd == -1 */ - void setImageNames( const QStringList& l ); + void setImageNames( const TQStringList& l ); void setParanoiaMode( int m ); void setReadRetries( int ); diff --git a/libk3b/jobs/k3bbinimagewritingjob.cpp b/libk3b/jobs/k3bbinimagewritingjob.cpp index de76e3f..3e39b1c 100644 --- a/libk3b/jobs/k3bbinimagewritingjob.cpp +++ b/libk3b/jobs/k3bbinimagewritingjob.cpp @@ -25,13 +25,13 @@ #include #include -#include -#include +#include +#include -K3bBinImageWritingJob::K3bBinImageWritingJob( K3bJobHandler* hdl, QObject* parent ) - : K3bBurnJob( hdl, parent ), +K3bBinImageWritingJob::K3bBinImageWritingJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bBurnJob( hdl, tqparent ), m_device(0), m_simulate(false), m_force(false), @@ -93,10 +93,10 @@ bool K3bBinImageWritingJob::prepareWriter() // TODO: put this into K3bCueFileParser // TODO: check K3bCueFileParser::imageFilenameInCue() // let's see if cdrecord can handle the cue file - QFile f( m_tocFile ); + TQFile f( m_tocFile ); if( f.open( IO_ReadOnly ) ) { - QTextStream fStr( &f ); - if( fStr.read().contains( "MODE1/2352" ) ) { + TQTextStream fStr( &f ); + if( fStr.read().tqcontains( "MODE1/2352" ) ) { kdDebug() << "(K3bBinImageWritingJob) cuefile contains MODE1/2352 track. using cdrdao." << endl; usedWritingApp = K3b::CDRDAO; } @@ -144,18 +144,18 @@ bool K3bBinImageWritingJob::prepareWriter() m_writer = writer; } - connect( m_writer, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_writer, SIGNAL(percent(int)), this, SLOT(copyPercent(int)) ); - connect( m_writer, SIGNAL(subPercent(int)), this, SLOT(copySubPercent(int)) ); - connect( m_writer, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) ); - connect( m_writer, SIGNAL(buffer(int)), this, SIGNAL(bufferStatus(int)) ); - connect( m_writer, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( m_writer, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); - connect( m_writer, SIGNAL(finished(bool)), this, SLOT(writerFinished(bool)) ); - connect( m_writer, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - connect( m_writer, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( m_writer, SIGNAL(nextTrack(int, int)), this, SLOT(slotNextTrack(int, int)) ); - connect( m_writer, SIGNAL(debuggingOutput(const QString&, const QString&)), this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( m_writer, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_writer, TQT_SIGNAL(percent(int)), this, TQT_SLOT(copyPercent(int)) ); + connect( m_writer, TQT_SIGNAL(subPercent(int)), this, TQT_SLOT(copySubPercent(int)) ); + connect( m_writer, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) ); + connect( m_writer, TQT_SIGNAL(buffer(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( m_writer, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( m_writer, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); + connect( m_writer, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(writerFinished(bool)) ); + connect( m_writer, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + connect( m_writer, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( m_writer, TQT_SIGNAL(nextTrack(int, int)), this, TQT_SLOT(slotNextTrack(int, int)) ); + connect( m_writer, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); return true; } @@ -207,26 +207,26 @@ void K3bBinImageWritingJob::writerFinished(bool ok) void K3bBinImageWritingJob::slotNextTrack( 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) ); } -QString K3bBinImageWritingJob::jobDescription() const +TQString K3bBinImageWritingJob::jobDescription() const { return ( i18n("Writing cue/bin Image") + ( m_copies > 1 ? i18n(" - %n Copy", " - %n Copies", m_copies) - : QString::null ) ); + : TQString() ) ); } -QString K3bBinImageWritingJob::jobDetails() const +TQString K3bBinImageWritingJob::jobDetails() const { return m_tocFile.section("/", -1); } -void K3bBinImageWritingJob::setTocFile(const QString& s) +void K3bBinImageWritingJob::setTocFile(const TQString& s) { m_tocFile = s; } diff --git a/libk3b/jobs/k3bbinimagewritingjob.h b/libk3b/jobs/k3bbinimagewritingjob.h index 3666793..9782985 100644 --- a/libk3b/jobs/k3bbinimagewritingjob.h +++ b/libk3b/jobs/k3bbinimagewritingjob.h @@ -30,15 +30,16 @@ namespace K3bDevice { class LIBK3B_EXPORT K3bBinImageWritingJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bBinImageWritingJob( K3bJobHandler*, QObject* parent = 0 ); + K3bBinImageWritingJob( K3bJobHandler*, TQObject* tqparent = 0 ); ~K3bBinImageWritingJob(); K3bDevice::Device* writer() const { return m_device; }; - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); @@ -48,7 +49,7 @@ class LIBK3B_EXPORT K3bBinImageWritingJob : public K3bBurnJob void setSimulate( bool b ) { m_simulate = b; } void setForce(bool b) { m_force = b; } void setMulti( bool b ) { m_noFix = b; } - void setTocFile( const QString& s); + void setTocFile( const TQString& s); void setCopies(int c) { m_copies = c; } void setSpeed( int s ) { m_speed = s; } @@ -66,7 +67,7 @@ class LIBK3B_EXPORT K3bBinImageWritingJob : public K3bBurnJob bool m_simulate; bool m_force; bool m_noFix; - QString m_tocFile; + TQString m_tocFile; int m_speed; int m_copies; int m_finishedCopies; diff --git a/libk3b/jobs/k3bblankingjob.cpp b/libk3b/jobs/k3bblankingjob.cpp index c11f4b4..80eba84 100644 --- a/libk3b/jobs/k3bblankingjob.cpp +++ b/libk3b/jobs/k3bblankingjob.cpp @@ -27,12 +27,12 @@ #include #include -#include +#include -K3bBlankingJob::K3bBlankingJob( K3bJobHandler* hdl, QObject* parent ) - : K3bBurnJob( hdl, parent ), +K3bBlankingJob::K3bBlankingJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bBurnJob( hdl, tqparent ), m_writerJob(0), m_force(true), m_device(0), @@ -94,7 +94,7 @@ void K3bBlankingJob::slotStartErasing() K3bCdrecordWriter* writer = new K3bCdrecordWriter( m_device, this ); m_writerJob = writer; - QString mode; + TQString mode; switch( m_mode ) { case Fast: mode = "fast"; @@ -121,19 +121,19 @@ void K3bBlankingJob::slotStartErasing() writer->setForceNoEject( m_forceNoEject ); } - connect(m_writerJob, SIGNAL(finished(bool)), this, SLOT(slotFinished(bool))); - connect(m_writerJob, SIGNAL(infoMessage( const QString&, int)), - this,SIGNAL(infoMessage( const QString&, int))); - connect( m_writerJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect(m_writerJob, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotFinished(bool))); + connect(m_writerJob, TQT_SIGNAL(infoMessage( const TQString&, int)), + this,TQT_SIGNAL(infoMessage( const TQString&, int))); + connect( m_writerJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); if( waitForMedia( m_device, K3bDevice::STATE_COMPLETE|K3bDevice::STATE_INCOMPLETE, K3bDevice::MEDIA_CD_RW, i18n("Please insert a rewritable CD medium into drive

%1 %2 (%3).") - .arg(m_device->vendor()) - .arg(m_device->description()) - .arg(m_device->devicename()) ) < 0 ) { + .tqarg(m_device->vendor()) + .tqarg(m_device->description()) + .tqarg(m_device->devicename()) ) < 0 ) { emit canceled(); jobFinished(false); return; diff --git a/libk3b/jobs/k3bblankingjob.h b/libk3b/jobs/k3bblankingjob.h index 8cfe0a1..ab6becd 100644 --- a/libk3b/jobs/k3bblankingjob.h +++ b/libk3b/jobs/k3bblankingjob.h @@ -19,7 +19,7 @@ #include #include "k3b_export.h" class KProcess; -class QString; +class TQString; class K3bDevice::Device; class K3bAbstractWriter; @@ -27,9 +27,10 @@ class K3bAbstractWriter; class LIBK3B_EXPORT K3bBlankingJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bBlankingJob( K3bJobHandler*, QObject* parent = 0 ); + K3bBlankingJob( K3bJobHandler*, TQObject* tqparent = 0 ); ~K3bBlankingJob(); K3bDevice::Device* writer() const; diff --git a/libk3b/jobs/k3bcdcopyjob.cpp b/libk3b/jobs/k3bcdcopyjob.cpp index ff8f35d..c55e284 100644 --- a/libk3b/jobs/k3bcdcopyjob.cpp +++ b/libk3b/jobs/k3bcdcopyjob.cpp @@ -42,15 +42,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include class K3bCdCopyJob::Private @@ -80,7 +80,7 @@ public: unsigned int currentWrittenSession; K3bDevice::Toc toc; - QByteArray cdTextRaw; + TQByteArray cdTextRaw; K3bReadcdReader* readcdReader; K3bDataTrackReader* dataTrackReader; @@ -93,10 +93,10 @@ public: bool writerRunning; // image filenames, one for every track - QStringList imageNames; + TQStringList imageNames; // inf-filenames for writing audio tracks - QStringList infNames; + TQStringList infNames; // indicates if we created a dir or not bool deleteTempDir; @@ -107,16 +107,16 @@ public: bool haveCddb; bool haveCdText; - QValueVector dataSessionProbablyTAORecorded; + TQValueVector dataSessionProbablyTAORecorded; // used to determine progress - QValueVector sessionSizes; + TQValueVector sessionSizes; long overallSize; }; -K3bCdCopyJob::K3bCdCopyJob( K3bJobHandler* hdl, QObject* parent ) - : K3bBurnJob( hdl, parent ), +K3bCdCopyJob::K3bCdCopyJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bBurnJob( hdl, tqparent ), m_simulate(false), m_copies(1), m_onlyCreateImages(false), @@ -173,8 +173,8 @@ void K3bCdCopyJob::start() // FIXME: read ISRCs and MCN - connect( K3bDevice::diskInfo( m_readerDevice ), SIGNAL(finished(K3bDevice::DeviceHandler*)), - this, SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); + connect( K3bDevice::diskInfo( m_readerDevice ), TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), + this, TQT_SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); } @@ -311,9 +311,9 @@ void K3bCdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) } unsigned long avail, size; - QString pathToTest = m_tempPath.left( m_tempPath.findRev( '/' ) ); + TQString pathToTest = m_tempPath.left( m_tempPath.tqfindRev( '/' ) ); if( !K3b::kbFreeOnFs( pathToTest, size, avail ) ) { - emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").arg(pathToTest), ERROR ); + emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR ); d->error = true; canCopy = false; } @@ -368,9 +368,9 @@ void K3bCdCopyJob::searchCdText() emit newSubTask( i18n("Searching CD-TEXT") ); connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::CD_TEXT_RAW, m_readerDevice ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotCdTextReady(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotCdTextReady(K3bDevice::DeviceHandler*)) ); } @@ -379,7 +379,7 @@ void K3bCdCopyJob::slotCdTextReady( K3bDevice::DeviceHandler* dh ) if( dh->success() ) { if( K3bDevice::CdText::checkCrc( dh->cdTextRaw() ) ) { K3bDevice::CdText cdt( dh->cdTextRaw() ); - emit infoMessage( i18n("Found CD-TEXT (%1 - %2).").arg(cdt.performer()).arg(cdt.title()), SUCCESS ); + emit infoMessage( i18n("Found CD-TEXT (%1 - %2).").tqarg(cdt.performer()).tqarg(cdt.title()), SUCCESS ); d->haveCdText = true; d->cdTextRaw = dh->cdTextRaw(); } @@ -411,8 +411,8 @@ void K3bCdCopyJob::queryCddb() if( !d->cddb ) { d->cddb = new K3bCddb( this ); - connect( d->cddb, SIGNAL(queryFinished(int)), - this, SLOT(slotCddbQueryFinished(int)) ); + connect( d->cddb, TQT_SIGNAL(queryFinished(int)), + this, TQT_SLOT(slotCddbQueryFinished(int)) ); } KConfig* c = k3bcore->config(); @@ -429,7 +429,7 @@ void K3bCdCopyJob::slotCddbQueryFinished( int error ) d->cddbInfo = d->cddb->result(); d->haveCddb = true; - emit infoMessage( i18n("Found Cddb entry (%1 - %2).").arg(d->cddbInfo.cdArtist).arg(d->cddbInfo.cdTitle), SUCCESS ); + emit infoMessage( i18n("Found Cddb entry (%1 - %2).").tqarg(d->cddbInfo.cdArtist).tqarg(d->cddbInfo.cdTitle), SUCCESS ); // save the entry locally KConfig* c = k3bcore->config(); @@ -441,7 +441,7 @@ void K3bCdCopyJob::slotCddbQueryFinished( int error ) emit infoMessage( i18n("No Cddb entry found."), WARNING ); } else { - emit infoMessage( i18n("Cddb error (%1).").arg(d->cddb->errorString()), ERROR ); + emit infoMessage( i18n("Cddb error (%1).").tqarg(d->cddb->errorString()), ERROR ); } startCopy(); @@ -495,7 +495,7 @@ bool K3bCdCopyJob::prepareImageFiles() d->infNames.clear(); d->deleteTempDir = false; - QFileInfo fi( m_tempPath ); + TQFileInfo fi( m_tempPath ); if( d->toc.count() > 1 || d->toc.contentType() == K3bDevice::AUDIO ) { // create a directory which contains all the images and inf and stuff @@ -503,9 +503,9 @@ bool K3bCdCopyJob::prepareImageFiles() bool tempDirReady = false; if( !fi.isDir() ) { - if( QFileInfo( m_tempPath.section( '/', 0, -2 ) ).isDir() ) { - if( !QFile::exists( m_tempPath ) ) { - QDir dir( m_tempPath.section( '/', 0, -2 ) ); + if( TQFileInfo( m_tempPath.section( '/', 0, -2 ) ).isDir() ) { + if( !TQFile::exists( m_tempPath ) ) { + TQDir dir( m_tempPath.section( '/', 0, -2 ) ); dir.mkdir( m_tempPath.section( '/', -1 ) ); tempDirReady = true; } @@ -520,28 +520,28 @@ bool K3bCdCopyJob::prepareImageFiles() // create temp dir if( !tempDirReady ) { - QDir dir( m_tempPath ); + TQDir dir( m_tempPath ); m_tempPath = K3b::findUniqueFilePrefix( "k3bCdCopy", m_tempPath ); kdDebug() << "(K3bCdCopyJob) creating temp dir: " << m_tempPath << endl; if( !dir.mkdir( m_tempPath, true ) ) { - emit infoMessage( i18n("Unable to create temporary directory '%1'.").arg(m_tempPath), ERROR ); + emit infoMessage( i18n("Unable to create temporary directory '%1'.").tqarg(m_tempPath), ERROR ); return false; } d->deleteTempDir = true; } m_tempPath = K3b::prepareDir( m_tempPath ); - emit infoMessage( i18n("Using temporary directory %1.").arg(m_tempPath), INFO ); + emit infoMessage( i18n("Using temporary directory %1.").tqarg(m_tempPath), INFO ); // create temp filenames int i = 1; for( K3bDevice::Toc::const_iterator it = d->toc.begin(); it != d->toc.end(); ++it ) { if( (*it).type() == K3bDevice::Track::AUDIO ) { - d->imageNames.append( m_tempPath + QString("Track%1.wav").arg(QString::number(i).rightJustify(2, '0')) ); - d->infNames.append( m_tempPath + QString("Track%1.inf").arg(QString::number(i).rightJustify(2, '0')) ); + d->imageNames.append( m_tempPath + TQString("Track%1.wav").tqarg(TQString::number(i).rightJustify(2, '0')) ); + d->infNames.append( m_tempPath + TQString("Track%1.inf").tqarg(TQString::number(i).rightJustify(2, '0')) ); } else - d->imageNames.append( m_tempPath + QString("Track%1.iso").arg(QString::number(i).rightJustify(2, '0')) ); + d->imageNames.append( m_tempPath + TQString("Track%1.iso").tqarg(TQString::number(i).rightJustify(2, '0')) ); ++i; } @@ -554,17 +554,17 @@ bool K3bCdCopyJob::prepareImageFiles() else { // we only need a single image file if( !fi.isFile() || - questionYesNo( i18n("Do you want to overwrite %1?").arg(m_tempPath), + questionYesNo( i18n("Do you want to overwrite %1?").tqarg(m_tempPath), i18n("File Exists") ) ) { if( fi.isDir() ) m_tempPath = K3b::findTempFile( "iso", m_tempPath ); - else if( !QFileInfo( m_tempPath.section( '/', 0, -2 ) ).isDir() ) { + else if( !TQFileInfo( m_tempPath.section( '/', 0, -2 ) ).isDir() ) { emit infoMessage( i18n("Specified an unusable temporary path. Using default."), WARNING ); m_tempPath = K3b::findTempFile( "iso" ); } // else the user specified a file in an existing dir - emit infoMessage( i18n("Writing image file to %1.").arg(m_tempPath), INFO ); + emit infoMessage( i18n("Writing image file to %1.").tqarg(m_tempPath), INFO ); } else return false; @@ -580,12 +580,12 @@ void K3bCdCopyJob::readNextSession() { if( !m_onTheFly || m_onlyCreateImages ) { if( d->numSessions > 1 ) - emit newTask( i18n("Reading Session %1").arg(d->currentReadSession) ); + emit newTask( i18n("Reading Session %1").tqarg(d->currentReadSession) ); else emit newTask( i18n("Reading Source Medium") ); if( d->currentReadSession == 1 ) - emit newSubTask( i18n("Reading track %1 of %2").arg(1).arg(d->toc.count()) ); + emit newSubTask( i18n("Reading track %1 of %2").tqarg(1).tqarg(d->toc.count()) ); } // there is only one situation where we need the audiosessionreader: @@ -594,13 +594,13 @@ void K3bCdCopyJob::readNextSession() if( d->currentReadSession == 1 && d->toc[0].type() == K3bDevice::Track::AUDIO ) { if( !d->audioSessionReader ) { d->audioSessionReader = new K3bAudioSessionReadingJob( this, this ); - connect( d->audioSessionReader, SIGNAL(nextTrack(int, int)), - this, SLOT(slotReadingNextTrack(int, int)) ); + connect( d->audioSessionReader, TQT_SIGNAL(nextTrack(int, int)), + this, TQT_SLOT(slotReadingNextTrack(int, int)) ); connectSubJob( d->audioSessionReader, - SLOT(slotSessionReaderFinished(bool)), + TQT_SLOT(slotSessionReaderFinished(bool)), true, - SLOT(slotReaderProgress(int)), - SLOT(slotReaderSubProgress(int)) ); + TQT_SLOT(slotReaderProgress(int)), + TQT_SLOT(slotReaderSubProgress(int)) ); } d->audioSessionReader->setDevice( m_readerDevice ); @@ -619,12 +619,12 @@ void K3bCdCopyJob::readNextSession() else { if( !d->dataTrackReader ) { d->dataTrackReader = new K3bDataTrackReader( this, this ); - connect( d->dataTrackReader, SIGNAL(percent(int)), this, SLOT(slotReaderProgress(int)) ); - connect( d->dataTrackReader, SIGNAL(processedSize(int, int)), this, SLOT(slotReaderProcessedSize(int, int)) ); - connect( d->dataTrackReader, SIGNAL(finished(bool)), this, SLOT(slotSessionReaderFinished(bool)) ); - connect( d->dataTrackReader, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->dataTrackReader, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->dataTrackReader, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotReaderProgress(int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(processedSize(int, int)), this, TQT_SLOT(slotReaderProcessedSize(int, int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotSessionReaderFinished(bool)) ); + connect( d->dataTrackReader, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } d->dataTrackReader->setDevice( m_readerDevice ); @@ -677,17 +677,17 @@ bool K3bCdCopyJob::writeNextSession() // we emit our own task since the cdrecord task is way too simple if( d->numSessions > 1 ) { if( m_simulate ) - emit newTask( i18n("Simulating Session %1").arg(d->currentWrittenSession) ); + emit newTask( i18n("Simulating Session %1").tqarg(d->currentWrittenSession) ); else if( m_copies > 1 ) - emit newTask( i18n("Writing Copy %1 (Session %2)").arg(d->doneCopies+1).arg(d->currentWrittenSession) ); + emit newTask( i18n("Writing Copy %1 (Session %2)").tqarg(d->doneCopies+1).tqarg(d->currentWrittenSession) ); else - emit newTask( i18n("Writing Copy (Session %2)").arg(d->currentWrittenSession) ); + emit newTask( i18n("Writing Copy (Session %2)").tqarg(d->currentWrittenSession) ); } else { if( m_simulate ) emit newTask( i18n("Simulating") ); else if( m_copies > 1 ) - emit newTask( i18n("Writing Copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Writing Copy %1").tqarg(d->doneCopies+1) ); else emit newTask( i18n("Writing Copy") ); } @@ -707,20 +707,20 @@ bool K3bCdCopyJob::writeNextSession() if( !d->cdrecordWriter ) { d->cdrecordWriter = new K3bCdrecordWriter( m_writerDevice, this, this ); - connect( d->cdrecordWriter, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->cdrecordWriter, SIGNAL(percent(int)), this, SLOT(slotWriterProgress(int)) ); - connect( d->cdrecordWriter, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) ); - connect( d->cdrecordWriter, SIGNAL(subPercent(int)), this, SIGNAL(subPercent(int)) ); - connect( d->cdrecordWriter, SIGNAL(processedSubSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( d->cdrecordWriter, SIGNAL(nextTrack(int, int)), this, SLOT(slotWritingNextTrack(int, int)) ); - connect( d->cdrecordWriter, SIGNAL(buffer(int)), this, SIGNAL(bufferStatus(int)) ); - connect( d->cdrecordWriter, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( d->cdrecordWriter, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); - connect( d->cdrecordWriter, SIGNAL(finished(bool)), this, SLOT(slotWriterFinished(bool)) ); - // connect( d->cdrecordWriter, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - connect( d->cdrecordWriter, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( d->cdrecordWriter, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotWriterProgress(int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(subPercent(int)), this, TQT_SIGNAL(subPercent(int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(processedSubSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(nextTrack(int, int)), this, TQT_SLOT(slotWritingNextTrack(int, int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(buffer(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotWriterFinished(bool)) ); + // connect( d->cdrecordWriter, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( d->cdrecordWriter, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } d->cdrecordWriter->setBurnDevice( m_writerDevice ); @@ -742,7 +742,7 @@ bool K3bCdCopyJob::writeNextSession() // // create the inf files if not already done // - if( d->infNames.isEmpty() || !QFile::exists( d->infNames[0] ) ) { + if( d->infNames.isEmpty() || !TQFile::exists( d->infNames[0] ) ) { unsigned int trackNumber = 1; @@ -773,7 +773,7 @@ bool K3bCdCopyJob::writeNextSession() // It is important that the files have the ending inf because // cdrecord only checks this - KTempFile tmp( QString::null, ".inf" ); + KTempFile tmp( TQString(), ".inf" ); d->infNames.append( tmp.name() ); bool success = d->infFileWriter->save( *tmp.textStream() ); tmp.close(); @@ -841,7 +841,7 @@ bool K3bCdCopyJob::writeNextSession() } else { // make sure the writer job does not create raw cdtext - d->cdrecordWriter->setRawCdText( QByteArray() ); + d->cdrecordWriter->setRawCdText( TQByteArray() ); // cdrecord will use the cdtext data in the inf files d->cdrecordWriter->addArgument( "-text" ); } @@ -923,7 +923,7 @@ bool K3bCdCopyJob::writeNextSession() trackLen = trackLen * 2056; // see k3bdatatrackreader.h else trackLen = trackLen * 2332; // see k3bdatatrackreader.h - d->cdrecordWriter->addArgument( QString("-tsize=%1").arg(trackLen) )->addArgument("-"); + d->cdrecordWriter->addArgument( TQString("-tsize=%1").tqarg(trackLen) )->addArgument("-"); } else if( d->toc.contentType() == K3bDevice::MIXED ) d->cdrecordWriter->addArgument( d->imageNames[d->toc.count()-1] ); @@ -931,7 +931,7 @@ bool K3bCdCopyJob::writeNextSession() d->cdrecordWriter->addArgument( d->imageNames[d->currentWrittenSession-1] ); // clear cd text from previous sessions - d->cdrecordWriter->setRawCdText( QByteArray() ); + d->cdrecordWriter->setRawCdText( TQByteArray() ); } @@ -953,7 +953,7 @@ void K3bCdCopyJob::slotSessionReaderFinished( bool success ) if( success ) { if( d->numSessions > 1 ) - emit infoMessage( i18n("Successfully read session %1.").arg(d->currentReadSession), SUCCESS ); + emit infoMessage( i18n("Successfully read session %1.").tqarg(d->currentReadSession), SUCCESS ); else emit infoMessage( i18n("Successfully read source disk."), SUCCESS ); @@ -987,7 +987,7 @@ void K3bCdCopyJob::slotSessionReaderFinished( bool success ) } else { if( !d->canceled ) { - emit infoMessage( i18n("Error while reading session %1.").arg(d->currentReadSession), ERROR ); + emit infoMessage( i18n("Error while reading session %1.").tqarg(d->currentReadSession), ERROR ); if( m_onTheFly ) d->cdrecordWriter->setSourceUnreadable(true); } @@ -1015,8 +1015,8 @@ void K3bCdCopyJob::slotWriterFinished( bool success ) // reload the media emit newSubTask( i18n("Reloading the medium") ); - connect( K3bDevice::reload( m_writerDevice ), SIGNAL(finished(K3bDevice::DeviceHandler*)), - this, SLOT(slotMediaReloadedForNextSession(K3bDevice::DeviceHandler*)) ); + connect( K3bDevice::reload( m_writerDevice ), TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), + this, TQT_SLOT(slotMediaReloadedForNextSession(K3bDevice::DeviceHandler*)) ); } else { d->doneCopies++; @@ -1073,14 +1073,14 @@ void K3bCdCopyJob::cleanup() { if( m_onTheFly || !m_keepImage || ((d->canceled || d->error) && !d->readingSuccessful) ) { emit infoMessage( i18n("Removing temporary files."), INFO ); - for( QStringList::iterator it = d->infNames.begin(); it != d->infNames.end(); ++it ) - QFile::remove( *it ); + for( TQStringList::iterator it = d->infNames.begin(); it != d->infNames.end(); ++it ) + TQFile::remove( *it ); } if( !m_onTheFly && (!m_keepImage || ((d->canceled || d->error) && !d->readingSuccessful)) ) { emit infoMessage( i18n("Removing image files."), INFO ); - for( QStringList::iterator it = d->imageNames.begin(); it != d->imageNames.end(); ++it ) - QFile::remove( *it ); + for( TQStringList::iterator it = d->imageNames.begin(); it != d->imageNames.end(); ++it ) + TQFile::remove( *it ); // remove the tempdir created in prepareImageFiles() if( d->deleteTempDir ) { @@ -1137,14 +1137,14 @@ void K3bCdCopyJob::slotWritingNextTrack( int t, int tt ) { if( d->toc.contentType() == K3bDevice::MIXED ) { if( d->currentWrittenSession == 1 ) - emit newSubTask( i18n("Writing track %1 of %2").arg(t).arg(d->toc.count()) ); + emit newSubTask( i18n("Writing track %1 of %2").tqarg(t).tqarg(d->toc.count()) ); else - emit newSubTask( i18n("Writing track %1 of %2").arg(d->toc.count()).arg(d->toc.count()) ); + emit newSubTask( i18n("Writing track %1 of %2").tqarg(d->toc.count()).tqarg(d->toc.count()) ); } else if( d->numSessions > 1 ) - emit newSubTask( i18n("Writing track %1 of %2").arg(d->currentWrittenSession).arg(d->toc.count()) ); + emit newSubTask( i18n("Writing track %1 of %2").tqarg(d->currentWrittenSession).tqarg(d->toc.count()) ); else - emit newSubTask( i18n("Writing track %1 of %2").arg(t).arg(tt) ); + emit newSubTask( i18n("Writing track %1 of %2").tqarg(t).tqarg(tt) ); } @@ -1159,12 +1159,12 @@ void K3bCdCopyJob::slotReadingNextTrack( int t, int ) else track = d->currentReadSession; - emit newSubTask( i18n("Reading track %1 of %2").arg(track).arg(d->toc.count()) ); + emit newSubTask( i18n("Reading track %1 of %2").tqarg(track).tqarg(d->toc.count()) ); } } -QString K3bCdCopyJob::jobDescription() const +TQString K3bCdCopyJob::jobDescription() const { if( m_onlyCreateImages ) { return i18n("Creating CD Image"); @@ -1184,7 +1184,7 @@ QString K3bCdCopyJob::jobDescription() const } -QString K3bCdCopyJob::jobDetails() const +TQString K3bCdCopyJob::jobDetails() const { return i18n("Creating 1 copy", "Creating %n copies", diff --git a/libk3b/jobs/k3bcdcopyjob.h b/libk3b/jobs/k3bcdcopyjob.h index 3ab77e8..65c7e9f 100644 --- a/libk3b/jobs/k3bcdcopyjob.h +++ b/libk3b/jobs/k3bcdcopyjob.h @@ -32,16 +32,17 @@ namespace K3bDevice { class LIBK3B_EXPORT K3bCdCopyJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bCdCopyJob( K3bJobHandler* hdl, QObject* parent = 0 ); + K3bCdCopyJob( K3bJobHandler* hdl, TQObject* tqparent = 0 ); ~K3bCdCopyJob(); K3bDevice::Device* writer() const { return m_onlyCreateImages ? 0 : m_writerDevice; } K3bDevice::Device* reader() const { return m_readerDevice; } - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); @@ -56,7 +57,7 @@ class LIBK3B_EXPORT K3bCdCopyJob : public K3bBurnJob void setKeepImage( bool b ) { m_keepImage = b; } void setOnlyCreateImage( bool b ) { m_onlyCreateImages = b; } void setSimulate( bool b ) { m_simulate = b; } - void setTempPath( const QString& path ) { m_tempPath= path; } + void setTempPath( const TQString& path ) { m_tempPath= path; } void setCopies( unsigned int c ) { m_copies = c; } void setParanoiaMode( int i ) { m_paranoiaMode = i; } void setIgnoreDataReadErrors( bool b ) { m_ignoreDataReadErrors = b; } @@ -107,7 +108,7 @@ class LIBK3B_EXPORT K3bCdCopyJob : public K3bBurnJob int m_audioReadRetries; bool m_preferCdText; bool m_copyCdText; - QString m_tempPath; + TQString m_tempPath; int m_writingMode; class Private; diff --git a/libk3b/jobs/k3bcdda2wavreader.cpp b/libk3b/jobs/k3bcdda2wavreader.cpp index 3df87d3..901f77b 100644 --- a/libk3b/jobs/k3bcdda2wavreader.cpp +++ b/libk3b/jobs/k3bcdda2wavreader.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include class K3bCdda2wavReader::Private @@ -48,12 +48,12 @@ public: int fdToWriteTo; int currentTrack; - QValueVector trackOffsets; + TQValueVector trackOffsets; }; -K3bCdda2wavReader::K3bCdda2wavReader( QObject* parent, const char* name ) - : K3bJob( parent, name ) +K3bCdda2wavReader::K3bCdda2wavReader( TQObject* tqparent, const char* name ) + : K3bJob( tqparent, name ) { d = new Private(); } @@ -95,7 +95,7 @@ void K3bCdda2wavReader::start( bool onlyInfo ) d->cdda2wavBin = k3bcore->externalBinManager()->binObject( "cdda2wav" ); if( !d->cdda2wavBin ) { - emit infoMessage( i18n("Could not find %1 executable.").arg("cdda2wav"), ERROR ); + emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdda2wav"), ERROR ); jobFinished(false); d->running = false; return; @@ -107,15 +107,15 @@ void K3bCdda2wavReader::start( bool onlyInfo ) d->process->setSplitStdout(true); d->process->setSuppressEmptyLines(true); d->process->setWorkingDirectory( m_imagePath ); - connect( d->process, SIGNAL(stdoutLine(const QString&)), this, SLOT(slotProcessLine(const QString&)) ); - connect( d->process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotProcessLine(const QString&)) ); - connect( d->process, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*)) ); + connect( d->process, TQT_SIGNAL(stdoutLine(const TQString&)), this, TQT_SLOT(slotProcessLine(const TQString&)) ); + connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotProcessLine(const TQString&)) ); + connect( d->process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*)) ); // create the command line *d->process << d->cdda2wavBin->path; *d->process << "-vall" << ( d->cdda2wavBin->hasFeature( "gui" ) ? "-gui" : "-g" ); if( d->cdda2wavBin->hasFeature( "dev" ) ) - *d->process << QString("dev=%1").arg(K3bDevice::externalBinDeviceParameter(m_device, d->cdda2wavBin)); + *d->process << TQString("dev=%1").tqarg(K3bDevice::externalBinDeviceParameter(m_device, d->cdda2wavBin)); else *d->process << "-D" << K3bDevice::externalBinDeviceParameter(m_device, d->cdda2wavBin); *d->process << ( d->cdda2wavBin->hasFeature( "bulk" ) ? "-bulk" : "-B" ); @@ -125,8 +125,8 @@ void K3bCdda2wavReader::start( bool onlyInfo ) *d->process << ( d->cdda2wavBin->hasFeature( "no-infofile" ) ? "-no-infofile" : "-H" ); // additional user parameters from config - const QStringList& params = d->cdda2wavBin->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = d->cdda2wavBin->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *d->process << *it; // start the thing @@ -134,7 +134,7 @@ void K3bCdda2wavReader::start( bool onlyInfo ) // something went wrong when starting the program // it "should" be the executable kdDebug() << "(K3bCdda2wavReader) could not start cdda2wav" << endl; - emit infoMessage( i18n("Could not start %1.").arg("cdda2wav"), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg("cdda2wav"), K3bJob::ERROR ); d->running = false; jobFinished(false); } @@ -152,7 +152,7 @@ void K3bCdda2wavReader::cancel() } -void K3bCdda2wavReader::slotProcessLine( const QString& line ) +void K3bCdda2wavReader::slotProcessLine( const TQString& line ) { // Tracks:11 44:37.30 // CDINDEX discid: ZvzBXv614ACgzn1bWWy107cs0nA- @@ -179,11 +179,11 @@ void K3bCdda2wavReader::slotProcessLine( const QString& line ) - static QRegExp rx( "T\\d\\d:" ); + static TQRegExp rx( "T\\d\\d:" ); if( rx.exactMatch( line.left(4) ) || line.startsWith( "Leadout" ) ) { - int pos = line.find( " " ); - int endpos = line.find( QRegExp( "\\d" ), pos ); - endpos = line.find( " ", endpos ); + int pos = line.tqfind( " " ); + int endpos = line.tqfind( TQRegExp( "\\d" ), pos ); + endpos = line.tqfind( " ", endpos ); bool ok; int offset = line.mid( pos, endpos-pos ).toInt(&ok); if( ok ) @@ -198,12 +198,12 @@ void K3bCdda2wavReader::slotProcessLine( const QString& line ) emit nextTrack( d->currentTrack, d->trackOffsets.count() ); } - else if( line.contains("successfully recorded") ) { + else if( line.tqcontains("successfully recorded") ) { d->currentTrack++; emit nextTrack( d->currentTrack, d->trackOffsets.count() ); } - else if( line.contains("%") ) { + else if( line.tqcontains("%") ) { // parse progress bool ok; int p = line.left(3).toInt(&ok); @@ -240,12 +240,12 @@ void K3bCdda2wavReader::slotProcessExited( KProcess* p ) } else { emit infoMessage( i18n("%1 returned an unknown error (code %2).") - .arg("Cdda2wav").arg(p->exitStatus()), ERROR ); + .tqarg("Cdda2wav").tqarg(p->exitStatus()), ERROR ); jobFinished( false ); } } else { - emit infoMessage( i18n("%1 did not exit cleanly.").arg("Cdda2wav"), + emit infoMessage( i18n("%1 did not exit cleanly.").tqarg("Cdda2wav"), ERROR ); jobFinished( false ); } diff --git a/libk3b/jobs/k3bcdda2wavreader.h b/libk3b/jobs/k3bcdda2wavreader.h index edde65c..938e1a5 100644 --- a/libk3b/jobs/k3bcdda2wavreader.h +++ b/libk3b/jobs/k3bcdda2wavreader.h @@ -32,9 +32,10 @@ namespace K3bDevice { class K3bCdda2wavReader : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bCdda2wavReader( QObject* parent = 0, const char* name = 0 ); + K3bCdda2wavReader( TQObject* tqparent = 0, const char* name = 0 ); ~K3bCdda2wavReader(); bool active() const; @@ -45,7 +46,7 @@ class K3bCdda2wavReader : public K3bJob void cancel(); void setReadDevice( K3bDevice::Device* dev ) { m_device = dev; } - void setImagePath( const QString& p ) { m_imagePath = p; } + void setImagePath( const TQString& p ) { m_imagePath = p; } /** * the data gets written directly into fd instead of the imagefile. @@ -55,13 +56,13 @@ class K3bCdda2wavReader : public K3bJob void writeToFd( int fd ); private slots: - void slotProcessLine( const QString& ); + void slotProcessLine( const TQString& ); void slotProcessExited( KProcess* ); private: K3bDevice::Device* m_device; - QString m_imagePath; + TQString m_imagePath; class Private; Private* d; diff --git a/libk3b/jobs/k3bclonejob.cpp b/libk3b/jobs/k3bclonejob.cpp index 9fb61ab..89c1c1f 100644 --- a/libk3b/jobs/k3bclonejob.cpp +++ b/libk3b/jobs/k3bclonejob.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include @@ -43,8 +43,8 @@ public: }; -K3bCloneJob::K3bCloneJob( K3bJobHandler* hdl, QObject* parent, const char* name ) - : K3bBurnJob( hdl, parent, name ), +K3bCloneJob::K3bCloneJob( K3bJobHandler* hdl, TQObject* tqparent, const char* name ) + : K3bBurnJob( hdl, tqparent, name ), m_writerDevice(0), m_readerDevice(0), m_writerJob(0), @@ -85,13 +85,13 @@ void K3bCloneJob::start() // const K3bExternalBin* cdrecordBin = k3bcore->externalBinManager()->binObject( "cdrecord" ); if( !cdrecordBin ) { - emit infoMessage( i18n("Could not find %1 executable.").arg("cdrecord"), ERROR ); + emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("cdrecord"), ERROR ); jobFinished(false); m_running = false; return; } else if( !cdrecordBin->hasFeature( "clone" ) ) { - emit infoMessage( i18n("Cdrecord version %1 does not have cloning support.").arg(cdrecordBin->version), ERROR ); + emit infoMessage( i18n("Cdrecord version %1 does not have cloning support.").tqarg(cdrecordBin->version), ERROR ); jobFinished(false); m_running = false; return; @@ -109,8 +109,8 @@ void K3bCloneJob::start() if( !writer()->supportsWritingMode( K3bDevice::RAW_R96R ) && !writer()->supportsWritingMode( K3bDevice::RAW_R16 ) ) { emit infoMessage( i18n("CD writer %1 does not support cloning.") - .arg(writer()->vendor()) - .arg(writer()->description()), ERROR ); + .tqarg(writer()->vendor()) + .tqarg(writer()->description()), ERROR ); m_running = false; jobFinished(false); return; @@ -120,7 +120,7 @@ void K3bCloneJob::start() if( m_imagePath.isEmpty() ) { m_imagePath = K3b::findTempFile( "img" ); } - else if( QFileInfo(m_imagePath).isDir() ) { + else if( TQFileInfo(m_imagePath).isDir() ) { m_imagePath = K3b::findTempFile( "img", m_imagePath ); } @@ -152,14 +152,14 @@ void K3bCloneJob::prepareReader() { if( !m_readcdReader ) { m_readcdReader = new K3bReadcdReader( this, this ); - connect( m_readcdReader, SIGNAL(percent(int)), this, SLOT(slotReadingPercent(int)) ); - connect( m_readcdReader, SIGNAL(percent(int)), this, SIGNAL(subPercent(int)) ); - connect( m_readcdReader, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( m_readcdReader, SIGNAL(finished(bool)), this, SLOT(slotReadingFinished(bool)) ); - connect( m_readcdReader, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_readcdReader, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( m_readcdReader, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( m_readcdReader, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotReadingPercent(int)) ); + connect( m_readcdReader, TQT_SIGNAL(percent(int)), this, TQT_SIGNAL(subPercent(int)) ); + connect( m_readcdReader, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( m_readcdReader, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotReadingFinished(bool)) ); + connect( m_readcdReader, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_readcdReader, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( m_readcdReader, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } m_readcdReader->setReadDevice( readingDevice() ); @@ -175,19 +175,19 @@ void K3bCloneJob::prepareWriter() { if( !m_writerJob ) { m_writerJob = new K3bCdrecordWriter( writer(), this, this ); - connect( m_writerJob, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_writerJob, SIGNAL(percent(int)), this, SLOT(slotWriterPercent(int)) ); - connect( m_writerJob, SIGNAL(percent(int)), this, SIGNAL(subPercent(int)) ); - connect( m_writerJob, SIGNAL(nextTrack(int, int)), this, SLOT(slotWriterNextTrack(int, int)) ); - connect( m_writerJob, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSubSize(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(slotWriterFinished(bool)) ); - // connect( m_writerJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - 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(slotWriterPercent(int)) ); + connect( m_writerJob, TQT_SIGNAL(percent(int)), this, TQT_SIGNAL(subPercent(int)) ); + connect( m_writerJob, TQT_SIGNAL(nextTrack(int, int)), this, TQT_SLOT(slotWriterNextTrack(int, int)) ); + connect( m_writerJob, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSubSize(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(slotWriterFinished(bool)) ); + // connect( m_writerJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + 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&)) ); } m_writerJob->clearArguments(); @@ -222,7 +222,7 @@ void K3bCloneJob::slotWriterPercent( int p ) void K3bCloneJob::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) ); } @@ -239,7 +239,7 @@ void K3bCloneJob::slotWriterFinished( bool success ) if( success ) { d->doneCopies++; - emit infoMessage( i18n("Successfully written clone copy %1.").arg(d->doneCopies), INFO ); + emit infoMessage( i18n("Successfully written clone copy %1.").tqarg(d->doneCopies), INFO ); if( d->doneCopies < m_copies ) { K3bDevice::eject( writer() ); @@ -330,7 +330,7 @@ void K3bCloneJob::startWriting() if( m_simulate ) emit newTask( i18n("Simulating clone copy") ); else - emit newTask( i18n("Writing clone copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Writing clone copy %1").tqarg(d->doneCopies+1) ); m_writerJob->start(); } @@ -340,15 +340,15 @@ void K3bCloneJob::removeImageFiles() { if( !m_onlyBurnExistingImage ) { emit infoMessage( i18n("Removing image files."), INFO ); - if( QFile::exists( m_imagePath ) ) - QFile::remove( m_imagePath ); - if( QFile::exists( m_imagePath + ".toc" ) ) - QFile::remove( m_imagePath + ".toc" ); + if( TQFile::exists( m_imagePath ) ) + TQFile::remove( m_imagePath ); + if( TQFile::exists( m_imagePath + ".toc" ) ) + TQFile::remove( m_imagePath + ".toc" ); } } -QString K3bCloneJob::jobDescription() const +TQString K3bCloneJob::jobDescription() const { if( m_onlyCreateImage ) return i18n("Creating Clone Image"); @@ -365,7 +365,7 @@ QString K3bCloneJob::jobDescription() const } -QString K3bCloneJob::jobDetails() const +TQString K3bCloneJob::jobDetails() const { return i18n("Creating 1 clone copy", "Creating %n clone copies", diff --git a/libk3b/jobs/k3bclonejob.h b/libk3b/jobs/k3bclonejob.h index 80c8ea9..e928f3c 100644 --- a/libk3b/jobs/k3bclonejob.h +++ b/libk3b/jobs/k3bclonejob.h @@ -18,7 +18,7 @@ #include #include "k3b_export.h" -#include +#include namespace K3bDevice { @@ -31,16 +31,17 @@ class K3bReadcdReader; class LIBK3B_EXPORT K3bCloneJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bCloneJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bCloneJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bCloneJob(); K3bDevice::Device* writer() const { return m_writerDevice; } K3bDevice::Device* readingDevice() const { return m_readerDevice; } - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); @@ -48,7 +49,7 @@ class LIBK3B_EXPORT K3bCloneJob : public K3bBurnJob void setWriterDevice( K3bDevice::Device* w ) { m_writerDevice = w; } void setReaderDevice( K3bDevice::Device* w ) { m_readerDevice = w; } - void setImagePath( const QString& p ) { m_imagePath = p; } + void setImagePath( const TQString& p ) { m_imagePath = p; } void setNoCorrection( bool b ) { m_noCorrection = b; } void setRemoveImageFiles( bool b ) { m_removeImageFiles = b; } void setOnlyCreateImage( bool b ) { m_onlyCreateImage = b; } @@ -73,7 +74,7 @@ class LIBK3B_EXPORT K3bCloneJob : public K3bBurnJob K3bDevice::Device* m_writerDevice; K3bDevice::Device* m_readerDevice; - QString m_imagePath; + TQString m_imagePath; K3bCdrecordWriter* m_writerJob; K3bReadcdReader* m_readcdReader; diff --git a/libk3b/jobs/k3bclonetocreader.cpp b/libk3b/jobs/k3bclonetocreader.cpp index 5dd8b8b..2122937 100644 --- a/libk3b/jobs/k3bclonetocreader.cpp +++ b/libk3b/jobs/k3bclonetocreader.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include @@ -35,12 +35,12 @@ public: } K3b::Msf size; - QString tocFile; + TQString tocFile; }; -K3bCloneTocReader::K3bCloneTocReader( const QString& filename ) +K3bCloneTocReader::K3bCloneTocReader( const TQString& filename ) : K3bImageFileReader() { d = new Private; @@ -74,8 +74,8 @@ void K3bCloneTocReader::readFile() d->tocFile = filename() + ".toc"; // now get rid of the ".toc" extension - QString imageFileName = d->tocFile.left( d->tocFile.length()-4 ); - if( !QFile::exists( imageFileName ) ) { + TQString imageFileName = d->tocFile.left( d->tocFile.length()-4 ); + if( !TQFile::exists( imageFileName ) ) { kdDebug() << "(K3bCloneTocReader) could not find image file " << imageFileName << endl; return; } @@ -84,7 +84,7 @@ void K3bCloneTocReader::readFile() d->size = 0; - QFile f( d->tocFile ); + TQFile f( d->tocFile ); if( f.open( IO_ReadOnly ) ) { // // Inspired by clone.c from the cdrecord sources diff --git a/libk3b/jobs/k3bclonetocreader.h b/libk3b/jobs/k3bclonetocreader.h index 17e80d7..6336050 100644 --- a/libk3b/jobs/k3bclonetocreader.h +++ b/libk3b/jobs/k3bclonetocreader.h @@ -30,7 +30,7 @@ class LIBK3B_EXPORT K3bCloneTocReader : public K3bImageFileReader { public: - K3bCloneTocReader( const QString& filename = QString::null ); + K3bCloneTocReader( const TQString& filename = TQString() ); ~K3bCloneTocReader(); const K3b::Msf& imageSize() const; diff --git a/libk3b/jobs/k3bdatatrackreader.cpp b/libk3b/jobs/k3bdatatrackreader.cpp index 8300ada..85a14cd 100644 --- a/libk3b/jobs/k3bdatatrackreader.cpp +++ b/libk3b/jobs/k3bdatatrackreader.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include @@ -57,7 +57,7 @@ public: K3b::Msf m_lastSector; K3b::Msf m_nextReadSector; int m_fd; - QString m_imagePath; + TQString m_imagePath; int m_sectorSize; bool m_useLibdvdcss; K3bLibDvdCss* m_libcss; @@ -71,8 +71,8 @@ private: }; -K3bDataTrackReader::K3bDataTrackReader( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bThreadJob( jh, parent, name ) +K3bDataTrackReader::K3bDataTrackReader( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bThreadJob( jh, tqparent, name ) { m_thread = new WorkThread(); setThread( m_thread ); @@ -109,7 +109,7 @@ void K3bDataTrackReader::WorkThread::run() emitStarted(); if( !m_device->open() ) { - emitInfoMessage( i18n("Could not open device %1").arg(m_device->blockDeviceName()), K3bJob::ERROR ); + emitInfoMessage( i18n("Could not open device %1").tqarg(m_device->blockDeviceName()), K3bJob::ERROR ); emitFinished(false); return; } @@ -142,7 +142,7 @@ void K3bDataTrackReader::WorkThread::run() } if( !m_libcss->open(m_device) ) { - emitInfoMessage( i18n("Could not open device %1").arg(m_device->blockDeviceName()), K3bJob::ERROR ); + emitInfoMessage( i18n("Could not open device %1").tqarg(m_device->blockDeviceName()), K3bJob::ERROR ); emitFinished(false); return; } @@ -183,23 +183,23 @@ void K3bDataTrackReader::WorkThread::run() } } - emitInfoMessage( i18n("Reading with sector size %1.").arg(m_usedSectorSize), K3bJob::INFO ); + emitInfoMessage( i18n("Reading with sector size %1.").tqarg(m_usedSectorSize), K3bJob::INFO ); emitDebuggingOutput( "K3bDataTrackReader", - QString("reading sectors %1 to %2 with sector size %3. Length: %4 sectors, %5 bytes.") - .arg( m_firstSector.lba() ) - .arg( m_lastSector.lba() ) - .arg( m_usedSectorSize ) - .arg( m_lastSector.lba() - m_firstSector.lba() + 1 ) - .arg( Q_UINT64(m_usedSectorSize) * (Q_UINT64)(m_lastSector.lba() - m_firstSector.lba() + 1) ) ); - - QFile file; + TQString("reading sectors %1 to %2 with sector size %3. Length: %4 sectors, %5 bytes.") + .tqarg( m_firstSector.lba() ) + .tqarg( m_lastSector.lba() ) + .tqarg( m_usedSectorSize ) + .tqarg( m_lastSector.lba() - m_firstSector.lba() + 1 ) + .tqarg( TQ_UINT64(m_usedSectorSize) * (TQ_UINT64)(m_lastSector.lba() - m_firstSector.lba() + 1) ) ); + + TQFile file; if( m_fd == -1 ) { file.setName( m_imagePath ); if( !file.open( IO_WriteOnly ) ) { m_device->close(); if( m_useLibdvdcss ) m_libcss->close(); - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(m_imagePath), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(m_imagePath), K3bJob::ERROR ); emitFinished( false ); return; } @@ -231,7 +231,7 @@ void K3bDataTrackReader::WorkThread::run() // s_bufferSizeSectors = K3bDevice::determineMaxReadingBufferSize( m_device, m_firstSector ); if( s_bufferSizeSectors <= 0 ) { - emitInfoMessage( i18n("Error while reading sector %1.").arg(m_firstSector.lba()), K3bJob::ERROR ); + emitInfoMessage( i18n("Error while reading sector %1.").tqarg(m_firstSector.lba()), K3bJob::ERROR ); emitFinished(false); m_device->block( false ); k3bcore->unblockDevice( m_device ); @@ -239,7 +239,7 @@ void K3bDataTrackReader::WorkThread::run() } kdDebug() << "(K3bDataTrackReader) using buffer size of " << s_bufferSizeSectors << " blocks." << endl; - emitDebuggingOutput( "K3bDataTrackReader", QString("using buffer size of %1 blocks.").arg( s_bufferSizeSectors ) ); + emitDebuggingOutput( "K3bDataTrackReader", TQString("using buffer size of %1 blocks.").tqarg( s_bufferSizeSectors ) ); // 2. get it on K3b::Msf currentSector = m_firstSector; @@ -253,7 +253,7 @@ void K3bDataTrackReader::WorkThread::run() int bufferLen = s_bufferSizeSectors*m_usedSectorSize; while( !m_canceled && currentSector <= m_lastSector ) { - int maxReadSectors = QMIN( bufferLen/m_usedSectorSize, m_lastSector.lba()-currentSector.lba()+1 ); + int maxReadSectors = TQMIN( bufferLen/m_usedSectorSize, m_lastSector.lba()-currentSector.lba()+1 ); int readSectors = read( buffer, currentSector.lba(), @@ -278,8 +278,8 @@ void K3bDataTrackReader::WorkThread::run() kdDebug() << "(K3bDataTrackReader::WorkThread) error while writing to fd " << m_fd << " current sector: " << (currentSector.lba()-m_firstSector.lba()) << endl; emitDebuggingOutput( "K3bDataTrackReader", - QString("Error while writing to fd %1. Current sector is %2.") - .arg(m_fd).arg(currentSector.lba()-m_firstSector.lba()) ); + TQString("Error while writing to fd %1. Current sector is %2.") + .tqarg(m_fd).tqarg(currentSector.lba()-m_firstSector.lba()) ); writeError = true; break; } @@ -289,8 +289,8 @@ void K3bDataTrackReader::WorkThread::run() kdDebug() << "(K3bDataTrackReader::WorkThread) error while writing to file " << m_imagePath << " current sector: " << (currentSector.lba()-m_firstSector.lba()) << endl; emitDebuggingOutput( "K3bDataTrackReader", - QString("Error while writing to file %1. Current sector is %2.") - .arg(m_imagePath).arg(currentSector.lba()-m_firstSector.lba()) ); + TQString("Error while writing to file %1. Current sector is %2.") + .tqarg(m_imagePath).tqarg(currentSector.lba()-m_firstSector.lba()) ); writeError = true; break; } @@ -330,9 +330,9 @@ void K3bDataTrackReader::WorkThread::run() delete [] buffer; emitDebuggingOutput( "K3bDataTrackReader", - QString("Read a total of %1 sectors (%2 bytes)") - .arg(totalReadSectors.lba()) - .arg((Q_UINT64)totalReadSectors.lba()*(Q_UINT64)m_usedSectorSize) ); + TQString("Read a total of %1 sectors (%2 bytes)") + .tqarg(totalReadSectors.lba()) + .tqarg((TQ_UINT64)totalReadSectors.lba()*(TQ_UINT64)m_usedSectorSize) ); if( m_canceled ) emitCanceled(); @@ -386,8 +386,8 @@ int K3bDataTrackReader::WorkThread::read( unsigned char* buffer, unsigned long s // here we read every single sector for itself to find the troubleing ones bool K3bDataTrackReader::WorkThread::retryRead( unsigned char* buffer, unsigned long startSector, unsigned int len ) { - emitDebuggingOutput( "K3bDataTrackReader", QString( "Problem while reading. Retrying from sector %1.").arg(startSector) ); - emitInfoMessage( i18n("Problem while reading. Retrying from sector %1.").arg(startSector), K3bJob::WARNING ); + emitDebuggingOutput( "K3bDataTrackReader", TQString( "Problem while reading. Retrying from sector %1.").tqarg(startSector) ); + emitInfoMessage( i18n("Problem while reading. Retrying from sector %1.").tqarg(startSector), K3bJob::WARNING ); int sectorsRead = -1; bool success = true; @@ -403,16 +403,16 @@ bool K3bDataTrackReader::WorkThread::retryRead( unsigned char* buffer, unsigned if( !success ) { if( m_ignoreReadErrors ) { - emitInfoMessage( i18n("Ignoring read error in sector %1.").arg(sector), K3bJob::ERROR ); - emitDebuggingOutput( "K3bDataTrackReader", QString( "Ignoring read error in sector %1.").arg(sector) ); + emitInfoMessage( i18n("Ignoring read error in sector %1.").tqarg(sector), K3bJob::ERROR ); + emitDebuggingOutput( "K3bDataTrackReader", TQString( "Ignoring read error in sector %1.").tqarg(sector) ); ++m_errorSectorCount; // ::memset( &buffer[i], 0, 1 ); success = true; } else { - emitInfoMessage( i18n("Error while reading sector %1.").arg(sector), K3bJob::ERROR ); - emitDebuggingOutput( "K3bDataTrackReader", QString( "Read error in sector %1.").arg(sector) ); + emitInfoMessage( i18n("Error while reading sector %1.").tqarg(sector), K3bJob::ERROR ); + emitDebuggingOutput( "K3bDataTrackReader", TQString( "Read error in sector %1.").tqarg(sector) ); break; } } @@ -502,7 +502,7 @@ void K3bDataTrackReader::writeToFd( int fd ) } -void K3bDataTrackReader::setImagePath( const QString& p ) +void K3bDataTrackReader::setImagePath( const TQString& p ) { m_thread->m_imagePath = p; m_thread->m_fd = -1; diff --git a/libk3b/jobs/k3bdatatrackreader.h b/libk3b/jobs/k3bdatatrackreader.h index 814c01c..0782079 100644 --- a/libk3b/jobs/k3bdatatrackreader.h +++ b/libk3b/jobs/k3bdatatrackreader.h @@ -41,7 +41,7 @@ namespace K3bDevice { class K3bDataTrackReader : public K3bThreadJob { public: - K3bDataTrackReader( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bDataTrackReader( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bDataTrackReader(); enum SectorSize { @@ -77,7 +77,7 @@ class K3bDataTrackReader : public K3bThreadJob */ void writeToFd( int fd ); - void setImagePath( const QString& p ); + void setImagePath( const TQString& p ); private: class WorkThread; diff --git a/libk3b/jobs/k3bdvdcopyjob.cpp b/libk3b/jobs/k3bdvdcopyjob.cpp index 96d727c..d00cc1d 100644 --- a/libk3b/jobs/k3bdvdcopyjob.cpp +++ b/libk3b/jobs/k3bdvdcopyjob.cpp @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include class K3bDvdCopyJob::Private @@ -83,8 +83,8 @@ public: }; -K3bDvdCopyJob::K3bDvdCopyJob( K3bJobHandler* hdl, QObject* parent, const char* name ) - : K3bBurnJob( hdl, parent, name ), +K3bDvdCopyJob::K3bDvdCopyJob( K3bJobHandler* hdl, TQObject* tqparent, const char* name ) + : K3bBurnJob( hdl, tqparent, name ), m_writerDevice(0), m_readerDevice(0), m_onTheFly(false), @@ -122,7 +122,7 @@ void K3bDvdCopyJob::start() k3bcore->externalBinManager()->binObject( "growisofs" )->version < K3bVersion( 5, 12 ) ) { m_onTheFly = false; emit infoMessage( i18n("K3b does not support writing on-the-fly with growisofs %1.") - .arg(k3bcore->externalBinManager()->binObject( "growisofs" )->version), ERROR ); + .tqarg(k3bcore->externalBinManager()->binObject( "growisofs" )->version), ERROR ); emit infoMessage( i18n("Disabling on-the-fly writing."), INFO ); } @@ -141,9 +141,9 @@ void K3bDvdCopyJob::start() emit newSubTask( i18n("Checking source medium") ); connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::DISKINFO, m_readerDevice ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); } @@ -293,19 +293,19 @@ void K3bDvdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) // // Check the image path // - QFileInfo fi( m_imagePath ); + TQFileInfo fi( m_imagePath ); if( !fi.isFile() || - questionYesNo( i18n("Do you want to overwrite %1?").arg(m_imagePath), + questionYesNo( i18n("Do you want to overwrite %1?").tqarg(m_imagePath), i18n("File Exists") ) ) { if( fi.isDir() ) m_imagePath = K3b::findTempFile( "iso", m_imagePath ); - else if( !QFileInfo( m_imagePath.section( '/', 0, -2 ) ).isDir() ) { + else if( !TQFileInfo( m_imagePath.section( '/', 0, -2 ) ).isDir() ) { emit infoMessage( i18n("Specified an unusable temporary path. Using default."), WARNING ); m_imagePath = K3b::findTempFile( "iso" ); } // else the user specified a file in an existing dir - emit infoMessage( i18n("Writing image file to %1.").arg(m_imagePath), INFO ); + emit infoMessage( i18n("Writing image file to %1.").tqarg(m_imagePath), INFO ); emit newSubTask( i18n("Reading source medium.") ); } @@ -314,9 +314,9 @@ void K3bDvdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) // KIO::filesize_t imageSpaceNeeded = (KIO::filesize_t)(d->lastSector.lba()+1)*2048; unsigned long avail, size; - QString pathToTest = m_imagePath.left( m_imagePath.findRev( '/' ) ); + TQString pathToTest = m_imagePath.left( m_imagePath.tqfindRev( '/' ) ); if( !K3b::kbFreeOnFs( pathToTest, size, avail ) ) { - emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").arg(pathToTest), ERROR ); + emit infoMessage( i18n("Unable to determine free space in temporary directory '%1'.").tqarg(pathToTest), ERROR ); jobFinished(false); d->running = false; return; @@ -332,7 +332,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) d->imageFile.setName( m_imagePath ); if( !d->imageFile.open( IO_WriteOnly ) ) { - emit infoMessage( i18n("Unable to open '%1' for writing.").arg(m_imagePath), ERROR ); + emit infoMessage( i18n("Unable to open '%1' for writing.").tqarg(m_imagePath), ERROR ); jobFinished( false ); d->running = false; return; @@ -353,7 +353,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) if( m_simulate ) emit newTask( i18n("Simulating DVD copy") ); else if( m_copies > 1 ) - emit newTask( i18n("Writing DVD copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Writing DVD copy %1").tqarg(d->doneCopies+1) ); else emit newTask( i18n("Writing DVD copy") ); @@ -399,13 +399,13 @@ void K3bDvdCopyJob::prepareReader() { if( !d->dataTrackReader ) { d->dataTrackReader = new K3bDataTrackReader( this ); - connect( d->dataTrackReader, SIGNAL(percent(int)), this, SLOT(slotReaderProgress(int)) ); - connect( d->dataTrackReader, SIGNAL(processedSize(int, int)), this, SLOT(slotReaderProcessedSize(int, int)) ); - connect( d->dataTrackReader, SIGNAL(finished(bool)), this, SLOT(slotReaderFinished(bool)) ); - connect( d->dataTrackReader, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->dataTrackReader, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( d->dataTrackReader, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->dataTrackReader, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotReaderProgress(int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(processedSize(int, int)), this, TQT_SLOT(slotReaderProcessedSize(int, int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotReaderFinished(bool)) ); + connect( d->dataTrackReader, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( d->dataTrackReader, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } d->dataTrackReader->setDevice( m_readerDevice ); @@ -430,18 +430,18 @@ void K3bDvdCopyJob::prepareWriter() d->writerJob = new K3bGrowisofsWriter( m_writerDevice, this ); - connect( d->writerJob, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->writerJob, SIGNAL(percent(int)), this, SLOT(slotWriterProgress(int)) ); - connect( d->writerJob, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) ); - connect( d->writerJob, SIGNAL(processedSubSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( d->writerJob, SIGNAL(buffer(int)), this, SIGNAL(bufferStatus(int)) ); - connect( d->writerJob, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( d->writerJob, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); - connect( d->writerJob, SIGNAL(finished(bool)), this, SLOT(slotWriterFinished(bool)) ); - // connect( d->writerJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - connect( d->writerJob, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( d->writerJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->writerJob, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->writerJob, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotWriterProgress(int)) ); + connect( d->writerJob, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) ); + connect( d->writerJob, TQT_SIGNAL(processedSubSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( d->writerJob, TQT_SIGNAL(buffer(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( d->writerJob, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( d->writerJob, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); + connect( d->writerJob, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotWriterFinished(bool)) ); + // connect( d->writerJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + connect( d->writerJob, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( d->writerJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); // these do only make sense with DVD-R(W) d->writerJob->setSimulate( m_simulate ); @@ -462,7 +462,7 @@ void K3bDvdCopyJob::prepareWriter() d->writerJob->setTrackSize( d->lastSector.lba()+1 ); } - d->writerJob->setImageToWrite( QString::null ); // write to stdin + d->writerJob->setImageToWrite( TQString() ); // write to stdin } @@ -548,7 +548,7 @@ void K3bDvdCopyJob::slotReaderFinished( bool success ) if( waitForDvd() ) { prepareWriter(); if( m_copies > 1 ) - emit newTask( i18n("Writing DVD copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Writing DVD copy %1").tqarg(d->doneCopies+1) ); else emit newTask( i18n("Writing DVD copy") ); @@ -597,30 +597,30 @@ void K3bDvdCopyJob::slotWriterFinished( bool success ) } if( success ) { - emit infoMessage( i18n("Successfully written DVD copy %1.").arg(d->doneCopies+1), INFO ); + emit infoMessage( i18n("Successfully written DVD copy %1.").tqarg(d->doneCopies+1), INFO ); if( d->verifyData && !m_simulate ) { 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(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(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->setDevice( m_writerDevice ); d->verificationJob->addTrack( 1, d->inPipe.checksum(), d->lastSector+1 ); if( m_copies > 1 ) - emit newTask( i18n("Verifying DVD copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Verifying DVD copy %1").tqarg(d->doneCopies+1) ); else emit newTask( i18n("Verifying DVD copy") ); @@ -637,7 +637,7 @@ void K3bDvdCopyJob::slotWriterFinished( bool success ) if( waitForDvd() ) { prepareWriter(); - emit newTask( i18n("Writing DVD copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Writing DVD copy %1").tqarg(d->doneCopies+1) ); emit burning(true); @@ -686,7 +686,7 @@ void K3bDvdCopyJob::slotVerificationFinished( bool success ) if( waitForDvd() ) { prepareWriter(); - emit newTask( i18n("Writing DVD copy %1").arg(d->doneCopies+1) ); + emit newTask( i18n("Writing DVD copy %1").tqarg(d->doneCopies+1) ); emit burning(true); @@ -790,8 +790,8 @@ bool K3bDvdCopyJob::waitForDvd() if( !questionYesNo( i18n("Your writer (%1 %2) does not support simulation with DVD-R(W) media. " "Do you really want to continue? The media will be written " "for real.") - .arg(m_writerDevice->vendor()) - .arg(m_writerDevice->description()), + .tqarg(m_writerDevice->vendor()) + .tqarg(m_writerDevice->description()), i18n("No Simulation with DVD-R(W)") ) ) { cancel(); return false; @@ -839,11 +839,11 @@ bool K3bDvdCopyJob::waitForDvd() if( m_writingMode == K3b::DAO ) { // ( m_writingMode == K3b::WRITING_MODE_AUTO && // ( sizeWithDao || !m_onTheFly ) ) ) { - emit infoMessage( i18n("Writing %1 in DAO mode.").arg( K3bDevice::mediaTypeString(m, true) ), INFO ); + emit infoMessage( i18n("Writing %1 in DAO mode.").tqarg( K3bDevice::mediaTypeString(m, true) ), INFO ); d->usedWritingMode = K3b::DAO; } else { - emit infoMessage( i18n("Writing %1 in incremental mode.").arg( K3bDevice::mediaTypeString(m, true) ), INFO ); + emit infoMessage( i18n("Writing %1 in incremental mode.").tqarg( K3bDevice::mediaTypeString(m, true) ), INFO ); d->usedWritingMode = K3b::WRITING_MODE_INCR_SEQ; } } @@ -857,14 +857,14 @@ bool K3bDvdCopyJob::waitForDvd() void K3bDvdCopyJob::removeImageFiles() { - if( QFile::exists( m_imagePath ) ) { + if( TQFile::exists( m_imagePath ) ) { d->imageFile.remove(); - emit infoMessage( i18n("Removed image file %1").arg(m_imagePath), K3bJob::SUCCESS ); + emit infoMessage( i18n("Removed image file %1").tqarg(m_imagePath), K3bJob::SUCCESS ); } } -QString K3bDvdCopyJob::jobDescription() const +TQString K3bDvdCopyJob::jobDescription() const { if( m_onlyCreateImage ) { return i18n("Creating DVD Image"); @@ -878,7 +878,7 @@ QString K3bDvdCopyJob::jobDescription() const } -QString K3bDvdCopyJob::jobDetails() const +TQString K3bDvdCopyJob::jobDetails() const { return i18n("Creating 1 copy", "Creating %n copies", diff --git a/libk3b/jobs/k3bdvdcopyjob.h b/libk3b/jobs/k3bdvdcopyjob.h index 91da4e9..eb2e51c 100644 --- a/libk3b/jobs/k3bdvdcopyjob.h +++ b/libk3b/jobs/k3bdvdcopyjob.h @@ -18,7 +18,7 @@ #include #include "k3b_export.h" -#include +#include namespace K3bDevice { @@ -30,16 +30,17 @@ namespace K3bDevice { class LIBK3B_EXPORT K3bDvdCopyJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bDvdCopyJob( K3bJobHandler* hdl, QObject* parent = 0, const char* name = 0 ); + K3bDvdCopyJob( K3bJobHandler* hdl, TQObject* tqparent = 0, const char* name = 0 ); ~K3bDvdCopyJob(); K3bDevice::Device* writer() const { return m_onlyCreateImage ? 0 : m_writerDevice; } K3bDevice::Device* readingDevice() const { return m_readerDevice; } - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); @@ -47,7 +48,7 @@ class LIBK3B_EXPORT K3bDvdCopyJob : public K3bBurnJob void setWriterDevice( K3bDevice::Device* w ) { m_writerDevice = w; } void setReaderDevice( K3bDevice::Device* w ) { m_readerDevice = w; } - void setImagePath( const QString& p ) { m_imagePath = p; } + void setImagePath( const TQString& p ) { m_imagePath = p; } void setRemoveImageFiles( bool b ) { m_removeImageFiles = b; } void setOnlyCreateImage( bool b ) { m_onlyCreateImage = b; } void setSimulate( bool b ) { m_simulate = b; } @@ -77,7 +78,7 @@ class LIBK3B_EXPORT K3bDvdCopyJob : public K3bBurnJob K3bDevice::Device* m_writerDevice; K3bDevice::Device* m_readerDevice; - QString m_imagePath; + TQString m_imagePath; bool m_onTheFly; bool m_removeImageFiles; diff --git a/libk3b/jobs/k3bdvdformattingjob.cpp b/libk3b/jobs/k3bdvdformattingjob.cpp index 732e404..62ea78e 100644 --- a/libk3b/jobs/k3bdvdformattingjob.cpp +++ b/libk3b/jobs/k3bdvdformattingjob.cpp @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -71,8 +71,8 @@ public: }; -K3bDvdFormattingJob::K3bDvdFormattingJob( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bBurnJob( jh, parent, name ) +K3bDvdFormattingJob::K3bDvdFormattingJob( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bBurnJob( jh, tqparent, name ) { d = new Private; } @@ -97,18 +97,18 @@ void K3bDvdFormattingJob::setForceNoEject( bool b ) } -QString K3bDvdFormattingJob::jobDescription() const +TQString K3bDvdFormattingJob::jobDescription() const { return i18n("Formatting DVD"); // Formatting DVD±RW } -QString K3bDvdFormattingJob::jobDetails() const +TQString K3bDvdFormattingJob::jobDetails() const { if( d->quick ) return i18n("Quick Format"); else - return QString::null; + return TQString(); } @@ -142,7 +142,7 @@ void K3bDvdFormattingJob::start() K3bDevice::STATE_COMPLETE|K3bDevice::STATE_INCOMPLETE|K3bDevice::STATE_EMPTY, K3bDevice::MEDIA_WRITABLE_DVD, i18n("Please insert a rewritable DVD medium into drive

%1 %2 (%3).") - .arg(d->device->vendor()).arg(d->device->description()).arg(d->device->devicename()) ) == -1 ) { + .tqarg(d->device->vendor()).tqarg(d->device->description()).tqarg(d->device->devicename()) ) == -1 ) { emit canceled(); d->running = false; jobFinished(false); @@ -153,9 +153,9 @@ void K3bDvdFormattingJob::start() emit newTask( i18n("Checking media") ); connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::NG_DISKINFO, d->device ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotDeviceHandlerFinished(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotDeviceHandlerFinished(K3bDevice::DeviceHandler*)) ); } @@ -207,7 +207,7 @@ void K3bDvdFormattingJob::setForce( bool b ) } -void K3bDvdFormattingJob::slotStderrLine( const QString& line ) +void K3bDvdFormattingJob::slotStderrLine( const TQString& line ) { // * DVD±RW format utility by , version 4.4. // * 4.7GB DVD-RW media in Sequential mode detected. @@ -218,15 +218,15 @@ void K3bDvdFormattingJob::slotStderrLine( const QString& line ) emit debuggingOutput( "dvd+rw-format", line ); // parsing for the -gui mode (since dvd+rw-format 4.6) - int pos = line.find( "blanking" ); + int pos = line.tqfind( "blanking" ); if( pos < 0 ) - pos = line.find( "formatting" ); + pos = line.tqfind( "formatting" ); if( pos >= 0 ) { - pos = line.find( QRegExp( "\\d" ), pos ); + pos = line.tqfind( TQRegExp( "\\d" ), pos ); } // parsing for \b\b... stuff else if( !line.startsWith("*") ) { - pos = line.find( QRegExp( "\\d" ) ); + pos = line.tqfind( TQRegExp( "\\d" ) ); } else if( line.startsWith( ":-(" ) ) { if( line.startsWith( ":-( unable to proceed with format" ) ) { @@ -235,7 +235,7 @@ void K3bDvdFormattingJob::slotStderrLine( const QString& line ) } if( pos >= 0 ) { - int endPos = line.find( QRegExp("[^\\d\\.]"), pos ) - 1; + int endPos = line.tqfind( TQRegExp("[^\\d\\.]"), pos ) - 1; bool ok; int progress = (int)(line.mid( pos, endPos - pos ).toDouble(&ok)); if( ok ) { @@ -267,7 +267,7 @@ void K3bDvdFormattingJob::slotProcessFinished( KProcess* p ) d->success = true; } else { - emit infoMessage( i18n("%1 returned an unknown error (code %2).").arg(d->dvdFormatBin->name()).arg(p->exitStatus()), + emit infoMessage( i18n("%1 returned an unknown error (code %2).").tqarg(d->dvdFormatBin->name()).tqarg(p->exitStatus()), K3bJob::ERROR ); emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR ); @@ -275,7 +275,7 @@ void K3bDvdFormattingJob::slotProcessFinished( KProcess* p ) } } else { - emit infoMessage( i18n("%1 did not exit cleanly.").arg(d->dvdFormatBin->name()), + emit infoMessage( i18n("%1 did not exit cleanly.").tqarg(d->dvdFormatBin->name()), ERROR ); d->success = false; } @@ -288,9 +288,9 @@ void K3bDvdFormattingJob::slotProcessFinished( KProcess* p ) else { emit infoMessage( i18n("Ejecting DVD..."), INFO ); connect( K3bDevice::eject( d->device ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotEjectingFinished(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotEjectingFinished(K3bDevice::DeviceHandler*)) ); } } @@ -362,7 +362,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) if( diskInfo.mediaType() == K3bDevice::MEDIA_DVD_PLUS_RW ) { - emit infoMessage( i18n("Found %1 media.").arg(K3bDevice::mediaTypeString(K3bDevice::MEDIA_DVD_PLUS_RW)), + emit infoMessage( i18n("Found %1 media.").tqarg(K3bDevice::mediaTypeString(K3bDevice::MEDIA_DVD_PLUS_RW)), INFO ); // mode is ignored @@ -375,7 +375,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) } else { emit infoMessage( i18n("No need to format %1 media more than once.") - .arg(K3bDevice::mediaTypeString(K3bDevice::MEDIA_DVD_PLUS_RW)), INFO ); + .tqarg(K3bDevice::mediaTypeString(K3bDevice::MEDIA_DVD_PLUS_RW)), INFO ); emit infoMessage( i18n("It may simply be overwritten."), INFO ); if( d->force ) { @@ -401,11 +401,11 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) // else { // MEDIA_DVD_RW - emit infoMessage( i18n("Found %1 media.").arg(K3bDevice::mediaTypeString(K3bDevice::MEDIA_DVD_RW)), + emit infoMessage( i18n("Found %1 media.").tqarg(K3bDevice::mediaTypeString(K3bDevice::MEDIA_DVD_RW)), INFO ); if( diskInfo.currentProfile() != K3bDevice::MEDIA_UNKNOWN ) { - emit infoMessage( i18n("Formatted in %1 mode.").arg(K3bDevice::mediaTypeString(diskInfo.currentProfile())), INFO ); + emit infoMessage( i18n("Formatted in %1 mode.").tqarg(K3bDevice::mediaTypeString(diskInfo.currentProfile())), INFO ); // @@ -428,7 +428,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) else if( diskInfo.currentProfile() == K3bDevice::MEDIA_DVD_RW_OVWR && d->mode != K3b::WRITING_MODE_INCR_SEQ ) { emit infoMessage( i18n("No need to format %1 media more than once.") - .arg(K3bDevice::mediaTypeString(diskInfo.currentProfile())), INFO ); + .tqarg(K3bDevice::mediaTypeString(diskInfo.currentProfile())), INFO ); emit infoMessage( i18n("It may simply be overwritten."), INFO ); if( d->force ) @@ -448,7 +448,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) } emit newSubTask( i18n("Formatting" - " DVD-RW in %1 mode.").arg(K3bDevice::mediaTypeString( blank ? + " DVD-RW in %1 mode.").tqarg(K3bDevice::mediaTypeString( blank ? K3bDevice::MEDIA_DVD_RW_SEQ : K3bDevice::MEDIA_DVD_RW_OVWR )) ); } @@ -467,19 +467,19 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) d->process = new K3bProcess(); d->process->setRunPrivileged(true); // d->process->setSuppressEmptyLines(false); - connect( d->process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotStderrLine(const QString&)) ); - connect( d->process, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessFinished(KProcess*)) ); + connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotStderrLine(const TQString&)) ); + connect( d->process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessFinished(KProcess*)) ); d->dvdFormatBin = k3bcore->externalBinManager()->binObject( "dvd+rw-format" ); if( !d->dvdFormatBin ) { - emit infoMessage( i18n("Could not find %1 executable.").arg("dvd+rw-format"), ERROR ); + emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("dvd+rw-format"), ERROR ); d->running = false; jobFinished(false); return; } if( !d->dvdFormatBin->copyright.isEmpty() ) - emit infoMessage( i18n("Using %1 %2 - Copyright (C) %3").arg(d->dvdFormatBin->name()).arg(d->dvdFormatBin->version).arg(d->dvdFormatBin->copyright), INFO ); + emit infoMessage( i18n("Using %1 %2 - Copyright (C) %3").tqarg(d->dvdFormatBin->name()).tqarg(d->dvdFormatBin->version).tqarg(d->dvdFormatBin->copyright), INFO ); *d->process << d->dvdFormatBin; @@ -487,7 +487,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) if( d->dvdFormatBin->version >= K3bVersion( 4, 6 ) ) *d->process << "-gui"; - QString p; + TQString p; if( blank ) p = "-blank"; else @@ -500,14 +500,14 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) *d->process << d->device->blockDeviceName(); // additional user parameters from config - const QStringList& params = d->dvdFormatBin->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = d->dvdFormatBin->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *d->process << *it; kdDebug() << "***** dvd+rw-format parameters:\n"; - const QValueList& args = d->process->args(); - QString s; - for( QValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList& args = d->process->args(); + TQString s; + for( TQValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << endl << flush; @@ -517,7 +517,7 @@ void K3bDvdFormattingJob::startFormatting( const K3bDevice::DiskInfo& diskInfo ) // something went wrong when starting the program // it "should" be the executable kdDebug() << "(K3bDvdFormattingJob) could not start " << d->dvdFormatBin->path << endl; - emit infoMessage( i18n("Could not start %1.").arg(d->dvdFormatBin->name()), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg(d->dvdFormatBin->name()), K3bJob::ERROR ); d->running = false; jobFinished(false); } diff --git a/libk3b/jobs/k3bdvdformattingjob.h b/libk3b/jobs/k3bdvdformattingjob.h index 10672cb..cf8b7eb 100644 --- a/libk3b/jobs/k3bdvdformattingjob.h +++ b/libk3b/jobs/k3bdvdformattingjob.h @@ -30,13 +30,14 @@ namespace K3bDevice { class LIBK3B_EXPORT K3bDvdFormattingJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bDvdFormattingJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bDvdFormattingJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bDvdFormattingJob(); - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; K3bDevice::Device* writer() const; @@ -75,7 +76,7 @@ class LIBK3B_EXPORT K3bDvdFormattingJob : public K3bBurnJob void setForceNoEject( bool ); private slots: - void slotStderrLine( const QString& ); + void slotStderrLine( const TQString& ); void slotProcessFinished( KProcess* ); void slotDeviceHandlerFinished( K3bDevice::DeviceHandler* ); void slotEjectingFinished( K3bDevice::DeviceHandler* ); diff --git a/libk3b/jobs/k3biso9660imagewritingjob.cpp b/libk3b/jobs/k3biso9660imagewritingjob.cpp index 1fb3871..cf63da4 100644 --- a/libk3b/jobs/k3biso9660imagewritingjob.cpp +++ b/libk3b/jobs/k3biso9660imagewritingjob.cpp @@ -36,10 +36,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class K3bIso9660ImageWritingJob::Private @@ -85,8 +85,8 @@ void K3bIso9660ImageWritingJob::start() emit newTask( i18n("Preparing data") ); - if( !QFile::exists( m_imagePath ) ) { - emit infoMessage( i18n("Could not find image %1").arg(m_imagePath), K3bJob::ERROR ); + if( !TQFile::exists( m_imagePath ) ) { + emit infoMessage( i18n("Could not find image %1").tqarg(m_imagePath), K3bJob::ERROR ); jobFinished( false ); return; } @@ -121,10 +121,10 @@ void K3bIso9660ImageWritingJob::slotWriterJobFinished( bool success ) if( !m_verifyJob ) { m_verifyJob = new K3bVerificationJob( this ); connectSubJob( m_verifyJob, - SLOT(slotVerificationFinished(bool)), + TQT_SLOT(slotVerificationFinished(bool)), true, - SLOT(slotVerificationProgress(int)), - SIGNAL(subPercent(int)) ); + TQT_SLOT(slotVerificationProgress(int)), + TQT_SIGNAL(subPercent(int)) ); } m_verifyJob->setDevice( m_device ); m_verifyJob->clear(); @@ -133,7 +133,7 @@ void K3bIso9660ImageWritingJob::slotWriterJobFinished( bool success ) if( m_copies == 1 ) emit newTask( i18n("Verifying written data") ); else - emit newTask( i18n("Verifying written copy %1 of %2").arg(m_currentCopy).arg(m_copies) ); + emit newTask( i18n("Verifying written copy %1 of %2").tqarg(m_currentCopy).tqarg(m_copies) ); m_verifyJob->start(); } @@ -164,8 +164,8 @@ void K3bIso9660ImageWritingJob::slotVerificationFinished( bool success ) if( success && m_currentCopy < m_copies ) { m_currentCopy++; - connect( K3bDevice::eject( m_device ), SIGNAL(finished(bool)), - this, SLOT(startWriting()) ); + connect( K3bDevice::eject( m_device ), TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(startWriting()) ); return; } @@ -200,7 +200,7 @@ void K3bIso9660ImageWritingJob::slotNextTrack( int, int ) if( m_copies == 1 ) emit newSubTask( i18n("Writing image") ); else - emit newSubTask( i18n("Writing copy %1 of %2").arg(m_currentCopy).arg(m_copies) ); + emit newSubTask( i18n("Writing copy %1 of %2").tqarg(m_currentCopy).tqarg(m_copies) ); } @@ -350,7 +350,7 @@ bool K3bIso9660ImageWritingJob::prepareWriter( int mediaType ) writer->addArgument("-data"); // read from stdin - writer->addArgument( QString("-tsize=%1s").arg( K3b::imageFilesize( m_imagePath )/2048 ) )->addArgument( "-" ); + writer->addArgument( TQString("-tsize=%1s").tqarg( K3b::imageFilesize( m_imagePath )/2048 ) )->addArgument( "-" ); m_writer = writer; } @@ -365,10 +365,10 @@ bool K3bIso9660ImageWritingJob::prepareWriter( int mediaType ) // now write the tocfile delete m_tocFile; - m_tocFile = new KTempFile( QString::null, "toc" ); + m_tocFile = new KTempFile( TQString(), "toc" ); m_tocFile->setAutoDelete(true); - if( QTextStream* s = m_tocFile->textStream() ) { + if( TQTextStream* s = m_tocFile->textStream() ) { if( (m_dataMode == K3b::DATA_MODE_AUTO && m_noFix) || m_dataMode == K3b::MODE2 ) { *s << "CD_ROM_XA" << "\n"; @@ -380,7 +380,7 @@ bool K3bIso9660ImageWritingJob::prepareWriter( int mediaType ) *s << "\n"; *s << "TRACK MODE1" << "\n"; } - *s << "DATAFILE \"-\" " << QString::number( K3b::imageFilesize( m_imagePath ) ) << "\n"; + *s << "DATAFILE \"-\" " << TQString::number( K3b::imageFilesize( m_imagePath ) ) << "\n"; m_tocFile->close(); } @@ -413,31 +413,31 @@ bool K3bIso9660ImageWritingJob::prepareWriter( int mediaType ) writer->setSimulate( m_simulate ); writer->setBurnSpeed( m_speed ); writer->setWritingMode( m_writingMode == K3b::DAO ? K3b::DAO : 0 ); - writer->setImageToWrite( QString::null ); // read from stdin + writer->setImageToWrite( TQString() ); // read from stdin writer->setCloseDvd( !m_noFix ); writer->setTrackSize( K3b::imageFilesize( m_imagePath )/2048 ); m_writer = writer; } - connect( m_writer, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_writer, SIGNAL(nextTrack(int, int)), this, SLOT(slotNextTrack(int, int)) ); - connect( m_writer, SIGNAL(percent(int)), this, SLOT(slotWriterPercent(int)) ); - connect( m_writer, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) ); - connect( m_writer, SIGNAL(buffer(int)), this, SIGNAL(bufferStatus(int)) ); - connect( m_writer, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( m_writer, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); - connect( m_writer, SIGNAL(finished(bool)), this, SLOT(slotWriterJobFinished(bool)) ); - connect( m_writer, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - connect( m_writer, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( m_writer, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( m_writer, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_writer, TQT_SIGNAL(nextTrack(int, int)), this, TQT_SLOT(slotNextTrack(int, int)) ); + connect( m_writer, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotWriterPercent(int)) ); + connect( m_writer, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) ); + connect( m_writer, TQT_SIGNAL(buffer(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( m_writer, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( m_writer, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); + connect( m_writer, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotWriterJobFinished(bool)) ); + connect( m_writer, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + connect( m_writer, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( m_writer, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); return true; } -QString K3bIso9660ImageWritingJob::jobDescription() const +TQString K3bIso9660ImageWritingJob::jobDescription() const { if( m_simulate ) return i18n("Simulating ISO9660 Image"); @@ -445,13 +445,13 @@ QString K3bIso9660ImageWritingJob::jobDescription() const return ( i18n("Burning ISO9660 Image") + ( m_copies > 1 ? i18n(" - %n Copy", " - %n Copies", m_copies) - : QString::null ) ); + : TQString() ) ); } -QString K3bIso9660ImageWritingJob::jobDetails() const +TQString K3bIso9660ImageWritingJob::jobDetails() const { - return m_imagePath.section("/", -1) + QString( " (%1)" ).arg(KIO::convertSize(K3b::filesize(KURL::fromPathOrURL(m_imagePath)))); + return m_imagePath.section("/", -1) + TQString( " (%1)" ).tqarg(KIO::convertSize(K3b::filesize(KURL::fromPathOrURL(m_imagePath)))); } diff --git a/libk3b/jobs/k3biso9660imagewritingjob.h b/libk3b/jobs/k3biso9660imagewritingjob.h index eceb6dc..e8a133b 100644 --- a/libk3b/jobs/k3biso9660imagewritingjob.h +++ b/libk3b/jobs/k3biso9660imagewritingjob.h @@ -19,7 +19,7 @@ #include #include "k3b_export.h" -class QString; +class TQString; class K3bAbstractWriter; class KTempFile; namespace K3bDevice { @@ -34,6 +34,7 @@ class K3bVerificationJob; class LIBK3B_EXPORT K3bIso9660ImageWritingJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: K3bIso9660ImageWritingJob( K3bJobHandler* ); @@ -41,14 +42,14 @@ class LIBK3B_EXPORT K3bIso9660ImageWritingJob : public K3bBurnJob K3bDevice::Device* writer() const { return m_device; }; - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void cancel(); void start(); - void setImagePath( const QString& path ) { m_imagePath = path; } + void setImagePath( const TQString& path ) { m_imagePath = path; } void setSpeed( int s ) { m_speed = s; } void setBurnDevice( K3bDevice::Device* dev ) { m_device = dev; } void setWritingMode( int mode ) { m_writingMode = mode; } @@ -78,7 +79,7 @@ class LIBK3B_EXPORT K3bIso9660ImageWritingJob : public K3bBurnJob bool m_verifyData; bool m_dvd; - QString m_imagePath; + TQString m_imagePath; K3bAbstractWriter* m_writer; KTempFile* m_tocFile; diff --git a/libk3b/jobs/k3breadcdreader.cpp b/libk3b/jobs/k3breadcdreader.cpp index d75eb63..ae6df10 100644 --- a/libk3b/jobs/k3breadcdreader.cpp +++ b/libk3b/jobs/k3breadcdreader.cpp @@ -28,9 +28,9 @@ #include #include -#include -#include -#include +#include +#include +#include @@ -60,8 +60,8 @@ public: -K3bReadcdReader::K3bReadcdReader( K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bJob( jh, parent, name ), +K3bReadcdReader::K3bReadcdReader( K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bJob( jh, tqparent, name ), m_noCorr(false), m_clone(false), m_noError(false), @@ -104,7 +104,7 @@ void K3bReadcdReader::start() // the first thing to do is to check for readcd d->readcdBinObject = k3bcore->externalBinManager()->binObject( "readcd" ); if( !d->readcdBinObject ) { - emit infoMessage( i18n("Could not find %1 executable.").arg("readcd"), ERROR ); + emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("readcd"), ERROR ); jobFinished(false); return; } @@ -116,11 +116,11 @@ void K3bReadcdReader::start() if( !d->readcdBinObject->hasFeature( "clone" ) ) { // search all readcd installations K3bExternalProgram* readcdProgram = k3bcore->externalBinManager()->program( "readcd" ); - const QPtrList& readcdBins = readcdProgram->bins(); - for( QPtrListIterator it( readcdBins ); it.current(); ++it ) { + const TQPtrList& readcdBins = readcdProgram->bins(); + for( TQPtrListIterator it( readcdBins ); it.current(); ++it ) { if( it.current()->hasFeature( "clone" ) ) { d->readcdBinObject = it.current(); - emit infoMessage( i18n("Using readcd %1 instead of default version for clone support.").arg(d->readcdBinObject->version), INFO ); + emit infoMessage( i18n("Using readcd %1 instead of default version for clone support.").tqarg(d->readcdBinObject->version), INFO ); foundCloneSupport = true; break; } @@ -138,8 +138,8 @@ void K3bReadcdReader::start() // create the commandline delete d->process; d->process = new K3bProcess(); - connect( d->process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotStdLine(const QString&)) ); - connect( d->process, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*)) ); + connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotStdLine(const TQString&)) ); + connect( d->process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*)) ); *d->process << d->readcdBinObject; @@ -148,10 +148,10 @@ void K3bReadcdReader::start() *d->process << "-v"; // Again we assume the device to be set! - *d->process << QString("dev=%1").arg(K3b::externalBinDeviceParameter(m_readDevice, + *d->process << TQString("dev=%1").tqarg(K3b::externalBinDeviceParameter(m_readDevice, d->readcdBinObject)); if( m_speed > 0 ) - *d->process << QString("speed=%1").arg(m_speed); + *d->process << TQString("speed=%1").tqarg(m_speed); // output @@ -160,8 +160,8 @@ void K3bReadcdReader::start() d->process->dupStdout( d->fdToWriteTo ); } else { - emit newTask( i18n("Writing image to %1.").arg(m_imagePath) ); - emit infoMessage( i18n("Writing image to %1.").arg(m_imagePath), INFO ); + emit newTask( i18n("Writing image to %1.").tqarg(m_imagePath) ); + emit infoMessage( i18n("Writing image to %1.").tqarg(m_imagePath), INFO ); *d->process << "f=" + m_imagePath; } @@ -177,25 +177,25 @@ void K3bReadcdReader::start() if( m_c2Scan ) *d->process << "-c2scan"; - *d->process << QString("retries=%1").arg(m_retries); + *d->process << TQString("retries=%1").tqarg(m_retries); // readcd does not read the last sector specified if( d->firstSector < d->lastSector ) - *d->process << QString("sectors=%1-%2").arg(d->firstSector.lba()).arg(d->lastSector.lba()+1); + *d->process << TQString("sectors=%1-%2").tqarg(d->firstSector.lba()).tqarg(d->lastSector.lba()+1); // Joerg sais it is a Linux kernel bug, anyway, with the default value it does not work *d->process << "ts=128k"; // additional user parameters from config - const QStringList& params = d->readcdBinObject->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = d->readcdBinObject->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *d->process << *it; kdDebug() << "***** readcd parameters:\n"; - const QValueList& args = d->process->args(); - QString s; - for( QValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList& args = d->process->args(); + TQString s; + for( TQValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << endl << flush; @@ -225,7 +225,7 @@ void K3bReadcdReader::cancel() } -void K3bReadcdReader::slotStdLine( const QString& line ) +void K3bReadcdReader::slotStdLine( const TQString& line ) { emit debuggingOutput( "readcd", line ); @@ -243,7 +243,7 @@ void K3bReadcdReader::slotStdLine( const QString& line ) else if( line.startsWith( "addr:" ) ) { bool ok; - long currentReadBlock = line.mid( 6, line.find("cnt")-7 ).toInt(&ok); + long currentReadBlock = line.mid( 6, line.tqfind("cnt")-7 ).toInt(&ok); if( d->firstSector < d->lastSector ) currentReadBlock -= d->firstSector.lba(); if( ok ) { @@ -260,41 +260,41 @@ void K3bReadcdReader::slotStdLine( const QString& line ) } else kdError() << "(K3bReadcdReader) currentReadBlock parsing error in line: " - << line.mid( 6, line.find("cnt")-7 ) << endl; + << line.mid( 6, line.tqfind("cnt")-7 ) << endl; } - else if( line.contains("Cannot read source disk") ) { + else if( line.tqcontains("Cannot read source disk") ) { emit infoMessage( i18n("Cannot read source disk."), ERROR ); } - else if( (pos = line.find("Retrying from sector")) >= 0 ) { + else if( (pos = line.tqfind("Retrying from sector")) >= 0 ) { // parse the sector pos += 21; bool ok; - int problemSector = line.mid( pos, line.find( QRegExp("\\D"), pos )-pos ).toInt(&ok); + int problemSector = line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ).toInt(&ok); if( !ok ) { kdError() << "(K3bReadcdReader) problemSector parsing error in line: " - << line.mid( pos, line.find( QRegExp("\\D"), pos )-pos ) << endl; + << line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ) << endl; } - emit infoMessage( i18n("Retrying from sector %1.").arg(problemSector), INFO ); + emit infoMessage( i18n("Retrying from sector %1.").tqarg(problemSector), INFO ); } - else if( (pos = line.find("Error on sector")) >= 0 ) { + else if( (pos = line.tqfind("Error on sector")) >= 0 ) { d->unreadableBlocks++; pos += 16; bool ok; - int problemSector = line.mid( pos, line.find( QRegExp("\\D"), pos )-pos ).toInt(&ok); + int problemSector = line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ).toInt(&ok); if( !ok ) { kdError() << "(K3bReadcdReader) problemSector parsing error in line: " - << line.mid( pos, line.find( QRegExp("\\D"), pos )-pos ) << endl; + << line.mid( pos, line.tqfind( TQRegExp("\\D"), pos )-pos ) << endl; } - if( line.contains( "not corrected") ) { - emit infoMessage( i18n("Uncorrected error in sector %1").arg(problemSector), ERROR ); + if( line.tqcontains( "not corrected") ) { + emit infoMessage( i18n("Uncorrected error in sector %1").tqarg(problemSector), ERROR ); } else { - emit infoMessage( i18n("Corrected error in sector %1").arg(problemSector), ERROR ); + emit infoMessage( i18n("Corrected error in sector %1").tqarg(problemSector), ERROR ); } } @@ -314,7 +314,7 @@ void K3bReadcdReader::slotProcessExited( KProcess* p ) jobFinished( true ); } else { - emit infoMessage( i18n("%1 returned error: %2").arg("Readcd").arg(p->exitStatus()), ERROR ); + emit infoMessage( i18n("%1 returned error: %2").tqarg("Readcd").tqarg(p->exitStatus()), ERROR ); jobFinished( false ); } } diff --git a/libk3b/jobs/k3breadcdreader.h b/libk3b/jobs/k3breadcdreader.h index 93ebce0..de6f225 100644 --- a/libk3b/jobs/k3breadcdreader.h +++ b/libk3b/jobs/k3breadcdreader.h @@ -34,9 +34,10 @@ namespace K3b { class K3bReadcdReader : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bReadcdReader( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bReadcdReader( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bReadcdReader(); bool active() const; @@ -59,7 +60,7 @@ class K3bReadcdReader : public K3bJob void setSectorRange( const K3b::Msf&, const K3b::Msf& ); - void setImagePath( const QString& p ) { m_imagePath = p; } + void setImagePath( const TQString& p ) { m_imagePath = p; } /** * the data gets written directly into fd instead of the imagefile. @@ -69,7 +70,7 @@ class K3bReadcdReader : public K3bJob void writeToFd( int fd ); private slots: - void slotStdLine( const QString& line ); + void slotStdLine( const TQString& line ); void slotProcessExited(KProcess*); private: @@ -82,7 +83,7 @@ class K3bReadcdReader : public K3bJob K3bDevice::Device* m_readDevice; - QString m_imagePath; + TQString m_imagePath; class Private; Private* d; diff --git a/libk3b/jobs/k3bverificationjob.cpp b/libk3b/jobs/k3bverificationjob.cpp index e73530e..963f1a2 100644 --- a/libk3b/jobs/k3bverificationjob.cpp +++ b/libk3b/jobs/k3bverificationjob.cpp @@ -29,10 +29,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class K3bVerificationJobTrackEntry @@ -42,14 +42,14 @@ public: : trackNumber(0) { } - K3bVerificationJobTrackEntry( int tn, const QCString& cs, const K3b::Msf& msf ) + K3bVerificationJobTrackEntry( int tn, const TQCString& cs, const K3b::Msf& msf ) : trackNumber(tn), checksum(cs), length(msf) { } int trackNumber; - QCString checksum; + TQCString checksum; K3b::Msf length; }; @@ -69,7 +69,7 @@ public: K3b::Msf grownSessionSize; - QValueList tracks; + TQValueList tracks; int currentTrackIndex; K3bDevice::DiskInfo diskInfo; @@ -89,16 +89,16 @@ public: }; -K3bVerificationJob::K3bVerificationJob( K3bJobHandler* hdl, QObject* parent, const char* name ) - : K3bJob( hdl, parent, name ) +K3bVerificationJob::K3bVerificationJob( K3bJobHandler* hdl, TQObject* tqparent, const char* name ) + : K3bJob( hdl, tqparent, name ) { d = new Private(); d->md5Job = new K3bMd5Job( this ); - connect( d->md5Job, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->md5Job, SIGNAL(finished(bool)), this, SLOT(slotMd5JobFinished(bool)) ); - connect( d->md5Job, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->md5Job, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->md5Job, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotMd5JobFinished(bool)) ); + connect( d->md5Job, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } @@ -118,7 +118,7 @@ void K3bVerificationJob::cancel() } -void K3bVerificationJob::addTrack( int trackNum, const QCString& checksum, const K3b::Msf& length ) +void K3bVerificationJob::addTrack( int trackNum, const TQCString& checksum, const K3b::Msf& length ) { d->tracks.append( K3bVerificationJobTrackEntry( trackNum, checksum, length ) ); } @@ -155,9 +155,9 @@ void K3bVerificationJob::start() d->mediumHasBeenReloaded = false; connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::DISKINFO, d->device ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); } @@ -174,9 +174,9 @@ void K3bVerificationJob::slotMediaReloaded( bool /*success*/ ) emit newTask( i18n("Checking medium") ); connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::DISKINFO, d->device ), - SIGNAL(finished(K3bDevice::DeviceHandler*)), + TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)), this, - SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); + TQT_SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) ); } @@ -193,7 +193,7 @@ void K3bVerificationJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) // just to be sure check if we actually have all the tracks int i = 0; - for( QValueList::iterator it = d->tracks.begin(); + for( TQValueList::iterator it = d->tracks.begin(); it != d->tracks.end(); ++i, ++it ) { // 0 means "last track" @@ -203,7 +203,7 @@ void K3bVerificationJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) if( (int)d->toc.count() < (*it).trackNumber ) { if ( d->mediumHasBeenReloaded ) { emit infoMessage( i18n("Internal Error: Verification job improperly initialized (%1)") - .arg( "Specified track number not found on medium" ), ERROR ); + .tqarg( "Specified track number not found on medium" ), ERROR ); jobFinished( false ); return; } @@ -211,9 +211,9 @@ void K3bVerificationJob::slotDiskInfoReady( K3bDevice::DeviceHandler* dh ) // many drives need to reload the medium to return to a proper state emit newTask( i18n("Reloading the medium") ); connect( K3bDevice::reload( d->device ), - SIGNAL(finished(bool)), + TQT_SIGNAL(finished(bool)), this, - SLOT(slotMediaReloaded(bool)) ); + TQT_SLOT(slotMediaReloaded(bool)) ); return; } } @@ -236,20 +236,20 @@ void K3bVerificationJob::readTrack( int trackIndex ) return; } - emit newTask( i18n("Verifying track %1").arg( d->tracks[trackIndex].trackNumber ) ); + emit newTask( i18n("Verifying track %1").tqarg( d->tracks[trackIndex].trackNumber ) ); d->pipe.open(); if( d->toc[d->tracks[trackIndex].trackNumber-1].type() == K3bDevice::Track::DATA ) { if( !d->dataTrackReader ) { d->dataTrackReader = new K3bDataTrackReader( this ); - connect( d->dataTrackReader, SIGNAL(percent(int)), this, SLOT(slotReaderProgress(int)) ); - // connect( d->dataTrackReader, SIGNAL(processedSize(int, int)), this, SLOT(slotReaderProcessedSize(int, int)) ); - connect( d->dataTrackReader, SIGNAL(finished(bool)), this, SLOT(slotReaderFinished(bool)) ); - connect( d->dataTrackReader, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); - connect( d->dataTrackReader, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( d->dataTrackReader, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); + connect( d->dataTrackReader, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotReaderProgress(int)) ); + // connect( d->dataTrackReader, TQT_SIGNAL(processedSize(int, int)), this, TQT_SLOT(slotReaderProcessedSize(int, int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotReaderFinished(bool)) ); + connect( d->dataTrackReader, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( d->dataTrackReader, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( d->dataTrackReader, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); } d->dataTrackReader->setDevice( d->device ); @@ -304,7 +304,7 @@ void K3bVerificationJob::slotMd5JobFinished( bool success ) if( success && !d->canceled && d->readSuccessful ) { // compare the two sums if( d->tracks[d->currentTrackIndex].checksum != d->md5Job->hexDigest() ) { - emit infoMessage( i18n("Written data in track %1 differs from original.").arg(d->tracks[d->currentTrackIndex].trackNumber), ERROR ); + emit infoMessage( i18n("Written data in track %1 differs from original.").tqarg(d->tracks[d->currentTrackIndex].trackNumber), ERROR ); jobFinished(false); } else { diff --git a/libk3b/jobs/k3bverificationjob.h b/libk3b/jobs/k3bverificationjob.h index ad750ee..945198d 100644 --- a/libk3b/jobs/k3bverificationjob.h +++ b/libk3b/jobs/k3bverificationjob.h @@ -47,9 +47,10 @@ namespace K3bDevice { class K3bVerificationJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bVerificationJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bVerificationJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bVerificationJob(); public slots: @@ -67,7 +68,7 @@ class K3bVerificationJob : public K3bJob * useful when writing to DVD+RW media and the iso descriptor does not * contain the exact image size (as true for many commercial Video DVDs) */ - void addTrack( int tracknum, const QCString& checksum, const K3b::Msf& length = K3b::Msf() ); + void addTrack( int tracknum, const TQCString& checksum, const K3b::Msf& length = K3b::Msf() ); /** * Handle the special case of iso session growing diff --git a/libk3b/jobs/k3bvideodvdtitledetectclippingjob.cpp b/libk3b/jobs/k3bvideodvdtitledetectclippingjob.cpp index fdcc3a4..320717a 100644 --- a/libk3b/jobs/k3bvideodvdtitledetectclippingjob.cpp +++ b/libk3b/jobs/k3bvideodvdtitledetectclippingjob.cpp @@ -46,8 +46,8 @@ public: -K3bVideoDVDTitleDetectClippingJob::K3bVideoDVDTitleDetectClippingJob( K3bJobHandler* hdl, QObject* parent ) - : K3bJob( hdl, parent ), +K3bVideoDVDTitleDetectClippingJob::K3bVideoDVDTitleDetectClippingJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bJob( hdl, tqparent ), m_clippingTop( 0 ), m_clippingBottom( 0 ), m_clippingLeft( 0 ), @@ -88,15 +88,15 @@ void K3bVideoDVDTitleDetectClippingJob::start() d->usedTranscodeBin = k3bcore->externalBinManager()->binObject("transcode"); if( !d->usedTranscodeBin ) { - emit infoMessage( i18n("%1 executable could not be found.").arg("transcode"), ERROR ); + emit infoMessage( i18n("%1 executable could not be found.").tqarg("transcode"), ERROR ); jobFinished( false ); return; } if( d->usedTranscodeBin->version < K3bVersion( 1, 0, 0 ) ){ emit infoMessage( i18n("%1 version %2 is too old.") - .arg("transcode") - .arg(d->usedTranscodeBin->version), ERROR ); + .tqarg("transcode") + .tqarg(d->usedTranscodeBin->version), ERROR ); jobFinished( false ); return; } @@ -105,11 +105,11 @@ void K3bVideoDVDTitleDetectClippingJob::start() if( !d->usedTranscodeBin->copyright.isEmpty() ) emit infoMessage( i18n("Using %1 %2 - Copyright (C) %3") - .arg(d->usedTranscodeBin->name()) - .arg(d->usedTranscodeBin->version) - .arg(d->usedTranscodeBin->copyright), INFO ); + .tqarg(d->usedTranscodeBin->name()) + .tqarg(d->usedTranscodeBin->version) + .tqarg(d->usedTranscodeBin->copyright), INFO ); - emit newTask( i18n("Analysing Title %1 of Video DVD %2").arg(m_titleNumber).arg(m_dvd.volumeIdentifier()) ); + emit newTask( i18n("Analysing Title %1 of Video DVD %2").tqarg(m_titleNumber).tqarg(m_dvd.volumeIdentifier()) ); startTranscode( 1 ); } @@ -125,9 +125,9 @@ void K3bVideoDVDTitleDetectClippingJob::startTranscode( int chapter ) // use the whole chapter // if( d->totalChapters == 1 ) - d->currentFrames = QMIN( 3000, QMAX( 1, m_dvd[m_titleNumber-1][d->currentChapter-1].playbackTime().totalFrames() ) ); + d->currentFrames = TQMIN( 3000, TQMAX( 1, m_dvd[m_titleNumber-1][d->currentChapter-1].playbackTime().totalFrames() ) ); else - d->currentFrames = QMIN( 200, QMAX( 1, m_dvd[m_titleNumber-1][d->currentChapter-1].playbackTime().totalFrames() ) ); + d->currentFrames = TQMIN( 200, TQMAX( 1, m_dvd[m_titleNumber-1][d->currentChapter-1].playbackTime().totalFrames() ) ); // // prepare the process @@ -136,9 +136,9 @@ void K3bVideoDVDTitleDetectClippingJob::startTranscode( int chapter ) d->process = new K3bProcess(); d->process->setSuppressEmptyLines(true); d->process->setSplitStdout(true); - // connect( d->process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotTranscodeStderr(const QString&)) ); - connect( d->process, SIGNAL(stdoutLine(const QString&)), this, SLOT(slotTranscodeStderr(const QString&)) ); - connect( d->process, SIGNAL(processExited(KProcess*)), this, SLOT(slotTranscodeExited(KProcess*)) ); + // connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotTranscodeStderr(const TQString&)) ); + connect( d->process, TQT_SIGNAL(stdoutLine(const TQString&)), this, TQT_SLOT(slotTranscodeStderr(const TQString&)) ); + connect( d->process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotTranscodeExited(KProcess*)) ); // the executable *d->process << d->usedTranscodeBin; @@ -151,27 +151,27 @@ void K3bVideoDVDTitleDetectClippingJob::startTranscode( int chapter ) *d->process << "-i" << m_dvd.device()->blockDeviceName(); // select the title number and chapter - *d->process << "-T" << QString("%1,%2").arg(m_titleNumber).arg(chapter); + *d->process << "-T" << TQString("%1,%2").tqarg(m_titleNumber).tqarg(chapter); // null output *d->process << "-y" << "null,null" << "-o" << "/dev/null"; // analyze the first 200 frames - *d->process << "-J" << QString("detectclipping=range=0-%1/5").arg(d->currentFrames); + *d->process << "-J" << TQString("detectclipping=range=0-%1/5").tqarg(d->currentFrames); // also only decode the first 200 frames - *d->process << "-c" << QString("0-%1").arg(d->currentFrames+1); + *d->process << "-c" << TQString("0-%1").tqarg(d->currentFrames+1); // additional user parameters from config - const QStringList& params = d->usedTranscodeBin->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = d->usedTranscodeBin->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *d->process << *it; // produce some debugging output kdDebug() << "***** transcode parameters:\n"; - const QValueList& args = d->process->args(); - QString s; - for( QValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList& args = d->process->args(); + TQString s; + for( TQValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << flush << endl; @@ -181,11 +181,11 @@ void K3bVideoDVDTitleDetectClippingJob::startTranscode( int chapter ) if( !d->process->start( KProcess::NotifyOnExit, KProcess::All ) ) { // something went wrong when starting the program // it "should" be the executable - emit infoMessage( i18n("Could not start %1.").arg(d->usedTranscodeBin->name()), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg(d->usedTranscodeBin->name()), K3bJob::ERROR ); jobFinished(false); } else { - emit newSubTask( i18n("Analysing Chapter %1 of %2").arg(chapter).arg(m_dvd[m_titleNumber-1].numPTTs()) ); + emit newSubTask( i18n("Analysing Chapter %1 of %2").tqarg(chapter).tqarg(m_dvd[m_titleNumber-1].numPTTs()) ); emit subPercent( 0 ); } } @@ -199,15 +199,15 @@ void K3bVideoDVDTitleDetectClippingJob::cancel() } -void K3bVideoDVDTitleDetectClippingJob::slotTranscodeStderr( const QString& line ) +void K3bVideoDVDTitleDetectClippingJob::slotTranscodeStderr( const TQString& line ) { emit debuggingOutput( "transcode", line ); // parse progress // encoding frame [185], 24.02 fps, 93.0%, ETA: 0:00:00, ( 0| 0| 0) if( line.startsWith( "encoding frame" ) ) { - int pos1 = line.find( '[', 15 ); - int pos2 = line.find( ']', pos1+1 ); + int pos1 = line.tqfind( '[', 15 ); + int pos2 = line.tqfind( ']', pos1+1 ); if( pos1 > 0 && pos2 > 0 ) { bool ok; int encodedFrames = line.mid( pos1+1, pos2-pos1-1 ).toInt( &ok ); @@ -235,13 +235,13 @@ void K3bVideoDVDTitleDetectClippingJob::slotTranscodeStderr( const QString& line // [detectclipping#0] valid area: X: 5..719 Y: 72..507 -> -j 72,6,68,0 else if( line.startsWith( "[detectclipping" ) ) { - int pos = line.find( "-j" ); + int pos = line.tqfind( "-j" ); if( pos > 0 ) { - QStringList values = QStringList::split( ',', line.mid( pos+3 ) ); - m_clippingTop = QMIN( m_clippingTop, values[0].toInt() ); - m_clippingLeft = QMIN( m_clippingLeft, values[1].toInt() ); - m_clippingBottom = QMIN( m_clippingBottom, values[2].toInt() ); - m_clippingRight = QMIN( m_clippingRight, values[3].toInt() ); + TQStringList values = TQStringList::split( ',', line.mid( pos+3 ) ); + m_clippingTop = TQMIN( m_clippingTop, values[0].toInt() ); + m_clippingLeft = TQMIN( m_clippingLeft, values[1].toInt() ); + m_clippingBottom = TQMIN( m_clippingBottom, values[2].toInt() ); + m_clippingRight = TQMIN( m_clippingRight, values[3].toInt() ); } else kdDebug() << "(K3bVideoDVDTitleDetectClippingJob) failed to parse line: " << line << endl; @@ -279,7 +279,7 @@ void K3bVideoDVDTitleDetectClippingJob::slotTranscodeExited( KProcess* p ) } else { emit infoMessage( i18n("%1 returned an unknown error (code %2).") - .arg(d->usedTranscodeBin->name()).arg(p->exitStatus()), + .tqarg(d->usedTranscodeBin->name()).tqarg(p->exitStatus()), K3bJob::ERROR ); emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR ); } diff --git a/libk3b/jobs/k3bvideodvdtitledetectclippingjob.h b/libk3b/jobs/k3bvideodvdtitledetectclippingjob.h index b13bbf8..a102810 100644 --- a/libk3b/jobs/k3bvideodvdtitledetectclippingjob.h +++ b/libk3b/jobs/k3bvideodvdtitledetectclippingjob.h @@ -28,9 +28,10 @@ class KProcess; class LIBK3B_EXPORT K3bVideoDVDTitleDetectClippingJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDTitleDetectClippingJob( K3bJobHandler* hdl, QObject* parent ); + K3bVideoDVDTitleDetectClippingJob( K3bJobHandler* hdl, TQObject* tqparent ); ~K3bVideoDVDTitleDetectClippingJob(); const K3bVideoDVD::VideoDVD& videoDVD() const { return m_dvd; } @@ -82,7 +83,7 @@ class LIBK3B_EXPORT K3bVideoDVDTitleDetectClippingJob : public K3bJob void setLowPriority( bool b ) { m_lowPriority = b; } private slots: - void slotTranscodeStderr( const QString& ); + void slotTranscodeStderr( const TQString& ); void slotTranscodeExited( KProcess* ); private: diff --git a/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp b/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp index 9fec637..08fbb59 100644 --- a/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp +++ b/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include class K3bVideoDVDTitleTranscodingJob::Private @@ -35,7 +35,7 @@ public: K3bProcess* process; - QString twoPassEncodingLogFile; + TQString twoPassEncodingLogFile; int currentEncodingPass; @@ -47,8 +47,8 @@ public: -K3bVideoDVDTitleTranscodingJob::K3bVideoDVDTitleTranscodingJob( K3bJobHandler* hdl, QObject* parent ) - : K3bJob( hdl, parent ), +K3bVideoDVDTitleTranscodingJob::K3bVideoDVDTitleTranscodingJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bJob( hdl, tqparent ), m_clippingTop( 0 ), m_clippingBottom( 0 ), m_clippingLeft( 0 ), @@ -87,15 +87,15 @@ void K3bVideoDVDTitleTranscodingJob::start() d->usedTranscodeBin = k3bcore->externalBinManager()->binObject("transcode"); if( !d->usedTranscodeBin ) { - emit infoMessage( i18n("%1 executable could not be found.").arg("transcode"), ERROR ); + emit infoMessage( i18n("%1 executable could not be found.").tqarg("transcode"), ERROR ); jobFinished( false ); return; } if( d->usedTranscodeBin->version < K3bVersion( 1, 0, 0 ) ){ emit infoMessage( i18n("%1 version %2 is too old.") - .arg("transcode") - .arg(d->usedTranscodeBin->version), ERROR ); + .tqarg("transcode") + .tqarg(d->usedTranscodeBin->version), ERROR ); jobFinished( false ); return; } @@ -104,9 +104,9 @@ void K3bVideoDVDTitleTranscodingJob::start() if( !d->usedTranscodeBin->copyright.isEmpty() ) emit infoMessage( i18n("Using %1 %2 - Copyright (C) %3") - .arg(d->usedTranscodeBin->name()) - .arg(d->usedTranscodeBin->version) - .arg(d->usedTranscodeBin->copyright), INFO ); + .tqarg(d->usedTranscodeBin->name()) + .tqarg(d->usedTranscodeBin->version) + .tqarg(d->usedTranscodeBin->copyright), INFO ); // // Let's take a look at the filename @@ -116,14 +116,14 @@ void K3bVideoDVDTitleTranscodingJob::start() } else { // let's see if the directory exists and we can write to it - QFileInfo fileInfo( m_filename ); - QFileInfo dirInfo( fileInfo.dirPath() ); + TQFileInfo fileInfo( m_filename ); + TQFileInfo dirInfo( fileInfo.dirPath() ); if( !dirInfo.exists() && !KStandardDirs::makeDir( dirInfo.absFilePath() ) ) { - emit infoMessage( i18n("Unable to create folder '%1'").arg(dirInfo.filePath()), ERROR ); + emit infoMessage( i18n("Unable to create folder '%1'").tqarg(dirInfo.filePath()), ERROR ); return; } else if( !dirInfo.isDir() || !dirInfo.isWritable() ) { - emit infoMessage( i18n("Invalid filename: '%1'").arg(m_filename), ERROR ); + emit infoMessage( i18n("Invalid filename: '%1'").tqarg(m_filename), ERROR ); jobFinished( false ); return; } @@ -134,7 +134,7 @@ void K3bVideoDVDTitleTranscodingJob::start() // d->twoPassEncodingLogFile = K3b::findTempFile( "log" ); - emit newTask( i18n("Transcoding title %1 from Video DVD %2").arg(m_titleNumber).arg(m_dvd.volumeIdentifier()) ); + emit newTask( i18n("Transcoding title %1 from Video DVD %2").tqarg(m_titleNumber).tqarg(m_dvd.volumeIdentifier()) ); // // Ok then, let's begin @@ -148,7 +148,7 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) d->currentEncodingPass = pass; d->lastSubProgress = 0; - QString videoCodecString; + TQString videoCodecString; switch( m_videoCodec ) { case VIDEO_CODEC_XVID: videoCodecString = "xvid"; @@ -159,12 +159,12 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) break; default: - emit infoMessage( i18n("Invalid Video codec set: %1").arg(m_videoCodec), ERROR ); + emit infoMessage( i18n("Invalid Video codec set: %1").tqarg(m_videoCodec), ERROR ); jobFinished( false ); return; } - QString audioCodecString; + TQString audioCodecString; switch( m_audioCodec ) { case AUDIO_CODEC_MP3: audioCodecString = "0x55"; @@ -182,7 +182,7 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) break; default: - emit infoMessage( i18n("Invalid Audio codec set: %1").arg(m_audioCodec), ERROR ); + emit infoMessage( i18n("Invalid Audio codec set: %1").tqarg(m_audioCodec), ERROR ); jobFinished( false ); return; } @@ -194,9 +194,9 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) d->process = new K3bProcess(); d->process->setSuppressEmptyLines(true); d->process->setSplitStdout(true); - connect( d->process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotTranscodeStderr(const QString&)) ); - connect( d->process, SIGNAL(stdoutLine(const QString&)), this, SLOT(slotTranscodeStderr(const QString&)) ); - connect( d->process, SIGNAL(processExited(KProcess*)), this, SLOT(slotTranscodeExited(KProcess*)) ); + connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotTranscodeStderr(const TQString&)) ); + connect( d->process, TQT_SIGNAL(stdoutLine(const TQString&)), this, TQT_SLOT(slotTranscodeStderr(const TQString&)) ); + connect( d->process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotTranscodeExited(KProcess*)) ); // the executable *d->process << d->usedTranscodeBin; @@ -207,9 +207,9 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) // we only need 100 steps, but to make sure we use 150 if ( d->usedTranscodeBin->version.simplify() >= K3bVersion( 1, 1, 0 ) ) - *d->process << "--progress_meter" << "2" << "--progress_rate" << QString::number(m_dvd[m_titleNumber-1].playbackTime().totalFrames()/150); + *d->process << "--progress_meter" << "2" << "--progress_rate" << TQString::number(m_dvd[m_titleNumber-1].playbackTime().totalFrames()/150); else - *d->process << "--print_status" << QString::number(m_dvd[m_titleNumber-1].playbackTime().totalFrames()/150); + *d->process << "--print_status" << TQString::number(m_dvd[m_titleNumber-1].playbackTime().totalFrames()/150); // the input *d->process << "-i" << m_dvd.device()->blockDeviceName(); @@ -218,22 +218,22 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) *d->process << "-x" << "dvd"; // select the title number - *d->process << "-T" << QString("%1,-1,1").arg( m_titleNumber ); + *d->process << "-T" << TQString("%1,-1,1").tqarg( m_titleNumber ); // select the audio stream to extract if ( m_dvd[m_titleNumber-1].numAudioStreams() > 0 ) - *d->process << "-a" << QString::number( m_audioStreamIndex ); + *d->process << "-a" << TQString::number( m_audioStreamIndex ); // clipping - *d->process << "-j" << QString("%1,%2,%3,%4") - .arg(m_clippingTop) - .arg(m_clippingLeft) - .arg(m_clippingBottom) - .arg(m_clippingRight); + *d->process << "-j" << TQString("%1,%2,%3,%4") + .tqarg(m_clippingTop) + .tqarg(m_clippingLeft) + .tqarg(m_clippingBottom) + .tqarg(m_clippingRight); // select the encoding type (single pass or two-pass) and the log file for two-pass encoding // the latter is unused for pass = 0 - *d->process << "-R" << QString("%1,%2").arg( pass ).arg( d->twoPassEncodingLogFile ); + *d->process << "-R" << TQString("%1,%2").tqarg( pass ).tqarg( d->twoPassEncodingLogFile ); // depending on the pass we use different options if( pass != 1 ) { @@ -249,7 +249,7 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) } else { // audio quality settings - *d->process << "-b" << QString("%1,%2").arg(m_audioBitrate).arg(m_audioVBR ? 1 : 0); + *d->process << "-b" << TQString("%1,%2").tqarg(m_audioBitrate).tqarg(m_audioVBR ? 1 : 0); // resample audio stream to 44.1 khz if( m_resampleAudio ) @@ -261,7 +261,7 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) } else { // gather information about the video stream, ignore audio - *d->process << "-y" << QString("%1,null").arg( videoCodecString ); + *d->process << "-y" << TQString("%1,null").tqarg( videoCodecString ); // we ignore the output from the first pass *d->process << "-o" << "/dev/null"; @@ -273,7 +273,7 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) } // video bitrate - *d->process << "-w" << QString::number( m_videoBitrate ); + *d->process << "-w" << TQString::number( m_videoBitrate ); // video resizing int usedWidth = m_width; @@ -317,19 +317,19 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) // we only give information about the resizing of the video once if( pass < 2 ) - emit infoMessage( i18n("Resizing picture of title %1 to %2x%3").arg(m_titleNumber).arg(usedWidth).arg(usedHeight), INFO ); - *d->process << "-Z" << QString("%1x%2").arg(usedWidth).arg(usedHeight); + emit infoMessage( i18n("Resizing picture of title %1 to %2x%3").tqarg(m_titleNumber).tqarg(usedWidth).tqarg(usedHeight), INFO ); + *d->process << "-Z" << TQString("%1x%2").tqarg(usedWidth).tqarg(usedHeight); // additional user parameters from config - const QStringList& params = d->usedTranscodeBin->userParameters(); - for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = d->usedTranscodeBin->userParameters(); + for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *d->process << *it; // produce some debugging output kdDebug() << "***** transcode parameters:\n"; - const QValueList& args = d->process->args(); - QString s; - for( QValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList& args = d->process->args(); + TQString s; + for( TQValueList::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << flush << endl; @@ -339,7 +339,7 @@ void K3bVideoDVDTitleTranscodingJob::startTranscode( int pass ) if( !d->process->start( KProcess::NotifyOnExit, KProcess::All ) ) { // something went wrong when starting the program // it "should" be the executable - emit infoMessage( i18n("Could not start %1.").arg(d->usedTranscodeBin->name()), K3bJob::ERROR ); + emit infoMessage( i18n("Could not start %1.").tqarg(d->usedTranscodeBin->name()), K3bJob::ERROR ); jobFinished(false); } else { @@ -367,26 +367,26 @@ void K3bVideoDVDTitleTranscodingJob::cancel() void K3bVideoDVDTitleTranscodingJob::cleanup( bool success ) { - if( QFile::exists( d->twoPassEncodingLogFile ) ) { - QFile::remove( d->twoPassEncodingLogFile ); + if( TQFile::exists( d->twoPassEncodingLogFile ) ) { + TQFile::remove( d->twoPassEncodingLogFile ); } - if( !success && QFile::exists( m_filename ) ) { - emit infoMessage( i18n("Removing incomplete video file '%1'").arg(m_filename), INFO ); - QFile::remove( m_filename ); + if( !success && TQFile::exists( m_filename ) ) { + emit infoMessage( i18n("Removing incomplete video file '%1'").tqarg(m_filename), INFO ); + TQFile::remove( m_filename ); } } -void K3bVideoDVDTitleTranscodingJob::slotTranscodeStderr( const QString& line ) +void K3bVideoDVDTitleTranscodingJob::slotTranscodeStderr( const TQString& line ) { emit debuggingOutput( "transcode", line ); // parse progress // encoding frames [000000-000144], 27.58 fps, EMT: 0:00:05, ( 0| 0| 0) if( line.startsWith( "encoding frame" ) ) { - int pos1 = line.find( '-', 15 ); - int pos2 = line.find( ']', pos1+1 ); + int pos1 = line.tqfind( '-', 15 ); + int pos2 = line.tqfind( ']', pos1+1 ); if( pos1 > 0 && pos2 > 0 ) { bool ok; int encodedFrames = line.mid( pos1+1, pos2-pos1-1 ).toInt( &ok ); @@ -440,7 +440,7 @@ void K3bVideoDVDTitleTranscodingJob::slotTranscodeExited( KProcess* p ) // FIXME: error handling emit infoMessage( i18n("%1 returned an unknown error (code %2).") - .arg(d->usedTranscodeBin->name()).arg(p->exitStatus()), + .tqarg(d->usedTranscodeBin->name()).tqarg(p->exitStatus()), K3bJob::ERROR ); emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR ); @@ -450,7 +450,7 @@ void K3bVideoDVDTitleTranscodingJob::slotTranscodeExited( KProcess* p ) } else { cleanup( false ); - emit infoMessage( i18n("Execution of %1 failed.").arg("transcode"), ERROR ); + emit infoMessage( i18n("Execution of %1 failed.").tqarg("transcode"), ERROR ); emit infoMessage( i18n("Please consult the debugging output for details."), ERROR ); jobFinished( false ); } @@ -467,7 +467,7 @@ void K3bVideoDVDTitleTranscodingJob::setClipping( int top, int left, int bottom, // // transcode seems unable to handle different clipping values for left and right // - m_clippingLeft = m_clippingRight = QMIN( m_clippingRight, m_clippingLeft ); + m_clippingLeft = m_clippingRight = TQMIN( m_clippingRight, m_clippingLeft ); } @@ -478,7 +478,7 @@ void K3bVideoDVDTitleTranscodingJob::setSize( int width, int height ) } -QString K3bVideoDVDTitleTranscodingJob::audioCodecString( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) +TQString K3bVideoDVDTitleTranscodingJob::audioCodecString( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) { switch( codec ) { case AUDIO_CODEC_AC3_STEREO: @@ -493,7 +493,7 @@ QString K3bVideoDVDTitleTranscodingJob::audioCodecString( K3bVideoDVDTitleTransc } -QString K3bVideoDVDTitleTranscodingJob::videoCodecString( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) +TQString K3bVideoDVDTitleTranscodingJob::videoCodecString( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) { switch( codec ) { case VIDEO_CODEC_FFMPEG_MPEG4: @@ -506,7 +506,7 @@ QString K3bVideoDVDTitleTranscodingJob::videoCodecString( K3bVideoDVDTitleTransc } -QString K3bVideoDVDTitleTranscodingJob::videoCodecDescription( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) +TQString K3bVideoDVDTitleTranscodingJob::videoCodecDescription( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) { switch( codec ) { case VIDEO_CODEC_FFMPEG_MPEG4: @@ -521,7 +521,7 @@ QString K3bVideoDVDTitleTranscodingJob::videoCodecDescription( K3bVideoDVDTitleT "volunteer programmers after the OpenDivX source was closed in July 2001.") + "
" + i18n("XviD features MPEG-4 Advanced Profile settings such as b-frames, global " - "and quarter pixel motion compensation, lumi masking, trellis quantization, and " + "and quarter pixel motion compensation, lumi tqmasking, trellis quantization, and " "H.263, MPEG and custom quantization matrices.") + "
" + i18n("XviD is a primary competitor of DivX (XviD being DivX spelled backwards). " @@ -536,9 +536,9 @@ QString K3bVideoDVDTitleTranscodingJob::videoCodecDescription( K3bVideoDVDTitleT } -QString K3bVideoDVDTitleTranscodingJob::audioCodecDescription( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) +TQString K3bVideoDVDTitleTranscodingJob::audioCodecDescription( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) { - static QString s_ac3General = i18n("AC3, better known as Dolby Digital is standardized as ATSC A/52. " + static TQString s_ac3General = i18n("AC3, better known as Dolby Digital is standardized as ATSC A/52. " "It contains up to 6 total channels of sound."); switch( codec ) { case AUDIO_CODEC_AC3_STEREO: @@ -566,7 +566,7 @@ bool K3bVideoDVDTitleTranscodingJob::transcodeBinaryHasSupportFor( K3bVideoDVDTi bin = k3bcore->externalBinManager()->binObject("transcode"); if( !bin ) return false; - return bin->hasFeature( QString::fromLatin1( s_codecFeatures[(int)codec] ) ); + return bin->hasFeature( TQString::tqfromLatin1( s_codecFeatures[(int)codec] ) ); } @@ -577,7 +577,7 @@ bool K3bVideoDVDTitleTranscodingJob::transcodeBinaryHasSupportFor( K3bVideoDVDTi bin = k3bcore->externalBinManager()->binObject("transcode"); if( !bin ) return false; - return bin->hasFeature( QString::fromLatin1( s_codecFeatures[(int)codec] ) ); + return bin->hasFeature( TQString::tqfromLatin1( s_codecFeatures[(int)codec] ) ); } #include "k3bvideodvdtitletranscodingjob.moc" diff --git a/libk3b/jobs/k3bvideodvdtitletranscodingjob.h b/libk3b/jobs/k3bvideodvdtitletranscodingjob.h index 77a48b5..8523d0e 100644 --- a/libk3b/jobs/k3bvideodvdtitletranscodingjob.h +++ b/libk3b/jobs/k3bvideodvdtitletranscodingjob.h @@ -33,9 +33,10 @@ class K3bExternalBin; class LIBK3B_EXPORT K3bVideoDVDTitleTranscodingJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDTitleTranscodingJob( K3bJobHandler* hdl, QObject* parent ); + K3bVideoDVDTitleTranscodingJob( K3bJobHandler* hdl, TQObject* tqparent ); ~K3bVideoDVDTitleTranscodingJob(); /** @@ -67,7 +68,7 @@ class LIBK3B_EXPORT K3bVideoDVDTitleTranscodingJob : public K3bJob int clippingRight() const { return m_clippingRight; } int height() const { return m_height; } int width() const { return m_width; } - const QString& filename() { return m_filename; } + const TQString& filename() { return m_filename; } VideoCodec videoCodec() const { return m_videoCodec; } int videoBitrate() const { return m_videoBitrate; } bool twoPassEncoding() const { return m_twoPassEncoding; } @@ -87,11 +88,11 @@ class LIBK3B_EXPORT K3bVideoDVDTitleTranscodingJob : public K3bJob */ static bool transcodeBinaryHasSupportFor( AudioCodec codec, const K3bExternalBin* bin = 0 ); - static QString videoCodecString( VideoCodec ); - static QString audioCodecString( AudioCodec ); + static TQString videoCodecString( VideoCodec ); + static TQString audioCodecString( AudioCodec ); - static QString videoCodecDescription( VideoCodec ); - static QString audioCodecDescription( AudioCodec ); + static TQString videoCodecDescription( VideoCodec ); + static TQString audioCodecDescription( AudioCodec ); public slots: void start(); @@ -158,7 +159,7 @@ class LIBK3B_EXPORT K3bVideoDVDTitleTranscodingJob : public K3bJob * The default is some automatically generated filename * in the default K3b temp directory. */ - void setFilename( const QString& name ) { m_filename = name; } + void setFilename( const TQString& name ) { m_filename = name; } /** * Set the video codec used to encode the video title. @@ -228,7 +229,7 @@ class LIBK3B_EXPORT K3bVideoDVDTitleTranscodingJob : public K3bJob void setLowPriority( bool b ) { m_lowPriority = b; } private slots: - void slotTranscodeStderr( const QString& ); + void slotTranscodeStderr( const TQString& ); void slotTranscodeExited( KProcess* ); private: @@ -243,7 +244,7 @@ class LIBK3B_EXPORT K3bVideoDVDTitleTranscodingJob : public K3bJob K3bVideoDVD::VideoDVD m_dvd; - QString m_filename; + TQString m_filename; int m_clippingTop; int m_clippingBottom; diff --git a/libk3b/k3bimage.xsd b/libk3b/k3bimage.xsd index ab7f36c..607bd95 100644 --- a/libk3b/k3bimage.xsd +++ b/libk3b/k3bimage.xsd @@ -1,9 +1,9 @@