summaryrefslogtreecommitdiffstats
path: root/libk3b/core
diff options
context:
space:
mode:
Diffstat (limited to 'libk3b/core')
-rw-r--r--libk3b/core/k3bcore.cpp52
-rw-r--r--libk3b/core/k3bcore.h15
-rw-r--r--libk3b/core/k3bdataevent.h10
-rw-r--r--libk3b/core/k3bdefaultexternalprograms.cpp282
-rw-r--r--libk3b/core/k3bdefaultexternalprograms.h30
-rw-r--r--libk3b/core/k3bexternalbinmanager.cpp104
-rw-r--r--libk3b/core/k3bexternalbinmanager.h79
-rw-r--r--libk3b/core/k3bglobals.cpp160
-rw-r--r--libk3b/core/k3bglobals.h54
-rw-r--r--libk3b/core/k3bglobalsettings.cpp4
-rw-r--r--libk3b/core/k3bjob.cpp86
-rw-r--r--libk3b/core/k3bjob.h50
-rw-r--r--libk3b/core/k3bjobhandler.h14
-rw-r--r--libk3b/core/k3bprocess.cpp70
-rw-r--r--libk3b/core/k3bprocess.h30
-rw-r--r--libk3b/core/k3bprogressinfoevent.h28
-rw-r--r--libk3b/core/k3bsimplejobhandler.cpp18
-rw-r--r--libk3b/core/k3bsimplejobhandler.h21
-rw-r--r--libk3b/core/k3bthread.cpp62
-rw-r--r--libk3b/core/k3bthread.h24
-rw-r--r--libk3b/core/k3bthreadjob.cpp18
-rw-r--r--libk3b/core/k3bthreadjob.h13
-rw-r--r--libk3b/core/k3bversion.cpp48
-rw-r--r--libk3b/core/k3bversion.h34
24 files changed, 657 insertions, 649 deletions
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 <kstandarddirs.h>
#include <kapplication.h>
-#include <qptrlist.h>
-#include <qthread.h>
-#include <qmutex.h>
+#include <tqptrlist.h>
+#include <tqthread.h>
+#include <tqmutex.h>
-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<K3bJob*> runningJobs;
- QValueList<K3bDevice::Device*> blockedDevices;
+ TQValueList<K3bJob*> runningJobs;
+ TQValueList<K3bDevice::Device*> 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<K3bJob*>& K3bCore::runningJobs() const
+const TQValueList<K3bJob*>& K3bCore::runningJobs() const
{
return d->runningJobs;
}
@@ -318,13 +318,13 @@ const QValueList<K3bJob*>& 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<DeviceBlockingEvent*>(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 <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#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<K3bJob*>& runningJobs() const;
+ const TQValueList<K3bJob*>& 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 <qevent.h>
+#include <tqevent.h>
/**
* 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 <k3bglobals.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include <k3bprocess.h>
#include <kdebug.h>
@@ -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 <kconfig.h>
#include <kdeversion.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -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<K3bExternalBin> it( m_bins );
+ TQPtrListIterator<K3bExternalBin> 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<K3bExternalBin> it( m_bins ); it.current(); ++it ) {
+ for( TQPtrListIterator<K3bExternalBin> 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<QString, K3bExternalProgram*>::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) {
+ for ( TQMap<TQString, K3bExternalProgram*>::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<QString, K3bExternalProgram*>::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) {
+ for ( TQMap<TQString, K3bExternalProgram*>::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<QString, K3bExternalProgram*>::Iterator it = m_programs.begin(); it != m_programs.end(); ++it )
+ for( TQMap<TQString, K3bExternalProgram*>::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<QString, K3bExternalProgram*>::iterator it = m_programs.begin(); it != m_programs.end(); ++it ) {
+ for( TQMap<TQString, K3bExternalProgram*>::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<QString, K3bExternalProgram*>::iterator pit = m_programs.begin(); pit != m_programs.end(); ++pit )
+ for( TQStringList::const_iterator it = paths.begin(); it != paths.end(); ++it )
+ for( TQMap<TQString, K3bExternalProgram*>::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 <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#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<K3bExternalBin>& bins() const { return m_bins; }
+ const TQPtrList<K3bExternalBin>& 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<K3bExternalBin> m_bins;
+ TQString m_name;
+ TQStringList m_userParameters;
+ TQPtrList<K3bExternalBin> 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<QString, K3bExternalProgram*>& programs() const { return m_programs; }
+ K3bExternalProgram* program( const TQString& ) const;
+ const TQMap<TQString, K3bExternalProgram*>& 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<QString, K3bExternalProgram*> m_programs;
- QStringList m_searchPath;
+ TQMap<TQString, K3bExternalProgram*> 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 <dcopref.h>
#include <kprocess.h>
-#include <qdatastream.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdatastream.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <cmath>
#include <sys/utsname.h>
@@ -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 <config.h>
#endif
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <kio/global.h>
#include <kurl.h>
#include <k3bdevicetypes.h>
@@ -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 <klocale.h>
#include <kprocess.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
@@ -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 <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#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<K3bJob>& runningSubJobs() const { return m_runningSubJobs; }
+ const TQPtrList<K3bJob>& 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<K3bJob> m_runningSubJobs;
+ TQPtrList<K3bJob> 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 <qstringlist.h>
-#include <qsocketnotifier.h>
-#include <qptrqueue.h>
-#include <qapplication.h>
+#include <tqstringlist.h>
+#include <tqsocketnotifier.h>
+#include <tqptrqueue.h>
+#include <tqapplication.h>
#include <kdebug.h>
@@ -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<KProcess*>(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<KProcess*>(this)->operator<<( arg );
return *this;
}
-K3bProcess& K3bProcess::operator<<( const QStringList& args )
+K3bProcess& K3bProcess::operator<<( const TQStringList& args )
{
static_cast<KProcess*>(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 <kprocess.h>
-#include <qstring.h>
+#include <tqstring.h>
#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 <qevent.h>
-#include <qstring.h>
+#include <tqevent.h>
+#include <tqstring.h>
/**
* 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 <k3b_export.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <k3bjobhandler.h>
@@ -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 <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
-static QPtrList<K3bThread> s_threads;
+static TQPtrList<K3bThread> s_threads;
void K3bThread::waitUntilFinished()
{
- QPtrListIterator<K3bThread> it( s_threads );
+ TQPtrListIterator<K3bThread> 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 <qthread.h>
+#include <tqthread.h>
#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<K3bDataEvent*>(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 <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -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 <qstring.h>
+#include <tqstring.h>
#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;
};