diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 72aaee9802d447ee21340b011856b9b355a58f1a (patch) | |
tree | f97a68e4f75e6c25c8492e03fdfe6983fb0aa199 /src/modules/file | |
parent | 5d03948cd3558c613fae1fad109635f860babcbb (diff) | |
download | kvirc-72aaee9802d447ee21340b011856b9b355a58f1a.tar.gz kvirc-72aaee9802d447ee21340b011856b9b355a58f1a.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/file')
-rw-r--r-- | src/modules/file/libkvifile.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp index 264423ff..14ddad5b 100644 --- a/src/modules/file/libkvifile.cpp +++ b/src/modules/file/libkvifile.cpp @@ -73,7 +73,7 @@ static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szSrc); KviFileUtils::adjustFilePath(szDst); - if(KviFileUtils::fileExists(szDst) && !c->switches()->tqfind('o',"overwrite")) + if(KviFileUtils::fileExists(szDst) && !c->switches()->find('o',"overwrite")) { c->warning(__tr2qs("Destinaion file exists: no copy made")); return true; @@ -113,7 +113,7 @@ static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDst); - TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).tqfind(szDst); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst); if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end()) KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).append(szDst); return true; @@ -146,7 +146,7 @@ static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) KVSM_PARAMETERS_END(c) KviFileUtils::adjustFilePath(szDst); - TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).tqfind(szDst); + TQStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst); if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end()) KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).remove(szDst); return true; @@ -194,10 +194,10 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) KviFileUtils::adjustFilePath(szFileName); bool bRet; - if(c->switches()->tqfind('l',"local-8-bit")) - bRet = KviFileUtils::writeFileLocal8Bit(szFileName,szData,c->switches()->tqfind('a',"append")); + if(c->switches()->find('l',"local-8-bit")) + bRet = KviFileUtils::writeFileLocal8Bit(szFileName,szData,c->switches()->find('a',"append")); else - bRet = KviFileUtils::writeFile(szFileName,szData,c->switches()->tqfind('a',"append")); + bRet = KviFileUtils::writeFile(szFileName,szData,c->switches()->find('a',"append")); if(!bRet) c->warning(__tr2qs("Failed to write to file %Q: the destination couldn't be opened"),&szFileName); @@ -318,7 +318,7 @@ static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) KviFileUtils::adjustFilePath(szName); if(!KviFileUtils::removeFile(szName)) { - if(!c->switches()->tqfind('q',"quiet")) + if(!c->switches()->find('q',"quiet")) c->warning(__tr2qs("Failed to remove the file %Q"),&szName); } return true; @@ -361,7 +361,7 @@ static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) KviFileUtils::adjustFilePath(szName); if(!KviFileUtils::removeDir(szName)) { - if(!c->switches()->tqfind('q',"quiet")) + if(!c->switches()->find('q',"quiet")) c->warning(__tr2qs("Failed to remove the directory %Q"),&szName); } return true; @@ -636,14 +636,14 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) #endif if(szFlags.isEmpty())iFlags = TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable | TQDir::Executable | TQDir::Hidden | TQDir::System; else { - 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; + if(szFlags.find('d',false) != -1)iFlags |= TQDir::Dirs; + if(szFlags.find('f',false) != -1)iFlags |= TQDir::Files; + if(szFlags.find('l',false) == -1)iFlags |= TQDir::NoSymLinks; + if(szFlags.find('r',false) != -1)iFlags |= TQDir::Readable; + if(szFlags.find('w',false) != -1)iFlags |= TQDir::Writable; + if(szFlags.find('x',false) != -1)iFlags |= TQDir::Executable; + if(szFlags.find('h',false) != -1)iFlags |= TQDir::Hidden; + if(szFlags.find('s',false) != -1)iFlags |= TQDir::System; } #ifdef COMPILE_USE_QT4 TQFlags<TQDir::SortFlag> iSort = 0; @@ -652,12 +652,12 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) #endif if(szFlags.isEmpty())iSort = TQDir::Unsorted; else { - 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; + if(szFlags.find('n',false) != -1)iSort |= TQDir::Name; + if(szFlags.find('t',false) != -1)iSort |= TQDir::Time; + if(szFlags.find('b',false) != -1)iSort |= TQDir::Size; + if(szFlags.find('z',false) != -1)iSort |= TQDir::DirsFirst; + if(szFlags.find('k',false) != -1)iSort |= TQDir::Reversed; + if(szFlags.find('i',false) != -1)iSort |= TQDir::IgnoreCase; } TQStringList sl; @@ -759,7 +759,7 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) buf[uReaded] = '\0'; - if(szFlags.tqfind('l',false) == -1) + if(szFlags.find('l',false) == -1) c->returnValue()->setString(TQString::fromUtf8(buf)); else c->returnValue()->setString(TQString::fromLocal8Bit(buf)); @@ -828,7 +828,7 @@ 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.tqfind('l',0,false) != -1; + bool bLocal8Bit = szFlags.find('l',0,false) != -1; KviKvsArray * a = new KviKvsArray(); @@ -914,16 +914,16 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) KviFile f(szFile); int iFlags = IO_WriteOnly; - if(!f.openForWriting(c->switches()->tqfind('a',"append"))) + if(!f.openForWriting(c->switches()->find('a',"append"))) { - if(!c->switches()->tqfind('q',"quiet")) + if(!c->switches()->find('q',"quiet")) c->warning(__tr2qs("Can't open the file \"%Q\" for writing"),&szFile); return true; } - bool bLocal8Bit = c->switches()->tqfind('l',"local-8-bit"); - bool bNoSeparator = c->switches()->tqfind('n',"no-separator"); - bool bAddCR = c->switches()->tqfind('c',"crlf"); + bool bLocal8Bit = c->switches()->find('l',"local-8-bit"); + bool bNoSeparator = c->switches()->find('n',"no-separator"); + bool bAddCR = c->switches()->find('c',"crlf"); unsigned int u = 0; while(u < a.array()->size()) @@ -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 tqcontains + The KVIrc local data directory is always writeable and contains 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 @@ -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 tqcontains + The KVIrc local data directory is always readable but usually not writeable and contains 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 |