summaryrefslogtreecommitdiffstats
path: root/ark
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /ark
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ark')
-rw-r--r--ark/ace.cpp60
-rw-r--r--ark/ace.h8
-rw-r--r--ark/ar.cpp96
-rw-r--r--ark/ar.h8
-rw-r--r--ark/arch.cpp70
-rw-r--r--ark/arch.h74
-rw-r--r--ark/archiveformatdlg.cpp22
-rw-r--r--ark/archiveformatdlg.h4
-rw-r--r--ark/archiveformatinfo.cpp46
-rw-r--r--ark/archiveformatinfo.h32
-rw-r--r--ark/ark_part.cpp128
-rw-r--r--ark/ark_part.h24
-rw-r--r--ark/arkapp.cpp18
-rw-r--r--ark/arkapp.h12
-rw-r--r--ark/arkfactory.cpp12
-rw-r--r--ark/arkfactory.h6
-rw-r--r--ark/arkutils.cpp34
-rw-r--r--ark/arkutils.h18
-rw-r--r--ark/arkviewer.cpp40
-rw-r--r--ark/arkviewer.h4
-rw-r--r--ark/arkwidget.cpp490
-rw-r--r--ark/arkwidget.h96
-rw-r--r--ark/compressedfile.cpp70
-rw-r--r--ark/compressedfile.h20
-rw-r--r--ark/extractiondialog.cpp64
-rw-r--r--ark/extractiondialog.h20
-rw-r--r--ark/filelistview.cpp106
-rw-r--r--ark/filelistview.h50
-rw-r--r--ark/lha.cpp86
-rw-r--r--ark/lha.h10
-rw-r--r--ark/mainwindow.cpp104
-rw-r--r--ark/mainwindow.h24
-rw-r--r--ark/rar.cpp84
-rw-r--r--ark/rar.h12
-rw-r--r--ark/searchbar.cpp10
-rw-r--r--ark/searchbar.h4
-rw-r--r--ark/sevenzip.cpp102
-rw-r--r--ark/sevenzip.h10
-rw-r--r--ark/tar.cpp218
-rw-r--r--ark/tar.h30
-rw-r--r--ark/tarlistingthread.cpp34
-rw-r--r--ark/tarlistingthread.h20
-rw-r--r--ark/zip.cpp92
-rw-r--r--ark/zip.h8
-rw-r--r--ark/zoo.cpp98
-rw-r--r--ark/zoo.h10
46 files changed, 1294 insertions, 1294 deletions
diff --git a/ark/ace.cpp b/ark/ace.cpp
index d9cce52..0c8fb14 100644
--- a/ark/ace.cpp
+++ b/ark/ace.cpp
@@ -22,7 +22,7 @@
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <klocale.h>
@@ -36,7 +36,7 @@
#include "arkwidget.h"
#include "settings.h"
-AceArch::AceArch( ArkWidget *gui, const QString &filename )
+AceArch::AceArch( ArkWidget *gui, const TQString &filename )
: Arch( gui, filename )
{
//m_archiver_program = m_unarchiver_program = "/usr/local/bin/unace";
@@ -49,14 +49,14 @@ AceArch::AceArch( ArkWidget *gui, const QString &filename )
m_dateCol = 3;
m_numCols = 5;
- m_archCols.append( new ArchColumns( 7, QRegExp( "[0-3][0-9]" ), 2 ) ); // Day
- m_archCols.append( new ArchColumns( 6, QRegExp( "[01][0-9]" ), 2 ) ); // Month
- m_archCols.append( new ArchColumns( 5, QRegExp( "[0-9][0-9]" ), 4 ) ); // Year
- m_archCols.append( new ArchColumns( 8, QRegExp( "[0-9:]+" ), 8 ) ); // Time
- m_archCols.append( new ArchColumns( 2, QRegExp( "[0-9]+" ) ) ); // Compressed Size
- m_archCols.append( new ArchColumns( 1, QRegExp( "[0-9]+" ) ) ); // Size
- m_archCols.append( new ArchColumns( 9, QRegExp( "[0-9][0-9]%" ) ) ); // Ratio
- m_archCols.append( new ArchColumns( 0, QRegExp( "[^\\n]+" ), 4096 ) ); // Name
+ m_archCols.append( new ArchColumns( 7, TQRegExp( "[0-3][0-9]" ), 2 ) ); // Day
+ m_archCols.append( new ArchColumns( 6, TQRegExp( "[01][0-9]" ), 2 ) ); // Month
+ m_archCols.append( new ArchColumns( 5, TQRegExp( "[0-9][0-9]" ), 4 ) ); // Year
+ m_archCols.append( new ArchColumns( 8, TQRegExp( "[0-9:]+" ), 8 ) ); // Time
+ m_archCols.append( new ArchColumns( 2, TQRegExp( "[0-9]+" ) ) ); // Compressed Size
+ m_archCols.append( new ArchColumns( 1, TQRegExp( "[0-9]+" ) ) ); // Size
+ m_archCols.append( new ArchColumns( 9, TQRegExp( "[0-9][0-9]%" ) ) ); // Ratio
+ m_archCols.append( new ArchColumns( 0, TQRegExp( "[^\\n]+" ), 4096 ) ); // Name
}
AceArch::~AceArch()
@@ -89,20 +89,20 @@ void AceArch::open()
kdDebug() << "AceArch::open(): kp->args(): " << kp->args() << endl;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotOpenExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotOpenExited(KProcess*) ) );
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- this, SLOT( catchMeIfYouCan(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ this, TQT_SLOT( catchMeIfYouCan(KProcess*, char*, int) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
@@ -112,15 +112,15 @@ void AceArch::create()
Arch::Extract | Arch::View );
}
-void AceArch::addFile( const QStringList & urls )
+void AceArch::addFile( const TQStringList & urls )
{
}
-void AceArch::addDir( const QString & dirName )
+void AceArch::addDir( const TQString & dirName )
{
}
-void AceArch::remove( QStringList *list )
+void AceArch::remove( TQStringList *list )
{
}
@@ -151,19 +151,19 @@ void AceArch::unarchFileInternal( )
// and we then extract everything in the archive.
if ( m_fileList )
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = m_fileList->begin(); it != m_fileList->end(); ++it )
{
*kp << (*it);
}
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotExtractExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotExtractExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -174,7 +174,7 @@ void AceArch::unarchFileInternal( )
void AceArch::catchMeIfYouCan( KProcess*, char *buffer, int buflen )
{
- QString myBuf = QString::fromLatin1( buffer, buflen );
+ TQString myBuf = TQString::fromLatin1( buffer, buflen );
kdDebug(1601) << " Wololo!: " << myBuf << endl;
}
diff --git a/ark/ace.h b/ark/ace.h
index 7aed56c..0f22fb1 100644
--- a/ark/ace.h
+++ b/ark/ace.h
@@ -33,16 +33,16 @@ class AceArch : public Arch
{
Q_OBJECT
public:
- AceArch( ArkWidget *, const QString & );
+ AceArch( ArkWidget *, const TQString & );
virtual ~AceArch();
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
- virtual void remove( QStringList * );
+ virtual void remove( TQStringList * );
virtual void unarchFileInternal( );
private slots:
diff --git a/ark/ar.cpp b/ark/ar.cpp
index 71f44e0..d71a2a0 100644
--- a/ark/ar.cpp
+++ b/ark/ar.cpp
@@ -32,7 +32,7 @@
#include <string.h>
// QT includes
-#include <qdir.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -45,7 +45,7 @@
#include "settings.h"
#include "ar.h"
-ArArch::ArArch( ArkWidget *_gui, const QString & _fileName )
+ArArch::ArArch( ArkWidget *_gui, const TQString & _fileName )
: Arch(_gui, _fileName )
{
m_archiver_program = m_unarchiver_program = "ar";
@@ -56,14 +56,14 @@ ArArch::ArArch( ArkWidget *_gui, const QString & _fileName )
m_numCols = 5;
m_dateCol = 4; m_fixYear = 8; m_repairMonth = 5; m_fixDay = 6; m_fixTime = 7;
- m_archCols.append(new ArchColumns(1, QRegExp("[a-zA-Z-]+"), 12)); // Perms
- m_archCols.append(new ArchColumns(2, QRegExp("[^\\s]+"), 128)); //User/grp
- m_archCols.append(new ArchColumns(3, QRegExp("[0-9]+"))); // Size
- m_archCols.append(new ArchColumns(5, QRegExp("[a-zA-Z]+"), 4)); // Month
- m_archCols.append(new ArchColumns(6, QRegExp("[0-9]+"), 2)); // Day
- m_archCols.append(new ArchColumns(7, QRegExp("[0-9:]+"), 6)); // Time
- m_archCols.append(new ArchColumns(8, QRegExp("[0-9]+"), 5)); // Year
- m_archCols.append(new ArchColumns(0, QRegExp("[^\\s][^\\n]+"), 4096));// File
+ m_archCols.append(new ArchColumns(1, TQRegExp("[a-zA-Z-]+"), 12)); // Perms
+ m_archCols.append(new ArchColumns(2, TQRegExp("[^\\s]+"), 128)); //User/grp
+ m_archCols.append(new ArchColumns(3, TQRegExp("[0-9]+"))); // Size
+ m_archCols.append(new ArchColumns(5, TQRegExp("[a-zA-Z]+"), 4)); // Month
+ m_archCols.append(new ArchColumns(6, TQRegExp("[0-9]+"), 2)); // Day
+ m_archCols.append(new ArchColumns(7, TQRegExp("[0-9:]+"), 6)); // Time
+ m_archCols.append(new ArchColumns(8, TQRegExp("[0-9]+"), 5)); // Year
+ m_archCols.append(new ArchColumns(0, TQRegExp("[^\\s][^\\n]+"), 4096));// File
kdDebug(1601) << "ArArch constructor" << endl;
}
@@ -89,18 +89,18 @@ void ArArch::open()
KProcess *kp = m_currentProcess = new KProcess;
*kp << m_archiver_program << "vt" << m_filename;
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedTOC(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedTOC(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotOpenExited(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotOpenExited(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
KMessageBox::error( 0, i18n("Could not start a subprocess.") );
- emit sigOpen(this, false, QString::null, 0 );
+ emit sigOpen(this, false, TQString::null, 0 );
}
kdDebug(1601) << "-ArArch::open" << endl;
}
@@ -111,10 +111,10 @@ void ArArch::create()
kp->clearArguments();
*kp << m_archiver_program << "c" << m_filename;
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
if (kp->start(KProcess::Block) == false)
{
@@ -129,7 +129,7 @@ void ArArch::create()
| Arch::View);
}
-void ArArch::addFile( const QStringList &urls )
+void ArArch::addFile( const TQStringList &urls )
{
kdDebug(1601) << "+ArArch::addFile" << endl;
KProcess *kp = m_currentProcess = new KProcess;
@@ -143,22 +143,22 @@ void ArArch::addFile( const QStringList &urls )
*kp << m_filename;
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
KURL url( urls.first() );
- QDir::setCurrent( url.directory() );
+ TQDir::setCurrent( url.directory() );
for (iter = urls.begin(); iter != urls.end(); ++iter )
{
KURL fileURL( *iter );
*kp << fileURL.fileName();
}
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotAddExited(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotAddExited(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
@@ -175,7 +175,7 @@ void ArArch::unarchFileInternal()
// if m_destDir is empty, abort with error.
kdDebug(1601) << "+ArArch::unarchFile" << endl;
- QString dest;
+ TQString dest;
if (m_destDir.isEmpty() || m_destDir.isNull())
{
@@ -187,7 +187,7 @@ void ArArch::unarchFileInternal()
// ar has no option to specify the destination directory
// so I have to change to it.
- bool ret = QDir::setCurrent(dest);
+ bool ret = TQDir::setCurrent(dest);
// I already checked the validity of the dir before coming here
Q_ASSERT(ret);
@@ -202,20 +202,20 @@ void ArArch::unarchFileInternal()
// and we then extract everything in the archive.
if (m_fileList)
{
- for ( QStringList::Iterator it = m_fileList->begin();
+ for ( TQStringList::Iterator it = m_fileList->begin();
it != m_fileList->end(); ++it )
{
*kp << (*it);
}
}
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotExtractExited(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotExtractExited(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
@@ -224,7 +224,7 @@ void ArArch::unarchFileInternal()
}
}
-void ArArch::remove(QStringList *list)
+void ArArch::remove(TQStringList *list)
{
kdDebug(1601) << "+ArArch::remove" << endl;
@@ -235,20 +235,20 @@ void ArArch::remove(QStringList *list)
kp->clearArguments();
*kp << m_archiver_program << "d" << m_filename;
- for ( QStringList::Iterator it = list->begin();
+ for ( TQStringList::Iterator it = list->begin();
it != list->end(); ++it )
{
- QString str = *it;
+ TQString str = *it;
*kp << str;
}
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotDeleteExited(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotDeleteExited(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
diff --git a/ark/ar.h b/ark/ar.h
index 1a5f00f..48dc156 100644
--- a/ark/ar.h
+++ b/ark/ar.h
@@ -42,16 +42,16 @@ class ArArch : public Arch
Q_OBJECT
public:
ArArch( ArkWidget *_gui,
- const QString & _fileName );
+ const TQString & _fileName );
virtual ~ArArch() {}
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir(const QString &) {} // never gets called
+ virtual void addFile( const TQStringList & );
+ virtual void addDir(const TQString &) {} // never gets called
- virtual void remove(QStringList *);
+ virtual void remove(TQStringList *);
virtual void unarchFileInternal();
private:
diff --git a/ark/arch.cpp b/ark/arch.cpp
index 1916e12..a08484c 100644
--- a/ark/arch.cpp
+++ b/ark/arch.cpp
@@ -31,8 +31,8 @@
#include <time.h>
// QT includes
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqfile.h>
// KDE includes
#include <kdebug.h>
@@ -60,12 +60,12 @@
#include "sevenzip.h"
#include "ace.h"
-Arch::ArchColumns::ArchColumns( int col, QRegExp reg, int length, bool opt )
+Arch::ArchColumns::ArchColumns( int col, TQRegExp reg, int length, bool opt )
: colRef( col ), pattern( reg ), maxLength( length ), optional( opt )
{
}
-Arch::Arch( ArkWidget *gui, const QString &filename )
+Arch::Arch( ArkWidget *gui, const TQString &filename )
: m_filename( filename ), m_buffer( "" ), m_gui( gui ),
m_bReadOnly( false ), m_bNotifyWhenDeleteFails( true ),
m_header_removed( false ), m_finished( false ),
@@ -83,18 +83,18 @@ Arch::~Arch()
}
//Check if a compress utility exists
-void Arch::verifyCompressUtilityIsAvailable( const QString &utility )
+void Arch::verifyCompressUtilityIsAvailable( const TQString &utility )
{
// see if the utility is in the PATH of the user.
- QString cmd = KGlobal::dirs()->findExe( utility );
+ TQString cmd = KGlobal::dirs()->findExe( utility );
m_bArchUtilityIsAvailable = !cmd.isEmpty();
}
//Check if a utility can uncompress files
-void Arch::verifyUncompressUtilityIsAvailable( const QString &utility )
+void Arch::verifyUncompressUtilityIsAvailable( const TQString &utility )
{
// see if the utility is in the PATH of the user.
- QString cmd = KGlobal::dirs()->findExe( utility );
+ TQString cmd = KGlobal::dirs()->findExe( utility );
m_bUnarchUtilityIsAvailable = !cmd.isEmpty();
}
@@ -106,7 +106,7 @@ void Arch::slotOpenExited( KProcess* _kp )
{
if ( passwordRequired() )
{
- QString msg;
+ TQString msg;
if ( !m_password.isEmpty() )
msg = i18n("The password was incorrect. ");
if (KPasswordDialog::getPassword( m_password, msg+i18n("You must enter a password to open the file:") ) == KPasswordDialog::Accepted )
@@ -118,7 +118,7 @@ void Arch::slotOpenExited( KProcess* _kp )
return;
}
m_password = "";
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
delete _kp;
_kp = m_currentProcess = 0;
return;
@@ -140,7 +140,7 @@ void Arch::slotOpenExited( KProcess* _kp )
emit sigOpen( this, true, m_filename,
Arch::Extract | Arch::Delete | Arch::Add | Arch::View );
else
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
delete _kp;
_kp = m_currentProcess = 0;
@@ -152,13 +152,13 @@ void Arch::slotDeleteExited( KProcess *_kp )
if ( !success )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- QString msg = i18n( "The deletion operation failed." );
+ TQString msg = i18n( "The deletion operation failed." );
if ( !getLastShellOutput().isNull() )
{
- QStringList list = QStringList::split( "\n", getLastShellOutput() );
+ TQStringList list = TQStringList::split( "\n", getLastShellOutput() );
KMessageBox::errorList( m_gui, msg, list );
clearShellOutput();
}
@@ -181,7 +181,7 @@ void Arch::slotExtractExited( KProcess *_kp )
{
if ( passwordRequired() )
{
- QString msg;
+ TQString msg;
if ( !m_password.isEmpty() )
msg = i18n("The password was incorrect. ");
if (KPasswordDialog::getPassword( m_password, msg+i18n("You must enter a password to extract the file:") ) == KPasswordDialog::Accepted )
@@ -200,14 +200,14 @@ void Arch::slotExtractExited( KProcess *_kp )
}
else if ( m_password.isEmpty() || _kp->exitStatus() > 1 )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- QString msg = i18n( "The extraction operation failed." );
+ TQString msg = i18n( "The extraction operation failed." );
if ( !getLastShellOutput().isNull() )
{
- //getLastShellOutput() is a QString. errorList is expecting QStringLists to show in multiple lines
- QStringList list = QStringList::split( "\n", getLastShellOutput() );
+ //getLastShellOutput() is a TQString. errorList is expecting QStringLists to show in multiple lines
+ TQStringList list = TQStringList::split( "\n", getLastShellOutput() );
KMessageBox::errorList( m_gui, msg, list );
clearShellOutput();
}
@@ -223,7 +223,7 @@ void Arch::slotExtractExited( KProcess *_kp )
emit sigExtract( success );
}
-void Arch::unarchFile( QStringList *fileList, const QString & destDir,
+void Arch::unarchFile( TQStringList *fileList, const TQString & destDir,
bool viewFriendly )
{
m_fileList = fileList;
@@ -238,13 +238,13 @@ void Arch::slotAddExited( KProcess *_kp )
if( !success )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- QString msg = i18n( "The addition operation failed." );
+ TQString msg = i18n( "The addition operation failed." );
if ( !getLastShellOutput().isNull() )
{
- QStringList list = QStringList::split( "\n", getLastShellOutput() );
+ TQStringList list = TQStringList::split( "\n", getLastShellOutput() );
KMessageBox::errorList( m_gui, msg, list );
clearShellOutput();
}
@@ -288,7 +288,7 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length )
data[ lfChar ] = '\0';
- m_buffer.append( QString::fromUtf8(data + startChar).latin1() );
+ m_buffer.append( TQString::fromUtf8(data + startChar).latin1() );
data[ lfChar ] = '\n';
startChar = lfChar + 1;
@@ -327,14 +327,14 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length )
data[ length ] = c;
}
-bool Arch::processLine( const QCString &line )
+bool Arch::processLine( const TQCString &line )
{
- QString columns[ 11 ];
+ TQString columns[ 11 ];
unsigned int pos = 0;
int strpos, len;
// Go through our columns, try to pick out data, return silently on failure
- for ( QPtrListIterator <ArchColumns>col( m_archCols ); col.current(); ++col )
+ for ( TQPtrListIterator <ArchColumns>col( m_archCols ); col.current(); ++col )
{
ArchColumns *curCol = *col;
@@ -354,20 +354,20 @@ bool Arch::processLine( const QCString &line )
pos = strpos + len;
- columns[curCol->colRef] = QString::fromLocal8Bit( line.mid(strpos, len) );
+ columns[curCol->colRef] = TQString::fromLocal8Bit( line.mid(strpos, len) );
}
if ( m_dateCol >= 0 )
{
- QString year = ( m_repairYear >= 0 ) ?
+ TQString year = ( m_repairYear >= 0 ) ?
ArkUtils::fixYear( columns[ m_repairYear ].ascii())
: columns[ m_fixYear ];
- QString month = ( m_repairMonth >= 0 ) ?
- QString( "%1" )
+ TQString month = ( m_repairMonth >= 0 ) ?
+ TQString( "%1" )
.arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) )
: columns[ m_fixMonth ];
- QString timestamp = QString::fromLatin1( "%1-%2-%3 %4" )
+ TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" )
.arg( year )
.arg( month )
.arg( columns[ m_fixDay ] )
@@ -376,7 +376,7 @@ bool Arch::processLine( const QCString &line )
columns[ m_dateCol ] = timestamp;
}
- QStringList list;
+ TQStringList list;
for ( int i = 0; i < m_numCols; ++i )
{
@@ -390,8 +390,8 @@ bool Arch::processLine( const QCString &line )
Arch *Arch::archFactory( ArchType aType,
- ArkWidget *parent, const QString &filename,
- const QString &openAsMimeType )
+ ArkWidget *parent, const TQString &filename,
+ const TQString &openAsMimeType )
{
switch( aType )
{
diff --git a/ark/arch.h b/ark/arch.h
index 1a38a2c..4f226f9 100644
--- a/ark/arch.h
+++ b/ark/arch.h
@@ -49,12 +49,12 @@
#ifndef ARCH_H
#define ARCH_H
-#include <qobject.h>
-#include <qptrlist.h> // Some very annoying hackery in arkwidgetpart
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h> // Some very annoying hackery in arkwidgetpart
+#include <tqregexp.h>
+#include <tqstring.h>
#include <kurl.h>
-#include <qpair.h>
+#include <tqpair.h>
class QCString;
class QStringList;
@@ -67,7 +67,7 @@ enum ArchType { UNKNOWN_FORMAT, ZIP_FORMAT, TAR_FORMAT, AA_FORMAT,
LHA_FORMAT, RAR_FORMAT, ZOO_FORMAT, COMPRESSED_FORMAT,
SEVENZIP_FORMAT, ACE_FORMAT };
-typedef QValueList< QPair< QString, Qt::AlignmentFlags > > ColumnList;
+typedef TQValueList< QPair< TQString, Qt::AlignmentFlags > > ColumnList;
/**
* Pure virtual base class for archives - provides a framework as well as
@@ -86,23 +86,23 @@ class Arch : public QObject
struct ArchColumns
{
int colRef; // Which column to load to in processLine
- QRegExp pattern;
+ TQRegExp pattern;
int maxLength;
bool optional;
- ArchColumns( int col, QRegExp reg, int length = 64, bool opt = false );
+ ArchColumns( int col, TQRegExp reg, int length = 64, bool opt = false );
};
public:
- Arch( ArkWidget *_viewer, const QString & _fileName );
+ Arch( ArkWidget *_viewer, const TQString & _fileName );
virtual ~Arch();
virtual void open() = 0;
virtual void create() = 0;
- virtual void remove( QStringList * ) = 0;
+ virtual void remove( TQStringList * ) = 0;
- virtual void addFile( const QStringList & ) = 0;
- virtual void addDir( const QString & ) = 0;
+ virtual void addFile( const TQStringList & ) = 0;
+ virtual void addDir( const TQString & ) = 0;
// unarch the files in m_fileList or all files if m_fileList is empty.
// if m_destDir is empty, abort with error.
@@ -111,10 +111,10 @@ class Arch : public QObject
// returns true if a password is required
virtual bool passwordRequired() { return false; }
- void unarchFile( QStringList *, const QString & _destDir,
+ void unarchFile( TQStringList *, const TQString & _destDir,
bool viewFriendly = false );
- QString fileName() const { return m_filename; }
+ TQString fileName() const { return m_filename; }
enum EditProperties{ Add = 1, Delete = 2, Extract = 4,
View = 8, Integrity = 16 };
@@ -127,28 +127,28 @@ class Arch : public QObject
void resetError() { m_error = false; }
// check to see if the utility exists in the PATH of the user
- void verifyUtilityIsAvailable( const QString &,
- const QString & = QString::null );
+ void verifyUtilityIsAvailable( const TQString &,
+ const TQString & = TQString::null );
- void verifyCompressUtilityIsAvailable( const QString &utility );
+ void verifyCompressUtilityIsAvailable( const TQString &utility );
- void verifyUncompressUtilityIsAvailable( const QString &utility );
+ void verifyUncompressUtilityIsAvailable( const TQString &utility );
bool archUtilityIsAvailable() { return m_bArchUtilityIsAvailable; }
bool unarchUtilityIsAvailable() { return m_bUnarchUtilityIsAvailable; }
- QString getArchUtility() { return m_archiver_program; }
+ TQString getArchUtility() { return m_archiver_program; }
- QString getUnarchUtility() { return m_unarchiver_program; }
+ TQString getUnarchUtility() { return m_unarchiver_program; }
- void appendShellOutputData( const char * data ) { m_lastShellOutput.append( QString::fromLocal8Bit( data ) ); }
+ void appendShellOutputData( const char * data ) { m_lastShellOutput.append( TQString::fromLocal8Bit( data ) ); }
void clearShellOutput() { m_lastShellOutput.truncate( 0 ); }
- const QString& getLastShellOutput() const { return m_lastShellOutput; }
+ const TQString& getLastShellOutput() const { return m_lastShellOutput; }
static Arch *archFactory( ArchType aType, ArkWidget *parent,
- const QString &filename,
- const QString &openAsMimeType = QString::null );
+ const TQString &filename,
+ const TQString &openAsMimeType = TQString::null );
protected slots:
void slotOpenExited( KProcess* );
@@ -158,21 +158,21 @@ class Arch : public QObject
void slotReceivedOutput( KProcess *, char*, int );
- virtual bool processLine( const QCString &line );
+ virtual bool processLine( const TQCString &line );
virtual void slotReceivedTOC( KProcess *, char *, int );
signals:
- void sigOpen( Arch * archive, bool success, const QString &filename, int );
- void sigCreate( Arch *, bool, const QString &, int );
+ void sigOpen( Arch * archive, bool success, const TQString &filename, int );
+ void sigCreate( Arch *, bool, const TQString &, int );
void sigDelete( bool );
void sigExtract( bool );
void sigAdd( bool );
void headers( const ColumnList& columns );
protected: // data
- QString m_filename;
- QString m_lastShellOutput;
- QCString m_buffer;
+ TQString m_filename;
+ TQString m_lastShellOutput;
+ TQCString m_buffer;
ArkWidget *m_gui;
bool m_bReadOnly; // for readonly archives
bool m_error;
@@ -186,20 +186,20 @@ class Arch : public QObject
// set to whether if the uncompressing utility is in the user's PATH
bool m_bUnarchUtilityIsAvailable;
- QString m_archiver_program;
- QString m_unarchiver_program;
+ TQString m_archiver_program;
+ TQString m_unarchiver_program;
// Archive parsing information
- QCString m_headerString;
+ TQCString m_headerString;
bool m_header_removed, m_finished;
- QPtrList<ArchColumns> m_archCols;
+ TQPtrList<ArchColumns> m_archCols;
int m_numCols, m_dateCol, m_fixYear, m_fixMonth, m_fixDay, m_fixTime;
int m_repairYear, m_repairMonth, m_repairTime;
KProcess *m_currentProcess;
- QStringList *m_fileList;
- QString m_destDir;
+ TQStringList *m_fileList;
+ TQString m_destDir;
bool m_viewFriendly;
- QCString m_password;
+ TQCString m_password;
};
// Columns
diff --git a/ark/archiveformatdlg.cpp b/ark/archiveformatdlg.cpp
index be046fb..5ac942c 100644
--- a/ark/archiveformatdlg.cpp
+++ b/ark/archiveformatdlg.cpp
@@ -25,17 +25,17 @@
#include <klocale.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
-ArchiveFormatDlg::ArchiveFormatDlg( QWidget * parent, const QString & defaultType )
+ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultType )
:KDialogBase( parent, "archiveformatdialog", true,
i18n( "Choose Archive Format" ),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok),
m_combo( 0 )
{
- QString defaultDescription = ArchiveFormatInfo::self()->descriptionForMimeType( defaultType );
- QString text;
+ TQString defaultDescription = ArchiveFormatInfo::self()->descriptionForMimeType( defaultType );
+ TQString text;
if ( defaultDescription.isNull() )
text = i18n( "This file appears to be of type %1,\n"
"which is not a supported archive format.\n"
@@ -47,24 +47,24 @@ ArchiveFormatDlg::ArchiveFormatDlg( QWidget * parent, const QString & defaultTyp
"If this is not correct, please choose "
"the appropriate format." ).arg( defaultDescription );
- QVBox * page = makeVBoxMainWidget();
+ TQVBox * page = makeVBoxMainWidget();
- QLabel * label;
- label = new QLabel( text, page );
+ TQLabel * label;
+ label = new TQLabel( text, page );
m_combo = new KComboBox( page );
- QStringList list = ArchiveFormatInfo::self()->allDescriptions();
+ TQStringList list = ArchiveFormatInfo::self()->allDescriptions();
list.sort();
m_combo->insertStringList( list );
m_combo->setCurrentItem( list.findIndex( defaultDescription ) );
}
-QString ArchiveFormatDlg::mimeType()
+TQString ArchiveFormatDlg::mimeType()
{
if (m_combo && !m_combo->currentText().isEmpty())
return ArchiveFormatInfo::self()->mimeTypeForDescription( m_combo->currentText() );
else
- return QString();
+ return TQString();
}
#include "archiveformatdlg.moc"
diff --git a/ark/archiveformatdlg.h b/ark/archiveformatdlg.h
index c8a2e46..6ef2302 100644
--- a/ark/archiveformatdlg.h
+++ b/ark/archiveformatdlg.h
@@ -29,8 +29,8 @@ class ArchiveFormatDlg: public KDialogBase
{
Q_OBJECT
public:
- ArchiveFormatDlg( QWidget * parent, const QString & defaultType );
- QString mimeType();
+ ArchiveFormatDlg( TQWidget * parent, const TQString & defaultType );
+ TQString mimeType();
private:
KComboBox * m_combo;
diff --git a/ark/archiveformatinfo.cpp b/ark/archiveformatinfo.cpp
index f2ac14d..4d7eda6 100644
--- a/ark/archiveformatinfo.cpp
+++ b/ark/archiveformatinfo.cpp
@@ -29,7 +29,7 @@
#include <kdesktopfile.h>
#include <kfilterdev.h>
-#include <qfile.h>
+#include <tqfile.h>
ArchiveFormatInfo * ArchiveFormatInfo::m_pSelf = 0;
@@ -83,7 +83,7 @@ void ArchiveFormatInfo::buildFormatInfos()
addFormatInfo( ACE_FORMAT, "application/x-ace", ".ace" );
}
-void ArchiveFormatInfo::addFormatInfo( ArchType type, QString mime, QString stdExt )
+void ArchiveFormatInfo::addFormatInfo( ArchType type, TQString mime, TQString stdExt )
{
FormatInfo & info = find( type );
@@ -101,10 +101,10 @@ void ArchiveFormatInfo::addFormatInfo( ArchType type, QString mime, QString stdE
}
-QString ArchiveFormatInfo::filter()
+TQString ArchiveFormatInfo::filter()
{
- QStringList allExtensions;
- QString filter;
+ TQStringList allExtensions;
+ TQString filter;
InfoList::Iterator it;
for ( it = m_formatInfos.begin(); it != m_formatInfos.end(); ++it )
{
@@ -116,9 +116,9 @@ QString ArchiveFormatInfo::filter()
+ filter;
}
-const QStringList ArchiveFormatInfo::supportedMimeTypes( bool includeCompressed )
+const TQStringList ArchiveFormatInfo::supportedMimeTypes( bool includeCompressed )
{
- QStringList list;
+ TQStringList list;
InfoList::Iterator end = m_formatInfos.end();
for ( InfoList::Iterator it = m_formatInfos.begin(); it != end; ++it )
@@ -132,9 +132,9 @@ const QStringList ArchiveFormatInfo::supportedMimeTypes( bool includeCompressed
return list;
}
-QStringList ArchiveFormatInfo::allDescriptions()
+TQStringList ArchiveFormatInfo::allDescriptions()
{
- QStringList descriptions;
+ TQStringList descriptions;
InfoList::Iterator it;
for ( it = m_formatInfos.begin(); it != m_formatInfos.end(); ++it )
descriptions += (*it).allDescriptions;
@@ -153,10 +153,10 @@ ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::find( ArchType type )
return ( *m_formatInfos.append( info ) );
}
-ArchType ArchiveFormatInfo::archTypeByExtension( const QString & archname )
+ArchType ArchiveFormatInfo::archTypeByExtension( const TQString & archname )
{
InfoList::Iterator it = m_formatInfos.begin();
- QStringList::Iterator ext;
+ TQStringList::Iterator ext;
for( ; it != m_formatInfos.end(); ++it )
{
ext = (*it).extensions.begin();
@@ -167,7 +167,7 @@ ArchType ArchiveFormatInfo::archTypeByExtension( const QString & archname )
return UNKNOWN_FORMAT;
}
-ArchType ArchiveFormatInfo::archTypeForMimeType( const QString & mimeType )
+ArchType ArchiveFormatInfo::archTypeForMimeType( const TQString & mimeType )
{
InfoList::Iterator it = m_formatInfos.begin();
for( ; it != m_formatInfos.end(); ++it )
@@ -186,10 +186,10 @@ ArchType ArchiveFormatInfo::archTypeForURL( const KURL & url )
if( url.isEmpty() )
return UNKNOWN_FORMAT;
- if( !QFile::exists( url.path() ) )
+ if( !TQFile::exists( url.path() ) )
return archTypeByExtension( url.path() );
- QString mimeType = KMimeType::findByURL( url, 0, true, true )->name();
+ TQString mimeType = KMimeType::findByURL( url, 0, true, true )->name();
kdDebug( 1601 ) << "find by url: " << mimeType << endl;
if( mimeType == KMimeType::defaultMimeType() )
{
@@ -205,13 +205,13 @@ ArchType ArchiveFormatInfo::archTypeForURL( const KURL & url )
}
-QString ArchiveFormatInfo::findMimeType( const KURL & url )
+TQString ArchiveFormatInfo::findMimeType( const KURL & url )
{
- QString mimeType = KMimeType::findByURL( url )->name();
+ TQString mimeType = KMimeType::findByURL( url )->name();
if ( mimeType != "application/x-bzip2" && mimeType != "application/x-gzip" )
return mimeType;
- QIODevice * dev = KFilterDev::deviceForFile( url.path(), mimeType );
+ TQIODevice * dev = KFilterDev::deviceForFile( url.path(), mimeType );
if ( !dev )
return mimeType;
@@ -232,7 +232,7 @@ QString ArchiveFormatInfo::findMimeType( const KURL & url )
return mimeType;
}
-QString ArchiveFormatInfo::mimeTypeForDescription( const QString & description )
+TQString ArchiveFormatInfo::mimeTypeForDescription( const TQString & description )
{
InfoList::Iterator it = m_formatInfos.begin();
int index;
@@ -242,10 +242,10 @@ QString ArchiveFormatInfo::mimeTypeForDescription( const QString & description )
if ( index != -1 )
return (* (*it).mimeTypes.at( index ) );
}
- return QString::null;
+ return TQString::null;
}
-QString ArchiveFormatInfo::descriptionForMimeType( const QString & mimeType )
+TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType )
{
InfoList::Iterator it = m_formatInfos.begin();
int index;
@@ -255,10 +255,10 @@ QString ArchiveFormatInfo::descriptionForMimeType( const QString & mimeType )
if ( index != -1 )
return (* (*it).allDescriptions.at( index ) );
}
- return QString::null;
+ return TQString::null;
}
-QString ArchiveFormatInfo::defaultExtension( const QString & mimeType )
+TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType )
{
InfoList::Iterator it = m_formatInfos.begin();
int index;
@@ -268,7 +268,7 @@ QString ArchiveFormatInfo::defaultExtension( const QString & mimeType )
if ( index != -1 )
return (* (*it).defaultExtensions.at( index ) );
}
- return QString::null;
+ return TQString::null;
}
bool ArchiveFormatInfo::wasUnknownExtension()
diff --git a/ark/archiveformatinfo.h b/ark/archiveformatinfo.h
index 5682a11..5ba5ef3 100644
--- a/ark/archiveformatinfo.h
+++ b/ark/archiveformatinfo.h
@@ -33,35 +33,35 @@ private:
public:
static ArchiveFormatInfo * self();
- QString filter();
- const QStringList supportedMimeTypes( bool includeCompressed = true );
- QStringList allDescriptions();
- ArchType archTypeForMimeType( const QString & mimeType );
- ArchType archTypeByExtension( const QString & archname );
+ TQString filter();
+ const TQStringList supportedMimeTypes( bool includeCompressed = true );
+ TQStringList allDescriptions();
+ ArchType archTypeForMimeType( const TQString & mimeType );
+ ArchType archTypeByExtension( const TQString & archname );
ArchType archTypeForURL( const KURL & url );
- QString mimeTypeForDescription( const QString & description );
- QString findMimeType( const KURL & url );
- QString descriptionForMimeType( const QString & mimeType );
- QString defaultExtension( const QString & mimeType );
+ TQString mimeTypeForDescription( const TQString & description );
+ TQString findMimeType( const KURL & url );
+ TQString descriptionForMimeType( const TQString & mimeType );
+ TQString defaultExtension( const TQString & mimeType );
bool wasUnknownExtension();
private:
void buildFormatInfos();
- void addFormatInfo( ArchType type, QString mime, QString stdExt );
+ void addFormatInfo( ArchType type, TQString mime, TQString stdExt );
struct FormatInfo
{
- QStringList extensions;
- QStringList mimeTypes;
- QStringList allDescriptions;
- QStringList defaultExtensions;
- QString description;
+ TQStringList extensions;
+ TQStringList mimeTypes;
+ TQStringList allDescriptions;
+ TQStringList defaultExtensions;
+ TQString description;
enum ArchType type;
};
FormatInfo & find ( ArchType type );
- typedef QValueList<FormatInfo> InfoList;
+ typedef TQValueList<FormatInfo> InfoList;
InfoList m_formatInfos;
bool m_lastExtensionUnknown;
diff --git a/ark/ark_part.cpp b/ark/ark_part.cpp
index a574217..60e7ff0 100644
--- a/ark/ark_part.cpp
+++ b/ark/ark_part.cpp
@@ -39,8 +39,8 @@
#include <kpushbutton.h>
#include <ksqueezedtextlabel.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
KAboutData *ArkPart::createAboutData()
{
@@ -63,8 +63,8 @@ KAboutData *ArkPart::createAboutData()
-ArkPart::ArkPart( QWidget *parentWidget, const char * /*widgetName*/, QObject *parent,
- const char *name, const QStringList &, bool readWrite )
+ArkPart::ArkPart( TQWidget *parentWidget, const char * /*widgetName*/, TQObject *parent,
+ const char *name, const TQStringList &, bool readWrite )
: KParts::ReadWritePart(parent, name)
{
kdDebug(1601)<<"ArkPart::ArkPart"<<endl;
@@ -72,12 +72,12 @@ ArkPart::ArkPart( QWidget *parentWidget, const char * /*widgetName*/, QObject *p
awidget = new ArkWidget( parentWidget, "ArkWidget" );
setWidget(awidget);
- connect( awidget, SIGNAL( fixActions() ), this, SLOT( fixEnables() ) );
- connect( awidget, SIGNAL( disableAllActions() ), this, SLOT( disableActions() ) );
- connect( awidget, SIGNAL( signalFilePopup( const QPoint& ) ), this, SLOT( slotFilePopup( const QPoint& ) ) );
- connect( awidget, SIGNAL( setWindowCaption( const QString & ) ), this, SIGNAL( setWindowCaption( const QString & ) ) );
- connect( awidget, SIGNAL( removeRecentURL( const KURL & ) ), this, SIGNAL( removeRecentURL( const KURL & ) ) );
- connect( awidget, SIGNAL( addRecentURL( const KURL & ) ), this, SIGNAL( addRecentURL( const KURL & ) ) );
+ connect( awidget, TQT_SIGNAL( fixActions() ), this, TQT_SLOT( fixEnables() ) );
+ connect( awidget, TQT_SIGNAL( disableAllActions() ), this, TQT_SLOT( disableActions() ) );
+ connect( awidget, TQT_SIGNAL( signalFilePopup( const TQPoint& ) ), this, TQT_SLOT( slotFilePopup( const TQPoint& ) ) );
+ connect( awidget, TQT_SIGNAL( setWindowCaption( const TQString & ) ), this, TQT_SIGNAL( setWindowCaption( const TQString & ) ) );
+ connect( awidget, TQT_SIGNAL( removeRecentURL( const KURL & ) ), this, TQT_SIGNAL( removeRecentURL( const KURL & ) ) );
+ connect( awidget, TQT_SIGNAL( addRecentURL( const KURL & ) ), this, TQT_SIGNAL( addRecentURL( const KURL & ) ) );
if( readWrite )
setXMLFile( "ark_part.rc" );
@@ -90,22 +90,22 @@ ArkPart::ArkPart( QWidget *parentWidget, const char * /*widgetName*/, QObject *p
setupActions();
m_ext = new ArkBrowserExtension( this, "ArkBrowserExtension" );
- connect( awidget, SIGNAL( openURLRequest( const KURL & ) ),
- m_ext, SLOT( slotOpenURLRequested( const KURL & ) ) );
+ connect( awidget, TQT_SIGNAL( openURLRequest( const KURL & ) ),
+ m_ext, TQT_SLOT( slotOpenURLRequested( const KURL & ) ) );
m_bar = new ArkStatusBarExtension( this );
- connect( awidget, SIGNAL( setStatusBarText( const QString & ) ), m_bar,
- SLOT( slotSetStatusBarText( const QString & ) ) );
- connect( awidget, SIGNAL( setStatusBarSelectedFiles( const QString & ) ), m_bar,
- SLOT( slotSetStatusBarSelectedFiles( const QString & ) ) );
- connect( awidget, SIGNAL( setBusy( const QString & ) ), m_bar,
- SLOT( slotSetBusy( const QString & ) ) );
- connect( awidget, SIGNAL( setReady() ), m_bar,
- SLOT( slotSetReady() ) );
- connect( this, SIGNAL( started(KIO::Job*) ), SLOT( transferStarted(KIO::Job*) ) );
- connect( this, SIGNAL( completed() ), SLOT( transferCompleted() ) );
- connect( this, SIGNAL( canceled(const QString&) ),
- SLOT( transferCanceled(const QString&) ) );
+ connect( awidget, TQT_SIGNAL( setStatusBarText( const TQString & ) ), m_bar,
+ TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
+ connect( awidget, TQT_SIGNAL( setStatusBarSelectedFiles( const TQString & ) ), m_bar,
+ TQT_SLOT( slotSetStatusBarSelectedFiles( const TQString & ) ) );
+ connect( awidget, TQT_SIGNAL( setBusy( const TQString & ) ), m_bar,
+ TQT_SLOT( slotSetBusy( const TQString & ) ) );
+ connect( awidget, TQT_SIGNAL( setReady() ), m_bar,
+ TQT_SLOT( slotSetReady() ) );
+ connect( this, TQT_SIGNAL( started(KIO::Job*) ), TQT_SLOT( transferStarted(KIO::Job*) ) );
+ connect( this, TQT_SIGNAL( completed() ), TQT_SLOT( transferCompleted() ) );
+ connect( this, TQT_SIGNAL( canceled(const TQString&) ),
+ TQT_SLOT( transferCanceled(const TQString&) ) );
setProgressInfoEnabled( false );
}
@@ -117,40 +117,40 @@ void
ArkPart::setupActions()
{
addFileAction = new KAction(i18n("Add &File..."), "ark_addfile", 0, awidget,
- SLOT(action_add()), actionCollection(), "addfile");
+ TQT_SLOT(action_add()), actionCollection(), "addfile");
addDirAction = new KAction(i18n("Add Folde&r..."), "ark_adddir", 0, awidget,
- SLOT(action_add_dir()), actionCollection(), "adddir");
+ TQT_SLOT(action_add_dir()), actionCollection(), "adddir");
extractAction = new KAction(i18n("E&xtract..."), "ark_extract", 0, awidget,
- SLOT(action_extract()), actionCollection(), "extract");
+ TQT_SLOT(action_extract()), actionCollection(), "extract");
deleteAction = new KAction(i18n("De&lete"), "ark_delete", KShortcut(Qt::Key_Delete), awidget,
- SLOT(action_delete()), actionCollection(), "delete");
+ TQT_SLOT(action_delete()), actionCollection(), "delete");
viewAction = new KAction(i18n("to view something","&View"), "ark_view", 0, awidget,
- SLOT(action_view()), actionCollection(), "view");
+ TQT_SLOT(action_view()), actionCollection(), "view");
openWithAction = new KAction(i18n("&Open With..."), 0, awidget,
- SLOT(slotOpenWith()), actionCollection(), "open_with");
+ TQT_SLOT(slotOpenWith()), actionCollection(), "open_with");
editAction = new KAction(i18n("Edit &With..."), 0, awidget,
- SLOT(action_edit()), actionCollection(), "edit");
+ TQT_SLOT(action_edit()), actionCollection(), "edit");
- selectAllAction = KStdAction::selectAll(awidget->fileList(), SLOT(selectAll()), actionCollection(), "select_all");
+ selectAllAction = KStdAction::selectAll(awidget->fileList(), TQT_SLOT(selectAll()), actionCollection(), "select_all");
- deselectAllAction = new KAction(i18n("&Unselect All"), 0, awidget->fileList(), SLOT(unselectAll()), actionCollection(), "deselect_all");
+ deselectAllAction = new KAction(i18n("&Unselect All"), 0, awidget->fileList(), TQT_SLOT(unselectAll()), actionCollection(), "deselect_all");
- invertSelectionAction = new KAction(i18n("&Invert Selection"), 0, awidget->fileList(), SLOT(invertSelection()), actionCollection(), "invert_selection");
+ invertSelectionAction = new KAction(i18n("&Invert Selection"), 0, awidget->fileList(), TQT_SLOT(invertSelection()), actionCollection(), "invert_selection");
- saveAsAction = KStdAction::saveAs(this, SLOT(file_save_as()), actionCollection());
+ saveAsAction = KStdAction::saveAs(this, TQT_SLOT(file_save_as()), actionCollection());
- //KStdAction::preferences(awidget, SLOT(showSettings()), actionCollection());
+ //KStdAction::preferences(awidget, TQT_SLOT(showSettings()), actionCollection());
( void ) new KAction( i18n( "Configure &Ark..." ), "configure" , 0, awidget,
- SLOT( showSettings() ), actionCollection(), "options_configure_ark" );
+ TQT_SLOT( showSettings() ), actionCollection(), "options_configure_ark" );
showSearchBar = new KToggleAction( i18n( "Show Search Bar" ), KShortcut(), actionCollection(), "options_show_search_bar" );
@@ -158,7 +158,7 @@ ArkPart::setupActions()
showSearchBar->setChecked( ArkSettings::showSearchBar() );
- connect( showSearchBar, SIGNAL( toggled( bool ) ), awidget, SLOT( slotShowSearchBarToggled( bool ) ) );
+ connect( showSearchBar, TQT_SIGNAL( toggled( bool ) ), awidget, TQT_SLOT( slotShowSearchBarToggled( bool ) ) );
initialEnables();
}
@@ -169,7 +169,7 @@ void ArkPart::fixEnables()
bool bHaveFiles = ( awidget->getNumFilesInArchive() > 0 );
bool bReadOnly = false;
bool bAddDirSupported = true;
- QString extension;
+ TQString extension;
if ( awidget->archiveType() == ZOO_FORMAT || awidget->archiveType() == AA_FORMAT
|| awidget->archiveType() == COMPRESSED_FORMAT)
bAddDirSupported = false;
@@ -247,9 +247,9 @@ bool ArkPart::openFile()
{
KURL url;
url.setPath( m_file );
- if( !QFile::exists( m_file ) )
+ if( !TQFile::exists( m_file ) )
{
- emit setWindowCaption( QString::null );
+ emit setWindowCaption( TQString::null );
emit removeRecentURL( awidget->realURL() );
return false;
}
@@ -290,7 +290,7 @@ bool ArkPart::closeURL()
if ( !isReadWrite() || !awidget->isModified() || awidget->realURL().isLocalFile() )
return closeArchive();
- QString docName = awidget->realURL().prettyURL();
+ TQString docName = awidget->realURL().prettyURL();
int res = KMessageBox::warningYesNoCancel( widget(),
i18n( "The archive \"%1\" has been modified.\n"
@@ -310,7 +310,7 @@ bool ArkPart::closeURL()
}
}
-void ArkPart::slotFilePopup( const QPoint &pPoint )
+void ArkPart::slotFilePopup( const TQPoint &pPoint )
{
if ( factory() )
static_cast<KPopupMenu *>(factory()->container("file_popup", this))->popup(pPoint);
@@ -326,10 +326,10 @@ void ArkPart::transferStarted( KIO::Job *job )
if ( job )
{
disableActions();
- connect( job, SIGNAL( percent(KIO::Job*, unsigned long) ),
- SLOT( progressInformation(KIO::Job*, unsigned long) ) );
- connect( m_bar->cancelButton(), SIGNAL( clicked() ),
- SLOT( cancelTransfer() ) );
+ connect( job, TQT_SIGNAL( percent(KIO::Job*, unsigned long) ),
+ TQT_SLOT( progressInformation(KIO::Job*, unsigned long) ) );
+ connect( m_bar->cancelButton(), TQT_SIGNAL( clicked() ),
+ TQT_SLOT( cancelTransfer() ) );
}
}
@@ -337,15 +337,15 @@ void ArkPart::transferCompleted()
{
if ( m_job )
{
- disconnect( m_job, SIGNAL( percent(KIO::Job*, unsigned long) ),
- this, SLOT( progressInformation(KIO::Job*, unsigned long) ) );
+ disconnect( m_job, TQT_SIGNAL( percent(KIO::Job*, unsigned long) ),
+ this, TQT_SLOT( progressInformation(KIO::Job*, unsigned long) ) );
m_job = 0;
}
m_bar->slotSetReady();
}
-void ArkPart::transferCanceled( const QString& errMsg )
+void ArkPart::transferCanceled( const TQString& errMsg )
{
m_job = 0;
if ( !errMsg.isEmpty() )
@@ -363,12 +363,12 @@ void ArkPart::progressInformation( KIO::Job *, unsigned long progress )
void ArkPart::cancelTransfer()
{
- disconnect( m_bar->cancelButton(), SIGNAL( clicked() ),
- this, SLOT( cancelTransfer() ) );
+ disconnect( m_bar->cancelButton(), TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( cancelTransfer() ) );
if ( m_job )
{
m_job->kill( false );
- transferCanceled( QString() );
+ transferCanceled( TQString() );
}
}
@@ -406,26 +406,26 @@ void ArkStatusBarExtension::setupStatusBar()
return;
}
- m_pTimer = new QTimer( this );
- connect( m_pTimer, SIGNAL( timeout() ), this, SLOT( slotProgress() ) );
+ m_pTimer = new TQTimer( this );
+ connect( m_pTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotProgress() ) );
m_pStatusLabelTotal = new KSqueezedTextLabel( statusBar(), "StatusLabelTotal" );
- m_pStatusLabelTotal->setFrameStyle( QFrame::NoFrame );
+ m_pStatusLabelTotal->setFrameStyle( TQFrame::NoFrame );
m_pStatusLabelTotal->setAlignment( AlignRight );
m_pStatusLabelTotal->setText( i18n( "Total: 0 files" ) );
- m_pStatusLabelSelect = new QLabel( statusBar(), "StatusLabelSelect" );
- m_pStatusLabelSelect->setFrameStyle( QFrame::NoFrame );
+ m_pStatusLabelSelect = new TQLabel( statusBar(), "StatusLabelSelect" );
+ m_pStatusLabelSelect->setFrameStyle( TQFrame::NoFrame );
m_pStatusLabelSelect->setAlignment( AlignLeft );
m_pStatusLabelSelect->setText(i18n( "0 files selected" ) );
- m_cancelButton = new KPushButton( SmallIcon( "cancel" ), QString(), statusBar(), "CancelButton" );
+ m_cancelButton = new KPushButton( SmallIcon( "cancel" ), TQString(), statusBar(), "CancelButton" );
addStatusBarItem( m_pStatusLabelSelect, 3000, false );
addStatusBarItem( m_pStatusLabelTotal, 3000, false );
}
-void ArkStatusBarExtension::slotSetStatusBarText( const QString & text )
+void ArkStatusBarExtension::slotSetStatusBarText( const TQString & text )
{
if ( !statusBar() )
return;
@@ -434,7 +434,7 @@ void ArkStatusBarExtension::slotSetStatusBarText( const QString & text )
m_pStatusLabelTotal->setText( text );
}
-void ArkStatusBarExtension::slotSetStatusBarSelectedFiles( const QString & text )
+void ArkStatusBarExtension::slotSetStatusBarSelectedFiles( const TQString & text )
{
if ( !statusBar() )
@@ -444,7 +444,7 @@ void ArkStatusBarExtension::slotSetStatusBarSelectedFiles( const QString & text
m_pStatusLabelSelect->setText( text );
}
-void ArkStatusBarExtension::slotSetBusy( const QString & text, bool showCancelButton, bool detailedProgress )
+void ArkStatusBarExtension::slotSetBusy( const TQString & text, bool showCancelButton, bool detailedProgress )
{
if ( m_bBusy || !statusBar() )
return;
@@ -452,10 +452,10 @@ void ArkStatusBarExtension::slotSetBusy( const QString & text, bool showCancelBu
setupStatusBar();
if ( !m_pBusyText )
{
- m_pBusyText = new QLabel( statusBar() );
+ m_pBusyText = new TQLabel( statusBar() );
m_pBusyText->setAlignment( AlignLeft );
- m_pBusyText->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ m_pBusyText->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
}
if ( !m_pProgressBar )
diff --git a/ark/ark_part.h b/ark/ark_part.h
index b5b7f6f..2be1bd8 100644
--- a/ark/ark_part.h
+++ b/ark/ark_part.h
@@ -30,7 +30,7 @@
#include <kaction.h>
#include <kprogress.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class KAboutData;
class KPushButton;
@@ -63,9 +63,9 @@ public:
KPushButton* cancelButton() const { return m_cancelButton; }
public slots:
- void slotSetStatusBarSelectedFiles( const QString & text );
- void slotSetStatusBarText( const QString & text );
- void slotSetBusy( const QString & text, bool showCancelButton = false, bool detailedProgress = false );
+ void slotSetStatusBarSelectedFiles( const TQString & text );
+ void slotSetStatusBarText( const TQString & text );
+ void slotSetBusy( const TQString & text, bool showCancelButton = false, bool detailedProgress = false );
void slotSetReady();
void slotProgress();
@@ -74,12 +74,12 @@ protected:
private:
bool m_bBusy;
- QLabel *m_pStatusLabelSelect; // How many files are selected
- QLabel *m_pStatusLabelTotal; // How many files in archive
- QLabel *m_pBusyText;
+ TQLabel *m_pStatusLabelSelect; // How many files are selected
+ TQLabel *m_pStatusLabelTotal; // How many files in archive
+ TQLabel *m_pBusyText;
KPushButton *m_cancelButton; // Cancel an operation
KProgress *m_pProgressBar;
- QTimer *m_pTimer;
+ TQTimer *m_pTimer;
};
@@ -87,8 +87,8 @@ class ArkPart: public KParts::ReadWritePart
{
Q_OBJECT
public:
- ArkPart( QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList &, bool readWrite );
+ ArkPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList &, bool readWrite );
virtual ~ArkPart();
static KAboutData* createAboutData();
@@ -96,14 +96,14 @@ public:
public slots:
void fixEnables();//rename to slotFixEnables()...
void disableActions();
- void slotFilePopup( const QPoint & pPoint );
+ void slotFilePopup( const TQPoint & pPoint );
void file_save_as();
bool saveFile();
bool openURL( const KURL & url );
bool closeURL();
void transferStarted( KIO::Job * );
void transferCompleted();
- void transferCanceled( const QString& errMsg );
+ void transferCanceled( const TQString& errMsg );
void progressInformation( KIO::Job *, unsigned long );
void cancelTransfer();
diff --git a/ark/arkapp.cpp b/ark/arkapp.cpp
index c117d0b..ff6acd8 100644
--- a/ark/arkapp.cpp
+++ b/ark/arkapp.cpp
@@ -30,7 +30,7 @@
#include <kcmdlineargs.h>
#include <klocale.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <errno.h>
@@ -43,7 +43,7 @@ ArkApplication *ArkApplication::mInstance = NULL;
// to make sure an archive isn't opened twice in different windows
// Now, readlink only gives one level so this function recurses.
-static QString resolveFilename(const QString & _arkname)
+static TQString resolveFilename(const TQString & _arkname)
{
char *buff;
int nread;
@@ -52,7 +52,7 @@ static QString resolveFilename(const QString & _arkname)
while ( true )
{
buff = new char[BUFSIZ*iter];
- nread = readlink( QFile::encodeName(_arkname), buff, BUFSIZ);
+ nread = readlink( TQFile::encodeName(_arkname), buff, BUFSIZ);
if (-1 == nread)
{
if ( EINVAL == errno ) // not a symbolic link. Stopping condition.
@@ -78,7 +78,7 @@ static QString resolveFilename(const QString & _arkname)
else
{
buff[nread] = '\0'; // readlink doesn't null terminate
- QString name = QFile::decodeName( buff );
+ TQString name = TQFile::decodeName( buff );
delete [] buff;
// watch out for relative pathnames
@@ -162,7 +162,7 @@ ArkApplication::newInstance()
{
bool oneFile = (args->count() == 2 ) ;
- QString extension = args->arg( 0 );
+ TQString extension = args->arg( 0 );
KURL archiveName = args->url( 1 ); // the filename
// if more than one file -> use directory name
@@ -234,7 +234,7 @@ ArkApplication::newInstance()
void
ArkApplication::addOpenArk(const KURL & _arkname, MainWindow *_ptr)
{
- QString realName;
+ TQString realName;
if( _arkname.isLocalFile() )
{
realName = resolveFilename( _arkname.path() ); // follow symlink
@@ -250,7 +250,7 @@ ArkApplication::addOpenArk(const KURL & _arkname, MainWindow *_ptr)
void
ArkApplication::removeOpenArk(const KURL & _arkname)
{
- QString realName;
+ TQString realName;
if ( _arkname.isLocalFile() )
realName = resolveFilename( _arkname.path() ); // follow symlink
else
@@ -265,7 +265,7 @@ ArkApplication::raiseArk(const KURL & _arkname)
{
kdDebug( 1601 ) << "ArkApplication::raiseArk " << endl;
MainWindow *window;
- QString realName;
+ TQString realName;
if( _arkname.isLocalFile() )
realName = resolveFilename(_arkname.path()); // follow symlink
else
@@ -282,7 +282,7 @@ ArkApplication::raiseArk(const KURL & _arkname)
bool
ArkApplication::isArkOpenAlready(const KURL & _arkname)
{
- QString realName;
+ TQString realName;
if ( _arkname.isLocalFile() )
realName = resolveFilename(_arkname.path()); // follow symlink
else
diff --git a/ark/arkapp.h b/ark/arkapp.h
index 1d1b474..f0d4444 100644
--- a/ark/arkapp.h
+++ b/ark/arkapp.h
@@ -30,7 +30,7 @@
#include "mainwindow.h"
// QT includes
-#include <qdict.h>
+#include <tqdict.h>
// KDE includes
#include <kuniqueapplication.h>
@@ -41,7 +41,7 @@ class QStringList;
class EqualKey
{
public:
- bool operator()(const QString & str1, const QString & str2) const
+ bool operator()(const TQString & str1, const TQString & str2) const
{
return (str1 == str2);
}
@@ -78,14 +78,14 @@ class ArkApplication : public KUniqueApplication
ArkApplication();
private:
- QWidget *m_mainwidget; // to be the parent of all ArkWidgets
+ TQWidget *m_mainwidget; // to be the parent of all ArkWidgets
int m_windowCount;
- QStringList openArksList;
+ TQStringList openArksList;
// a hash to obtain the window associated with a filename.
- // given a QString key, you get an ArkWidget * pointer.
- QDict<MainWindow> m_windowsHash;
+ // given a TQString key, you get an ArkWidget * pointer.
+ TQDict<MainWindow> m_windowsHash;
static ArkApplication *mInstance;
};
diff --git a/ark/arkfactory.cpp b/ark/arkfactory.cpp
index 8fcd262..3e17e7a 100644
--- a/ark/arkfactory.cpp
+++ b/ark/arkfactory.cpp
@@ -38,20 +38,20 @@ ArkFactory::~ArkFactory()
s_instance = 0L;
}
-KParts::Part * ArkFactory::createPartObject( QWidget *parentWidget,
- const char *widgetName, QObject *parent,
+KParts::Part * ArkFactory::createPartObject( TQWidget *parentWidget,
+ const char *widgetName, TQObject *parent,
const char *name, const char *classname,
- const QStringList &args )
+ const TQStringList &args )
{
bool readWrite = false; // for e.g. Browser/View or KParts::ReadOnlyPart
- if ( QCString( classname ) == "KParts::ReadWritePart"
- || QCString( classname ) == "ArkPart" )
+ if ( TQCString( classname ) == "KParts::ReadWritePart"
+ || TQCString( classname ) == "ArkPart" )
{
readWrite = true;
}
ArkPart* obj = new ArkPart( parentWidget, widgetName, parent, name,
args, readWrite );
- //kdDebug( 1601 ) << "classname is: " << QCString( classname ) << endl;
+ //kdDebug( 1601 ) << "classname is: " << TQCString( classname ) << endl;
return obj;
}
diff --git a/ark/arkfactory.h b/ark/arkfactory.h
index ec3534a..2b5514b 100644
--- a/ark/arkfactory.h
+++ b/ark/arkfactory.h
@@ -29,10 +29,10 @@ public:
ArkFactory() : KParts::Factory() {}
virtual ~ArkFactory();
virtual KParts::Part *createPartObject(
- QWidget *parentWidget = 0,const char *widgetName = 0,
- QObject *parent = 0, const char *name = 0,
+ TQWidget *parentWidget = 0,const char *widgetName = 0,
+ TQObject *parent = 0, const char *name = 0,
const char *classname = "KParts::Part",
- const QStringList &args = QStringList() );
+ const TQStringList &args = TQStringList() );
static KInstance* instance();
private:
static KInstance* s_instance;
diff --git a/ark/arkutils.cpp b/ark/arkutils.cpp
index 1b4ed0a..bfe496c 100644
--- a/ark/arkutils.cpp
+++ b/ark/arkutils.cpp
@@ -70,13 +70,13 @@
#include <klargefile.h>
// Qt includes
-#include <qfile.h>
+#include <tqfile.h>
#include "arkutils.h"
-QString ArkUtils::getTimeStamp(const QString &_month,
- const QString &_day,
- const QString &_yearOrTime)
+TQString ArkUtils::getTimeStamp(const TQString &_month,
+ const TQString &_day,
+ const TQString &_yearOrTime)
{
// Make the date format sortable.
// Month is in _month, day is in _day.
@@ -99,7 +99,7 @@ QString ArkUtils::getTimeStamp(const QString &_month,
int thisYear = now->tm_year + 1900;
int thisMonth = now->tm_mon + 1;
- QString year, timestamp;
+ TQString year, timestamp;
if (_yearOrTime.contains(":"))
// it has a timestamp so we have to figure out the year
@@ -118,7 +118,7 @@ QString ArkUtils::getTimeStamp(const QString &_month,
timestamp = "??:??";
}
- QString retval;
+ TQString retval;
retval.sprintf("%s-%.2d-%.2d %s",
year.utf8().data(), nMonth, nDay,
timestamp.utf8().data());
@@ -154,7 +154,7 @@ int ArkUtils::getYear(int theMonth, int thisYear, int thisMonth)
return thisYear;
}
-QString ArkUtils::fixYear(const QString& strYear)
+TQString ArkUtils::fixYear(const TQString& strYear)
{
// returns 4-digit year by guessing from two-char year string.
// Remember: this is used for file timestamps. There probably aren't any
@@ -173,27 +173,27 @@ QString ArkUtils::fixYear(const QString& strYear)
else
y += 2000;
- return QString::number( y );
+ return TQString::number( y );
}
else
- return QString::null;
+ return TQString::null;
}
bool
-ArkUtils::haveDirPermissions( const QString &strFile )
+ArkUtils::haveDirPermissions( const TQString &strFile )
{
- return ( access( QFile::encodeName( strFile ), W_OK ) == 0 );
+ return ( access( TQFile::encodeName( strFile ), W_OK ) == 0 );
}
bool
-ArkUtils::diskHasSpace(const QString &dir, KIO::filesize_t size)
+ArkUtils::diskHasSpace(const TQString &dir, KIO::filesize_t size)
// check if disk has enough space to accommodate (a) new file(s) of
// the given size in the partition containing the given directory
{
kdDebug( 1601 ) << "diskHasSpace() " << "dir: " << dir << " Size: " << size << endl;
struct STATFS buf;
- if (STATFS(QFile::encodeName(dir), &buf) == 0)
+ if (STATFS(TQFile::encodeName(dir), &buf) == 0)
{
double nAvailable = (double)buf.f_bavail * buf.f_bsize;
if ( nAvailable < (double)size )
@@ -212,17 +212,17 @@ ArkUtils::diskHasSpace(const QString &dir, KIO::filesize_t size)
}
KIO::filesize_t
-ArkUtils::getSizes(QStringList *list)
+ArkUtils::getSizes(TQStringList *list)
{
KIO::filesize_t sum = 0;
- QString str;
+ TQString str;
KDE_struct_stat st;
- for ( QStringList::Iterator it = list->begin(); it != list->end(); ++it)
+ for ( TQStringList::Iterator it = list->begin(); it != list->end(); ++it)
{
str = *it;
str = str.right(str.length()-5);
- if (KDE_stat(QFile::encodeName(str), &st ) < 0)
+ if (KDE_stat(TQFile::encodeName(str), &st ) < 0)
continue;
sum += st.st_size;
}
diff --git a/ark/arkutils.h b/ark/arkutils.h
index 4ddea65..6f1f3e3 100644
--- a/ark/arkutils.h
+++ b/ark/arkutils.h
@@ -32,7 +32,7 @@
#ifndef ARKUTILS_H
#define ARKUTILS_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/global.h>
@@ -43,14 +43,14 @@ namespace ArkUtils
{
int getYear(int theMonth, int thisYear, int thisMonth);
int getMonth(const char *strMonth);
- QString fixYear(const QString& strYear);
-
- QString getTimeStamp(const QString &month,
- const QString &day,
- const QString &year);
- bool haveDirPermissions(const QString &strFile);
- bool diskHasSpace(const QString &dir, KIO::filesize_t size);
- KIO::filesize_t getSizes(QStringList *list);
+ TQString fixYear(const TQString& strYear);
+
+ TQString getTimeStamp(const TQString &month,
+ const TQString &day,
+ const TQString &year);
+ bool haveDirPermissions(const TQString &strFile);
+ bool diskHasSpace(const TQString &dir, KIO::filesize_t size);
+ KIO::filesize_t getSizes(TQStringList *list);
}
#endif
diff --git a/ark/arkviewer.cpp b/ark/arkviewer.cpp
index 1ea76ac..2f173a8 100644
--- a/ark/arkviewer.cpp
+++ b/ark/arkviewer.cpp
@@ -29,20 +29,20 @@
#include <kglobal.h>
#include <kiconloader.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qurl.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqurl.h>
-ArkViewer::ArkViewer( QWidget * parent, const char * name )
- : KDialogBase( parent, name, false, QString::null, Close ), m_part( 0 )
+ArkViewer::ArkViewer( TQWidget * parent, const char * name )
+ : KDialogBase( parent, name, false, TQString::null, Close ), m_part( 0 )
{
- m_widget = new QVBox( this );
+ m_widget = new TQVBox( this );
m_widget->layout()->setSpacing( 10 );
- connect( this, SIGNAL( finished() ), this, SLOT( slotFinished() ) );
+ connect( this, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotFinished() ) );
setMainWidget( m_widget );
}
@@ -65,28 +65,28 @@ bool ArkViewer::view( const KURL& filename )
setCaption( filename.fileName() );
- QSize size = configDialogSize( "ArkViewer" );
+ TQSize size = configDialogSize( "ArkViewer" );
if (size.width() < 200)
- size = QSize(560, 400);
+ size = TQSize(560, 400);
setInitialSize( size );
- QFrame *header = new QFrame( m_widget );
- QHBoxLayout *headerLayout = new QHBoxLayout( header );
+ TQFrame *header = new TQFrame( m_widget );
+ TQHBoxLayout *headerLayout = new TQHBoxLayout( header );
headerLayout->setAutoAdd( true );
- QLabel *iconLabel = new QLabel( header );
+ TQLabel *iconLabel = new TQLabel( header );
iconLabel->setPixmap( mimetype->pixmap( KIcon::Desktop ) );
- iconLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ iconLabel->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum );
- QVBox *headerRight = new QVBox( header );
- new QLabel( QString( "<qt><b>%1</b></qt>" )
+ TQVBox *headerRight = new TQVBox( header );
+ new TQLabel( TQString( "<qt><b>%1</b></qt>" )
.arg( filename.fileName() ), headerRight
);
- new QLabel( mimetype->comment(), headerRight );
+ new TQLabel( mimetype->comment(), headerRight );
- header->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Maximum );
+ header->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Maximum );
- m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype->name(), QString::null, m_widget, 0, this );
+ m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype->name(), TQString::null, m_widget, 0, this );
if ( m_part )
{
diff --git a/ark/arkviewer.h b/ark/arkviewer.h
index e0fda83..3720ffa 100644
--- a/ark/arkviewer.h
+++ b/ark/arkviewer.h
@@ -30,7 +30,7 @@ class ArkViewer : public KDialogBase
Q_OBJECT
public:
- ArkViewer( QWidget* parent = 0, const char * name = 0 );
+ ArkViewer( TQWidget* parent = 0, const char * name = 0 );
~ArkViewer();
bool view( const KURL& filename );
@@ -40,7 +40,7 @@ class ArkViewer : public KDialogBase
private:
KParts::ReadOnlyPart *m_part;
- QWidget *m_widget;
+ TQWidget *m_widget;
};
#endif // ARKVIEWER_H
diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp
index 5720317..0809a6b 100644
--- a/ark/arkwidget.cpp
+++ b/ark/arkwidget.cpp
@@ -33,11 +33,11 @@
#include <sys/stat.h>
// Qt includes
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qdir.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -83,13 +83,13 @@
static void viewInExternalViewer( ArkWidget* parent, const KURL& filename )
{
- QString mimetype = KMimeType::findByURL( filename )->name();
+ TQString mimetype = KMimeType::findByURL( filename )->name();
bool view = true;
if ( KRun::isExecutable( mimetype ) )
{
- QString text = i18n( "The file you're trying to view may be an executable. Running untrusted executables may compromise your system's security.\nAre you sure you want to run that file?" );
- view = ( KMessageBox::warningContinueCancel( parent, text, QString::null, i18n("Run Nevertheless") ) == KMessageBox::Continue );
+ TQString text = i18n( "The file you're trying to view may be an executable. Running untrusted executables may compromise your system's security.\nAre you sure you want to run that file?" );
+ view = ( KMessageBox::warningContinueCancel( parent, text, TQString::null, i18n("Run Nevertheless") ) == KMessageBox::Continue );
}
if ( view )
@@ -103,10 +103,10 @@ static void viewInExternalViewer( ArkWidget* parent, const KURL& filename )
//
//----------------------------------------------------------------------
-ArkWidget::ArkWidget( QWidget *parent, const char *name )
- : QVBox(parent, name), m_bBusy( false ), m_bBusyHold( false ),
+ArkWidget::ArkWidget( TQWidget *parent, const char *name )
+ : TQVBox(parent, name), m_bBusy( false ), m_bBusyHold( false ),
m_extractOnly( false ), m_extractRemote(false),
- m_openAsMimeType(QString::null), m_pTempAddList(NULL),
+ m_openAsMimeType(TQString::null), m_pTempAddList(NULL),
m_bArchivePopupEnabled( false ),
m_convert_tmpDir( NULL ), m_convertSuccess( false ),
m_createRealArchTmpDir( NULL ), m_extractRemoteTmpDir( NULL ),
@@ -130,7 +130,7 @@ ArkWidget::ArkWidget( QWidget *parent, const char *name )
m_searchToolBar = new KToolBar( this, "searchBar" );
m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() );
- QLabel * l1 = new QLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
+ TQLabel * l1 = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
m_searchBar = new SearchBar( m_searchToolBar, 0 );
l1->setBuddy( m_searchBar );
@@ -198,13 +198,13 @@ ArkWidget::updateStatusTotals()
m_nNumFiles = m_fileListView->totalFiles();
m_nSizeOfFiles = m_fileListView->totalSize();
- QString strInfo = i18n( "%n file %1", "%n files %1", m_nNumFiles )
+ TQString strInfo = i18n( "%n file %1", "%n files %1", m_nNumFiles )
.arg( KIO::convertSize( m_nSizeOfFiles ) );
emit setStatusBarText(strInfo);
}
void
-ArkWidget::busy( const QString & text )
+ArkWidget::busy( const TQString & text )
{
emit setBusy( text );
@@ -213,7 +213,7 @@ ArkWidget::busy( const QString & text )
m_fileListView->setEnabled( false );
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
m_bBusy = true;
}
@@ -224,7 +224,7 @@ ArkWidget::holdBusy()
return;
m_bBusyHold = true;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void
@@ -234,7 +234,7 @@ ArkWidget::resumeBusy()
return;
m_bBusyHold = false;
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
}
void
@@ -245,7 +245,7 @@ ArkWidget::ready()
m_fileListView->setEnabled( true );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit setReady();
m_bBusyHold = false;
m_bBusy = false;
@@ -258,14 +258,14 @@ ArkWidget::ready()
KURL
ArkWidget::getSaveAsFileName()
{
- QString defaultMimeType;
+ TQString defaultMimeType;
if ( m_openAsMimeType.isNull() )
defaultMimeType = KMimeType::findByPath( m_strArchName )->name();
else
defaultMimeType = m_openAsMimeType;
KURL u;
- QString suggestedName;
+ TQString suggestedName;
if ( m_realURL.isLocalFile() )
suggestedName = m_realURL.url();
else
@@ -299,7 +299,7 @@ ArkWidget::convertTo( const KURL & u )
busy( i18n( "Saving..." ) );
m_convert_tmpDir = new KTempDir( tmpDir() + "convtmp" );
m_convert_tmpDir->setAutoDelete( true );
- connect( arch, SIGNAL( sigExtract( bool ) ), this, SLOT( convertSlotExtractDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this, TQT_SLOT( convertSlotExtractDone( bool ) ) );
m_convert_saveAsURL = u;
arch->unarchFile( 0, m_convert_tmpDir->name() );
}
@@ -308,16 +308,16 @@ void
ArkWidget::convertSlotExtractDone( bool )
{
kdDebug( 1601 ) << k_funcinfo << endl;
- disconnect( arch, SIGNAL( sigExtract( bool ) ), this, SLOT( convertSlotExtractDone( bool ) ) );
- QTimer::singleShot( 0, this, SLOT( convertSlotCreate() ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ), this, TQT_SLOT( convertSlotExtractDone( bool ) ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( convertSlotCreate() ) );
}
void
ArkWidget::convertSlotCreate()
{
file_close();
- connect( this, SIGNAL( createDone( bool ) ), this, SLOT( convertSlotCreateDone( bool ) ) );
- QString archToCreate;
+ connect( this, TQT_SIGNAL( createDone( bool ) ), this, TQT_SLOT( convertSlotCreateDone( bool ) ) );
+ TQString archToCreate;
if ( m_convert_saveAsURL.isLocalFile() )
archToCreate = m_convert_saveAsURL.path();
else
@@ -330,18 +330,18 @@ ArkWidget::convertSlotCreate()
void
ArkWidget::convertSlotCreateDone( bool success )
{
- disconnect( this, SIGNAL( createDone( bool ) ), this, SLOT( convertSlotCreateDone( bool ) ) );
+ disconnect( this, TQT_SIGNAL( createDone( bool ) ), this, TQT_SLOT( convertSlotCreateDone( bool ) ) );
kdDebug( 1601 ) << k_funcinfo << endl;
if ( !success )
{
kdWarning( 1601 ) << "Error while converting. (convertSlotCreateDone)" << endl;
return;
}
- QDir dir( m_convert_tmpDir->name() );
- QStringList entries = dir.entryList();
+ TQDir dir( m_convert_tmpDir->name() );
+ TQStringList entries = dir.entryList();
entries.remove( ".." );
entries.remove( "." );
- QStringList::Iterator it = entries.begin();
+ TQStringList::Iterator it = entries.begin();
for ( ; it != entries.end(); ++it )
{
///////////////////////////////////////////////////////
@@ -351,13 +351,13 @@ ArkWidget::convertSlotCreateDone( bool success )
// and break the rest of the world' //
// hack. See also action_edit ... //
// addFile should be: //
- // addFile( const QString & baseDir, //
- // const QStringList & filesToAdd ) //
+ // addFile( const TQString & baseDir, //
+ // const TQStringList & filesToAdd ) //
//////////////////////////////////////////////////////
- *it = QString::fromLatin1( "file:" )+ m_convert_tmpDir->name() + *it;
+ *it = TQString::fromLatin1( "file:" )+ m_convert_tmpDir->name() + *it;
}
bool bOldRecVal = ArkSettings::rarRecurseSubdirs();
- connect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( convertSlotAddDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( convertSlotAddDone( bool ) ) );
arch->addFile( entries );
ArkSettings::setRarRecurseSubdirs( bOldRecVal );
}
@@ -365,11 +365,11 @@ ArkWidget::convertSlotCreateDone( bool success )
void
ArkWidget::convertSlotAddDone( bool success )
{
- disconnect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( convertSlotAddDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( convertSlotAddDone( bool ) ) );
kdDebug( 1601 ) << k_funcinfo << endl;
m_convertSuccess = success;
// needed ? (TarArch, lzo)
- QTimer::singleShot( 0, this, SLOT( convertFinish() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( convertFinish() ) );
}
void
@@ -406,10 +406,10 @@ ArkWidget::allowedArchiveName( const KURL & u )
if (u.isEmpty())
return false;
- QString archMimeType = KMimeType::findByURL( m_url )->name();
+ TQString archMimeType = KMimeType::findByURL( m_url )->name();
if ( !m_openAsMimeType.isNull() )
archMimeType = m_openAsMimeType;
- QString newArchMimeType = KMimeType::findByPath( u.path() )->name();
+ TQString newArchMimeType = KMimeType::findByPath( u.path() )->name();
if ( archMimeType == newArchMimeType )
return true;
@@ -423,7 +423,7 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b
if ( bGuessName ) // suggest an extract directory based on archive name
{
- const QString fileName = guessName( archive );
+ const TQString fileName = guessName( archive );
m_extractTo_targetDirectory.setPath( targetDirectory.path( 1 ) + fileName + '/' );
}
@@ -438,16 +438,16 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b
}
}
- connect( this, SIGNAL( openDone( bool ) ), this, SLOT( extractToSlotOpenDone( bool ) ) );
+ connect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) );
}
const QString
ArkWidget::guessName( const KURL &archive )
{
- QString fileName = archive.fileName();
- QStringList list = KMimeType::findByPath( fileName )->patterns();
- QStringList::Iterator it = list.begin();
- QString ext;
+ TQString fileName = archive.fileName();
+ TQStringList list = KMimeType::findByPath( fileName )->patterns();
+ TQStringList::Iterator it = list.begin();
+ TQString ext;
for ( ; it != list.end(); ++it )
{
ext = (*it).remove( '*' );
@@ -464,7 +464,7 @@ ArkWidget::guessName( const KURL &archive )
void
ArkWidget::extractToSlotOpenDone( bool success )
{
- disconnect( this, SIGNAL( openDone( bool ) ), this, SLOT( extractToSlotOpenDone( bool ) ) );
+ disconnect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) );
if ( !success )
{
KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).arg( m_url.prettyURL() ) );
@@ -472,7 +472,7 @@ ArkWidget::extractToSlotOpenDone( bool success )
return;
}
- QString extractDir = m_extractTo_targetDirectory.path();
+ TQString extractDir = m_extractTo_targetDirectory.path();
// little code duplication from action_extract():
if ( !m_extractTo_targetDirectory.isLocalFile() )
{
@@ -491,8 +491,8 @@ ArkWidget::extractToSlotOpenDone( bool success )
}
}
- QStringList empty;
- QStringList alreadyExisting = existingFiles( extractDir, empty );
+ TQStringList empty;
+ TQStringList alreadyExisting = existingFiles( extractDir, empty );
kdDebug( 1601 ) << "Already existing files count: " << existingFiles( extractDir, empty ).count() << endl;
bool keepGoing = true;
if ( !ArkSettings::extractOverwrite() && !alreadyExisting.isEmpty() )
@@ -508,7 +508,7 @@ ArkWidget::extractToSlotOpenDone( bool success )
if ( ArkUtils::diskHasSpace( extractDir, m_nSizeOfFiles ) )
{
disableAll();
- connect( arch, SIGNAL( sigExtract( bool ) ), this, SLOT( extractToSlotExtractDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this, TQT_SLOT( extractToSlotExtractDone( bool ) ) );
arch->unarchFile( 0, extractDir );
}
else
@@ -525,7 +525,7 @@ ArkWidget::extractToSlotOpenDone( bool success )
void
ArkWidget::extractToSlotExtractDone( bool success )
{
- disconnect( arch, SIGNAL( sigExtract( bool ) ), this, SLOT( extractToSlotExtractDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ), this, TQT_SLOT( extractToSlotExtractDone( bool ) ) );
if ( !success )
{
kdDebug( 1601 ) << "Last Shell Output" << arch->getLastShellOutput() << endl;
@@ -536,7 +536,7 @@ ArkWidget::extractToSlotExtractDone( bool success )
if ( m_extractRemote )
{
- connect( this, SIGNAL( extractRemoteMovingDone() ), this, SIGNAL( request_file_quit() ) );
+ connect( this, TQT_SIGNAL( extractRemoteMovingDone() ), this, TQT_SIGNAL( request_file_quit() ) );
extractRemoteInitiateMoving( m_extractTo_targetDirectory );
}
else
@@ -552,9 +552,9 @@ ArkWidget::addToArchive( const KURL::List & filesToAdd, const KURL & archive)
{
if ( !m_openAsMimeType.isEmpty() )
{
- QStringList extensions = KMimeType::mimeType( m_openAsMimeType )->patterns();
- QStringList::Iterator it = extensions.begin();
- QString file = archive.path();
+ TQStringList extensions = KMimeType::mimeType( m_openAsMimeType )->patterns();
+ TQStringList::Iterator it = extensions.begin();
+ TQString file = archive.path();
for ( ; it != extensions.end() && !file.endsWith( ( *it ).remove( '*' ) ); ++it )
;
@@ -565,7 +565,7 @@ ArkWidget::addToArchive( const KURL::List & filesToAdd, const KURL & archive)
}
}
- connect( this, SIGNAL( createDone( bool ) ), this, SLOT( addToArchiveSlotCreateDone( bool ) ) );
+ connect( this, TQT_SIGNAL( createDone( bool ) ), this, TQT_SLOT( addToArchiveSlotCreateDone( bool ) ) );
// TODO: remote Archives should be handled by createArchive
if ( archive.isLocalFile() )
@@ -581,14 +581,14 @@ ArkWidget::addToArchive( const KURL::List & filesToAdd, const KURL & archive)
return true;
}
- connect( this, SIGNAL( openDone( bool ) ), this, SLOT( addToArchiveSlotOpenDone( bool ) ) );
+ connect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( addToArchiveSlotOpenDone( bool ) ) );
return true;
}
void
ArkWidget::addToArchiveSlotCreateDone( bool success )
{
- disconnect( this, SIGNAL( createDone( bool ) ), this, SLOT( addToArchiveSlotCreateDone( bool ) ) );
+ disconnect( this, TQT_SIGNAL( createDone( bool ) ), this, TQT_SLOT( addToArchiveSlotCreateDone( bool ) ) );
if ( !success )
{
kdDebug( 1601 ) << "Could not create the archive" << endl;
@@ -602,7 +602,7 @@ void
ArkWidget::addToArchiveSlotOpenDone( bool success )
{
kdDebug( 1601 ) << k_funcinfo << endl;
- disconnect( this, SIGNAL( openDone( bool ) ), this, SLOT( addToArchiveSlotOpenDone( bool ) ) );
+ disconnect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( addToArchiveSlotOpenDone( bool ) ) );
// TODO: handle dirs with addDir ( or better+easier: get rid of the need to do that entirely )
if ( !success )
{
@@ -612,12 +612,12 @@ ArkWidget::addToArchiveSlotOpenDone( bool success )
if ( m_bIsSimpleCompressedFile && (m_nNumFiles == 1))
{
- QString strFilename;
+ TQString strFilename;
KURL url = askToCreateRealArchive();
strFilename = url.path();
if (!strFilename.isEmpty())
{
- connect( this, SIGNAL( createRealArchiveDone( bool ) ), this, SLOT( addToArchiveSlotAddDone( bool ) ) );
+ connect( this, TQT_SIGNAL( createRealArchiveDone( bool ) ), this, TQT_SLOT( addToArchiveSlotAddDone( bool ) ) );
createRealArchive( strFilename, m_addToArchive_filesToAdd.toStringList() );
return;
}
@@ -628,7 +628,7 @@ ArkWidget::addToArchiveSlotOpenDone( bool success )
}
}
-/* QStringList list = m_addToArchive_filesToAdd.toStringList();
+/* TQStringList list = m_addToArchive_filesToAdd.toStringList();
if ( !ArkUtils::diskHasSpace( tmpDir(), ArkUtils::getSizes( &list ) ) )
{
KMessageBox::error( this, i18n( "Not enough free disc space to extract the archive." ) );
@@ -639,10 +639,10 @@ ArkWidget::addToArchiveSlotOpenDone( bool success )
disableAll();
// if they are URLs, we have to download them, replace the URLs
// with filenames, and remember to delete the temporaries later.
-/* for ( QStringList::Iterator it = list.begin();
+/* for ( TQStringList::Iterator it = list.begin();
it != list.end(); ++it)
{
- QString str = *it;
+ TQString str = *it;
KURL url( toLocalFile( str ) );
*it = url.prettyURL();
}
@@ -662,7 +662,7 @@ ArkWidget::addToArchiveSlotOpenDone( bool success )
kdDebug( 1601 ) << "Adding: " << list << endl;
- connect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( addToArchiveSlotAddDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( addToArchiveSlotAddDone( bool ) ) );
arch->addFile( list.toStringList() );
}
@@ -670,7 +670,7 @@ void
ArkWidget::addToArchiveSlotAddDone( bool success )
{
kdDebug( 1601 ) << k_funcinfo << endl;
- disconnect( this, SLOT( addToArchiveSlotAddDone( bool ) ) );
+ disconnect( this, TQT_SLOT( addToArchiveSlotAddDone( bool ) ) );
if ( !success )
{
KMessageBox::error( this, i18n( "An error occurred while adding the files to the archive." ) );
@@ -681,7 +681,7 @@ ArkWidget::addToArchiveSlotAddDone( bool success )
return;
}
-void ArkWidget::setOpenAsMimeType( const QString & mimeType )
+void ArkWidget::setOpenAsMimeType( const TQString & mimeType )
{
m_openAsMimeType = mimeType;
}
@@ -705,11 +705,11 @@ ArkWidget::file_open(const KURL& url)
}
- QString strFile = url.path();
+ TQString strFile = url.path();
kdDebug( 1601 ) << "File to open: " << strFile << endl;
- QFileInfo fileInfo( strFile );
+ TQFileInfo fileInfo( strFile );
if ( !fileInfo.exists() )
{
KMessageBox::error(this, i18n("The archive %1 does not exist.").arg(strFile));
@@ -746,17 +746,17 @@ ArkWidget::file_open(const KURL& url)
// File menu /////////////////////////////////////////////////////////
KURL
-ArkWidget::getCreateFilename(const QString & _caption,
- const QString & _defaultMimeType,
+ArkWidget::getCreateFilename(const TQString & _caption,
+ const TQString & _defaultMimeType,
bool allowCompressed,
- const QString & _suggestedName )
+ const TQString & _suggestedName )
{
int choice=0;
bool fileExists = true;
- QString strFile;
+ TQString strFile;
KURL url;
- KFileDialog dlg( ":ArkSaveAsDialog", QString::null, this, "SaveAsDialog", true );
+ KFileDialog dlg( ":ArkSaveAsDialog", TQString::null, this, "SaveAsDialog", true );
dlg.setCaption( _caption );
dlg.setOperationMode( KFileDialog::Saving );
dlg.setMimeFilter( ArchiveFormatInfo::self()->supportedMimeTypes( allowCompressed ),
@@ -775,16 +775,16 @@ ArkWidget::getCreateFilename(const QString & _caption,
strFile = url.path();
if (strFile.isEmpty())
- return QString::null;
+ return TQString::null;
//the user chose to save as the current archive
//or wanted to create a new one with the same name
//no need to do anything
if (strFile == m_strArchName && m_bIsArchiveOpen)
- return QString::null;
+ return TQString::null;
- QStringList extensions = dlg.currentFilterMimeType()->patterns();
- QStringList::Iterator it = extensions.begin();
+ TQStringList extensions = dlg.currentFilterMimeType()->patterns();
+ TQStringList::Iterator it = extensions.begin();
for ( ; it != extensions.end() && !strFile.endsWith( ( *it ).remove( '*' ) ); ++it )
;
@@ -795,7 +795,7 @@ ArkWidget::getCreateFilename(const QString & _caption,
}
kdDebug(1601) << "Trying to create an archive named " << strFile << endl;
- fileExists = QFile::exists( strFile );
+ fileExists = TQFile::exists( strFile );
if( fileExists )
{
choice = KMessageBox::warningYesNoCancel(0,
@@ -804,12 +804,12 @@ ArkWidget::getCreateFilename(const QString & _caption,
if ( choice == KMessageBox::Yes )
{
- QFile::remove( strFile );
+ TQFile::remove( strFile );
break;
}
else if ( choice == KMessageBox::Cancel )
{
- return QString::null;
+ return TQString::null;
}
else
{
@@ -822,7 +822,7 @@ ArkWidget::getCreateFilename(const QString & _caption,
KMessageBox::error( this,
i18n( "You do not have permission"
" to write to the directory %1" ).arg(url.directory() ) );
- return QString::null;
+ return TQString::null;
}
} // end of while loop
@@ -832,7 +832,7 @@ ArkWidget::getCreateFilename(const QString & _caption,
void
ArkWidget::file_new()
{
- QString strFile;
+ TQString strFile;
KURL url = getCreateFilename(i18n("Create New Archive") );
strFile = url.path();
if (!strFile.isEmpty())
@@ -858,8 +858,8 @@ ArkWidget::extractOnlyOpenDone()
void
ArkWidget::slotExtractDone(bool success)
{
- disconnect( arch, SIGNAL( sigExtract( bool ) ),
- this, SLOT( slotExtractDone(bool) ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ),
+ this, TQT_SLOT( slotExtractDone(bool) ) );
ready();
if(m_extractList != 0)
@@ -894,19 +894,19 @@ ArkWidget::extractRemoteInitiateMoving( const KURL & target )
{
KURL srcDirURL;
KURL src;
- QString srcDir;
+ TQString srcDir;
srcDir = m_extractRemoteTmpDir->name();
srcDirURL.setPath( srcDir );
- QDir dir( srcDir );
- dir.setFilter( QDir::All | QDir::Hidden );
- QStringList lst( dir.entryList() );
+ TQDir dir( srcDir );
+ dir.setFilter( TQDir::All | TQDir::Hidden );
+ TQStringList lst( dir.entryList() );
lst.remove( "." );
lst.remove( ".." );
KURL::List srcList;
- for( QStringList::ConstIterator it = lst.begin(); it != lst.end() ; ++it)
+ for( TQStringList::ConstIterator it = lst.begin(); it != lst.end() ; ++it)
{
src = srcDirURL;
src.addPath( *it );
@@ -916,8 +916,8 @@ ArkWidget::extractRemoteInitiateMoving( const KURL & target )
m_extractURL.adjustPath( 1 );
KIO::CopyJob *job = KIO::copy( srcList, target, this );
- connect( job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotExtractRemoteDone(KIO::Job*)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotExtractRemoteDone(KIO::Job*)) );
m_extractRemote = false;
}
@@ -957,7 +957,7 @@ ArkWidget::file_close()
if ( isArchiveOpen() )
{
closeArch();
- emit setWindowCaption( QString::null );
+ emit setWindowCaption( TQString::null );
emit removeOpenArk( m_strArchName );
updateStatusTotals();
updateStatusSelection();
@@ -968,7 +968,7 @@ ArkWidget::file_close()
closeArch();
}
- m_strArchName = QString::null;
+ m_strArchName = TQString::null;
m_url = KURL();
}
@@ -984,22 +984,22 @@ ArkWidget::askToCreateRealArchive()
if (choice == KMessageBox::Yes)
{
url = getCreateFilename( i18n("Create New Archive"),
- QString::null, false );
+ TQString::null, false );
}
else
- url.setPath( QString::null );
+ url.setPath( TQString::null );
return url;
}
void
-ArkWidget::createRealArchive( const QString & strFilename, const QStringList & filesToAdd )
+ArkWidget::createRealArchive( const TQString & strFilename, const TQStringList & filesToAdd )
{
Arch * newArch = getNewArchive( strFilename );
busy( i18n( "Creating archive..." ) );
if ( !newArch )
return;
if ( !filesToAdd.isEmpty() )
- m_pTempAddList = new QStringList( filesToAdd );
+ m_pTempAddList = new TQStringList( filesToAdd );
m_compressedFile = static_cast< CompressedFile * >( arch )->tempFileName();
KURL u1, u2;
u1.setPath( m_compressedFile );
@@ -1007,28 +1007,28 @@ ArkWidget::createRealArchive( const QString & strFilename, const QStringList & f
u2.setPath( m_createRealArchTmpDir->name() + u1.fileName() );
KIO::NetAccess::copy( u1, u2, this );
m_compressedFile = "file:" + u2.path(); // AGAIN THE 5 SPACES Hack :-(
- connect( newArch, SIGNAL( sigCreate( Arch *, bool, const QString &, int ) ),
- this, SLOT( createRealArchiveSlotCreate( Arch *, bool,
- const QString &, int ) ) );
+ connect( newArch, TQT_SIGNAL( sigCreate( Arch *, bool, const TQString &, int ) ),
+ this, TQT_SLOT( createRealArchiveSlotCreate( Arch *, bool,
+ const TQString &, int ) ) );
file_close();
newArch->create();
}
void
ArkWidget::createRealArchiveSlotCreate( Arch * newArch, bool success,
- const QString & fileName, int nbr )
+ const TQString & fileName, int nbr )
{
slotCreate( newArch, success, fileName, nbr );
if ( !success )
return;
- QStringList listForCompressedFile;
+ TQStringList listForCompressedFile;
listForCompressedFile.append(m_compressedFile);
disableAll();
- connect( newArch, SIGNAL( sigAdd( bool ) ), this,
- SLOT( createRealArchiveSlotAddDone( bool ) ) );
+ connect( newArch, TQT_SIGNAL( sigAdd( bool ) ), this,
+ TQT_SLOT( createRealArchiveSlotAddDone( bool ) ) );
newArch->addFile(listForCompressedFile);
}
@@ -1037,8 +1037,8 @@ void
ArkWidget::createRealArchiveSlotAddDone( bool success )
{
kdDebug( 1601 ) << "createRealArchiveSlotAddDone+, success:" << success << endl;
- disconnect( arch, SIGNAL( sigAdd( bool ) ), this,
- SLOT( createRealArchiveSlotAddDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigAdd( bool ) ), this,
+ TQT_SLOT( createRealArchiveSlotAddDone( bool ) ) );
m_createRealArchTmpDir->unlink();
delete m_createRealArchTmpDir;
@@ -1058,8 +1058,8 @@ ArkWidget::createRealArchiveSlotAddDone( bool success )
}
else
{
- connect( arch, SIGNAL( sigAdd( bool ) ), this,
- SLOT( createRealArchiveSlotAddFilesDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this,
+ TQT_SLOT( createRealArchiveSlotAddFilesDone( bool ) ) );
// files were dropped in
addFile( m_pTempAddList );
}
@@ -1069,8 +1069,8 @@ void
ArkWidget::createRealArchiveSlotAddFilesDone( bool success )
{
//kdDebug( 1601 ) << "createRealArchiveSlotAddFilesDone+, success:" << success << endl;
- disconnect( arch, SIGNAL( sigAdd( bool ) ), this,
- SLOT( createRealArchiveSlotAddFilesDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigAdd( bool ) ), this,
+ TQT_SLOT( createRealArchiveSlotAddFilesDone( bool ) ) );
delete m_pTempAddList;
m_pTempAddList = NULL;
emit createRealArchiveDone( success );
@@ -1086,7 +1086,7 @@ ArkWidget::action_add()
{
if (m_bIsSimpleCompressedFile && (m_nNumFiles == 1))
{
- QString strFilename;
+ TQString strFilename;
KURL url = askToCreateRealArchive();
strFilename = url.path();
if (!strFilename.isEmpty())
@@ -1096,7 +1096,7 @@ ArkWidget::action_add()
return;
}
- KFileDialog fileDlg( ":ArkAddDir", QString::null, this, "adddlg", true );
+ KFileDialog fileDlg( ":ArkAddDir", TQString::null, this, "adddlg", true );
fileDlg.setMode( KFile::Mode( KFile::Files | KFile::ExistingOnly ) );
fileDlg.setCaption(i18n("Select Files to Add"));
@@ -1104,7 +1104,7 @@ ArkWidget::action_add()
{
KURL::List addList;
addList = fileDlg.selectedURLs();
- QStringList * list = new QStringList();
+ TQStringList * list = new TQStringList();
//Here we pre-calculate the end of the list
KURL::List::ConstIterator endList = addList.end();
for (KURL::List::ConstIterator it = addList.begin(); it != endList; ++it)
@@ -1114,7 +1114,7 @@ ArkWidget::action_add()
{
if ( m_bIsSimpleCompressedFile && list->count() > 1 )
{
- QString strFilename;
+ TQString strFilename;
KURL url = askToCreateRealArchive();
strFilename = url.path();
if (!strFilename.isEmpty())
@@ -1131,7 +1131,7 @@ ArkWidget::action_add()
}
void
-ArkWidget::addFile(QStringList *list)
+ArkWidget::addFile(TQStringList *list)
{
if ( !ArkUtils::diskHasSpace( tmpDir(), ArkUtils::getSizes( list ) ) )
return;
@@ -1140,14 +1140,14 @@ ArkWidget::addFile(QStringList *list)
busy( i18n( "Adding files..." ) );
// if they are URLs, we have to download them, replace the URLs
// with filenames, and remember to delete the temporaries later.
- for (QStringList::Iterator it = list->begin(); it != list->end(); ++it)
+ for (TQStringList::Iterator it = list->begin(); it != list->end(); ++it)
{
- QString str = *it;
+ TQString str = *it;
*it = toLocalFile(KURL(str)).prettyURL();
}
- connect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( slotAddDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( slotAddDone( bool ) ) );
arch->addFile( ( *list ) );
}
@@ -1158,13 +1158,13 @@ ArkWidget::action_add_dir()
false, this,
i18n("Select Folder to Add"));
- QString dir = KURL::decode_string( u.url(-1) );
+ TQString dir = KURL::decode_string( u.url(-1) );
if ( !dir.isEmpty() )
{
busy( i18n( "Adding folder..." ) );
disableAll();
u = toLocalFile(u);
- connect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( slotAddDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( slotAddDone( bool ) ) );
arch->addDir( u.prettyURL() );
}
@@ -1173,7 +1173,7 @@ ArkWidget::action_add_dir()
void
ArkWidget::slotAddDone(bool _bSuccess)
{
- disconnect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( slotAddDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( slotAddDone( bool ) ) );
m_fileListView->setUpdatesEnabled(true);
m_fileListView->triggerUpdate();
ready();
@@ -1201,9 +1201,9 @@ ArkWidget::toLocalFile( const KURL& url )
if(!url.isLocalFile())
{
- QString strURL = url.prettyURL();
+ TQString strURL = url.prettyURL();
- QString tempfile = tmpDir();
+ TQString tempfile = tmpDir();
tempfile += strURL.right(strURL.length() - strURL.findRev("/") - 1);
deleteAfterUse(tempfile); // remember for deletion
KURL tempurl; tempurl.setPath( tempfile );
@@ -1215,7 +1215,7 @@ ArkWidget::toLocalFile( const KURL& url )
}
void
-ArkWidget::deleteAfterUse( const QString& path )
+ArkWidget::deleteAfterUse( const TQString& path )
{
mpDownloadedList.append( path );
}
@@ -1228,10 +1228,10 @@ ArkWidget::removeDownloadedFiles()
// It is necessary to remove those files even if tmpDir() is getting deleted:
// not all files in mpDownloadedList are from tmpDir() - e.g. when using --tempfile
// But of course we could decide to not add files from tmpDir() into mpDownloadedList.
- QStringList::ConstIterator it = mpDownloadedList.begin();
- QStringList::ConstIterator end = mpDownloadedList.end();
+ TQStringList::ConstIterator it = mpDownloadedList.begin();
+ TQStringList::ConstIterator end = mpDownloadedList.end();
for ( ; it != end ; ++it )
- QFile::remove( *it );
+ TQFile::remove( *it );
mpDownloadedList.clear();
}
}
@@ -1249,13 +1249,13 @@ ArkWidget::action_delete()
return; // shouldn't happen - delete should have been disabled!
}
- QStringList list = m_fileListView->selectedFilenames();
+ TQStringList list = m_fileListView->selectedFilenames();
// ask for confirmation
if ( KMessageBox::warningContinueCancelList( this,
i18n( "Do you really want to delete the selected items?" ),
list,
- QString::null,
+ TQString::null,
KStdGuiItem::del(),
"confirmDelete" )
!= KMessageBox::Continue)
@@ -1264,7 +1264,7 @@ ArkWidget::action_delete()
}
// Remove the entries from the list view
- QListViewItemIterator it( m_fileListView );
+ TQListViewItemIterator it( m_fileListView );
while ( it.current() )
{
if ( it.current()->isSelected() )
@@ -1275,7 +1275,7 @@ ArkWidget::action_delete()
disableAll();
busy( i18n( "Removing..." ) );
- connect( arch, SIGNAL( sigDelete( bool ) ), this, SLOT( slotDeleteDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigDelete( bool ) ), this, TQT_SLOT( slotDeleteDone( bool ) ) );
arch->remove(&list);
kdDebug(1601) << "-ArkWidget::action_delete" << endl;
}
@@ -1283,7 +1283,7 @@ ArkWidget::action_delete()
void
ArkWidget::slotDeleteDone(bool _bSuccess)
{
- disconnect( arch, SIGNAL( sigDelete( bool ) ), this, SLOT( slotDeleteDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigDelete( bool ) ), this, TQT_SLOT( slotDeleteDone( bool ) ) );
kdDebug(1601) << "+ArkWidget::slotDeleteDone" << endl;
m_fileListView->setUpdatesEnabled(true);
m_fileListView->triggerUpdate();
@@ -1305,8 +1305,8 @@ ArkWidget::slotDeleteDone(bool _bSuccess)
void
ArkWidget::slotOpenWith()
{
- connect( arch, SIGNAL( sigExtract( bool ) ), this,
- SLOT( openWithSlotExtractDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this,
+ TQT_SLOT( openWithSlotExtractDone( bool ) ) );
showCurrentFile();
}
@@ -1314,14 +1314,14 @@ ArkWidget::slotOpenWith()
void
ArkWidget::openWithSlotExtractDone( bool success )
{
- disconnect( arch, SIGNAL( sigExtract( bool ) ), this,
- SLOT( openWithSlotExtractDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ), this,
+ TQT_SLOT( openWithSlotExtractDone( bool ) ) );
if ( success )
{
KURL::List list;
list.append(m_viewURL);
- KOpenWithDlg l( list, i18n("Open with:"), QString::null, (QWidget*)0L);
+ KOpenWithDlg l( list, i18n("Open with:"), TQString::null, (TQWidget*)0L);
if ( l.exec() )
{
KService::Ptr service = l.service();
@@ -1331,7 +1331,7 @@ ArkWidget::openWithSlotExtractDone( bool success )
}
else
{
- QString exec = l.text();
+ TQString exec = l.text();
exec += " %f";
KRun::run( exec, list );
}
@@ -1347,22 +1347,22 @@ ArkWidget::openWithSlotExtractDone( bool success )
void
-ArkWidget::prepareViewFiles( const QStringList & fileList )
+ArkWidget::prepareViewFiles( const TQStringList & fileList )
{
- QString destTmpDirectory;
+ TQString destTmpDirectory;
destTmpDirectory = tmpDir();
// Make sure to delete previous file already there...
- for(QStringList::ConstIterator it = fileList.begin();
+ for(TQStringList::ConstIterator it = fileList.begin();
it != fileList.end(); ++it)
- QFile::remove(destTmpDirectory + *it);
+ TQFile::remove(destTmpDirectory + *it);
- m_viewList = new QStringList( fileList );
+ m_viewList = new TQStringList( fileList );
arch->unarchFile( m_viewList, destTmpDirectory, true);
}
bool
-ArkWidget::reportExtractFailures( const QString & _dest, QStringList *_list )
+ArkWidget::reportExtractFailures( const TQString & _dest, TQStringList *_list )
{
// reports extract failures when Overwrite = False and the file
// exists already in the destination directory.
@@ -1370,10 +1370,10 @@ ArkWidget::reportExtractFailures( const QString & _dest, QStringList *_list )
// Otherwise the list contains the files we are to extract.
bool redoExtraction = false;
- QString strFilename;
+ TQString strFilename;
- QStringList list = *_list;
- QStringList filesExisting = existingFiles( _dest, list );
+ TQStringList list = *_list;
+ TQStringList filesExisting = existingFiles( _dest, list );
int numFilesToReport = filesExisting.count();
@@ -1390,11 +1390,11 @@ ArkWidget::reportExtractFailures( const QString & _dest, QStringList *_list )
}
QStringList
-ArkWidget::existingFiles( const QString & _dest, QStringList & _list )
+ArkWidget::existingFiles( const TQString & _dest, TQStringList & _list )
{
- QString strFilename, tmp;
+ TQString strFilename, tmp;
- QString strDestDir = _dest;
+ TQString strDestDir = _dest;
// make sure the destination directory has a / at the end.
if ( !strDestDir.endsWith( "/" ) )
@@ -1407,15 +1407,15 @@ ArkWidget::existingFiles( const QString & _dest, QStringList & _list )
_list = m_fileListView->fileNames();
}
- QStringList existingFiles;
+ TQStringList existingFiles;
// now the list contains all the names we must verify.
- for (QStringList::Iterator it = _list.begin(); it != _list.end(); ++it)
+ for (TQStringList::Iterator it = _list.begin(); it != _list.end(); ++it)
{
strFilename = *it;
- QString strFullName = strDestDir + strFilename;
+ TQString strFullName = strDestDir + strFilename;
// if the filename ends with an "/", it means it is a directory
- if ( QFile::exists( strFullName ) && !strFilename.endsWith("/") )
+ if ( TQFile::exists( strFullName ) && !strFilename.endsWith("/") )
{
existingFiles.append( strFilename );
}
@@ -1441,20 +1441,20 @@ ArkWidget::action_extract()
}
//if more than one entry in the archive is root level, suggest a path prefix
- QString prefix = m_fileListView->childCount() > 1 ?
- QChar( '/' ) + guessName( realURL() )
- : QString();
+ TQString prefix = m_fileListView->childCount() > 1 ?
+ TQChar( '/' ) + guessName( realURL() )
+ : TQString();
// Should the extraction dialog show an option for extracting only selected files?
bool enableSelected = ( m_nNumSelectedFiles > 0 ) &&
( m_fileListView->totalFiles() > 1);
- QString base = ArkSettings::extractionHistory().isEmpty()?
- QString() : ArkSettings::extractionHistory().first();
+ TQString base = ArkSettings::extractionHistory().isEmpty()?
+ TQString() : ArkSettings::extractionHistory().first();
if ( base.isEmpty() )
{
// Perhaps the KDE Documents folder is a better choice?
- base = QDir::homeDirPath();
+ base = TQDir::homeDirPath();
}
// Default URL shown in the extraction dialog;
@@ -1462,7 +1462,7 @@ ArkWidget::action_extract()
if ( m_extractOnly )
{
- defaultDir = KURL::fromPathOrURL( QDir::currentDirPath() );
+ defaultDir = KURL::fromPathOrURL( TQDir::currentDirPath() );
}
ExtractionDialog *dlg = new ExtractionDialog( this, 0, enableSelected, defaultDir, prefix, m_url.fileName() );
@@ -1479,7 +1479,7 @@ ArkWidget::action_extract()
//extractDir will either be the real, local extract dir,
//or in case of a extract to remote location, a local tmp dir
- QString extractDir;
+ TQString extractDir;
if ( !m_extractURL.isLocalFile() )
{
@@ -1519,7 +1519,7 @@ ArkWidget::action_extract()
{
disableAll();
busy( i18n( "Extracting..." ) );
- connect( arch, SIGNAL( sigExtract( bool ) ), this, SLOT( slotExtractDone(bool) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this, TQT_SLOT( slotExtractDone(bool) ) );
arch->unarchFile(0, extractDir);
}
}
@@ -1528,12 +1528,12 @@ ArkWidget::action_extract()
{
KIO::filesize_t nTotalSize = 0;
// make a list to send to unarchFile
- QStringList selectedFiles = m_fileListView->selectedFilenames();
- for ( QStringList::const_iterator it = selectedFiles.constBegin();
+ TQStringList selectedFiles = m_fileListView->selectedFilenames();
+ for ( TQStringList::const_iterator it = selectedFiles.constBegin();
it != selectedFiles.constEnd();
++it )
{
- m_extractList->append( QFile::encodeName( *it ) );
+ m_extractList->append( TQFile::encodeName( *it ) );
}
if (!bOvwrt)
@@ -1546,8 +1546,8 @@ ArkWidget::action_extract()
{
disableAll();
busy( i18n( "Extracting..." ) );
- connect( arch, SIGNAL( sigExtract( bool ) ),
- this, SLOT( slotExtractDone(bool) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ),
+ this, TQT_SLOT( slotExtractDone(bool) ) );
arch->unarchFile(m_extractList, extractDir); // extract selected files
}
}
@@ -1580,16 +1580,16 @@ ArkWidget::action_edit()
// [hmm, does that really make sense? I'll leave it for now.]
busy( i18n( "Extracting..." ) );
- connect( arch, SIGNAL( sigExtract( bool ) ), this,
- SLOT( editSlotExtractDone() ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this,
+ TQT_SLOT( editSlotExtractDone() ) );
showCurrentFile();
}
void
ArkWidget::editSlotExtractDone()
{
- disconnect( arch, SIGNAL( sigExtract( bool ) ),
- this, SLOT( editSlotExtractDone() ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ),
+ this, TQT_SLOT( editSlotExtractDone() ) );
ready();
editStart();
@@ -1608,14 +1608,14 @@ ArkWidget::editStart()
KURL::List list;
// edit will be in progress until the KProcess terminates.
KOpenWithDlg l( list, i18n("Edit with:"),
- QString::null, (QWidget*)0L );
+ TQString::null, (TQWidget*)0L );
if ( l.exec() )
{
KProcess *kp = new KProcess;
*kp << l.text() << m_strFileToView;
- connect( kp, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotEditFinished(KProcess *)) );
+ connect( kp, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotEditFinished(KProcess *)) );
if ( kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false )
{
KMessageBox::error(0, i18n("Trouble editing the file..."));
@@ -1627,9 +1627,9 @@ void
ArkWidget::slotEditFinished(KProcess *kp)
{
kdDebug(1601) << "+ArkWidget::slotEditFinished" << endl;
- connect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( editSlotAddDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( editSlotAddDone( bool ) ) );
delete kp;
- QStringList list;
+ TQStringList list;
// now put the file back into the archive.
list.append(m_strFileToView);
disableAll();
@@ -1640,16 +1640,16 @@ ArkWidget::slotEditFinished(KProcess *kp)
// If the filename has more than three /'s then we should
// change to the first level directory so that the paths
// come out right.
- QStringList::Iterator it = list.begin();
- QString filename = *it;
- QString path;
+ TQStringList::Iterator it = list.begin();
+ TQString filename = *it;
+ TQString path;
if (filename.contains('/') > 3)
{
kdDebug(1601) << "Filename is originally: " << filename << endl;
int i = filename.find('/', 5);
path = filename.left(1+i);
kdDebug(1601) << "Changing to dir: " << path << endl;
- QDir::setCurrent(path);
+ TQDir::setCurrent(path);
filename = filename.right(filename.length()-i-1);
// HACK!! We need a relative path. If I have "file:", it
// will look like an absolute path. So five spaces here to get
@@ -1668,15 +1668,15 @@ void
ArkWidget::editSlotAddDone( bool success )
{
ready();
- disconnect( arch, SIGNAL( sigAdd( bool ) ), this, SLOT( editSlotAddDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( editSlotAddDone( bool ) ) );
slotAddDone( success );
}
void
ArkWidget::action_view()
{
- connect( arch, SIGNAL( sigExtract( bool ) ), this,
- SLOT( viewSlotExtractDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this,
+ TQT_SLOT( viewSlotExtractDone( bool ) ) );
busy( i18n( "Extracting file to view" ) );
showCurrentFile();
}
@@ -1686,7 +1686,7 @@ ArkWidget::viewSlotExtractDone( bool success )
{
if ( success )
{
- chmod( QFile::encodeName( m_strFileToView ), 0400 );
+ chmod( TQFile::encodeName( m_strFileToView ), 0400 );
bool view = true;
if ( ArkSettings::useIntegratedViewer() )
@@ -1695,8 +1695,8 @@ ArkWidget::viewSlotExtractDone( bool success )
if ( !viewer->view( m_viewURL ) )
{
- QString text = i18n( "The internal viewer is not able to display this file. Would you like to view it using an external program?" );
- view = ( KMessageBox::warningYesNo( this, text, QString::null, i18n("View Externally"), i18n("Do Not View") ) == KMessageBox::Yes );
+ TQString text = i18n( "The internal viewer is not able to display this file. Would you like to view it using an external program?" );
+ view = ( KMessageBox::warningYesNo( this, text, TQString::null, i18n("View Externally"), i18n("Do Not View") ) == KMessageBox::Yes );
if ( view )
viewInExternalViewer( this, m_viewURL );
@@ -1708,8 +1708,8 @@ ArkWidget::viewSlotExtractDone( bool success )
}
}
- disconnect( arch, SIGNAL( sigExtract( bool ) ), this,
- SLOT( viewSlotExtractDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ), this,
+ TQT_SLOT( viewSlotExtractDone( bool ) ) );
delete m_viewList;
@@ -1729,21 +1729,21 @@ ArkWidget::showCurrentFile()
if ( !m_fileListView->currentItem() )
return;
- QString name = m_fileListView->currentItem()->fileName();
+ TQString name = m_fileListView->currentItem()->fileName();
- QString fullname = tmpDir();
+ TQString fullname = tmpDir();
fullname += name;
if(fullname.contains("../"))
fullname.remove("../");
- //Convert the QString filename to KURL to escape the bad characters
+ //Convert the TQString filename to KURL to escape the bad characters
m_viewURL.setPath(fullname);
m_strFileToView = fullname;
kdDebug(1601) << "File to be extracted: " << m_viewURL << endl;
- QStringList extractList;
+ TQStringList extractList;
extractList.append(name);
if (ArkUtils::diskHasSpace( tmpDir(), m_fileListView->currentItem()->fileSize() ) )
@@ -1762,7 +1762,7 @@ ArkWidget::setArchivePopupEnabled( bool b )
}
void
-ArkWidget::doPopup( QListViewItem *pItem, const QPoint &pPoint, int nCol ) // slot
+ArkWidget::doPopup( TQListViewItem *pItem, const TQPoint &pPoint, int nCol ) // slot
// do the right-click popup menus
{
if ( nCol == 0 || !m_bArchivePopupEnabled )
@@ -1779,7 +1779,7 @@ ArkWidget::doPopup( QListViewItem *pItem, const QPoint &pPoint, int nCol ) // sl
void
-ArkWidget::viewFile( QListViewItem* item ) // slot
+ArkWidget::viewFile( TQListViewItem* item ) // slot
// show contents when double click
{
// Preview, if it is a file
@@ -1809,7 +1809,7 @@ ArkWidget::updateStatusSelection()
m_nNumSelectedFiles = m_fileListView->selectedFilesCount();
m_nSizeOfSelectedFiles = m_fileListView->selectedSize();
- QString strInfo;
+ TQString strInfo;
if (m_nNumSelectedFiles == 0)
{
strInfo = i18n("0 files selected");
@@ -1834,7 +1834,7 @@ ArkWidget::updateStatusSelection()
// Drag & Drop ////////////////////////////////////////////////////////
void
-ArkWidget::dragMoveEvent(QDragMoveEvent *e)
+ArkWidget::dragMoveEvent(TQDragMoveEvent *e)
{
if (KURLDrag::canDecode(e) && !m_bDropSourceIsSelf)
{
@@ -1844,7 +1844,7 @@ ArkWidget::dragMoveEvent(QDragMoveEvent *e)
void
-ArkWidget::dropEvent(QDropEvent* e)
+ArkWidget::dropEvent(TQDropEvent* e)
{
kdDebug( 1601 ) << "+ArkWidget::dropEvent" << endl;
@@ -1852,7 +1852,7 @@ ArkWidget::dropEvent(QDropEvent* e)
if ( KURLDrag::decode( e, list ) )
{
- QStringList urlList = list.toStringList();
+ TQStringList urlList = list.toStringList();
dropAction( urlList );
}
@@ -1864,7 +1864,7 @@ ArkWidget::dropEvent(QDropEvent* e)
//////////////////////////////////////////////////////////////////////
void
-ArkWidget::dropAction( QStringList & list )
+ArkWidget::dropAction( TQStringList & list )
{
// Called by dropEvent
@@ -1881,8 +1881,8 @@ ArkWidget::dropAction( QStringList & list )
// and don't forget about gzip files.
- QString str;
- QStringList urls; // to be sent to addFile
+ TQString str;
+ TQStringList urls; // to be sent to addFile
str = list.first();
@@ -1896,13 +1896,13 @@ ArkWidget::dropAction( QStringList & list )
// one or open it as the new current archive
int nRet = KMessageBox::warningYesNoCancel(this,
i18n("Do you wish to add this to the current archive or open it as a new archive?"),
- QString::null,
+ TQString::null,
i18n("&Add"), i18n("&Open"));
if (KMessageBox::Yes == nRet) // add it
{
if (m_bIsSimpleCompressedFile && (m_nNumFiles == 1))
{
- QString strFilename;
+ TQString strFilename;
KURL url = askToCreateRealArchive();
strFilename = url.path();
if (!strFilename.isEmpty())
@@ -1933,7 +1933,7 @@ ArkWidget::dropAction( QStringList & list )
{
if (m_bIsSimpleCompressedFile && (m_nNumFiles == 1))
{
- QString strFilename;
+ TQString strFilename;
KURL url = askToCreateRealArchive();
strFilename = url.path();
if (!strFilename.isEmpty())
@@ -1950,11 +1950,11 @@ ArkWidget::dropAction( QStringList & list )
// no archive is open, so we ask if the user wants to open one
// for this/these file/files.
- QString str;
+ TQString str;
str = (list.count() > 1)
? i18n("There is no archive currently open. Do you wish to create one now for these files?")
: i18n("There is no archive currently open. Do you wish to create one now for this file?");
- int nRet = KMessageBox::warningYesNo(this, str, QString::null, i18n("Create Archive"), i18n("Do Not Create"));
+ int nRet = KMessageBox::warningYesNo(this, str, TQString::null, i18n("Create Archive"), i18n("Do Not Create"));
if (nRet == KMessageBox::Yes) // yes
{
file_new();
@@ -1969,22 +1969,22 @@ ArkWidget::dropAction( QStringList & list )
}
void
-ArkWidget::startDrag( const QStringList & fileList )
+ArkWidget::startDrag( const TQStringList & fileList )
{
mDragFiles = fileList;
- connect( arch, SIGNAL( sigExtract( bool ) ), this, SLOT( startDragSlotExtractDone( bool ) ) );
+ connect( arch, TQT_SIGNAL( sigExtract( bool ) ), this, TQT_SLOT( startDragSlotExtractDone( bool ) ) );
prepareViewFiles( fileList );
}
void
ArkWidget::startDragSlotExtractDone( bool )
{
- disconnect( arch, SIGNAL( sigExtract( bool ) ),
- this, SLOT( startDragSlotExtractDone( bool ) ) );
+ disconnect( arch, TQT_SIGNAL( sigExtract( bool ) ),
+ this, TQT_SLOT( startDragSlotExtractDone( bool ) ) );
KURL::List list;
- for (QStringList::Iterator it = mDragFiles.begin(); it != mDragFiles.end(); ++it)
+ for (TQStringList::Iterator it = mDragFiles.begin(); it != mDragFiles.end(); ++it)
{
KURL url;
url.setPath( tmpDir() + *it );
@@ -1999,7 +1999,7 @@ ArkWidget::startDragSlotExtractDone( bool )
void
-ArkWidget::arkWarning(const QString& msg)
+ArkWidget::arkWarning(const TQString& msg)
{
KMessageBox::information(this, msg);
}
@@ -2012,26 +2012,26 @@ ArkWidget::createFileListView()
{
m_fileListView = new FileListView(this);
- connect( m_fileListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
- connect( m_fileListView, SIGNAL( rightButtonPressed(QListViewItem *, const QPoint &, int) ),
- this, SLOT(doPopup(QListViewItem *, const QPoint &, int)));
- connect( m_fileListView, SIGNAL( startDragRequest( const QStringList & ) ),
- this, SLOT( startDrag( const QStringList & ) ) );
- connect( m_fileListView, SIGNAL( executed(QListViewItem *, const QPoint &, int ) ),
- this, SLOT( viewFile(QListViewItem*) ) );
- connect( m_fileListView, SIGNAL( returnPressed(QListViewItem * ) ),
- this, SLOT( viewFile(QListViewItem*) ) );
+ connect( m_fileListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
+ connect( m_fileListView, TQT_SIGNAL( rightButtonPressed(TQListViewItem *, const TQPoint &, int) ),
+ this, TQT_SLOT(doPopup(TQListViewItem *, const TQPoint &, int)));
+ connect( m_fileListView, TQT_SIGNAL( startDragRequest( const TQStringList & ) ),
+ this, TQT_SLOT( startDrag( const TQStringList & ) ) );
+ connect( m_fileListView, TQT_SIGNAL( executed(TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( viewFile(TQListViewItem*) ) );
+ connect( m_fileListView, TQT_SIGNAL( returnPressed(TQListViewItem * ) ),
+ this, TQT_SLOT( viewFile(TQListViewItem*) ) );
}
m_fileListView->clear();
}
-Arch * ArkWidget::getNewArchive( const QString & _fileName, const QString& _mimetype )
+Arch * ArkWidget::getNewArchive( const TQString & _fileName, const TQString& _mimetype )
{
Arch * newArch = 0;
- QString type = _mimetype.isNull()? KMimeType::findByURL( KURL::fromPathOrURL(_fileName) )->name() : _mimetype;
+ TQString type = _mimetype.isNull()? KMimeType::findByURL( KURL::fromPathOrURL(_fileName) )->name() : _mimetype;
ArchType archtype = ArchiveFormatInfo::self()->archTypeForMimeType(type);
kdDebug( 1601 ) << "archtype is recognised as: " << archtype << endl;
if(0 == (newArch = Arch::archFactory(archtype, this,
@@ -2048,8 +2048,8 @@ Arch * ArkWidget::getNewArchive( const QString & _fileName, const QString& _mime
return NULL;
}
- connect( newArch, SIGNAL(headers(const ColumnList&)),
- m_fileListView, SLOT(setHeaders(const ColumnList&)));
+ connect( newArch, TQT_SIGNAL(headers(const ColumnList&)),
+ m_fileListView, TQT_SLOT(setHeaders(const ColumnList&)));
m_archType = archtype;
m_fileListView->setUpdatesEnabled(true);
@@ -2062,26 +2062,26 @@ Arch * ArkWidget::getNewArchive( const QString & _fileName, const QString& _mime
bool
-ArkWidget::createArchive( const QString & _filename )
+ArkWidget::createArchive( const TQString & _filename )
{
Arch * newArch = getNewArchive( _filename );
if ( !newArch )
return false;
busy( i18n( "Creating archive..." ) );
- connect( newArch, SIGNAL(sigCreate(Arch *, bool, const QString &, int) ),
- this, SLOT(slotCreate(Arch *, bool, const QString &, int) ) );
+ connect( newArch, TQT_SIGNAL(sigCreate(Arch *, bool, const TQString &, int) ),
+ this, TQT_SLOT(slotCreate(Arch *, bool, const TQString &, int) ) );
newArch->create();
return true;
}
void
-ArkWidget::slotCreate(Arch * _newarch, bool _success, const QString & _filename, int)
+ArkWidget::slotCreate(Arch * _newarch, bool _success, const TQString & _filename, int)
{
kdDebug( 1601 ) << k_funcinfo << endl;
- disconnect( _newarch, SIGNAL( sigCreate( Arch *, bool, const QString &, int ) ),
- this, SLOT(slotCreate(Arch *, bool, const QString &, int) ) );
+ disconnect( _newarch, TQT_SIGNAL( sigCreate( Arch *, bool, const TQString &, int ) ),
+ this, TQT_SLOT(slotCreate(Arch *, bool, const TQString &, int) ) );
ready();
if ( _success )
{
@@ -2115,7 +2115,7 @@ ArkWidget::slotCreate(Arch * _newarch, bool _success, const QString & _filename,
//////////////////////////////////////////////////////////////////////
void
-ArkWidget::openArchive( const QString & _filename )
+ArkWidget::openArchive( const TQString & _filename )
{
Arch *newArch = 0;
ArchType archtype;
@@ -2126,9 +2126,9 @@ ArkWidget::openArchive( const QString & _filename )
if ( info->wasUnknownExtension() )
{
ArchiveFormatDlg * dlg = new ArchiveFormatDlg( this, info->findMimeType( m_url ) );
- if ( !dlg->exec() == QDialog::Accepted )
+ if ( !dlg->exec() == TQDialog::Accepted )
{
- emit setWindowCaption( QString::null );
+ emit setWindowCaption( TQString::null );
emit removeRecentURL( m_realURL );
delete dlg;
file_close();
@@ -2148,7 +2148,7 @@ ArkWidget::openArchive( const QString & _filename )
if( 0 == ( newArch = Arch::archFactory( archtype, this,
_filename, m_openAsMimeType) ) )
{
- emit setWindowCaption( QString::null );
+ emit setWindowCaption( TQString::null );
emit removeRecentURL( m_realURL );
KMessageBox::error( this, i18n("Unknown archive format or corrupted archive") );
return;
@@ -2162,10 +2162,10 @@ ArkWidget::openArchive( const QString & _filename )
m_archType = archtype;
- connect( newArch, SIGNAL(sigOpen(Arch *, bool, const QString &, int)),
- this, SLOT(slotOpen(Arch *, bool, const QString &,int)) );
- connect( newArch, SIGNAL(headers(const ColumnList&)),
- m_fileListView, SLOT(setHeaders(const ColumnList&)));
+ connect( newArch, TQT_SIGNAL(sigOpen(Arch *, bool, const TQString &, int)),
+ this, TQT_SLOT(slotOpen(Arch *, bool, const TQString &,int)) );
+ connect( newArch, TQT_SIGNAL(headers(const ColumnList&)),
+ m_fileListView, TQT_SLOT(setHeaders(const ColumnList&)));
disableAll();
@@ -2177,7 +2177,7 @@ ArkWidget::openArchive( const QString & _filename )
}
void
-ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const QString & _filename, int )
+ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const TQString & _filename, int )
{
ready();
m_fileListView->setUpdatesEnabled(true);
@@ -2187,8 +2187,8 @@ ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const QString & _file
if ( _success )
{
- QFileInfo fi( _filename );
- QString path = fi.dirPath( true );
+ TQFileInfo fi( _filename );
+ TQString path = fi.dirPath( true );
if ( !fi.isWritable() )
{
@@ -2210,7 +2210,7 @@ ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const QString & _file
else
{
emit removeRecentURL( m_realURL );
- emit setWindowCaption( QString::null );
+ emit setWindowCaption( TQString::null );
KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).arg( _filename ) );
if ( m_extractOnly )
@@ -2257,7 +2257,7 @@ void ArkWidget::showSettings(){
if ( offers.isEmpty() )
genPage->kcfg_KonquerorIntegration->setEnabled( false );
else
- genPage->konqIntegrationLabel->setText( QString::null );
+ genPage->konqIntegrationLabel->setText( TQString::null );
dialog->show();
diff --git a/ark/arkwidget.h b/ark/arkwidget.h
index 435fafa..75f5364 100644
--- a/ark/arkwidget.h
+++ b/ark/arkwidget.h
@@ -33,7 +33,7 @@
#include <kio/job.h>
#include <ktempdir.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include "arch.h"
class QPoint;
@@ -60,7 +60,7 @@ class ArkWidget : public QVBox
{
Q_OBJECT
public:
- ArkWidget( QWidget *parent=0, const char *name=0 );
+ ArkWidget( TQWidget *parent=0, const char *name=0 );
virtual ~ArkWidget();
bool isArchiveOpen() const { return m_bIsArchiveOpen; }
@@ -70,12 +70,12 @@ public:
void setArkInstanceId( int aid ) { m_arkInstanceId = aid; }
void cleanArkTmpDir();
- virtual QString getArchName() const { return m_strArchName; }
+ virtual TQString getArchName() const { return m_strArchName; }
const KURL& realURL() const { return m_realURL; }
void setRealURL( const KURL& url ) { m_realURL = url; }
- QString tmpDir() const { return m_tmpDir ? m_tmpDir->name() : QString::null; }
+ TQString tmpDir() const { return m_tmpDir ? m_tmpDir->name() : TQString::null; }
FileListView * fileList() const { return m_fileListView; }
SearchBar * searchBar() const { return m_searchBar; }
@@ -89,13 +89,13 @@ public:
void closeArch();
virtual void setExtractOnly(bool extOnly) { m_extractOnly = extOnly; }
- virtual void deleteAfterUse( const QString& path );
+ virtual void deleteAfterUse( const TQString& path );
bool allowedArchiveName( const KURL & u );
bool file_save_as( const KURL & u );
virtual KURL getSaveAsFileName();
- virtual void setOpenAsMimeType( const QString & mimeType );
- QString & openAsMimeType(){ return m_openAsMimeType; }
- void prepareViewFiles( const QStringList & fileList );
+ virtual void setOpenAsMimeType( const TQString & mimeType );
+ TQString & openAsMimeType(){ return m_openAsMimeType; }
+ void prepareViewFiles( const TQStringList & fileList );
virtual void setArchivePopupEnabled( bool b );
virtual void extractTo( const KURL & targetDirectory, const KURL & archive, bool bGuessName );
@@ -121,12 +121,12 @@ protected slots:
void slotOpenWith();
void action_edit();
- void doPopup(QListViewItem *, const QPoint &, int); // right-click menus
- void viewFile(QListViewItem*); // doubleClick view files
+ void doPopup(TQListViewItem *, const TQPoint &, int); // right-click menus
+ void viewFile(TQListViewItem*); // doubleClick view files
void slotSelectionChanged();
- void slotOpen(Arch *, bool, const QString &, int);
- void slotCreate(Arch *, bool, const QString &, int);
+ void slotOpen(Arch *, bool, const TQString &, int);
+ void slotCreate(Arch *, bool, const TQString &, int);
void slotDeleteDone(bool);
void slotExtractDone(bool);
void slotExtractRemoteDone(KIO::Job *job);
@@ -135,17 +135,17 @@ protected slots:
signals:
void openURLRequest( const KURL & url );
void request_file_quit();
- void setBusy( const QString & );
+ void setBusy( const TQString & );
void setReady();
void fixActions();
void disableAllActions();
- void signalFilePopup( const QPoint & pPoint );
- void signalArchivePopup( const QPoint & pPoint );
- void setStatusBarText( const QString & text );
- void setStatusBarSelectedFiles( const QString & text );
+ void signalFilePopup( const TQPoint & pPoint );
+ void signalArchivePopup( const TQPoint & pPoint );
+ void setStatusBarText( const TQString & text );
+ void setStatusBarSelectedFiles( const TQString & text );
void removeRecentURL( const KURL & url );
void addRecentURL( const KURL & url );
- void setWindowCaption( const QString &caption );
+ void setWindowCaption( const TQString &caption );
void removeOpenArk( const KURL & );
void addOpenArk( const KURL & );
void createDone( bool );
@@ -156,9 +156,9 @@ signals:
protected:
// DND
- void dragMoveEvent(QDragMoveEvent *e);
- void dropEvent(QDropEvent* event);
- void dropAction(QStringList & list);
+ void dragMoveEvent(TQDragMoveEvent *e);
+ void dropEvent(TQDropEvent* event);
+ void dropAction(TQStringList & list);
private: // methods
// disabling/enabling of buttons and menu items
@@ -168,7 +168,7 @@ private: // methods
void disableAll();
void updateStatusSelection();
void updateStatusTotals();
- void addFile(QStringList *list);
+ void addFile(TQStringList *list);
void removeDownloadedFiles();
// make sure that str is a local file/dir
@@ -177,31 +177,31 @@ private: // methods
// ask user whether to create a real archive from a compressed file
// returns filename if so. Otherwise, empty.
KURL askToCreateRealArchive();
- Arch * getNewArchive( const QString & _fileName, const QString& _mimetype = QString() );
- void createRealArchive( const QString &strFilename,
- const QStringList & filesToAdd = QStringList() );
- KURL getCreateFilename( const QString & _caption,
- const QString & _defaultMimeType = QString::null,
+ Arch * getNewArchive( const TQString & _fileName, const TQString& _mimetype = TQString() );
+ void createRealArchive( const TQString &strFilename,
+ const TQStringList & filesToAdd = TQStringList() );
+ KURL getCreateFilename( const TQString & _caption,
+ const TQString & _defaultMimeType = TQString::null,
bool allowCompressed = true,
- const QString & _suggestedName = QString::null );
+ const TQString & _suggestedName = TQString::null );
- bool reportExtractFailures(const QString & _dest, QStringList *_list);
- QStringList existingFiles( const QString & _dest, QStringList & _list );
+ bool reportExtractFailures(const TQString & _dest, TQStringList *_list);
+ TQStringList existingFiles( const TQString & _dest, TQStringList & _list );
void extractOnlyOpenDone();
void extractRemoteInitiateMoving( const KURL & target );
void editStart();
- void busy( const QString & text );
+ void busy( const TQString & text );
void holdBusy();
void resumeBusy();
void ready();
//suggests an extract directory based on archive name
- const QString guessName( const KURL & archive );
+ const TQString guessName( const KURL & archive );
private slots:
- void startDrag( const QStringList & fileList );
+ void startDrag( const TQStringList & fileList );
void startDragSlotExtractDone( bool );
void editSlotExtractDone();
void editSlotAddDone( bool success );
@@ -209,7 +209,7 @@ private slots:
void openWithSlotExtractDone( bool success );
void createRealArchiveSlotCreate( Arch * newArch, bool success,
- const QString & fileName, int nbr );
+ const TQString & fileName, int nbr );
void createRealArchiveSlotAddDone( bool success );
void createRealArchiveSlotAddFilesDone( bool success );
@@ -227,14 +227,14 @@ private slots:
void addToArchiveSlotAddDone( bool success );
protected:
- void arkWarning(const QString& msg);
- void arkError(const QString& msg);
+ void arkWarning(const TQString& msg);
+ void arkError(const TQString& msg);
- void newCaption(const QString& filename);
+ void newCaption(const TQString& filename);
void createFileListView();
- bool createArchive(const QString & name);
- void openArchive(const QString & name);
+ bool createArchive(const TQString & name);
+ void openArchive(const TQString & name);
void showCurrentFile();
@@ -245,10 +245,10 @@ private: // data
bool m_settingsAltered;
// for use in the edit methods: the url.
- QString m_strFileToView;
+ TQString m_strFileToView;
// the compressed file to be added into the new archive
- QString m_compressedFile;
+ TQString m_compressedFile;
// Set to true if we are doing an "Extract to Folder"
bool m_extractOnly;
@@ -263,15 +263,15 @@ private: // data
KURL m_viewURL;
// the mimetype the user wants to open this archive as
- QString m_openAsMimeType;
+ TQString m_openAsMimeType;
// if they're dragging in files, this is the temporary list for when
// we have to create an archive:
- QStringList *m_pTempAddList;
+ TQStringList *m_pTempAddList;
KRun *m_pKRunPtr;
- QStringList mpDownloadedList;
+ TQStringList mpDownloadedList;
bool m_bArchivePopupEnabled;
@@ -293,7 +293,7 @@ private: // data
SearchBar * m_searchBar;
Arch * arch;
- QString m_strArchName;
+ TQString m_strArchName;
KURL m_realURL;
KURL m_url;
ArchType m_archType;
@@ -309,9 +309,9 @@ private: // data
bool m_bIsSimpleCompressedFile;
bool m_bDropSourceIsSelf;
- QStringList mDragFiles;
- QStringList *m_extractList;
- QStringList *m_viewList;
+ TQStringList mDragFiles;
+ TQStringList *m_extractList;
+ TQStringList *m_viewList;
KTempDir *m_tmpDir;
};
diff --git a/ark/compressedfile.cpp b/ark/compressedfile.cpp
index 9ebe283..29d29a9 100644
--- a/ark/compressedfile.cpp
+++ b/ark/compressedfile.cpp
@@ -29,7 +29,7 @@
#include <fcntl.h>
// Qt includes
-#include <qdir.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -53,21 +53,21 @@
// encapsulates the idea of a compressed file
-CompressedFile::CompressedFile( ArkWidget *_gui, const QString & _fileName, const QString & _openAsMimeType )
+CompressedFile::CompressedFile( ArkWidget *_gui, const TQString & _fileName, const TQString & _openAsMimeType )
: Arch( _gui, _fileName )
{
m_tempDirectory = NULL;
m_openAsMimeType = _openAsMimeType;
kdDebug(1601) << "CompressedFile constructor" << endl;
m_tempDirectory = new KTempDir( _gui->tmpDir()
- + QString::fromLatin1( "compressed_file_temp" ) );
+ + TQString::fromLatin1( "compressed_file_temp" ) );
m_tempDirectory->setAutoDelete( true );
m_tmpdir = m_tempDirectory->name();
initData();
verifyCompressUtilityIsAvailable( m_archiver_program );
verifyUncompressUtilityIsAvailable( m_unarchiver_program );
- if (!QFile::exists(_fileName))
+ if (!TQFile::exists(_fileName))
{
KMessageBox::information(0,
i18n("You are creating a simple compressed archive which contains only one input file.\n"
@@ -97,10 +97,10 @@ void CompressedFile::setHeaders()
void CompressedFile::initData()
{
- m_unarchiver_program = QString::null;
- m_archiver_program = QString::null;
+ m_unarchiver_program = TQString::null;
+ m_archiver_program = TQString::null;
- QString mimeType;
+ TQString mimeType;
if ( !m_openAsMimeType.isNull() )
mimeType = m_openAsMimeType;
else
@@ -138,12 +138,12 @@ void CompressedFile::initData()
}
-QString CompressedFile::extension()
+TQString CompressedFile::extension()
{
- QStringList::Iterator it = m_defaultExtensions.begin();
+ TQStringList::Iterator it = m_defaultExtensions.begin();
for( ; it != m_defaultExtensions.end(); ++it )
if( m_filename.endsWith( *it ) )
- return QString::null;
+ return TQString::null;
return m_defaultExtensions.first();
}
@@ -190,17 +190,17 @@ void CompressedFile::open()
kdDebug(1601) << "Command is " << m_unarchiver_program << " " << m_tmpfile<< endl;
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotUncompressDone(KProcess*)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotUncompressDone(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
KMessageBox::error( 0, i18n("Could not start a subprocess.") );
- emit sigOpen(this, false, QString::null, 0 );
+ emit sigOpen(this, false, TQString::null, 0 );
}
kdDebug(1601) << "-CompressedFile::open" << endl;
@@ -223,12 +223,12 @@ void CompressedFile::slotUncompressDone(KProcess *_kp)
if ( !bSuccess )
{
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
return;
}
- QDir dir( m_tmpdir );
- QStringList lst( dir.entryList() );
+ TQDir dir( m_tmpdir );
+ TQStringList lst( dir.entryList() );
lst.remove( ".." );
lst.remove( "." );
KURL url;
@@ -237,7 +237,7 @@ void CompressedFile::slotUncompressDone(KProcess *_kp)
KIO::UDSEntry udsInfo;
KIO::NetAccess::stat( url, udsInfo, m_gui );
KFileItem fileItem( udsInfo, url );
- QStringList list;
+ TQStringList list;
list << fileItem.name();
list << fileItem.permissionsString();
list << fileItem.user();
@@ -256,7 +256,7 @@ void CompressedFile::create()
| Arch::View);
}
-void CompressedFile::addFile( const QStringList &urls )
+void CompressedFile::addFile( const TQStringList &urls )
{
// only used for adding ONE file to an EMPTY gzip file, i.e., one that
// has just been created
@@ -269,7 +269,7 @@ void CompressedFile::addFile( const QStringList &urls )
KURL url = KURL::fromPathOrURL(urls.first());
Q_ASSERT(url.isLocalFile());
- QString file;
+ TQString file;
file = url.path();
KProcess proc;
@@ -291,18 +291,18 @@ void CompressedFile::addFile( const QStringList &urls )
if ( m_archiver_program == "lzop")
kp->setUsePty( KProcess::Stdin, false );
- QString compressor = m_archiver_program;
+ TQString compressor = m_archiver_program;
*kp << compressor << "-c" << file;
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotAddInProgress(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotAddDone(KProcess*)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotAddInProgress(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotAddDone(KProcess*)));
- int f_desc = KDE_open(QFile::encodeName(m_filename), O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ int f_desc = KDE_open(TQFile::encodeName(m_filename), O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (f_desc != -1)
fd = fdopen( f_desc, "w" );
else
@@ -340,7 +340,7 @@ void CompressedFile::unarchFileInternal()
{
if (m_destDir != m_tmpdir)
{
- QString dest;
+ TQString dest;
if (m_destDir.isEmpty() || m_destDir.isNull())
{
kdError(1601) << "There was no extract directory given." << endl;
@@ -356,14 +356,14 @@ void CompressedFile::unarchFileInternal()
emit sigExtract(true);
}
-void CompressedFile::remove(QStringList *)
+void CompressedFile::remove(TQStringList *)
{
kdDebug(1601) << "+CompressedFile::remove" << endl;
- QFile::remove(m_tmpfile);
+ TQFile::remove(m_tmpfile);
// do not delete but truncate the compressed file in case someone
// does a reload and finds it no longer exists!
- truncate(QFile::encodeName(m_filename), 0);
+ truncate(TQFile::encodeName(m_filename), 0);
m_tmpfile = "";
emit sigDelete(true);
diff --git a/ark/compressedfile.h b/ark/compressedfile.h
index ceaee6c..9840923 100644
--- a/ark/compressedfile.h
+++ b/ark/compressedfile.h
@@ -45,19 +45,19 @@ class CompressedFile : public Arch
{
Q_OBJECT
public:
- CompressedFile( ArkWidget *_gui, const QString & _fileName, const QString &_openAsMimeType );
+ CompressedFile( ArkWidget *_gui, const TQString & _fileName, const TQString &_openAsMimeType );
virtual ~CompressedFile();
virtual void open();
virtual void create();
- virtual void addFile( const QStringList& );
- virtual void addDir(const QString &) { }
+ virtual void addFile( const TQStringList& );
+ virtual void addDir(const TQString &) { }
- virtual void remove(QStringList *);
+ virtual void remove(TQStringList *);
virtual void unarchFileInternal();
- QString tempFileName(){ return m_tmpfile; }
+ TQString tempFileName(){ return m_tmpfile; }
private slots:
void slotUncompressDone(KProcess *);
@@ -68,13 +68,13 @@ private:
void initExtract( bool, bool, bool );
void setHeaders();
void initData();
- QString extension();
+ TQString extension();
- QString m_openAsMimeType;
+ TQString m_openAsMimeType;
KTempDir * m_tempDirectory;
- QString m_tmpdir;
- QString m_tmpfile;
- QStringList m_defaultExtensions;
+ TQString m_tmpdir;
+ TQString m_tmpfile;
+ TQStringList m_defaultExtensions;
// for use with addFile
FILE *fd;
diff --git a/ark/extractiondialog.cpp b/ark/extractiondialog.cpp
index 7892efb..cf95d48 100644
--- a/ark/extractiondialog.cpp
+++ b/ark/extractiondialog.cpp
@@ -29,12 +29,12 @@
#include "extractiondialog.h"
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kglobal.h>
@@ -51,11 +51,11 @@
#include "arkutils.h"
#include "settings.h"
-ExtractionDialog::ExtractionDialog( QWidget *parent, const char *name,
+ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name,
bool enableSelected,
const KURL& defaultExtractionDir,
- const QString &prefix,
- const QString &archiveName )
+ const TQString &prefix,
+ const TQString &archiveName )
: KDialogBase( parent, name, true, i18n( "Extract" ), Ok | Cancel, Ok ),
m_selectedButton( 0 ), m_allButton( 0 ),
m_selectedOnly( enableSelected ), m_extractionDirectory( defaultExtractionDir ),
@@ -66,37 +66,37 @@ ExtractionDialog::ExtractionDialog( QWidget *parent, const char *name,
setCaption( i18n( "Extract Files From %1" ).arg( archiveName ) );
}
- QVBox *vbox = makeVBoxMainWidget();
+ TQVBox *vbox = makeVBoxMainWidget();
- QHBox *header = new QHBox( vbox );
+ TQHBox *header = new TQHBox( vbox );
header->layout()->setSpacing( 10 );
- QLabel *icon = new QLabel( header );
+ TQLabel *icon = new TQLabel( header );
icon->setPixmap( DesktopIcon( "ark_extract" ) );
- icon->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ icon->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum );
if ( enableSelected )
{
- QVBox *whichFiles = new QVBox( header );
+ TQVBox *whichFiles = new TQVBox( header );
whichFiles->layout()->setSpacing( 6 );
- new QLabel( QString( "<qt><b><font size=\"+1\">%1</font></b></qt>" )
+ new TQLabel( TQString( "<qt><b><font size=\"+1\">%1</font></b></qt>" )
.arg( i18n( "Extract:" ) ), whichFiles );
- QHButtonGroup *filesGroup = new QHButtonGroup( whichFiles );
- m_selectedButton = new QRadioButton( i18n( "Selected files only" ), filesGroup );
- m_allButton = new QRadioButton( i18n( "All files" ), filesGroup );
+ TQHButtonGroup *filesGroup = new TQHButtonGroup( whichFiles );
+ m_selectedButton = new TQRadioButton( i18n( "Selected files only" ), filesGroup );
+ m_allButton = new TQRadioButton( i18n( "All files" ), filesGroup );
m_selectedButton->setChecked( true );
}
else
{
- new QLabel( QString( "<qt><b><font size=\"+2\">%1</font></b></qt>" )
+ new TQLabel( TQString( "<qt><b><font size=\"+2\">%1</font></b></qt>" )
.arg( i18n( "Extract all files" ) ), header );
}
- QHBox *destDirBox = new QHBox( vbox );
+ TQHBox *destDirBox = new TQHBox( vbox );
- QLabel *destFolderLabel = new QLabel( i18n( "Destination folder: " ), destDirBox );
- destFolderLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQLabel *destFolderLabel = new TQLabel( i18n( "Destination folder: " ), destDirBox );
+ destFolderLabel->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
KHistoryCombo *combobox = new KHistoryCombo( true, destDirBox );
combobox->setPixmapProvider( new KURLPixmapProvider );
@@ -108,10 +108,10 @@ ExtractionDialog::ExtractionDialog( QWidget *parent, const char *name,
comp->setCompletionMode( KGlobalSettings::CompletionAuto );
combobox->setCompletionObject( comp );
combobox->setMaxCount( 20 );
- combobox->setInsertionPolicy( QComboBox::AtTop );
+ combobox->setInsertionPolicy( TQComboBox::AtTop );
m_urlRequester = new KURLRequester( combobox, destDirBox );
- m_urlRequester->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ m_urlRequester->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
m_urlRequester->setMode( KFile::Directory );
if (!defaultExtractionDir.prettyURL().isEmpty() )
@@ -119,12 +119,12 @@ ExtractionDialog::ExtractionDialog( QWidget *parent, const char *name,
m_urlRequester->setKURL( defaultExtractionDir.prettyURL() + prefix );
}
- m_viewFolderAfterExtraction = new QCheckBox( i18n( "Open destination folder after extraction" ), vbox );
+ m_viewFolderAfterExtraction = new TQCheckBox( i18n( "Open destination folder after extraction" ), vbox );
m_viewFolderAfterExtraction->setChecked( ArkSettings::openDestinationFolder() );
- connect( combobox, SIGNAL( returnPressed( const QString& ) ), combobox, SLOT( addToHistory( const QString& ) ) );
- connect( combobox->lineEdit(), SIGNAL( textChanged( const QString& ) ),
- this, SLOT( extractDirChanged( const QString & ) ) );
+ connect( combobox, TQT_SIGNAL( returnPressed( const TQString& ) ), combobox, TQT_SLOT( addToHistory( const TQString& ) ) );
+ connect( combobox->lineEdit(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( extractDirChanged( const TQString & ) ) );
}
ExtractionDialog::~ExtractionDialog()
@@ -142,10 +142,10 @@ void ExtractionDialog::accept()
//if p isn't local KIO and friends will complain later on
if ( p.isLocalFile() )
{
- QFileInfo fi( p.path() );
+ TQFileInfo fi( p.path() );
if ( !fi.isDir() && !fi.exists() )
{
- QString ltext = i18n( "Create folder %1?").arg(p.path());
+ TQString ltext = i18n( "Create folder %1?").arg(p.path());
int createDir = KMessageBox::questionYesNo( this, ltext, i18n( "Missing Folder" ) , i18n("Create Folder"), i18n("Do Not Create"));
if( createDir == 4 )
{
@@ -170,7 +170,7 @@ void ExtractionDialog::accept()
m_selectedOnly = m_selectedButton == 0? false : m_selectedButton->isChecked();
// Determine what exactly should be added to the extraction combo list
- QString historyURL = p.prettyURL();
+ TQString historyURL = p.prettyURL();
if ( historyURL == KURL( m_defaultExtractionDir + m_prefix ).prettyURL() )
{
historyURL = m_defaultExtractionDir;
@@ -186,7 +186,7 @@ void ExtractionDialog::accept()
KDialogBase::accept();
}
-void ExtractionDialog::extractDirChanged(const QString &text )
+void ExtractionDialog::extractDirChanged(const TQString &text )
{
enableButtonOK(!text.isEmpty());
}
diff --git a/ark/extractiondialog.h b/ark/extractiondialog.h
index 822c085..b0619b1 100644
--- a/ark/extractiondialog.h
+++ b/ark/extractiondialog.h
@@ -29,7 +29,7 @@
#ifndef EXTRACTIONDIALOG_H
#define EXTRACTIONDIALOG_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurl.h>
#include <kdialogbase.h>
@@ -45,11 +45,11 @@ class ExtractionDialog : public KDialogBase
/**
* Constructor.
*/
- ExtractionDialog( QWidget *parent = 0, const char *name = 0,
+ ExtractionDialog( TQWidget *parent = 0, const char *name = 0,
bool enableSelected = true,
const KURL &defaultExtractionDir = KURL(),
- const QString &prefix = QString(),
- const QString &archiveName = QString::null );
+ const TQString &prefix = TQString(),
+ const TQString &archiveName = TQString::null );
/**
* Destructor.
@@ -77,19 +77,19 @@ class ExtractionDialog : public KDialogBase
public slots:
void accept();
- void extractDirChanged( const QString & );
+ void extractDirChanged( const TQString & );
private:
- QRadioButton *m_selectedButton;
- QRadioButton *m_allButton;
- QCheckBox *m_viewFolderAfterExtraction;
+ TQRadioButton *m_selectedButton;
+ TQRadioButton *m_allButton;
+ TQCheckBox *m_viewFolderAfterExtraction;
bool m_selectedOnly;
KURL m_extractionDirectory;
KURLRequester *m_urlRequester;
- QString m_defaultExtractionDir;
- QString m_prefix;
+ TQString m_defaultExtractionDir;
+ TQString m_prefix;
};
#endif // EXTRACTIONDIALOG_H
diff --git a/ark/filelistview.cpp b/ark/filelistview.cpp
index 3668d11..165b128 100644
--- a/ark/filelistview.cpp
+++ b/ark/filelistview.cpp
@@ -27,9 +27,9 @@
*/
// Qt includes
-#include <qpainter.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
// KDE includes
#include <klocale.h>
@@ -47,26 +47,26 @@
FileLVI::FileLVI( KListView* lv )
: KListViewItem( lv ), m_fileSize( 0 ), m_packedFileSize( 0 ),
- m_ratio( 0 ), m_timeStamp( QDateTime() ), m_entryName( QString() )
+ m_ratio( 0 ), m_timeStamp( TQDateTime() ), m_entryName( TQString() )
{
}
FileLVI::FileLVI( KListViewItem* lvi )
: KListViewItem( lvi ), m_fileSize( 0 ), m_packedFileSize( 0 ),
- m_ratio( 0 ), m_timeStamp( QDateTime() ), m_entryName( QString() )
+ m_ratio( 0 ), m_timeStamp( TQDateTime() ), m_entryName( TQString() )
{
}
-QString FileLVI::key( int column, bool ascending ) const
+TQString FileLVI::key( int column, bool ascending ) const
{
if ( column == 0 )
return fileName();
else
- return QListViewItem::key( column, ascending );
+ return TQListViewItem::key( column, ascending );
}
-int FileLVI::compare( QListViewItem * i, int column, bool ascending ) const
+int FileLVI::compare( TQListViewItem * i, int column, bool ascending ) const
{
FileLVI * item = static_cast< FileLVI * >( i );
@@ -119,12 +119,12 @@ int FileLVI::compare( QListViewItem * i, int column, bool ascending ) const
}
}
-void FileLVI::setText( int column, const QString &text )
+void FileLVI::setText( int column, const TQString &text )
{
columnName colName = ( static_cast< FileListView * > ( listView() ) )->nameOfColumn( column );
if ( column == 0 )
{
- QString name = text;
+ TQString name = text;
if ( name.endsWith( "/" ) )
name = name.left( name.length() - 1 );
if ( name.startsWith( "/" ) )
@@ -132,18 +132,18 @@ void FileLVI::setText( int column, const QString &text )
int pos = name.findRev( '/' );
if ( pos != -1 )
name = name.right( name.length() - pos - 1 );
- QListViewItem::setText( column, name );
+ TQListViewItem::setText( column, name );
m_entryName = text;
}
else if ( colName == sizeCol )
{
m_fileSize = text.toULongLong();
- QListViewItem::setText( column, KIO::convertSize( m_fileSize ) );
+ TQListViewItem::setText( column, KIO::convertSize( m_fileSize ) );
}
else if ( colName == packedStrCol )
{
m_packedFileSize = text.toULongLong();
- QListViewItem::setText( column, KIO::convertSize( m_packedFileSize ) );
+ TQListViewItem::setText( column, KIO::convertSize( m_packedFileSize ) );
}
else if ( colName == ratioStrCol )
{
@@ -152,25 +152,25 @@ void FileLVI::setText( int column, const QString &text )
m_ratio = text.left(l).toDouble();
else
m_ratio = text.toDouble();
- QListViewItem::setText( column, i18n( "Packed Ratio", "%1 %" )
+ TQListViewItem::setText( column, i18n( "Packed Ratio", "%1 %" )
.arg(KGlobal::locale()->formatNumber( m_ratio, 1 ) )
);
}
else if ( colName == timeStampStrCol )
{
if ( text.isEmpty() )
- QListViewItem::setText(column, text);
+ TQListViewItem::setText(column, text);
else
{
- m_timeStamp = QDateTime::fromString( text, ISODate );
- QListViewItem::setText( column, KGlobal::locale()->formatDateTime( m_timeStamp ) );
+ m_timeStamp = TQDateTime::fromString( text, ISODate );
+ TQListViewItem::setText( column, KGlobal::locale()->formatDateTime( m_timeStamp ) );
}
}
else
- QListViewItem::setText(column, text);
+ TQListViewItem::setText(column, text);
}
-static FileLVI* folderLVI( KListViewItem *parent, const QString& name )
+static FileLVI* folderLVI( KListViewItem *parent, const TQString& name )
{
FileLVI *folder = new FileLVI( parent );
@@ -181,7 +181,7 @@ static FileLVI* folderLVI( KListViewItem *parent, const QString& name )
return folder;
}
-static FileLVI* folderLVI( KListView *parent, const QString& name )
+static FileLVI* folderLVI( KListView *parent, const TQString& name )
{
FileLVI *folder = new FileLVI( parent );
folder->setText( 0, name );
@@ -194,10 +194,10 @@ static FileLVI* folderLVI( KListView *parent, const QString& name )
/////////////////////////////////////////////////////////////////////
-FileListView::FileListView(QWidget *parent, const char* name)
+FileListView::FileListView(TQWidget *parent, const char* name)
: KListView(parent, name)
{
- QWhatsThis::add( this,
+ TQWhatsThis::add( this,
i18n( "This area is for displaying information about the files contained within an archive." )
);
@@ -212,7 +212,7 @@ FileListView::FileListView(QWidget *parent, const char* name)
m_pressed = false;
}
-int FileListView::addColumn ( const QString & label, int width )
+int FileListView::addColumn ( const TQString & label, int width )
{
int index = KListView::addColumn( label, width );
if ( label == SIZE_COLUMN.first )
@@ -254,9 +254,9 @@ columnName FileListView::nameOfColumn( int index )
return m_columnMap[ index ];
}
-QStringList FileListView::selectedFilenames()
+TQStringList FileListView::selectedFilenames()
{
- QStringList files;
+ TQStringList files;
FileLVI *item = static_cast<FileLVI*>( firstChild() );
@@ -299,11 +299,11 @@ QStringList FileListView::selectedFilenames()
return files;
}
-QStringList FileListView::fileNames()
+TQStringList FileListView::fileNames()
{
- QStringList files;
+ TQStringList files;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() )
{
FileLVI *item = static_cast<FileLVI*>( it.current() );
@@ -329,9 +329,9 @@ bool FileListView::isSelectionEmpty()
}
void
-FileListView::contentsMousePressEvent(QMouseEvent *e)
+FileListView::contentsMousePressEvent(TQMouseEvent *e)
{
- if( e->button()==QMouseEvent::LeftButton )
+ if( e->button()==TQMouseEvent::LeftButton )
{
m_pressed = true;
m_presspos = e->pos();
@@ -341,14 +341,14 @@ FileListView::contentsMousePressEvent(QMouseEvent *e)
}
void
-FileListView::contentsMouseReleaseEvent(QMouseEvent *e)
+FileListView::contentsMouseReleaseEvent(TQMouseEvent *e)
{
m_pressed = false;
KListView::contentsMouseReleaseEvent(e);
}
void
-FileListView::contentsMouseMoveEvent(QMouseEvent *e)
+FileListView::contentsMouseMoveEvent(TQMouseEvent *e)
{
if(!m_pressed)
{
@@ -361,20 +361,20 @@ FileListView::contentsMouseMoveEvent(QMouseEvent *e)
{
return;
}
- QStringList dragFiles = selectedFilenames();
+ TQStringList dragFiles = selectedFilenames();
emit startDragRequest( dragFiles );
KListView::contentsMouseMoveEvent(e);
}
}
FileLVI*
-FileListView::item(const QString& filename) const
+FileListView::item(const TQString& filename) const
{
FileLVI * flvi = (FileLVI*) firstChild();
while (flvi)
{
- QString curFilename = flvi->fileName();
+ TQString curFilename = flvi->fileName();
if (curFilename == filename)
return flvi;
flvi = (FileLVI*) flvi->nextSibling();
@@ -383,7 +383,7 @@ FileListView::item(const QString& filename) const
return 0;
}
-void FileListView::addItem( const QStringList & entries )
+void FileListView::addItem( const TQStringList & entries )
{
FileLVI *flvi, *parent = findParent( entries[0] );
if ( parent )
@@ -394,7 +394,7 @@ void FileListView::addItem( const QStringList & entries )
int i = 0;
- for (QStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it)
+ for (TQStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it)
{
flvi->setText(i, *it);
++i;
@@ -406,12 +406,12 @@ void FileListView::addItem( const QStringList & entries )
void FileListView::selectAll()
{
- QListView::selectAll( true );
+ TQListView::selectAll( true );
}
void FileListView::unselectAll()
{
- QListView::selectAll( false );
+ TQListView::selectAll( false );
}
void FileListView::setHeaders( const ColumnList& columns )
@@ -422,12 +422,12 @@ void FileListView::setHeaders( const ColumnList& columns )
it != columns.constEnd();
++it )
{
- QPair< QString, Qt::AlignmentFlags > pair = *it;
+ QPair< TQString, Qt::AlignmentFlags > pair = *it;
int colnum = addColumn( pair.first );
setColumnAlignment( colnum, pair.second );
}
- setResizeMode( QListView::LastColumn );
+ setResizeMode( TQListView::LastColumn );
header()->show();
}
@@ -445,7 +445,7 @@ int FileListView::totalFiles()
{
int numFiles = 0;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() )
{
if ( it.current()->childCount() == 0 )
@@ -460,7 +460,7 @@ int FileListView::selectedFilesCount()
{
int numFiles = 0;
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() )
{
++numFiles;
@@ -474,7 +474,7 @@ KIO::filesize_t FileListView::totalSize()
{
KIO::filesize_t size = 0;
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while ( it.current() )
{
FileLVI *item = static_cast<FileLVI*>( it.current() );
@@ -489,7 +489,7 @@ KIO::filesize_t FileListView::selectedSize()
{
KIO::filesize_t size = 0;
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() )
{
FileLVI *item = static_cast<FileLVI*>( it.current() );
@@ -500,9 +500,9 @@ KIO::filesize_t FileListView::selectedSize()
return size;
}
-FileLVI* FileListView::findParent( const QString& fullname )
+FileLVI* FileListView::findParent( const TQString& fullname )
{
- QString name = fullname;
+ TQString name = fullname;
if ( name.endsWith( "/" ) )
name = name.left( name.length() -1 );
@@ -513,11 +513,11 @@ FileLVI* FileListView::findParent( const QString& fullname )
return static_cast< FileLVI* >( 0 );
// Get a list of ancestors
- QString parentFullname = name.left( name.findRev( '/' ) );
- QStringList ancestorList = QStringList::split( '/', parentFullname );
+ TQString parentFullname = name.left( name.findRev( '/' ) );
+ TQStringList ancestorList = TQStringList::split( '/', parentFullname );
// Checks if the listview contains the first item in the list of ancestors
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
while ( item )
{
if ( item->text( 0 ) == ancestorList[0] )
@@ -536,7 +536,7 @@ FileLVI* FileListView::findParent( const QString& fullname )
while ( ancestorList.count() > 0 )
{
- QString name = ancestorList[0];
+ TQString name = ancestorList[0];
FileLVI *parent = static_cast< FileLVI*>( item );
item = parent->firstChild();
@@ -559,10 +559,10 @@ FileLVI* FileListView::findParent( const QString& fullname )
return static_cast< FileLVI* >( item );
}
-QStringList FileListView::childrenOf( FileLVI* parent )
+TQStringList FileListView::childrenOf( FileLVI* parent )
{
Q_ASSERT( parent );
- QStringList children;
+ TQStringList children;
FileLVI *item = static_cast<FileLVI*>( parent->firstChild() );
diff --git a/ark/filelistview.h b/ark/filelistview.h
index 8ea0d48..1de8b7e 100644
--- a/ark/filelistview.h
+++ b/ark/filelistview.h
@@ -28,9 +28,9 @@
#ifndef FILELISTVIEW_H
#define FILELISTVIEW_H
-#include <qdatetime.h>
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include <klistview.h>
#include <kio/global.h>
@@ -51,50 +51,50 @@ class FileLVI : public KListViewItem
FileLVI( KListView* lv );
FileLVI( KListViewItem* lvi );
- QString fileName() const { return m_entryName; }
+ TQString fileName() const { return m_entryName; }
KIO::filesize_t fileSize() const { return m_fileSize; }
KIO::filesize_t packedFileSize() const { return m_packedFileSize; }
double ratio() const { return m_ratio; }
- QDateTime timeStamp() const { return m_timeStamp; }
+ TQDateTime timeStamp() const { return m_timeStamp; }
- int compare ( QListViewItem * i, int col, bool ascending ) const;
- virtual QString key( int column, bool ) const;
- virtual void setText( int column, const QString &text );
+ int compare ( TQListViewItem * i, int col, bool ascending ) const;
+ virtual TQString key( int column, bool ) const;
+ virtual void setText( int column, const TQString &text );
private:
KIO::filesize_t m_fileSize;
KIO::filesize_t m_packedFileSize;
double m_ratio;
- QDateTime m_timeStamp;
- QString m_entryName;
+ TQDateTime m_timeStamp;
+ TQString m_entryName;
};
-typedef QValueList< QPair< QString, Qt::AlignmentFlags > > ColumnList;
+typedef TQValueList< QPair< TQString, Qt::AlignmentFlags > > ColumnList;
class FileListView: public KListView
{
Q_OBJECT
public:
- FileListView( QWidget *parent = 0, const char* name = 0 );
+ FileListView( TQWidget *parent = 0, const char* name = 0 );
FileLVI *currentItem() {return ((FileLVI *) KListView::currentItem());}
/**
* Returns the full names of the selected files.
*/
- QStringList selectedFilenames();
+ TQStringList selectedFilenames();
/**
* Return the full names of all files.
*/
- QStringList fileNames();
+ TQStringList fileNames();
/**
* Returns true if no file is selected
*/
bool isSelectionEmpty();
- virtual int addColumn( const QString & label, int width = -1 );
+ virtual int addColumn( const TQString & label, int width = -1 );
virtual void removeColumn( int index );
columnName nameOfColumn( int index );
@@ -103,13 +103,13 @@ class FileListView: public KListView
* @param filename The filename in question to reference in the archive
* @return The requested file's FileLVI
*/
- FileLVI* item(const QString& filename) const;
+ FileLVI* item(const TQString& filename) const;
/**
* Adds a file and stats to the file listing
* @param entries A stringlist of the entries for each column of the list.
*/
- void addItem( const QStringList & entries );
+ void addItem( const TQStringList & entries );
/**
* Returns the number of files in the archive.
@@ -143,20 +143,20 @@ class FileListView: public KListView
void clearHeaders();
signals:
- void startDragRequest( const QStringList & fileList );
+ void startDragRequest( const TQStringList & fileList );
protected:
- virtual void contentsMouseReleaseEvent( QMouseEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseMoveEvent( QMouseEvent *e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *e );
private:
- FileLVI* findParent( const QString& fullname );
- QStringList childrenOf( FileLVI* parent );
+ FileLVI* findParent( const TQString& fullname );
+ TQStringList childrenOf( FileLVI* parent );
- QMap<int, columnName> m_columnMap;
+ TQMap<int, columnName> m_columnMap;
bool m_pressed;
- QPoint m_presspos; // this will save the click pos to correctly recognize drag events
+ TQPoint m_presspos; // this will save the click pos to correctly recognize drag events
};
#endif
diff --git a/ark/lha.cpp b/ark/lha.cpp
index f890139..1bf3aac 100644
--- a/ark/lha.cpp
+++ b/ark/lha.cpp
@@ -35,8 +35,8 @@
#include <string.h>
// QT includes
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -52,7 +52,7 @@
#include "arkutils.h"
#include "filelistview.h"
-LhaArch::LhaArch( ArkWidget *_gui, const QString & _fileName )
+LhaArch::LhaArch( ArkWidget *_gui, const TQString & _fileName )
: Arch( _gui, _fileName )
{
m_archiver_program = "lha";
@@ -61,7 +61,7 @@ LhaArch::LhaArch( ArkWidget *_gui, const QString & _fileName )
m_headerString = "----";
}
-bool LhaArch::processLine( const QCString &line )
+bool LhaArch::processLine( const TQCString &line )
{
const char *_line = ( const char * ) line;
char columns[13][80];
@@ -95,13 +95,13 @@ bool LhaArch::processLine( const QCString &line )
}
// make the time stamp sortable
- QString massagedTimeStamp = ArkUtils::getTimeStamp( columns[6], columns[7],
+ TQString massagedTimeStamp = ArkUtils::getTimeStamp( columns[6], columns[7],
columns[8] );
strlcpy( columns[6], massagedTimeStamp.ascii(), sizeof( columns[6] ) );
// see if there was a link in filename
- QString file = filename;
- QString name, link;
+ TQString file = filename;
+ TQString name, link;
bool bLink = false;
int pos = file.find( " -> " );
if ( pos != -1 )
@@ -115,12 +115,12 @@ bool LhaArch::processLine( const QCString &line )
name = file;
}
- QStringList list;
+ TQStringList list;
list.append( name );
for ( int i = 0; i < 7; i++ )
{
- list.append( QString::fromLocal8Bit( columns[i] ) );
+ list.append( TQString::fromLocal8Bit( columns[i] ) );
}
if ( bLink )
@@ -144,17 +144,17 @@ void LhaArch::open()
KProcess *kp = m_currentProcess = new KProcess;
*kp << m_archiver_program << "v" << m_filename;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotOpenExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotOpenExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
@@ -180,23 +180,23 @@ void LhaArch::create()
Arch::Extract | Arch::Delete | Arch::Add | Arch::View );
}
-void LhaArch::addDir( const QString & dirName )
+void LhaArch::addDir( const TQString & dirName )
{
if ( !dirName.isEmpty() )
{
- QStringList list;
+ TQStringList list;
list.append( dirName );
addFile( list );
}
}
-void LhaArch::addFile( const QStringList &urls )
+void LhaArch::addFile( const TQStringList &urls )
{
KProcess *kp = m_currentProcess = new KProcess;
kp->clearArguments();
*kp << m_archiver_program;
- QString strOptions;
+ TQString strOptions;
if ( ArkSettings::replaceOnlyWithNewer() )
strOptions = "u";
else
@@ -205,21 +205,21 @@ void LhaArch::addFile( const QStringList &urls )
*kp << strOptions << m_filename;
KURL url( urls.first() );
- QDir::setCurrent( url.directory() );
+ TQDir::setCurrent( url.directory() );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
for ( iter = urls.begin(); iter != urls.end(); ++iter )
{
KURL fileURL( *iter );
*kp << fileURL.fileName();
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotAddExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotAddExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -248,19 +248,19 @@ void LhaArch::unarchFileInternal()
// and we then extract everything in the archive.
if ( m_fileList )
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = m_fileList->begin(); it != m_fileList->end(); ++it )
{
*kp << ( *it );
}
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotExtractExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotExtractExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -269,7 +269,7 @@ void LhaArch::unarchFileInternal()
}
}
-void LhaArch::remove( QStringList *list )
+void LhaArch::remove( TQStringList *list )
{
if ( !list )
return;
@@ -279,18 +279,18 @@ void LhaArch::remove( QStringList *list )
*kp << m_archiver_program << "df" << m_filename;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list->begin(); it != list->end(); ++it )
{
*kp << ( *it );
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotDeleteExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotDeleteExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
diff --git a/ark/lha.h b/ark/lha.h
index 98041fb..7e486a2 100644
--- a/ark/lha.h
+++ b/ark/lha.h
@@ -39,20 +39,20 @@ class LhaArch : public Arch
{
Q_OBJECT
public:
- LhaArch( ArkWidget *, const QString & );
+ LhaArch( ArkWidget *, const TQString & );
virtual ~LhaArch() { }
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
- virtual void remove( QStringList * );
+ virtual void remove( TQStringList * );
virtual void unarchFileInternal();
protected slots:
- virtual bool processLine( const QCString &line );
+ virtual bool processLine( const TQCString &line );
private:
void setHeaders();
diff --git a/ark/mainwindow.cpp b/ark/mainwindow.cpp
index b62422c..5866d18 100644
--- a/ark/mainwindow.cpp
+++ b/ark/mainwindow.cpp
@@ -22,7 +22,7 @@
*/
// QT includes
-#include <qlayout.h>
+#include <tqlayout.h>
// KDE includes
#include <kdebug.h>
@@ -45,7 +45,7 @@
#include "archiveformatinfo.h"
#include "arkwidget.h"
-MainWindow::MainWindow( QWidget * /*parent*/, const char *name )
+MainWindow::MainWindow( TQWidget * /*parent*/, const char *name )
: KParts::MainWindow(), progressDialog( 0 )
{
setXMLFile( "arkui.rc" );
@@ -58,29 +58,29 @@ MainWindow::MainWindow( QWidget * /*parent*/, const char *name )
setStandardToolBarMenuEnabled( true );
setupActions();
- connect( m_part->widget(), SIGNAL( request_file_quit() ), this, SLOT( file_quit() ) );
- connect( KParts::BrowserExtension::childObject( m_part ), SIGNAL( openURLRequestDelayed
+ connect( m_part->widget(), TQT_SIGNAL( request_file_quit() ), this, TQT_SLOT( file_quit() ) );
+ connect( KParts::BrowserExtension::childObject( m_part ), TQT_SIGNAL( openURLRequestDelayed
( const KURL &, const KParts::URLArgs & ) ),
- m_part, SLOT( openURL( const KURL & ) ) );
+ m_part, TQT_SLOT( openURL( const KURL & ) ) );
m_widget->setArchivePopupEnabled( true );
- connect( m_part->widget(), SIGNAL( signalArchivePopup( const QPoint & ) ), this,
- SLOT( slotArchivePopup( const QPoint & ) ) );
-
- connect( m_part, SIGNAL( removeRecentURL( const KURL & ) ), this,
- SLOT( slotRemoveRecentURL( const KURL & ) ) );
- connect( m_part, SIGNAL( addRecentURL( const KURL & ) ), this,
- SLOT( slotAddRecentURL( const KURL & ) ) );
- connect( m_part, SIGNAL( fixActionState( const bool & ) ), this,
- SLOT( slotFixActionState( const bool & ) ) );
- connect( m_widget, SIGNAL( disableAllActions() ), this,
- SLOT( slotDisableActions() ) );
+ connect( m_part->widget(), TQT_SIGNAL( signalArchivePopup( const TQPoint & ) ), this,
+ TQT_SLOT( slotArchivePopup( const TQPoint & ) ) );
+
+ connect( m_part, TQT_SIGNAL( removeRecentURL( const KURL & ) ), this,
+ TQT_SLOT( slotRemoveRecentURL( const KURL & ) ) );
+ connect( m_part, TQT_SIGNAL( addRecentURL( const KURL & ) ), this,
+ TQT_SLOT( slotAddRecentURL( const KURL & ) ) );
+ connect( m_part, TQT_SIGNAL( fixActionState( const bool & ) ), this,
+ TQT_SLOT( slotFixActionState( const bool & ) ) );
+ connect( m_widget, TQT_SIGNAL( disableAllActions() ), this,
+ TQT_SLOT( slotDisableActions() ) );
ArkApplication::getInstance()->addWindow();
- connect( m_widget, SIGNAL( removeOpenArk( const KURL &) ), this,
- SLOT( slotRemoveOpenArk( const KURL & ) ) );
- connect( m_widget, SIGNAL( addOpenArk( const KURL & ) ), this,
- SLOT( slotAddOpenArk( const KURL & ) ) );
+ connect( m_widget, TQT_SIGNAL( removeOpenArk( const KURL &) ), this,
+ TQT_SLOT( slotRemoveOpenArk( const KURL & ) ) );
+ connect( m_widget, TQT_SIGNAL( addOpenArk( const KURL & ) ), this,
+ TQT_SLOT( slotAddOpenArk( const KURL & ) ) );
setCentralWidget( m_part->widget() );
createGUI( m_part );
@@ -110,23 +110,23 @@ void
MainWindow::setupActions()
{
newWindowAction = new KAction(i18n("New &Window"), "window_new", KShortcut(), this,
- SLOT(file_newWindow()), actionCollection(), "new_window");
+ TQT_SLOT(file_newWindow()), actionCollection(), "new_window");
- newArchAction = KStdAction::openNew(this, SLOT(file_new()), actionCollection());
- openAction = KStdAction::open(this, SLOT(file_open()), actionCollection());
+ newArchAction = KStdAction::openNew(this, TQT_SLOT(file_new()), actionCollection());
+ openAction = KStdAction::open(this, TQT_SLOT(file_open()), actionCollection());
reloadAction = new KAction(i18n("Re&load"), "reload", KStdAccel::shortcut( KStdAccel::Reload ), this,
- SLOT(file_reload()), actionCollection(), "reload_arch");
- closeAction = KStdAction::close(this, SLOT(file_close()), actionCollection(), "file_close");
+ TQT_SLOT(file_reload()), actionCollection(), "reload_arch");
+ closeAction = KStdAction::close(this, TQT_SLOT(file_close()), actionCollection(), "file_close");
- recent = KStdAction::openRecent(this, SLOT(openURL(const KURL&)), actionCollection());
+ recent = KStdAction::openRecent(this, TQT_SLOT(openURL(const KURL&)), actionCollection());
recent->loadEntries(kapp->config());
createStandardStatusBarAction();
- KStdAction::quit(this, SLOT(window_close()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(editToolbars()), actionCollection());
- KStdAction::keyBindings(this, SLOT( slotConfigureKeyBindings()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(window_close()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(editToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT( slotConfigureKeyBindings()), actionCollection());
openAction->setEnabled( true );
recent->setEnabled( true );
@@ -177,9 +177,9 @@ MainWindow::file_reload()
void
MainWindow::editToolbars()
{
- saveMainWindowSettings( KGlobal::config(), QString::fromLatin1("MainWindow") );
+ saveMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") );
KEditToolbar dlg( factory(), this );
- connect(&dlg, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -187,7 +187,7 @@ void
MainWindow::slotNewToolbarConfig()
{
createGUI( m_part );
- applyMainWindowSettings( KGlobal::config(), QString::fromLatin1("MainWindow") );
+ applyMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") );
}
void
@@ -202,7 +202,7 @@ MainWindow::slotConfigureKeyBindings()
}
void
-MainWindow::slotArchivePopup( const QPoint &pPoint)
+MainWindow::slotArchivePopup( const TQPoint &pPoint)
{
static_cast<KPopupMenu *>(factory()->container("archive_popup", this))->popup(pPoint);
}
@@ -240,29 +240,29 @@ MainWindow::openURL( const KURL & url, bool tempFile )
}
KURL
-MainWindow::getOpenURL( bool addOnly, const QString & caption,
- const QString & startDir, const QString & suggestedName )
+MainWindow::getOpenURL( bool addOnly, const TQString & caption,
+ const TQString & startDir, const TQString & suggestedName )
{
kdDebug( 1601 ) << "startDir is: " << startDir << endl;
- QWidget * forceFormatWidget = new QWidget( this );
- QHBoxLayout * l = new QHBoxLayout( forceFormatWidget );
+ TQWidget * forceFormatWidget = new TQWidget( this );
+ TQHBoxLayout * l = new TQHBoxLayout( forceFormatWidget );
- QLabel * label = new QLabel( forceFormatWidget );
+ TQLabel * label = new TQLabel( forceFormatWidget );
label->setText( i18n( "Open &as:" ) );
label->adjustSize();
KComboBox * combo = new KComboBox( forceFormatWidget );
- QStringList list;
+ TQStringList list;
list = ArchiveFormatInfo::self()->allDescriptions();
list.sort();
list.prepend( i18n( "Autodetect (default)" ) );
combo->insertStringList( list );
- QString filter = ArchiveFormatInfo::self()->filter();
+ TQString filter = ArchiveFormatInfo::self()->filter();
if ( !suggestedName.isEmpty() )
{
- filter = QString::null;
+ filter = TQString::null;
combo->setCurrentItem( list.findIndex( ArchiveFormatInfo::self()->descriptionForMimeType(
KMimeType::findByPath( suggestedName, 0, true )->name() ) ) );
}
@@ -272,7 +272,7 @@ MainWindow::getOpenURL( bool addOnly, const QString & caption,
l->addWidget( label );
l->addWidget( combo, 1 );
- QString dir;
+ TQString dir;
if ( addOnly )
dir = startDir;
else
@@ -296,7 +296,7 @@ MainWindow::getOpenURL( bool addOnly, const QString & caption,
m_widget->setOpenAsMimeType(
ArchiveFormatInfo::self()->mimeTypeForDescription( combo->currentText() ) );
else
- m_widget->setOpenAsMimeType( QString::null );
+ m_widget->setOpenAsMimeType( TQString::null );
return url;
}
@@ -355,7 +355,7 @@ MainWindow::saveProperties( KConfig* config )
void
MainWindow::readProperties( KConfig* config )
{
- QString file = config->readPathEntry("SMOpenedFile");
+ TQString file = config->readPathEntry("SMOpenedFile");
kdDebug(1601) << "ArkWidget::readProperties( KConfig* config ) file=" << file << endl;
if ( !file.isEmpty() )
openURL( KURL::fromPathOrURL( file ) );
@@ -402,7 +402,7 @@ MainWindow::extractTo( const KURL & targetDirectory, const KURL & archive, bool
}
void
-MainWindow::addToArchive( const KURL::List & filesToAdd, const QString & /*cwd*/,
+MainWindow::addToArchive( const KURL::List & filesToAdd, const TQString & /*cwd*/,
const KURL & archive, bool askForName )
{
KURL archiveFile;
@@ -416,7 +416,7 @@ MainWindow::addToArchive( const KURL::List & filesToAdd, const QString & /*cwd*/
// like: /dira> ark -add /dirb/file, but well...
KURL cwdURL;
cwdURL.setPath( filesToAdd.first().path() );
- QString dir = cwdURL.directory( false );
+ TQString dir = cwdURL.directory( false );
archiveFile = getOpenURL( true, i18n( "Select Archive to Add Files To" ),
dir /*cwd*/, archive.fileName() );
@@ -443,10 +443,10 @@ MainWindow::addToArchive( const KURL::List & filesToAdd, const QString & /*cwd*/
}
void
-MainWindow::startProgressDialog( const QString & text )
+MainWindow::startProgressDialog( const TQString & text )
{
if ( !progressDialog )
- progressDialog = new KProgressDialog( this, "progress_dialog", QString::null, text, false );
+ progressDialog = new KProgressDialog( this, "progress_dialog", TQString::null, text, false );
else
progressDialog->setLabel( text );
@@ -458,14 +458,14 @@ MainWindow::startProgressDialog( const QString & text )
progressDialog->progressBar()->setTotalSteps( 0 );
progressDialog->progressBar()->setPercentageVisible( false );
-// progressDialog->setInitialSize( QSize(200,100), true );
+// progressDialog->setInitialSize( TQSize(200,100), true );
progressDialog->setMinimumDuration( 500 );
progressDialog->show();
KDialog::centerOnScreen( progressDialog );
- connect( progressDialog, SIGNAL( cancelClicked() ), this, SLOT( window_close() ) );
+ connect( progressDialog, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( window_close() ) );
- timer = new QTimer( this );
- connect( timer, SIGNAL( timeout() ), this, SLOT( slotProgress() ) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotProgress() ) );
timer->start( 200, false );
}
diff --git a/ark/mainwindow.h b/ark/mainwindow.h
index 2d25ed0..428167e 100644
--- a/ark/mainwindow.h
+++ b/ark/mainwindow.h
@@ -25,9 +25,9 @@
#define ARKMAINWINDOW_H
// QT includes
-#include <qstring.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
// KDE includes
#include <kmainwindow.h>
@@ -42,12 +42,12 @@ MainWindow: public KParts::MainWindow
{
Q_OBJECT
public:
- MainWindow( QWidget *parent=0, const char *name=0 );
+ MainWindow( TQWidget *parent=0, const char *name=0 );
virtual ~MainWindow();
void setExtractOnly ( bool b );
void extractTo( const KURL & targetDirectory, const KURL & archive, bool guessName );
- void addToArchive( const KURL::List & filesToAdd, const QString & cwd = QString::null,
+ void addToArchive( const KURL::List & filesToAdd, const TQString & cwd = TQString::null,
const KURL & archive = KURL(), bool askForName = false );
public slots:
@@ -65,7 +65,7 @@ public slots:
virtual void saveProperties( KConfig* config );
virtual void readProperties( KConfig* config );
void slotSaveProperties();
- void slotArchivePopup( const QPoint &pPoint);
+ void slotArchivePopup( const TQPoint &pPoint);
void slotRemoveRecentURL( const KURL &url );
void slotAddRecentURL( const KURL &url );
void slotFixActionState( const bool & bHaveFiles );
@@ -81,14 +81,14 @@ private: // methods
void setupActions();
void setupMenuBar();
- void newCaption(const QString & filename);
+ void newCaption(const TQString & filename);
bool arkAlreadyOpen( const KURL & url );
- KURL getOpenURL( bool addOnly = false , const QString & caption = QString::null,
- const QString & startDir = QString::null,
- const QString & suggestedName = QString::null );
+ KURL getOpenURL( bool addOnly = false , const TQString & caption = TQString::null,
+ const TQString & startDir = TQString::null,
+ const TQString & suggestedName = TQString::null );
- void startProgressDialog( const QString & text );
+ void startProgressDialog( const TQString & text );
private slots:
void slotProgress();
@@ -106,7 +106,7 @@ private: // data
//progress dialog for konqs service menus / commmand line
KProgressDialog *progressDialog;
- QTimer *timer;
+ TQTimer *timer;
};
#endif /* ARKMAINWINDOW_H*/
diff --git a/ark/rar.cpp b/ark/rar.cpp
index 071dc9e..554fdfc 100644
--- a/ark/rar.cpp
+++ b/ark/rar.cpp
@@ -30,8 +30,8 @@
#include <string>
// QT includes
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -50,7 +50,7 @@
#include "arkutils.h"
#include "filelistview.h"
-RarArch::RarArch( ArkWidget *_gui, const QString & _fileName )
+RarArch::RarArch( ArkWidget *_gui, const TQString & _fileName )
: Arch( _gui, _fileName )
{
// Check if rar is available
@@ -87,26 +87,26 @@ RarArch::RarArch( ArkWidget *_gui, const QString & _fileName )
m_isFirstLine = true;
}
-bool RarArch::processLine( const QCString &line )
+bool RarArch::processLine( const TQCString &line )
{
if ( m_isFirstLine )
{
- m_entryFilename = QString::fromLocal8Bit( line );
+ m_entryFilename = TQString::fromLocal8Bit( line );
m_entryFilename.remove( 0, 1 );
m_isFirstLine = false;
return true;
}
- QStringList list;
+ TQStringList list;
- QStringList l2 = QStringList::split( ' ', line );
+ TQStringList l2 = TQStringList::split( ' ', line );
list << m_entryFilename; // filename
list << l2[ 0 ]; // size
list << l2[ 1 ]; // packed
list << l2[ 2 ]; // ratio
- QStringList date = QStringList::split( '-', l2[ 3 ] );
+ TQStringList date = TQStringList::split( '-', l2[ 3 ] );
list << ArkUtils::fixYear( date[ 2 ].latin1() ) + '-' + date[ 1 ] + '-' + date [ 0 ] + ' ' + l2[4]; // date
list << l2[ 5 ]; // attributes
list << l2[ 6 ]; // crc
@@ -137,17 +137,17 @@ void RarArch::open()
*kp << m_filename;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotOpenExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotOpenExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
@@ -173,17 +173,17 @@ void RarArch::create()
Arch::Extract | Arch::Delete | Arch::Add | Arch::View );
}
-void RarArch::addDir( const QString & _dirName )
+void RarArch::addDir( const TQString & _dirName )
{
if ( !_dirName.isEmpty() )
{
- QStringList list;
+ TQStringList list;
list.append( _dirName );
addFile( list );
}
}
-void RarArch::addFile( const QStringList & urls )
+void RarArch::addFile( const TQStringList & urls )
{
KProcess *kp = m_currentProcess = new KProcess;
@@ -203,21 +203,21 @@ void RarArch::addFile( const QStringList & urls )
*kp << m_filename;
KURL dir( urls.first() );
- QDir::setCurrent( dir.directory() );
+ TQDir::setCurrent( dir.directory() );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
for ( iter = urls.begin(); iter != urls.end(); ++iter )
{
KURL url( *iter );
*kp << url.fileName();
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotAddExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotAddExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -260,7 +260,7 @@ void RarArch::unarchFileInternal()
// and we then extract everything in the archive.
if ( m_fileList )
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = m_fileList->begin(); it != m_fileList->end(); ++it )
{
*kp << (*it);
@@ -269,12 +269,12 @@ void RarArch::unarchFileInternal()
*kp << m_destDir ;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotExtractExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotExtractExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -288,7 +288,7 @@ bool RarArch::passwordRequired()
return m_lastShellOutput.findRev("password incorrect ?)")+1;
}
-void RarArch::remove( QStringList *list )
+void RarArch::remove( TQStringList *list )
{
if ( !list )
return;
@@ -298,19 +298,19 @@ void RarArch::remove( QStringList *list )
*kp << m_archiver_program << "d" << m_filename;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list->begin(); it != list->end(); ++it )
{
- QString str = *it;
+ TQString str = *it;
*kp << str;
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotDeleteExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotDeleteExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
diff --git a/ark/rar.h b/ark/rar.h
index d8a4ab4..5ffab3f 100644
--- a/ark/rar.h
+++ b/ark/rar.h
@@ -36,21 +36,21 @@ class RarArch : public Arch
{
Q_OBJECT
public:
- RarArch( ArkWidget *_gui, const QString & _fileName );
+ RarArch( ArkWidget *_gui, const TQString & _fileName );
virtual ~RarArch() {}
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
- virtual void remove( QStringList * );
+ virtual void remove( TQStringList * );
virtual void unarchFileInternal();
virtual bool passwordRequired();
protected slots:
- virtual bool processLine( const QCString & );
+ virtual bool processLine( const TQCString & );
private:
void setHeaders();
@@ -62,7 +62,7 @@ class RarArch : public Arch
* Therefore, the variables below are needed.
*/
bool m_isFirstLine;
- QString m_entryFilename;
+ TQString m_entryFilename;
};
#endif // RAR_H
diff --git a/ark/searchbar.cpp b/ark/searchbar.cpp
index 015a3bf..40fb522 100644
--- a/ark/searchbar.cpp
+++ b/ark/searchbar.cpp
@@ -28,14 +28,14 @@
#include <kaction.h>
#include <kactioncollection.h>
-#include <qlabel.h>
-#include <qapplication.h>
-#include <qvaluelist.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
+#include <tqvaluelist.h>
-SearchBar::SearchBar( QWidget* parent, KActionCollection* aC, const char * name )
+SearchBar::SearchBar( TQWidget* parent, KActionCollection* aC, const char * name )
: KListViewSearchLine( parent, 0, name )
{
- KAction *resetSearch = new KAction( i18n( "Reset Search" ), QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, this, SLOT( clear() ), aC, "reset_search" );
+ KAction *resetSearch = new KAction( i18n( "Reset Search" ), TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, this, TQT_SLOT( clear() ), aC, "reset_search" );
resetSearch->plug( parent );
resetSearch->setWhatsThis( i18n( "Reset Search\n"
diff --git a/ark/searchbar.h b/ark/searchbar.h
index 95857ae..c21b4d4 100644
--- a/ark/searchbar.h
+++ b/ark/searchbar.h
@@ -23,7 +23,7 @@
#include <klistviewsearchline.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KListView;
class KComboBox;
@@ -33,7 +33,7 @@ class SearchBar: public KListViewSearchLine
{
Q_OBJECT
public:
- SearchBar( QWidget* parent, KActionCollection* aC, const char * name = 0 );
+ SearchBar( TQWidget* parent, KActionCollection* aC, const char * name = 0 );
~SearchBar();
};
diff --git a/ark/sevenzip.cpp b/ark/sevenzip.cpp
index 30747a3..99170ac 100644
--- a/ark/sevenzip.cpp
+++ b/ark/sevenzip.cpp
@@ -24,7 +24,7 @@
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <klocale.h>
@@ -40,7 +40,7 @@
#include "arkutils.h"
#include "filelistview.h"
-SevenZipArch::SevenZipArch( ArkWidget *gui, const QString &filename )
+SevenZipArch::SevenZipArch( ArkWidget *gui, const TQString &filename )
: Arch( gui, filename ), m_nameColumnPos( -1 )
{
// Check if 7z is available
@@ -64,13 +64,13 @@ SevenZipArch::SevenZipArch( ArkWidget *gui, const QString &filename )
m_dateCol = 3;
m_numCols = 5;
- m_archCols.append( new ArchColumns( 5, QRegExp( "[0-2][0-9][0-9][0-9]" ), 4 ) ); // Year
- m_archCols.append( new ArchColumns( 6, QRegExp( "[01][0-9]" ), 2 ) ); // Month
- m_archCols.append( new ArchColumns( 7, QRegExp( "[0-3][0-9]" ), 2 ) ); // Day
- m_archCols.append( new ArchColumns( 8, QRegExp( "[0-9:]+" ), 8 ) ); // Time
- m_archCols.append( new ArchColumns( 4, QRegExp( "[^\\s]+" ) ) ); // Attributes
- m_archCols.append( new ArchColumns( 1, QRegExp( "[0-9]+" ) ) ); // Size
- m_archCols.append( new ArchColumns( 2, QRegExp( "[0-9]+" ), 64, true ) ); // Compressed Size
+ m_archCols.append( new ArchColumns( 5, TQRegExp( "[0-2][0-9][0-9][0-9]" ), 4 ) ); // Year
+ m_archCols.append( new ArchColumns( 6, TQRegExp( "[01][0-9]" ), 2 ) ); // Month
+ m_archCols.append( new ArchColumns( 7, TQRegExp( "[0-3][0-9]" ), 2 ) ); // Day
+ m_archCols.append( new ArchColumns( 8, TQRegExp( "[0-9:]+" ), 8 ) ); // Time
+ m_archCols.append( new ArchColumns( 4, TQRegExp( "[^\\s]+" ) ) ); // Attributes
+ m_archCols.append( new ArchColumns( 1, TQRegExp( "[0-9]+" ) ) ); // Size
+ m_archCols.append( new ArchColumns( 2, TQRegExp( "[0-9]+" ), 64, true ) ); // Compressed Size
}
SevenZipArch::~SevenZipArch()
@@ -100,17 +100,17 @@ void SevenZipArch::open()
KProcess *kp = m_currentProcess = new KProcess;
*kp << m_archiver_program << "l" << m_filename;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotOpenExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotOpenExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
@@ -120,7 +120,7 @@ void SevenZipArch::create()
Arch::Extract | Arch::Delete | Arch::Add | Arch::View );
}
-void SevenZipArch::addFile( const QStringList & urls )
+void SevenZipArch::addFile( const TQStringList & urls )
{
KProcess *kp = m_currentProcess = new KProcess;
@@ -128,23 +128,23 @@ void SevenZipArch::addFile( const QStringList & urls )
*kp << m_archiver_program << "a" ;
KURL url( urls.first() );
- QDir::setCurrent( url.directory() );
+ TQDir::setCurrent( url.directory() );
*kp << m_filename;
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
for ( iter = urls.begin(); iter != urls.end(); ++iter )
{
KURL url( *iter );
*kp << url.fileName();
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotAddExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotAddExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -153,17 +153,17 @@ void SevenZipArch::addFile( const QStringList & urls )
}
}
-void SevenZipArch::addDir( const QString & dirName )
+void SevenZipArch::addDir( const TQString & dirName )
{
if ( !dirName.isEmpty() )
{
- QStringList list;
+ TQStringList list;
list.append( dirName );
addFile( list );
}
}
-void SevenZipArch::remove( QStringList *list )
+void SevenZipArch::remove( TQStringList *list )
{
if ( !list )
return;
@@ -173,18 +173,18 @@ void SevenZipArch::remove( QStringList *list )
*kp << m_archiver_program << "d" << m_filename;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list->begin(); it != list->end(); ++it )
{
*kp << *it;
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotDeleteExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotDeleteExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -218,7 +218,7 @@ void SevenZipArch::unarchFileInternal( )
// and we then extract everything in the archive.
if ( m_fileList )
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = m_fileList->begin(); it != m_fileList->end(); ++it )
{
*kp << (*it);
@@ -227,12 +227,12 @@ void SevenZipArch::unarchFileInternal( )
*kp << "-o" + m_destDir ;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotExtractExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotExtractExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -241,10 +241,10 @@ void SevenZipArch::unarchFileInternal( )
}
}
-bool SevenZipArch::processLine( const QCString& _line )
+bool SevenZipArch::processLine( const TQCString& _line )
{
- QCString line( _line );
- QString columns[ 11 ];
+ TQCString line( _line );
+ TQString columns[ 11 ];
unsigned int pos = 0;
int strpos, len;
@@ -252,7 +252,7 @@ bool SevenZipArch::processLine( const QCString& _line )
line.truncate( m_nameColumnPos );
// Go through our columns, try to pick out data, return silently on failure
- for ( QPtrListIterator <ArchColumns>col( m_archCols ); col.current(); ++col )
+ for ( TQPtrListIterator <ArchColumns>col( m_archCols ); col.current(); ++col )
{
ArchColumns *curCol = *col;
@@ -278,14 +278,14 @@ bool SevenZipArch::processLine( const QCString& _line )
if ( m_dateCol >= 0 )
{
- QString year = ( m_repairYear >= 0 ) ?
+ TQString year = ( m_repairYear >= 0 ) ?
ArkUtils::fixYear( columns[ m_repairYear ].ascii())
: columns[ m_fixYear ];
- QString month = ( m_repairMonth >= 0 ) ?
- QString( "%1" )
+ TQString month = ( m_repairMonth >= 0 ) ?
+ TQString( "%1" )
.arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) )
: columns[ m_fixMonth ];
- QString timestamp = QString::fromLatin1( "%1-%2-%3 %4" )
+ TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" )
.arg( year )
.arg( month )
.arg( columns[ m_fixDay ] )
@@ -294,7 +294,7 @@ bool SevenZipArch::processLine( const QCString& _line )
columns[ m_dateCol ] = timestamp;
}
- QStringList list;
+ TQStringList list;
for ( int i = 0; i < m_numCols; ++i )
{
diff --git a/ark/sevenzip.h b/ark/sevenzip.h
index 4a34c48..f728768 100644
--- a/ark/sevenzip.h
+++ b/ark/sevenzip.h
@@ -30,20 +30,20 @@ class SevenZipArch : public Arch
{
Q_OBJECT
public:
- SevenZipArch( ArkWidget *, const QString & );
+ SevenZipArch( ArkWidget *, const TQString & );
virtual ~SevenZipArch();
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
- virtual void remove( QStringList * );
+ virtual void remove( TQStringList * );
virtual void unarchFileInternal( );
protected slots:
- virtual bool processLine( const QCString& line );
+ virtual bool processLine( const TQCString& line );
virtual void slotReceivedTOC( KProcess*, char*, int );
private:
diff --git a/ark/tar.cpp b/ark/tar.cpp
index 5f104ef..6e599c9 100644
--- a/ark/tar.cpp
+++ b/ark/tar.cpp
@@ -49,9 +49,9 @@
#include <stdlib.h>
// Qt includes
-#include <qdir.h>
-#include <qregexp.h>
-#include <qeventloop.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqeventloop.h>
// KDE includes
#include <kapplication.h>
@@ -74,13 +74,13 @@
#include "tarlistingthread.h"
TarArch::TarArch( ArkWidget *_gui,
- const QString & _filename, const QString & _openAsMimeType)
+ const TQString & _filename, const TQString & _openAsMimeType)
: Arch( _gui, _filename), m_tmpDir( 0 ), createTmpInProgress(false),
updateInProgress(false), deleteInProgress(false), fd(0),
m_pTmpProc( 0 ), m_pTmpProc2( 0 ), failed( false ),
m_dotslash( false ), m_listingThread( 0 )
{
- m_filesToAdd = m_filesToRemove = QStringList();
+ m_filesToAdd = m_filesToRemove = TQStringList();
m_archiver_program = m_unarchiver_program = ArkSettings::tarExe();
verifyCompressUtilityIsAvailable( m_archiver_program );
verifyUncompressUtilityIsAvailable( m_unarchiver_program );
@@ -106,12 +106,12 @@ TarArch::TarArch( ArkWidget *_gui,
{
compressed = true;
m_tmpDir = new KTempDir( _gui->tmpDir()
- + QString::fromLatin1( "temp_tar" ) );
+ + TQString::fromLatin1( "temp_tar" ) );
m_tmpDir->setAutoDelete( true );
m_tmpDir->qDir()->cd( m_tmpDir->name() );
// build the temp file name
KTempFile *pTempFile = new KTempFile( m_tmpDir->name(),
- QString::fromLatin1(".tar") );
+ TQString::fromLatin1(".tar") );
tmpfile = pTempFile->name();
delete pTempFile;
@@ -143,7 +143,7 @@ void TarArch::updateArch()
if (compressed)
{
updateInProgress = true;
- int f_desc = KDE_open(QFile::encodeName(m_filename), O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ int f_desc = KDE_open(TQFile::encodeName(m_filename), O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (f_desc != -1)
fd = fdopen( f_desc, "w" );
else
@@ -163,13 +163,13 @@ void TarArch::updateArch()
*kp << "cat" << tmpfile;
- connect(kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(updateProgress( KProcess *, char *, int )));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- (Arch *)this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect(kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(updateProgress( KProcess *, char *, int )));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ (Arch *)this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect(kp, SIGNAL(processExited(KProcess *)),
- this, SLOT(updateFinished(KProcess *)) );
+ connect(kp, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(updateFinished(KProcess *)) );
if ( !fd || kp->start(KProcess::NotifyOnExit, flag) == false)
{
@@ -197,46 +197,46 @@ void TarArch::updateProgress( KProcess * _proc, char *_buffer, int _bufflen )
-QString TarArch::getCompressor()
+TQString TarArch::getCompressor()
{
if ( m_fileMimeType == "application/x-tarz" )
- return QString( "compress" );
+ return TQString( "compress" );
if ( m_fileMimeType == "application/x-tgz" )
- return QString( "gzip" );
+ return TQString( "gzip" );
if ( m_fileMimeType == "application/x-tbz" )
- return QString( "bzip2" );
+ return TQString( "bzip2" );
if( m_fileMimeType == "application/x-tzo" )
- return QString( "lzop" );
+ return TQString( "lzop" );
- return QString::null;
+ return TQString::null;
}
-QString TarArch::getUnCompressor()
+TQString TarArch::getUnCompressor()
{
if ( m_fileMimeType == "application/x-tarz" )
- return QString( "uncompress" );
+ return TQString( "uncompress" );
if ( m_fileMimeType == "application/x-tgz" )
- return QString( "gunzip" );
+ return TQString( "gunzip" );
if ( m_fileMimeType == "application/x-tbz" )
- return QString( "bunzip2" );
+ return TQString( "bunzip2" );
if( m_fileMimeType == "application/x-tzo" )
- return QString( "lzop" );
+ return TQString( "lzop" );
- return QString::null;
+ return TQString::null;
}
void
TarArch::open()
{
if ( compressed )
- QFile::remove(tmpfile); // just to make sure
+ TQFile::remove(tmpfile); // just to make sure
setHeaders();
clearShellOutput();
@@ -260,12 +260,12 @@ TarArch::open()
m_header_removed = false;
m_finished = false;
- connect(kp, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotListingDone(KProcess *)));
- connect(kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput( KProcess *, char *, int )));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect(kp, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotListingDone(KProcess *)));
+ connect(kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput( KProcess *, char *, int )));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
@@ -282,7 +282,7 @@ TarArch::open()
}
else
{
- connect( this, SIGNAL( createTempDone() ), this, SLOT( openFirstCreateTempDone() ) );
+ connect( this, TQT_SIGNAL( createTempDone() ), this, TQT_SLOT( openFirstCreateTempDone() ) );
createTmp();
}
}
@@ -292,7 +292,7 @@ void TarArch::openFirstCreateTempDone()
if ( compressed && ( m_fileMimeType != "application/x-tgz" )
&& ( m_fileMimeType != "application/x-tbz" ) )
{
- disconnect( this, SIGNAL( createTempDone() ), this, SLOT( openFirstCreateTempDone() ) );
+ disconnect( this, TQT_SIGNAL( createTempDone() ), this, TQT_SLOT( openFirstCreateTempDone() ) );
}
Q_ASSERT( !m_listingThread );
@@ -302,19 +302,19 @@ void TarArch::openFirstCreateTempDone()
void TarArch::slotListingDone(KProcess *_kp)
{
- const QString list = getLastShellOutput();
+ const TQString list = getLastShellOutput();
FileListView *flv = m_gui->fileList();
if (flv!=NULL && flv->totalFiles()>0)
{
- const QString firstfile = ((FileLVI *) flv->firstChild())->fileName();
- if (list.find(QRegExp(QString("\\s\\./%1[/\\n]").arg(firstfile)))>=0)
+ const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName();
+ if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").arg(firstfile)))>=0)
{
m_dotslash = true;
kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl;
}
else
{
- if (list.find(QRegExp(QString("\\s%1[/\\n]").arg(firstfile)))>=0)
+ if (list.find(TQRegExp(TQString("\\s%1[/\\n]").arg(firstfile)))>=0)
{
// archive doesn't have dot-slash
m_dotslash = false;
@@ -356,15 +356,15 @@ void TarArch::createTmp()
{
if ( compressed )
{
- if ( !QFile::exists(tmpfile) )
+ if ( !TQFile::exists(tmpfile) )
{
- QString strUncompressor = getUnCompressor();
+ TQString strUncompressor = getUnCompressor();
// at least lzop doesn't want to pipe zerosize/nonexistent files
- QFile originalFile( m_filename );
+ TQFile originalFile( m_filename );
if ( strUncompressor != "gunzip" && strUncompressor !="bunzip2" &&
( !originalFile.exists() || originalFile.size() == 0 ) )
{
- QFile temp( tmpfile );
+ TQFile temp( tmpfile );
temp.open( IO_ReadWrite );
temp.close();
emit createTempDone();
@@ -372,7 +372,7 @@ void TarArch::createTmp()
}
// the tmpfile does not yet exist, so we create it.
createTmpInProgress = true;
- int f_desc = KDE_open(QFile::encodeName(tmpfile), O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ int f_desc = KDE_open(TQFile::encodeName(tmpfile), O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (f_desc != -1)
fd = fdopen( f_desc, "w" );
else
@@ -394,16 +394,16 @@ void TarArch::createTmp()
}
*kp << "-c" << m_filename;
- connect(kp, SIGNAL(processExited(KProcess *)),
- this, SLOT(createTmpFinished(KProcess *)));
- connect(kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(createTmpProgress( KProcess *, char *, int )));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect(kp, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(createTmpFinished(KProcess *)));
+ connect(kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(createTmpProgress( KProcess *, char *, int )));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
if (kp->start(KProcess::NotifyOnExit, flag ) == false)
{
KMessageBox::error(0, i18n("Unable to fork a decompressor"));
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
else
@@ -436,13 +436,13 @@ void TarArch::createTmpProgress( KProcess * _proc, char *_buffer, int _bufflen )
}
}
-void TarArch::deleteOldFiles(const QStringList &urls, bool bAddOnlyNew)
+void TarArch::deleteOldFiles(const TQStringList &urls, bool bAddOnlyNew)
// because tar is broken. Used when appending: see addFile.
{
- QStringList list;
- QString str;
+ TQStringList list;
+ TQString str;
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
for (iter = urls.begin(); iter != urls.end(); ++iter )
{
KURL url( *iter );
@@ -457,9 +457,9 @@ void TarArch::deleteOldFiles(const QStringList &urls, bool bAddOnlyNew)
// old. Otherwise we aren't adding it anyway, so we can go on to the next
// file with a "continue".
- QFileInfo fileInfo( url.path() );
- QDateTime addFileMTime = fileInfo.lastModified();
- QDateTime oldFileMTime = lv->timeStamp();
+ TQFileInfo fileInfo( url.path() );
+ TQDateTime addFileMTime = fileInfo.lastModified();
+ TQDateTime oldFileMTime = lv->timeStamp();
kdDebug(1601) << "Old file: " << oldFileMTime.date().year() << '-' <<
oldFileMTime.date().month() << '-' << oldFileMTime.date().day() <<
@@ -489,7 +489,7 @@ void TarArch::deleteOldFiles(const QStringList &urls, bool bAddOnlyNew)
}
-void TarArch::addFile( const QStringList& urls )
+void TarArch::addFile( const TQStringList& urls )
{
m_filesToAdd = urls;
// tar is broken. If you add a file that's already there, it gives you
@@ -499,23 +499,23 @@ void TarArch::addFile( const QStringList& urls )
// first. So we'll first delete all the old files matching the names of
// those in urls.
m_bNotifyWhenDeleteFails = false;
- connect( this, SIGNAL( removeDone() ), this, SLOT( deleteOldFilesDone() ) );
+ connect( this, TQT_SIGNAL( removeDone() ), this, TQT_SLOT( deleteOldFilesDone() ) );
deleteOldFiles(urls, ArkSettings::replaceOnlyWithNewer());
}
void TarArch::deleteOldFilesDone()
{
- disconnect( this, SIGNAL( removeDone() ), this, SLOT( deleteOldFilesDone() ) );
+ disconnect( this, TQT_SIGNAL( removeDone() ), this, TQT_SLOT( deleteOldFilesDone() ) );
m_bNotifyWhenDeleteFails = true;
- connect( this, SIGNAL( createTempDone() ), this, SLOT( addFileCreateTempDone() ) );
+ connect( this, TQT_SIGNAL( createTempDone() ), this, TQT_SLOT( addFileCreateTempDone() ) );
createTmp();
}
void TarArch::addFileCreateTempDone()
{
- disconnect( this, SIGNAL( createTempDone() ), this, SLOT( addFileCreateTempDone() ) );
- QStringList * urls = &m_filesToAdd;
+ disconnect( this, TQT_SIGNAL( createTempDone() ), this, TQT_SLOT( addFileCreateTempDone() ) );
+ TQStringList * urls = &m_filesToAdd;
KProcess *kp = m_currentProcess = new KProcess;
*kp << m_archiver_program;
@@ -530,9 +530,9 @@ void TarArch::addFileCreateTempDone()
else
*kp << m_filename;
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
KURL url( urls->first() );
- QDir::setCurrent( url.directory() );
+ TQDir::setCurrent( url.directory() );
for (iter = urls->begin(); iter != urls->end(); ++iter )
{
KURL fileURL( *iter );
@@ -540,20 +540,20 @@ void TarArch::addFileCreateTempDone()
}
// debugging info
- QValueList<QCString> list = kp->args();
- QValueList<QCString>::Iterator strTemp;
+ TQValueList<TQCString> list = kp->args();
+ TQValueList<TQCString>::Iterator strTemp;
for ( strTemp=list.begin(); strTemp != list.end(); ++strTemp )
{
kdDebug(1601) << *strTemp << " " << endl;
}
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotAddFinished(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotAddFinished(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
@@ -564,13 +564,13 @@ void TarArch::addFileCreateTempDone()
void TarArch::slotAddFinished(KProcess *_kp)
{
- disconnect( _kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotAddFinished(KProcess*)));
+ disconnect( _kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotAddFinished(KProcess*)));
m_pTmpProc = _kp;
- m_filesToAdd = QStringList();
+ m_filesToAdd = TQStringList();
if ( compressed )
{
- connect( this, SIGNAL( updateDone() ), this, SLOT( addFinishedUpdateDone() ) );
+ connect( this, TQT_SIGNAL( updateDone() ), this, TQT_SLOT( addFinishedUpdateDone() ) );
updateArch();
}
else
@@ -580,14 +580,14 @@ void TarArch::slotAddFinished(KProcess *_kp)
void TarArch::addFinishedUpdateDone()
{
if ( compressed )
- disconnect( this, SIGNAL( updateDone() ), this, SLOT( addFinishedUpdateDone() ) );
+ disconnect( this, TQT_SIGNAL( updateDone() ), this, TQT_SLOT( addFinishedUpdateDone() ) );
Arch::slotAddExited( m_pTmpProc ); // this will delete _kp
m_pTmpProc = NULL;
}
void TarArch::unarchFileInternal()
{
- QString dest;
+ TQString dest;
if (m_destDir.isEmpty() || m_destDir.isNull())
{
@@ -596,7 +596,7 @@ void TarArch::unarchFileInternal()
}
else dest = m_destDir;
- QString tmp;
+ TQString tmp;
KProcess *kp = m_currentProcess = new KProcess;
kp->clearArguments();
@@ -605,7 +605,7 @@ void TarArch::unarchFileInternal()
if (compressed)
*kp << "--use-compress-program="+getUnCompressor();
- QString options = "-x";
+ TQString options = "-x";
if (!ArkSettings::extractOverwrite())
options += "k";
if (ArkSettings::preservePerms())
@@ -619,20 +619,20 @@ void TarArch::unarchFileInternal()
// and we then extract everything in the archive.
if (m_fileList)
{
- for ( QStringList::Iterator it = m_fileList->begin();
+ for ( TQStringList::Iterator it = m_fileList->begin();
it != m_fileList->end(); ++it )
{
- *kp << QString(m_dotslash ? "./" : "")+(*it);
+ *kp << TQString(m_dotslash ? "./" : "")+(*it);
}
}
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotExtractExited(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotExtractExited(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
@@ -642,19 +642,19 @@ void TarArch::unarchFileInternal()
}
-void TarArch::remove(QStringList *list)
+void TarArch::remove(TQStringList *list)
{
deleteInProgress = true;
m_filesToRemove = *list;
- connect( this, SIGNAL( createTempDone() ), this, SLOT( removeCreateTempDone() ) );
+ connect( this, TQT_SIGNAL( createTempDone() ), this, TQT_SLOT( removeCreateTempDone() ) );
createTmp();
}
void TarArch::removeCreateTempDone()
{
- disconnect( this, SIGNAL( createTempDone() ), this, SLOT( removeCreateTempDone() ) );
+ disconnect( this, TQT_SIGNAL( createTempDone() ), this, TQT_SLOT( removeCreateTempDone() ) );
- QString name, tmp;
+ TQString name, tmp;
KProcess *kp = m_currentProcess = new KProcess;
kp->clearArguments();
*kp << m_archiver_program << "--delete" << "-f" ;
@@ -663,20 +663,20 @@ void TarArch::removeCreateTempDone()
else
*kp << m_filename;
- QStringList::Iterator it = m_filesToRemove.begin();
+ TQStringList::Iterator it = m_filesToRemove.begin();
for ( ; it != m_filesToRemove.end(); ++it )
{
- *kp << QString(m_dotslash ? "./" : "")+(*it);
+ *kp << TQString(m_dotslash ? "./" : "")+(*it);
}
- m_filesToRemove = QStringList();
+ m_filesToRemove = TQStringList();
- connect( kp, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ connect( kp, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
- connect( kp, SIGNAL(processExited(KProcess*)), this,
- SLOT(slotDeleteExited(KProcess*)));
+ connect( kp, TQT_SIGNAL(processExited(KProcess*)), this,
+ TQT_SLOT(slotDeleteExited(KProcess*)));
if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false)
{
@@ -690,7 +690,7 @@ void TarArch::slotDeleteExited(KProcess *_kp)
m_pTmpProc2 = _kp;
if ( compressed )
{
- connect( this, SIGNAL( updateDone() ), this, SLOT( removeUpdateDone() ) );
+ connect( this, TQT_SIGNAL( updateDone() ), this, TQT_SLOT( removeUpdateDone() ) );
updateArch();
}
else
@@ -700,7 +700,7 @@ void TarArch::slotDeleteExited(KProcess *_kp)
void TarArch::removeUpdateDone()
{
if ( compressed )
- disconnect( this, SIGNAL( updateDone() ), this, SLOT( removeUpdateDone() ) );
+ disconnect( this, TQT_SIGNAL( updateDone() ), this, TQT_SLOT( removeUpdateDone() ) );
deleteInProgress = false;
emit removeDone();
@@ -708,9 +708,9 @@ void TarArch::removeUpdateDone()
m_pTmpProc = NULL;
}
-void TarArch::addDir(const QString & _dirName)
+void TarArch::addDir(const TQString & _dirName)
{
- QStringList list;
+ TQStringList list;
list.append(_dirName);
addFile(list);
}
@@ -742,7 +742,7 @@ void TarArch::updateFinished( KProcess *_kp )
emit updateDone();
}
-void TarArch::customEvent( QCustomEvent *ev )
+void TarArch::customEvent( TQCustomEvent *ev )
{
if ( ev->type() == 65442 )
{
@@ -757,7 +757,7 @@ void TarArch::customEvent( QCustomEvent *ev )
m_listingThread->wait();
delete m_listingThread;
m_listingThread = 0;
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
break;
case ListingEvent::ListingFinished:
diff --git a/ark/tar.h b/ark/tar.h
index 544949a..08f189b 100644
--- a/ark/tar.h
+++ b/ark/tar.h
@@ -57,22 +57,22 @@ class TarArch : public Arch
{
Q_OBJECT
public:
- TarArch( ArkWidget *_gui, const QString & _filename,
- const QString & _openAsMimeType );
+ TarArch( ArkWidget *_gui, const TQString & _filename,
+ const TQString & _openAsMimeType );
virtual ~TarArch();
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
- virtual void remove( QStringList* );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
+ virtual void remove( TQStringList* );
virtual void unarchFileInternal();
virtual int getEditFlag();
- QString getCompressor();
- QString getUnCompressor();
+ TQString getCompressor();
+ TQString getUnCompressor();
public slots:
void updateProgress( KProcess *_kp, char *_buffer, int _bufflen );
@@ -98,21 +98,21 @@ class TarArch : public Arch
void removeUpdateDone();
protected:
- void customEvent( QCustomEvent * );
+ void customEvent( TQCustomEvent * );
private: // methods
void updateArch();
void createTmp();
void setHeaders();
- void processDir( const KTarDirectory *tardir, const QString & root );
- void deleteOldFiles( const QStringList &list, bool bAddOnlyNew );
- QString getEntry( const QString & filename );
+ void processDir( const KTarDirectory *tardir, const TQString & root );
+ void deleteOldFiles( const TQStringList &list, bool bAddOnlyNew );
+ TQString getEntry( const TQString & filename );
private: // data
// if the tar is compressed, this is the temporary uncompressed tar.
KTempDir * m_tmpDir;
- QString tmpfile;
- QString m_fileMimeType;
+ TQString tmpfile;
+ TQString m_fileMimeType;
bool compressed;
// for use with createTmp and updateArch
@@ -122,8 +122,8 @@ class TarArch : public Arch
// for use with deleteOldFiles
bool deleteInProgress;
FILE *fd;
- QStringList m_filesToAdd;
- QStringList m_filesToRemove;
+ TQStringList m_filesToAdd;
+ TQStringList m_filesToRemove;
KProcess * m_pTmpProc;
KProcess * m_pTmpProc2;
bool failed;
diff --git a/ark/tarlistingthread.cpp b/ark/tarlistingthread.cpp
index 2a98375..3045c4a 100644
--- a/ark/tarlistingthread.cpp
+++ b/ark/tarlistingthread.cpp
@@ -20,8 +20,8 @@
*/
-#include <qstring.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqapplication.h>
#include <karchive.h>
#include <ktar.h>
@@ -78,8 +78,8 @@ static char *makeAccessString(mode_t mode)
return buffer;
}
-TarListingThread::TarListingThread( QObject *parent, const QString& filename )
- : QThread(), m_parent( parent )
+TarListingThread::TarListingThread( TQObject *parent, const TQString& filename )
+ : TQThread(), m_parent( parent )
{
Q_ASSERT( m_parent );
m_archive = new KTar( filename );
@@ -95,32 +95,32 @@ void TarListingThread::run()
{
if (!m_archive->open( IO_ReadOnly ))
{
- ListingEvent *ev = new ListingEvent( QStringList(), ListingEvent::Error );
+ ListingEvent *ev = new ListingEvent( TQStringList(), ListingEvent::Error );
qApp->postEvent( m_parent, ev );
return;
}
- processDir( m_archive->directory(), QString() );
+ processDir( m_archive->directory(), TQString() );
- // Send an empty QStringList in an Event to signal the listing end.
- ListingEvent *ev = new ListingEvent( QStringList(), ListingEvent::ListingFinished );
+ // Send an empty TQStringList in an Event to signal the listing end.
+ ListingEvent *ev = new ListingEvent( TQStringList(), ListingEvent::ListingFinished );
qApp->postEvent( m_parent, ev );
}
-void TarListingThread::processDir( const KTarDirectory *tardir, const QString & root )
+void TarListingThread::processDir( const KTarDirectory *tardir, const TQString & root )
{
- QStringList list = tardir->entries();
+ TQStringList list = tardir->entries();
- QStringList::const_iterator itEnd = list.constEnd();
+ TQStringList::const_iterator itEnd = list.constEnd();
- for ( QStringList::const_iterator it = list.constBegin(); it != itEnd; ++it )
+ for ( TQStringList::const_iterator it = list.constBegin(); it != itEnd; ++it )
{
const KTarEntry* tarEntry = tardir->entry((*it));
if (!tarEntry)
continue;
- QStringList col_list;
- QString name;
+ TQStringList col_list;
+ TQString name;
if (root.isEmpty() || root.isNull())
name = tarEntry->name();
else
@@ -128,7 +128,7 @@ void TarListingThread::processDir( const KTarDirectory *tardir, const QString &
if ( !tarEntry->isFile() )
name += '/';
col_list.append( name );
- QString perms = makeAccessString(tarEntry->permissions());
+ TQString perms = makeAccessString(tarEntry->permissions());
if (!tarEntry->isFile())
perms = "d" + perms;
else if (!tarEntry->symlink().isEmpty())
@@ -138,13 +138,13 @@ void TarListingThread::processDir( const KTarDirectory *tardir, const QString &
col_list.append(perms);
col_list.append( tarEntry->user() );
col_list.append( tarEntry->group() );
- QString strSize = "0";
+ TQString strSize = "0";
if (tarEntry->isFile())
{
strSize.sprintf("%d", ((KTarFile *)tarEntry)->size());
}
col_list.append(strSize);
- QString timestamp = tarEntry->datetime().toString(ISODate);
+ TQString timestamp = tarEntry->datetime().toString(ISODate);
col_list.append(timestamp);
col_list.append(tarEntry->symlink());
diff --git a/ark/tarlistingthread.h b/ark/tarlistingthread.h
index f9de02b..b79f10c 100644
--- a/ark/tarlistingthread.h
+++ b/ark/tarlistingthread.h
@@ -22,9 +22,9 @@
#ifndef TARLISTINGTHREAD_H
#define TARLISTINGTHREAD_H
-#include <qthread.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqthread.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
class QString;
class KArchive;
@@ -33,31 +33,31 @@ class ListingEvent: public QCustomEvent
{
public:
enum Status { Normal, Error, ListingFinished };
- ListingEvent( const QStringList& data, Status st = Normal )
- : QCustomEvent( 65442 ), m_data( data ), m_status( st ) {}
+ ListingEvent( const TQStringList& data, Status st = Normal )
+ : TQCustomEvent( 65442 ), m_data( data ), m_status( st ) {}
- const QStringList& columns() const { return m_data; }
+ const TQStringList& columns() const { return m_data; }
Status status() const { return m_status; }
private:
- QStringList m_data;
+ TQStringList m_data;
Status m_status;
};
class TarListingThread: public QThread
{
public:
- TarListingThread( QObject *parent, const QString& filename );
+ TarListingThread( TQObject *parent, const TQString& filename );
~TarListingThread();
protected:
void run();
private:
- void processDir( const KTarDirectory *tardir, const QString & root );
+ void processDir( const KTarDirectory *tardir, const TQString & root );
KArchive *m_archive;
- QObject *m_parent;
+ TQObject *m_parent;
};
#endif // TARLISTINGTHREAD_H
diff --git a/ark/zip.cpp b/ark/zip.cpp
index 3538d11..f223016 100644
--- a/ark/zip.cpp
+++ b/ark/zip.cpp
@@ -27,7 +27,7 @@
// Qt includes
-#include <qdir.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -41,7 +41,7 @@
#include "settings.h"
-ZipArch::ZipArch( ArkWidget *_gui, const QString & _fileName )
+ZipArch::ZipArch( ArkWidget *_gui, const TQString & _fileName )
: Arch( _gui, _fileName )
{
m_archiver_program = "zip";
@@ -54,16 +54,16 @@ ZipArch::ZipArch( ArkWidget *_gui, const QString & _fileName )
m_dateCol = 5;
m_numCols = 7;
- m_archCols.append( new ArchColumns( 1, QRegExp( "[0-9]+" ) ) );
- m_archCols.append( new ArchColumns( 2, QRegExp( "[^\\s]+" ) ) );
- m_archCols.append( new ArchColumns( 3, QRegExp( "[0-9]+" ) ) );
- m_archCols.append( new ArchColumns( 4, QRegExp( "[0-9.]+%" ) ) );
- m_archCols.append( new ArchColumns( 7, QRegExp( "[01][0-9]" ), 2 ) );
- m_archCols.append( new ArchColumns( 8, QRegExp( "[0-3][0-9]" ), 2 ) );
- m_archCols.append( new ArchColumns( 9, QRegExp( "[0-9][0-9]" ), 2 ) );
- m_archCols.append( new ArchColumns( 10, QRegExp( "[0-9:]+" ), 6 ) );
- m_archCols.append( new ArchColumns( 6, QRegExp( "[a-fA-F0-9]+ {2}" ) ) );
- m_archCols.append( new ArchColumns( 0, QRegExp( "[^\\n]+" ), 4096 ) );
+ m_archCols.append( new ArchColumns( 1, TQRegExp( "[0-9]+" ) ) );
+ m_archCols.append( new ArchColumns( 2, TQRegExp( "[^\\s]+" ) ) );
+ m_archCols.append( new ArchColumns( 3, TQRegExp( "[0-9]+" ) ) );
+ m_archCols.append( new ArchColumns( 4, TQRegExp( "[0-9.]+%" ) ) );
+ m_archCols.append( new ArchColumns( 7, TQRegExp( "[01][0-9]" ), 2 ) );
+ m_archCols.append( new ArchColumns( 8, TQRegExp( "[0-3][0-9]" ), 2 ) );
+ m_archCols.append( new ArchColumns( 9, TQRegExp( "[0-9][0-9]" ), 2 ) );
+ m_archCols.append( new ArchColumns( 10, TQRegExp( "[0-9:]+" ), 6 ) );
+ m_archCols.append( new ArchColumns( 6, TQRegExp( "[a-fA-F0-9]+ {2}" ) ) );
+ m_archCols.append( new ArchColumns( 0, TQRegExp( "[^\\n]+" ), 4096 ) );
}
@@ -93,17 +93,17 @@ void ZipArch::open()
*kp << m_unarchiver_program << "-v" << m_filename;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotOpenExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotOpenExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
@@ -114,7 +114,7 @@ void ZipArch::create()
Arch::Extract | Arch::Delete | Arch::Add | Arch::View );
}
-void ZipArch::addDir( const QString & _dirName )
+void ZipArch::addDir( const TQString & _dirName )
{
if ( !_dirName.isEmpty() )
{
@@ -122,14 +122,14 @@ void ZipArch::addDir( const QString & _dirName )
// must be true for add directory - otherwise why would user try?
ArkSettings::setRarRecurseSubdirs( true );
- QStringList list;
+ TQStringList list;
list.append( _dirName );
addFile( list );
ArkSettings::setRarRecurseSubdirs( bOldRecVal ); // reset to old val
}
}
-void ZipArch::addFile( const QStringList &urls )
+void ZipArch::addFile( const TQStringList &urls )
{
KProcess *kp = m_currentProcess = new KProcess;
kp->clearArguments();
@@ -156,21 +156,21 @@ void ZipArch::addFile( const QStringList &urls )
*kp << m_filename;
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
KURL url( urls.first() );
- QDir::setCurrent( url.directory() );
+ TQDir::setCurrent( url.directory() );
for ( iter = urls.begin(); iter != urls.end(); ++iter )
{
KURL fileURL( *iter );
*kp << fileURL.fileName();
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotAddExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotAddExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -214,7 +214,7 @@ void ZipArch::unarchFileInternal()
// and we then extract everything in the archive.
if ( m_fileList )
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = m_fileList->begin(); it != m_fileList->end(); ++it )
{
@@ -224,12 +224,12 @@ void ZipArch::unarchFileInternal()
*kp << "-d" << m_destDir;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotExtractExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotExtractExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -243,7 +243,7 @@ bool ZipArch::passwordRequired()
return m_lastShellOutput.findRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.findRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n");
}
-void ZipArch::remove( QStringList *list )
+void ZipArch::remove( TQStringList *list )
{
if ( !list )
return;
@@ -253,19 +253,19 @@ void ZipArch::remove( QStringList *list )
*kp << m_archiver_program << "-d" << m_filename;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list->begin(); it != list->end(); ++it )
{
- QString str = *it;
+ TQString str = *it;
*kp << str;
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotDeleteExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotDeleteExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
diff --git a/ark/zip.h b/ark/zip.h
index 721d734..6fcb7e3 100644
--- a/ark/zip.h
+++ b/ark/zip.h
@@ -39,16 +39,16 @@ class ZipArch : public Arch
{
Q_OBJECT
public:
- ZipArch( ArkWidget *_gui, const QString & _fileName );
+ ZipArch( ArkWidget *_gui, const TQString & _fileName );
virtual ~ZipArch() { }
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
- virtual void remove( QStringList * );
+ virtual void remove( TQStringList * );
virtual void unarchFileInternal();
virtual bool passwordRequired();
private:
diff --git a/ark/zoo.cpp b/ark/zoo.cpp
index 9116ea5..8896251 100644
--- a/ark/zoo.cpp
+++ b/ark/zoo.cpp
@@ -32,8 +32,8 @@
#include <string.h>
// QT includes
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -49,9 +49,9 @@
#include "arkutils.h"
#include "filelistview.h"
-static QString fixTime( const QString &_strTime );
+static TQString fixTime( const TQString &_strTime );
-ZooArch::ZooArch( ArkWidget *gui, const QString & fileName )
+ZooArch::ZooArch( ArkWidget *gui, const TQString & fileName )
: Arch( gui, fileName )
{
m_archiver_program = m_unarchiver_program = "zoo";
@@ -61,7 +61,7 @@ ZooArch::ZooArch( ArkWidget *gui, const QString & fileName )
m_headerString = "----";
}
-bool ZooArch::processLine( const QCString &line )
+bool ZooArch::processLine( const TQCString &line )
{
const char *_line = ( const char * )line;
char columns[11][80];
@@ -74,9 +74,9 @@ bool ZooArch::processLine( const QCString &line )
columns[1], columns[0], columns[2], columns[3], columns[7],
columns[8], columns[9], columns[4], columns[10], filename );
- QString year = ArkUtils::fixYear( columns[8] );
+ TQString year = ArkUtils::fixYear( columns[8] );
- QString strDate;
+ TQString strDate;
strDate.sprintf( "%s-%.2d-%.2d", year.utf8().data(),
ArkUtils::getMonth( columns[7] ), atoi( columns[3] ) );
@@ -86,12 +86,12 @@ bool ZooArch::processLine( const QCString &line )
strlcat( columns[3], " ", sizeof( columns[3] ) );
strlcat( columns[3], fixTime( columns[4] ).ascii(), sizeof( columns[3] ) );
- QStringList list;
- list.append( QFile::decodeName( filename ) );
+ TQStringList list;
+ list.append( TQFile::decodeName( filename ) );
for ( int i=0; i<4; i++ )
{
- list.append( QString::fromLocal8Bit( columns[i] ) );
+ list.append( TQString::fromLocal8Bit( columns[i] ) );
}
m_gui->fileList()->addItem( list ); // send to GUI
@@ -110,17 +110,17 @@ void ZooArch::open()
KProcess *kp = m_currentProcess = new KProcess;
*kp << m_archiver_program << "l" << m_filename;
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotOpenExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedTOC(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotOpenExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
- emit sigOpen( this, false, QString::null, 0 );
+ emit sigOpen( this, false, TQString::null, 0 );
}
}
@@ -143,17 +143,17 @@ void ZooArch::create()
Arch::Extract | Arch::Delete | Arch::Add | Arch::View);
}
-void ZooArch::addDir( const QString & _dirName )
+void ZooArch::addDir( const TQString & _dirName )
{
if ( ! _dirName.isEmpty() )
{
- QStringList list;
+ TQStringList list;
list.append( _dirName );
addFile( list );
}
}
-void ZooArch::addFile( const QStringList &urls )
+void ZooArch::addFile( const TQStringList &urls )
{
KProcess *kp = m_currentProcess = new KProcess;
kp->clearArguments();
@@ -167,9 +167,9 @@ void ZooArch::addFile( const QStringList &urls )
*kp << m_filename;
KURL url( urls.first() );
- QDir::setCurrent( url.directory() );
+ TQDir::setCurrent( url.directory() );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
for ( iter = urls.begin(); iter != urls.end(); ++iter )
{
@@ -177,12 +177,12 @@ void ZooArch::addFile( const QStringList &urls )
*kp << fileURL.fileName();
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotAddExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotAddExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -205,7 +205,7 @@ void ZooArch::unarchFileInternal()
// zoo has no option to specify the destination directory
// so we have to change to it.
- bool ret = QDir::setCurrent( m_destDir );
+ bool ret = TQDir::setCurrent( m_destDir );
// We already checked the validity of the dir before coming here
Q_ASSERT(ret);
@@ -229,19 +229,19 @@ void ZooArch::unarchFileInternal()
// and we then extract everything in the archive.
if (m_fileList)
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = m_fileList->begin(); it != m_fileList->end(); ++it )
{
*kp << (*it);
}
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotExtractExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotExtractExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -250,7 +250,7 @@ void ZooArch::unarchFileInternal()
}
}
-void ZooArch::remove( QStringList *list )
+void ZooArch::remove( TQStringList *list )
{
if (!list)
return;
@@ -260,19 +260,19 @@ void ZooArch::remove( QStringList *list )
*kp << m_archiver_program << "D" << m_filename;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list->begin(); it != list->end(); ++it )
{
- QString str = *it;
+ TQString str = *it;
*kp << str;
}
- connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
- SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
- connect( kp, SIGNAL( processExited(KProcess*) ),
- SLOT( slotDeleteExited(KProcess*) ) );
+ connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, TQT_SIGNAL( processExited(KProcess*) ),
+ TQT_SLOT( slotDeleteExited(KProcess*) ) );
if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -281,17 +281,17 @@ void ZooArch::remove( QStringList *list )
}
}
-QString fixTime( const QString &_strTime )
+TQString fixTime( const TQString &_strTime )
{
// it may have come from a different time zone... get rid of trailing
// +3 or -3 etc.
- QString strTime = _strTime;
+ TQString strTime = _strTime;
if ( strTime.contains("+") || strTime.contains("-") )
{
- QCharRef c = strTime.at( 8 );
+ TQCharRef c = strTime.at( 8 );
int offset = strTime.right( strTime.length() - 9 ).toInt();
- QString strHour = strTime.left( 2 );
+ TQString strHour = strTime.left( 2 );
int nHour = strHour.toInt();
if ( c == '+' || c == '-' )
{
diff --git a/ark/zoo.h b/ark/zoo.h
index 0e83ce1..7083c8b 100644
--- a/ark/zoo.h
+++ b/ark/zoo.h
@@ -37,20 +37,20 @@ class ZooArch : public Arch
{
Q_OBJECT
public:
- ZooArch( ArkWidget *, const QString & );
+ ZooArch( ArkWidget *, const TQString & );
virtual ~ZooArch() { }
virtual void open();
virtual void create();
- virtual void addFile( const QStringList & );
- virtual void addDir( const QString & );
+ virtual void addFile( const TQStringList & );
+ virtual void addDir( const TQString & );
- virtual void remove( QStringList * );
+ virtual void remove( TQStringList * );
virtual void unarchFileInternal();
protected slots:
- virtual bool processLine( const QCString &line );
+ virtual bool processLine( const TQCString &line );
private:
void setHeaders();