aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/file/libkvifile.cpp
diff options
context:
space:
mode:
authorGravatar Noldor2008-05-18 15:59:39 +0000
committerGravatar Noldor2008-05-18 15:59:39 +0000
commit2132166a29f9cf9d773b76cc9c8ce77df419c1bd (patch)
treee1b6653fc701eb58f3488394607d1169a6219af6 /src/modules/file/libkvifile.cpp
parentfixed (maybe) mdi window title (diff)
downloadKVIrc-2132166a29f9cf9d773b76cc9c8ce77df419c1bd.tar.gz
KVIrc-2132166a29f9cf9d773b76cc9c8ce77df419c1bd.tar.bz2
KVIrc-2132166a29f9cf9d773b76cc9c8ce77df419c1bd.zip
more QT4 port
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1817 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/file/libkvifile.cpp')
-rw-r--r--src/modules/file/libkvifile.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp
index 617c089bf..9169d8d02 100644
--- a/src/modules/file/libkvifile.cpp
+++ b/src/modules/file/libkvifile.cpp
@@ -112,8 +112,10 @@ static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_END(c)
KviFileUtils::adjustFilePath(szDst);
- QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst);
- if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end())
+ //QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst);
+ int index=KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).indexOf(szDst);
+ //if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end())
+ if (index==-1)
KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).append(szDst);
return true;
}
@@ -145,9 +147,11 @@ static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_END(c)
KviFileUtils::adjustFilePath(szDst);
- QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst);
- if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end())
- KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).remove(szDst);
+ //QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).find(szDst);
+ int index=KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).indexOf(szDst);
+ //if(it == KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).end())
+ if(index!=-1)
+ KVI_OPTION_STRINGLIST(KviOption_stringlistImageSearchPaths).removeAt(index);
return true;
}
@@ -650,7 +654,7 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c)
}
QStringList sl;
- if(!szFilter.isEmpty())sl = d.entryList(szFilter,iFlags,iSort);
+ if(!szFilter.isEmpty())sl = d.entryList(QStringList(szFilter),iFlags,iSort);
else sl = d.entryList(iFlags,iSort);
KviKvsArray * a = new KviKvsArray();
@@ -898,7 +902,7 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c)
KviFileUtils::adjustFilePath(szFile);
KviFile f(szFile);
- int iFlags = IO_WriteOnly;
+ int iFlags = QIODevice::WriteOnly;
if(!f.openForWriting(c->switches()->find('a',"append")))
{