diff options
Diffstat (limited to 'ark/zip.cpp')
-rw-r--r-- | ark/zip.cpp | 74 |
1 files changed, 39 insertions, 35 deletions
diff --git a/ark/zip.cpp b/ark/zip.cpp index 392cc5c..598f5fd 100644 --- a/ark/zip.cpp +++ b/ark/zip.cpp @@ -33,7 +33,8 @@ #include <kdebug.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kprocess.h> +#include <tdeprocess.h> +#include <tdeprocio.h> #include <kpassdlg.h> // ark includes @@ -51,7 +52,10 @@ ZipArch::ZipArch( ArkWidget *_gui, const TQString & _fileName ) verifyUncompressUtilityIsAvailable( m_unarchiver_program ); m_headerString = "----"; - m_repairYear = 9; m_fixMonth = 7; m_fixDay = 8; m_fixTime = 10; + m_fixYear = 7; + m_fixMonth = 8; + m_fixDay = 9; + m_fixTime = 10; m_dateCol = 5; m_numCols = 7; @@ -59,9 +63,9 @@ ZipArch::ZipArch( ArkWidget *_gui, const TQString & _fileName ) 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( 7, TQRegExp( "[0-9]{4}" ), 4 ) ); + m_archCols.append( new ArchColumns( 8, TQRegExp( "[01][0-9]" ), 2 ) ); + m_archCols.append( new ArchColumns( 9, TQRegExp( "[0-3][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 ) ); @@ -94,12 +98,12 @@ void ZipArch::open() *kp << m_unarchiver_program << "-v" << m_filename; - connect( kp, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedTOC(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( processExited(TDEProcess*) ), - TQT_SLOT( slotOpenExited(TDEProcess*) ) ); + connect( kp, TQ_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedTOC(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( processExited(TDEProcess*) ), + TQ_SLOT( slotOpenExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { @@ -172,12 +176,12 @@ void ZipArch::addFile( const TQStringList &urls ) *kp << fileURL.fileName(); } - connect( kp, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( processExited(TDEProcess*) ), - TQT_SLOT( slotAddExited(TDEProcess*) ) ); + connect( kp, TQ_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( processExited(TDEProcess*) ), + TQ_SLOT( slotAddExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { @@ -231,12 +235,12 @@ void ZipArch::unarchFileInternal() *kp << "-d" << m_destDir; - connect( kp, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( processExited(TDEProcess*) ), - TQT_SLOT( slotExtractExited(TDEProcess*) ) ); + connect( kp, TQ_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( processExited(TDEProcess*) ), + TQ_SLOT( slotExtractExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { @@ -268,12 +272,12 @@ void ZipArch::remove( TQStringList *list ) *kp << str; } - connect( kp, TQT_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), - TQT_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, TQT_SIGNAL( processExited(TDEProcess*) ), - TQT_SLOT( slotDeleteExited(TDEProcess*) ) ); + connect( kp, TQ_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( processExited(TDEProcess*) ), + TQ_SLOT( slotDeleteExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { @@ -296,12 +300,12 @@ void ZipArch::test() *kp << m_filename; - connect( kp, SIGNAL( receivedStdout(TDEProcess*, char*, int) ), - SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, SIGNAL( receivedStderr(TDEProcess*, char*, int) ), - SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); - connect( kp, SIGNAL( processExited(TDEProcess*) ), - SLOT( slotTestExited(TDEProcess*) ) ); + connect( kp, TQ_SIGNAL( receivedStdout(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( receivedStderr(TDEProcess*, char*, int) ), + TQ_SLOT( slotReceivedOutput(TDEProcess*, char*, int) ) ); + connect( kp, TQ_SIGNAL( processExited(TDEProcess*) ), + TQ_SLOT( slotTestExited(TDEProcess*) ) ); if ( !kp->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) { |