diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:57:07 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:57:07 -0600 |
commit | 644e85d451b96982107f4e70977f0ff08b91291d (patch) | |
tree | 1d48dc166787231440da12a553a0195177858d8d /krArc | |
parent | 44ec35d6f3ec0bf8067f31896d7721ac3082f66f (diff) | |
download | krusader-644e85d451b96982107f4e70977f0ff08b91291d.tar.gz krusader-644e85d451b96982107f4e70977f0ff08b91291d.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 44ec35d6f3ec0bf8067f31896d7721ac3082f66f.
Diffstat (limited to 'krArc')
-rw-r--r-- | krArc/krarc.cpp | 56 | ||||
-rw-r--r-- | krArc/krarc.h | 2 |
2 files changed, 29 insertions, 29 deletions
diff --git a/krArc/krarc.cpp b/krArc/krarc.cpp index 6ff1ca0..435821e 100644 --- a/krArc/krarc.cpp +++ b/krArc/krarc.cpp @@ -86,7 +86,7 @@ kio_krarcProtocol::kio_krarcProtocol(const TQCString &pool_socket, const TQCStri dirDict.setAutoDelete(true); arcTempDir = locateLocal("tmp",TQString()); - TQString dirName = "krArc"+TQDateTime::currentDateTime().toString(Qt::ISODate); + TQString dirName = "krArc"+TQDateTime::tqcurrentDateTime().toString(Qt::ISODate); dirName.replace(TQRegExp(":"),"_"); TQDir(arcTempDir).mkdir(dirName); arcTempDir = arcTempDir+dirName+"/"; @@ -124,7 +124,7 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){ if( putCmd.isEmpty() ){ error(ERR_UNSUPPORTED_ACTION, - i18n("Creating directories is not supported with %1 archives").arg(arcType) ); + i18n("Creating directories is not supported with %1 archives").tqarg(arcType) ); return; } @@ -154,14 +154,14 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){ // pack the directory KrShellProcess proc; proc << putCmd << convertName( arcFile->url().path() ) + " " << convertFileName( tmpDir.mid(arcTempDir.length()) ); - infoMessage(i18n("Creating %1 ...").arg( url.fileName() ) ); + infoMessage(i18n("Creating %1 ...").tqarg( url.fileName() ) ); TQDir::setCurrent(arcTempDir); proc.start(KProcess::Block,KProcess::AllOutput); // delete the temp directory TQDir().rmdir(arcTempDir); - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) { error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() ); return; } @@ -184,7 +184,7 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool if( putCmd.isEmpty() ){ error(ERR_UNSUPPORTED_ACTION, - i18n("Writing to %1 archives is not supported").arg(arcType) ); + i18n("Writing to %1 archives is not supported").tqarg(arcType) ); return; } if( !overwrite && findFileEntry(url) ){ @@ -225,13 +225,13 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool // pack the file KrShellProcess proc; proc << putCmd << convertName( arcFile->url().path() )+ " " <<convertFileName( tmpFile.mid(arcTempDir.length()) ); - infoMessage(i18n("Packing %1 ...").arg( url.fileName() ) ); + infoMessage(i18n("Packing %1 ...").tqarg( url.fileName() ) ); TQDir::setCurrent(arcTempDir); proc.start(KProcess::Block,KProcess::AllOutput); // remove the file TQFile::remove(tmpFile); - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) { error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() ); return; } @@ -259,7 +259,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){ if( getCmd.isEmpty() ){ error(ERR_UNSUPPORTED_ACTION, - i18n("Retrieving data from %1 archives is not supported").arg(arcType) ); + i18n("Retrieving data from %1 archives is not supported").tqarg(arcType) ); return; } UDSEntry* entry = findFileEntry(url); @@ -317,13 +317,13 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), this,TQT_SLOT(receivedData(KProcess*,char*,int)) ); } - infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) ); + infoMessage(i18n("Unpacking %1 ...").tqarg( url.fileName() ) ); // change the working directory to our arcTempDir TQDir::setCurrent(arcTempDir); proc.start(KProcess::Block,KProcess::AllOutput); if( !extArcReady && !decompressToFile ) { - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || ( arcType != "bzip2" && expectedSize != decompressedLen ) ) { + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) || ( arcType != "bzip2" && expectedSize != decompressedLen ) ) { if( encrypted && tries ) { invalidatePassword(); get( url, tries - 1 ); @@ -334,7 +334,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){ } } else{ - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || !TQFileInfo( arcTempDir+file ).exists() ) { + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) || !TQFileInfo( arcTempDir+file ).exists() ) { if( decompressToFile ) TQFile(arcTempDir+file).remove(); if( encrypted && tries ) { @@ -439,7 +439,7 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){ if( delCmd.isEmpty() ){ error(ERR_UNSUPPORTED_ACTION, - i18n("Deleting files from %1 archives is not supported").arg(arcType) ); + i18n("Deleting files from %1 archives is not supported").tqarg(arcType) ); return; } if( !findFileEntry(url) ){ @@ -455,9 +455,9 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){ } KrShellProcess proc; proc << delCmd << convertName( arcFile->url().path() )+" " << convertFileName( file ); - infoMessage(i18n("Deleting %1 ...").arg( url.fileName() ) ); + infoMessage(i18n("Deleting %1 ...").tqarg( url.fileName() ) ); proc.start(KProcess::Block, KProcess::AllOutput); - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) { error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() ); return; } @@ -479,7 +479,7 @@ void kio_krarcProtocol::stat( const KURL & url ){ if( listCmd.isEmpty() ){ error(ERR_UNSUPPORTED_ACTION, - i18n("Accessing files is not supported with the %1 archives").arg(arcType) ); + i18n("Accessing files is not supported with the %1 archives").tqarg(arcType) ); return; } TQString path = url.path(-1); @@ -551,9 +551,9 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw if( arcType == "ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!! proc << "<" << "/dev/ptmx"; - infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) ); + infoMessage(i18n("Unpacking %1 ...").tqarg( url.fileName() ) ); proc.start(KProcess::Block, KProcess::AllOutput); - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) { error(KIO::ERR_COULD_NOT_WRITE, dest.path(-1) + "\n\n" + proc.getErrorMsg() ); return; } @@ -579,7 +579,7 @@ void kio_krarcProtocol::listDir(const KURL& url){ } if( listCmd.isEmpty() ){ error(ERR_UNSUPPORTED_ACTION, - i18n("Listing directories is not supported for %1 archives").arg(arcType) ); + i18n("Listing directories is not supported for %1 archives").tqarg(arcType) ); return; } TQString path = url.path(); @@ -712,7 +712,7 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){ if( arcType == "ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!! proc << "<" << "/dev/ptmx"; proc.start(KProcess::Block,KProcess::AllOutput); - if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) return false; + if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) return false; } // clear the dir dictionary dirDict.clear(); @@ -983,13 +983,13 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) { if( perm.length() == 7 ) // windows rar permission format { - bool isDir = ( perm.at(1).lower() == 'd' ); - bool isReadOnly = ( perm.at(2).lower() == 'r' ); + bool isDir = ( perm.tqat(1).lower() == 'd' ); + bool isReadOnly = ( perm.tqat(2).lower() == 'r' ); perm = isDir ? "drwxr-xr-x" : "-rw-r--r--"; if( isReadOnly ) - perm.at( 2 ) = '-'; + perm.tqat( 2 ) = '-'; } if(perm.length() != 10) perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ; @@ -1073,7 +1073,7 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) { // date & time int month = (TQStringList::split(',', "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")).findIndex( nextWord(line) ) + 1; int day = nextWord(line).toInt(); - int year = TQDate::currentDate().year(); + int year = TQDate::tqcurrentDate().year(); TQString third = nextWord(line); TQTime qtime; @@ -1141,11 +1141,11 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) { // permissions perm = nextWord(line); - bool isDir = ( perm.at(0).lower() == 'd' ); - bool isReadOnly = ( perm.at(1).lower() == 'r' ); + bool isDir = ( perm.tqat(0).lower() == 'd' ); + bool isReadOnly = ( perm.tqat(1).lower() == 'r' ); perm = isDir ? "drwxr-xr-x" : "-rw-r--r--"; if( isReadOnly ) - perm.at( 2 ) = '-'; + perm.tqat( 2 ) = '-'; mode = parsePermString(perm); @@ -1369,14 +1369,14 @@ bool kio_krarcProtocol::initArcParameters() { if( KStandardDirs::findExe(cmd).isEmpty() ){ error( KIO::ERR_CANNOT_LAUNCH_PROCESS, cmd+ - i18n("\nMake sure that the %1 binary are installed properly on your system.").arg(cmd)); + i18n("\nMake sure that the %1 binary are installed properly on your system.").tqarg(cmd)); KRDEBUG("Failed to find cmd: " << cmd); return false; } return true; } -bool kio_krarcProtocol::checkStatus( int exitCode ) { +bool kio_krarcProtocol::checktqStatus( int exitCode ) { KRDEBUG( exitCode ); if( arcType == "zip" || arcType == "rar" || arcType == "7z" ) diff --git a/krArc/krarc.h b/krArc/krarc.h index 98e4524..9ea56fd 100644 --- a/krArc/krarc.h +++ b/krArc/krarc.h @@ -70,7 +70,7 @@ protected: private: void get(const KURL& url, int tries); /** checks if the exit code is OK. */ - bool checkStatus( int exitCode ); + bool checktqStatus( int exitCode ); /** service function for parseLine. */ TQString nextWord(TQString &s,char d=' '); /** translate permittion string to mode_t. */ |