diff options
| author | 2008-08-04 16:14:40 +0000 | |
|---|---|---|
| committer | 2008-08-04 16:14:40 +0000 | |
| commit | bb4fcd90315ef77460676935005cdbbde1e55f76 (patch) | |
| tree | 74d3fda8fc99ff3beb2f1c679bde03dc1a7bb145 /src/modules/objects/class_file.cpp | |
| parent | compilation fix (diff) | |
| download | KVIrc-bb4fcd90315ef77460676935005cdbbde1e55f76.tar.gz KVIrc-bb4fcd90315ef77460676935005cdbbde1e55f76.tar.bz2 KVIrc-bb4fcd90315ef77460676935005cdbbde1e55f76.zip | |
more QT4 port (objects module) + vs2005 projects update + some compilation fixes
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2174 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects/class_file.cpp')
| -rw-r--r-- | src/modules/objects/class_file.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/objects/class_file.cpp b/src/modules/objects/class_file.cpp index 4bf98f40c..59196826d 100644 --- a/src/modules/objects/class_file.cpp +++ b/src/modules/objects/class_file.cpp @@ -222,7 +222,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c) { for ( int idx=0;idx<modes.count();idx++) { - mod = IO_ReadOnly; + mod = QIODevice::ReadOnly; for(unsigned int j = 0; j < mod_num; j++) { if(KviQString::equalCI(modes.at(idx), mod_tbl[j])) @@ -231,7 +231,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c) break; } } - if(mod!=IO_ReadOnly) + if(mod!=QIODevice::ReadOnly) sum = sum | mod; else c->warning(__tr2qs("No such open mode: '%Q'"),&modes.at(idx)); @@ -335,7 +335,7 @@ bool KviKvsObject_file::functionunGetch(KviKvsObjectFunctionCall *c) { if (szChar.length()>1) c->warning(__tr2qs("Argument to long, using only first char")); const char *ch=szChar.toUtf8().data(); - if (m_pFile->ungetch(ch[0])<0) c->warning(__tr2qs("An error occured !"));// c->error ? + m_pFile->ungetChar(ch[0]); } return true; } @@ -352,7 +352,7 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c) { char * buff = new char[uLen + 1]; m_pFile->flush(); // advice from QFile man page (to avoid trash) - int rlen = m_pFile->readBlock(buff, uLen); + int rlen = m_pFile->read(buff, uLen); buff[rlen] = '\0'; QString szBlock(buff); c->returnValue()->setString(szBlock); @@ -372,7 +372,7 @@ bool KviKvsObject_file::functionwriteBlock(KviKvsObjectFunctionCall *c) if(!m_pFile->isOpen()) c->warning(__tr("File is not open !")); const char *block=szBlock.toUtf8().data(); - int rlen = m_pFile->writeBlock(block, uLen); + int rlen = m_pFile->write(block, uLen); c->returnValue()->setInteger(rlen); m_pFile->flush(); return true; |
