diff options
Diffstat (limited to 'src/modules/file/libkvifile.cpp')
-rw-r--r-- | src/modules/file/libkvifile.cpp | 194 |
1 files changed, 97 insertions, 97 deletions
diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp index 8b8dd9ec..264423ff 100644 --- a/src/modules/file/libkvifile.cpp +++ b/src/modules/file/libkvifile.cpp @@ -32,10 +32,10 @@ #include "kvi_kvs_arraycast.h" -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "kvi_file.h" -#include <qdir.h> -#include <qtextstream.h> +#include <tqdir.h> +#include <tqtextstream.h> /* @doc: file.copy @@ -66,14 +66,14 @@ static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) { - QString szSrc,szDst; + TQString szSrc,szDst; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("source",KVS_PT_NONEMPTYSTRING,0,szSrc) KVSM_PARAMETER("destination",KVS_PT_NONEMPTYSTRING,0,szDst) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szSrc); KviFileUtils::adjustFilePath(szDst); - if(KviFileUtils::fileExists(szDst) && !c->switches()->find('o',"overwrite")) + if(KviFileUtils::fileExists(szDst) && !c->switches()->tqfind('o',"overwrite")) { c->warning(__tr2qs("Destinaion file exists: no copy made")); return true; @@ -107,13 +107,13 @@ static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) { - QString szDst; + TQString szDst; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("path",KVS_PT_NONEMPTYSTRING,0,szDst) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDst); - QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).tqfind(szDst); if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end()) KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).append(szDst); return true; @@ -140,13 +140,13 @@ static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) { - QString szDst; + TQString szDst; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("path",KVS_PT_NONEMPTYSTRING,0,szDst) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDst); - QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).tqfind(szDst); if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end()) KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).remove(szDst); return true; @@ -186,7 +186,7 @@ static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) { - QString szFileName,szData; + TQString szFileName,szData; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFileName) KVSM_PARAMETER("data",KVS_PT_NONEMPTYSTRING,0,szData) @@ -194,10 +194,10 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) KviFileUtils::adjustFilePath(szFileName); bool bRet; - if(c->switches()->find('l',"local-8-bit")) - bRet = KviFileUtils::writeFileLocal8Bit(szFileName,szData,c->switches()->find('a',"append")); + if(c->switches()->tqfind('l',"local-8-bit")) + bRet = KviFileUtils::writeFileLocal8Bit(szFileName,szData,c->switches()->tqfind('a',"append")); else - bRet = KviFileUtils::writeFile(szFileName,szData,c->switches()->find('a',"append")); + bRet = KviFileUtils::writeFile(szFileName,szData,c->switches()->tqfind('a',"append")); if(!bRet) c->warning(__tr2qs("Failed to write to file %Q: the destination couldn't be opened"),&szFileName); @@ -231,7 +231,7 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_rename(KviKvsModuleCommandCall * c) { - QString szOld,szNew; + TQString szOld,szNew; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("oldname",KVS_PT_NONEMPTYSTRING,0,szOld) KVSM_PARAMETER("newname",KVS_PT_NONEMPTYSTRING,0,szNew) @@ -272,7 +272,7 @@ static bool file_kvs_cmd_rename(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) { - QString szDir; + TQString szDir; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("directory",KVS_PT_NONEMPTYSTRING,0,szDir) KVSM_PARAMETERS_END(c) @@ -311,14 +311,14 @@ static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); if(!KviFileUtils::removeFile(szName)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Failed to remove the file %Q"),&szName); } return true; @@ -354,14 +354,14 @@ static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); if(!KviFileUtils::removeDir(szName)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Failed to remove the directory %Q"),&szName); } return true; @@ -385,12 +385,12 @@ static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFileInfo f(szName); + TQFileInfo f(szName); c->returnValue()->setBoolean(f.exists()); return true; } @@ -414,12 +414,12 @@ static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFileInfo f(szName); + TQFileInfo f(szName); if(f.isFile())c->returnValue()->setString("f"); else if(f.isDir())c->returnValue()->setString("d"); else if(f.isSymLink())c->returnValue()->setString("l"); @@ -445,12 +445,12 @@ static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFileInfo f(szName); + TQFileInfo f(szName); c->returnValue()->setInteger(f.size()); return true; } @@ -470,31 +470,31 @@ static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) { - QString szDir; + TQString szDir; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("directory",KVS_PT_NONEMPTYSTRING,0,szDir) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDir); - QDir d(szDir); + TQDir d(szDir); if(!d.exists()) { c->warning(__tr2qs("The specified directory does not exist '%Q'"),&szDir); return true; } - QStringList sl; - sl = d.entryList(QDir::Files); + TQStringList sl; + sl = d.entryList(TQDir::Files); KviKvsArray * a = new KviKvsArray(); - QString szFile; + TQString szFile; if(!sl.isEmpty()) { int idx = 0; - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { szFile=szDir+(*it); - QFileInfo f(szFile); + TQFileInfo f(szFile); a->set(idx,new KviKvsVariant((kvs_int_t)f.size())); idx++; } @@ -534,7 +534,7 @@ static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -563,7 +563,7 @@ static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) { - c->returnValue()->setString(QString(QChar(KVI_PATH_SEPARATOR_CHAR))); + c->returnValue()->setString(TQString(TQChar(KVI_PATH_SEPARATOR_CHAR))); return true; } @@ -613,7 +613,7 @@ static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) { - QString szDir,szFlags,szFilter; + TQString szDir,szFlags,szFilter; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("directory",KVS_PT_NONEMPTYSTRING,0,szDir) KVSM_PARAMETER("flags",KVS_PT_STRING,KVS_PF_OPTIONAL,szFlags) @@ -622,7 +622,7 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) KviFileUtils::adjustFilePath(szDir); - QDir d(szDir); + TQDir d(szDir); if(!d.exists()) { c->warning(__tr2qs("The specified directory does not exist '%Q'"),&szDir); @@ -630,37 +630,37 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) } #ifdef COMPILE_USE_QT4 - QFlags<QDir::Filter> iFlags = 0; + TQFlags<TQDir::Filter> iFlags = 0; #else int iFlags = 0; #endif - if(szFlags.isEmpty())iFlags = QDir::Dirs | QDir::Files | QDir::NoSymLinks | QDir::Readable | QDir::Writable | QDir::Executable | QDir::Hidden | QDir::System; + if(szFlags.isEmpty())iFlags = TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable | TQDir::Executable | TQDir::Hidden | TQDir::System; else { - if(szFlags.find('d',false) != -1)iFlags |= QDir::Dirs; - if(szFlags.find('f',false) != -1)iFlags |= QDir::Files; - if(szFlags.find('l',false) == -1)iFlags |= QDir::NoSymLinks; - if(szFlags.find('r',false) != -1)iFlags |= QDir::Readable; - if(szFlags.find('w',false) != -1)iFlags |= QDir::Writable; - if(szFlags.find('x',false) != -1)iFlags |= QDir::Executable; - if(szFlags.find('h',false) != -1)iFlags |= QDir::Hidden; - if(szFlags.find('s',false) != -1)iFlags |= QDir::System; + if(szFlags.tqfind('d',false) != -1)iFlags |= TQDir::Dirs; + if(szFlags.tqfind('f',false) != -1)iFlags |= TQDir::Files; + if(szFlags.tqfind('l',false) == -1)iFlags |= TQDir::NoSymLinks; + if(szFlags.tqfind('r',false) != -1)iFlags |= TQDir::Readable; + if(szFlags.tqfind('w',false) != -1)iFlags |= TQDir::Writable; + if(szFlags.tqfind('x',false) != -1)iFlags |= TQDir::Executable; + if(szFlags.tqfind('h',false) != -1)iFlags |= TQDir::Hidden; + if(szFlags.tqfind('s',false) != -1)iFlags |= TQDir::System; } #ifdef COMPILE_USE_QT4 - QFlags<QDir::SortFlag> iSort = 0; + TQFlags<TQDir::SortFlag> iSort = 0; #else int iSort = 0; #endif - if(szFlags.isEmpty())iSort = QDir::Unsorted; + if(szFlags.isEmpty())iSort = TQDir::Unsorted; else { - if(szFlags.find('n',false) != -1)iSort |= QDir::Name; - if(szFlags.find('t',false) != -1)iSort |= QDir::Time; - if(szFlags.find('b',false) != -1)iSort |= QDir::Size; - if(szFlags.find('z',false) != -1)iSort |= QDir::DirsFirst; - if(szFlags.find('k',false) != -1)iSort |= QDir::Reversed; - if(szFlags.find('i',false) != -1)iSort |= QDir::IgnoreCase; + if(szFlags.tqfind('n',false) != -1)iSort |= TQDir::Name; + if(szFlags.tqfind('t',false) != -1)iSort |= TQDir::Time; + if(szFlags.tqfind('b',false) != -1)iSort |= TQDir::Size; + if(szFlags.tqfind('z',false) != -1)iSort |= TQDir::DirsFirst; + if(szFlags.tqfind('k',false) != -1)iSort |= TQDir::Reversed; + if(szFlags.tqfind('i',false) != -1)iSort |= TQDir::IgnoreCase; } - QStringList sl; + TQStringList sl; if(!szFilter.isEmpty())sl = d.entryList(szFilter,iFlags,iSort); else sl = d.entryList(iFlags,iSort); @@ -668,7 +668,7 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) if(!sl.isEmpty()) { int idx = 0; - for(QStringList::Iterator it = sl.begin();it != sl.end();++it) + for(TQStringList::Iterator it = sl.begin();it != sl.end();++it) { a->set(idx,new KviKvsVariant(*it)); idx++; @@ -714,9 +714,9 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) { - QString szNameZ; + TQString szNameZ; kvs_uint_t uSize; - QString szFlags; + TQString szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szNameZ) KVSM_PARAMETER("size",KVS_PT_UINT,KVS_PF_OPTIONAL,uSize) @@ -724,7 +724,7 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szNameZ); - QFile f(szNameZ); + TQFile f(szNameZ); if(!f.open(IO_ReadOnly)) { c->warning(__tr2qs("Can't open the file \"%Q\" for reading"),&szNameZ); @@ -759,10 +759,10 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) buf[uReaded] = '\0'; - if(szFlags.find('l',false) == -1) - c->returnValue()->setString(QString::fromUtf8(buf)); + if(szFlags.tqfind('l',false) == -1) + c->returnValue()->setString(TQString::fromUtf8(buf)); else - c->returnValue()->setString(QString::fromLocal8Bit(buf)); + c->returnValue()->setString(TQString::fromLocal8Bit(buf)); kvi_free(buf); @@ -806,8 +806,8 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) { - QString szName; - QString szFlags; + TQString szName; + TQString szFlags; kvs_int_t iStartLine; kvs_int_t iCount; KVSM_PARAMETERS_BEGIN(c) @@ -818,7 +818,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szName); - QFile f(szName); + TQFile f(szName); if(!f.open(IO_ReadOnly)) { c->warning(__tr2qs("Can't open the file \"%Q\" for reading"),&szName); @@ -828,15 +828,15 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) if(c->params()->count() < 2)iStartLine = 0; if(c->params()->count() < 3)iCount = -1; - bool bLocal8Bit = szFlags.find('l',0,false) != -1; + bool bLocal8Bit = szFlags.tqfind('l',0,false) != -1; KviKvsArray * a = new KviKvsArray(); int iIndex=0; - QTextStream stream( &f ); + TQTextStream stream( &f ); - stream.setEncoding(bLocal8Bit ? QTextStream::Locale : QTextStream::UnicodeUTF8); + stream.setEncoding(bLocal8Bit ? TQTextStream::Locale : TQTextStream::UnicodeUTF8); for(int i=0;i<iStartLine;i++) stream.readLine(); @@ -873,7 +873,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) @switches: !sw: -l | --local-8-bit Causes the lines to be saved in local 8 bit character set instead - of the default unicode encoding. + of the default tqunicode encoding. !sw: -a | --append If the file already exists, then the lines are appended to the end instead of overwriting the file. @@ -902,7 +902,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) { - QString szFile,szFlags; + TQString szFile,szFlags; KviKvsArrayCast a; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFile) @@ -914,27 +914,27 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) KviFile f(szFile); int iFlags = IO_WriteOnly; - if(!f.openForWriting(c->switches()->find('a',"append"))) + if(!f.openForWriting(c->switches()->tqfind('a',"append"))) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("Can't open the file \"%Q\" for writing"),&szFile); return true; } - bool bLocal8Bit = c->switches()->find('l',"local-8-bit"); - bool bNoSeparator = c->switches()->find('n',"no-separator"); - bool bAddCR = c->switches()->find('c',"crlf"); + bool bLocal8Bit = c->switches()->tqfind('l',"local-8-bit"); + bool bNoSeparator = c->switches()->tqfind('n',"no-separator"); + bool bAddCR = c->switches()->tqfind('c',"crlf"); unsigned int u = 0; while(u < a.array()->size()) { KviKvsVariant * v = a.array()->at(u); - KviQCString dat; + KviTQCString dat; if(v) { - QString szDat; + TQString szDat; v->asString(szDat); - KviQCString dat = bLocal8Bit ? szDat.local8Bit() : szDat.utf8(); + KviTQCString dat = bLocal8Bit ? szDat.local8Bit() : szDat.utf8(); } if(!bNoSeparator) { @@ -963,7 +963,7 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) <string> $file.localdir([relative_path:string]) @description: Returns the path to the KVIrc local data directory.[br] - The KVIrc local data directory is always writeable and contains + The KVIrc local data directory is always writeable and tqcontains the various subdirectories that KVIrc uses internally: audio , avatars , config , help , incoming , log , modules , msgcolors and pics.[br] If <relative_path> is passed , then it is appended at the end of the directory @@ -980,12 +980,12 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath; + TQString szPath; g_pApp->getLocalKvircDirectory(szPath,KviApp::None,szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1015,13 +1015,13 @@ static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath = QDir::homeDirPath(); - KviQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); + TQString szPath = TQDir::homeDirPath(); + KviTQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); szPath.append(szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1052,13 +1052,13 @@ static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath = QDir::rootDirPath(); - KviQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); + TQString szPath = TQDir::rootDirPath(); + KviTQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); szPath.append(szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1087,13 +1087,13 @@ static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath = QDir::currentDirPath(); - KviQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); + TQString szPath = TQDir::currentDirPath(); + KviTQString::ensureLastCharIs(szPath,KVI_PATH_SEPARATOR_CHAR); szPath.append(szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1114,7 +1114,7 @@ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) $file.globaldir @description: Returns the path to the KVIrc global data directory.[br] - The KVIrc local data directory is always readable but usually not writeable and contains + The KVIrc local data directory is always readable but usually not writeable and tqcontains the various subdirectories that KVIrc uses internally: audio , avatars , config , help , incoming , log , modules , msgcolors and pics.[br] If <relative_path> is passed , then it is appended at the end of the directory @@ -1131,12 +1131,12 @@ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_globaldir(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("relative_path",KVS_PT_STRING,KVS_PF_OPTIONAL,szName) KVSM_PARAMETERS_END(c) if(szName.isEmpty())szName.append(KVI_PATH_SEPARATOR_CHAR); - QString szPath; + TQString szPath; g_pApp->getGlobalKvircDirectory(szPath,KviApp::None,szName); KviFileUtils::adjustFilePath(szPath); c->returnValue()->setString(szPath); @@ -1165,11 +1165,11 @@ static bool file_kvs_fnc_globaldir(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filepath",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) - c->returnValue()->setString(QFileInfo(szName).dirPath(TRUE)); + c->returnValue()->setString(TQFileInfo(szName).dirPath(TRUE)); return true; } @@ -1195,12 +1195,12 @@ static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c) static bool file_kvs_fnc_extractfilename(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filepath",KVS_PT_NONEMPTYSTRING,0,szName) KVSM_PARAMETERS_END(c) KviFileUtils::extractFileName(szName); - KviQString::cutToLast(szName,KVI_PATH_SEPARATOR_CHAR); + KviTQString::cutToLast(szName,KVI_PATH_SEPARATOR_CHAR); c->returnValue()->setString(szName); return true; } |