summaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects/class_file.cpp')
-rw-r--r--src/modules/objects/class_file.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/modules/objects/class_file.cpp b/src/modules/objects/class_file.cpp
index 3429278e..9e966a6e 100644
--- a/src/modules/objects/class_file.cpp
+++ b/src/modules/objects/class_file.cpp
@@ -20,7 +20,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-//#warning "Add QFILEINFO to this stuff ?"
+//#warning "Add TQFILEINFO to this stuff ?"
#include "class_file.h"
#include "kvi_debug.h"
@@ -28,7 +28,7 @@
#include "kvi_locale.h"
#include "kvi_error.h"
#include "kvi_fileutils.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
// needed for $open()
@@ -41,13 +41,13 @@ const char * const mod_tbl[] = {
"Truncate"
};
#ifdef COMPILE_USE_QT4
-#define IO_RAW QIODevice::Unbuffered
-#define IO_READONLY QIODevice::ReadOnly
-#define IO_WRITEONLY QIODevice::WriteOnly
-#define IO_READWRITE QIODevice::ReadWrite
-#define IO_APPEND QIODevice::Append
-#define IO_TRUNCATE QIODevice::Truncate
-//#define IO_TRANSLATE QIODevice::Text
+#define IO_RAW TQIODevice::Unbuffered
+#define IO_READONLY TQIODevice::ReadOnly
+#define IO_WRITEONLY TQIODevice::WriteOnly
+#define IO_READWRITE TQIODevice::ReadWrite
+#define IO_APPEND TQIODevice::Append
+#define IO_TRUNCATE TQIODevice::Truncate
+//#define IO_TRANSLATE TQIODevice::Text
#else
#define IO_RAW IO_Raw
#define IO_READONLY IO_ReadOnly
@@ -57,7 +57,7 @@ const char * const mod_tbl[] = {
#define IO_TRUNCATE IO_Truncate
#endif
#ifdef COMPILE_USE_QT4
-const QIODevice::OpenMode mod_cod[] = {
+const TQIODevice::OpenMode mod_cod[] = {
#else
const int mod_cod[] = {
#endif
@@ -189,7 +189,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_file,"file","object")
KVSO_END_REGISTERCLASS(KviKvsObject_file)
KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_file,KviKvsObject)
- m_pFile = new QFile();
+ m_pFile = new TQFile();
KVSO_END_CONSTRUCTOR(KviKvsObject_file)
KVSO_BEGIN_DESTRUCTOR(KviKvsObject_file)
@@ -201,7 +201,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_file)
bool KviKvsObject_file::functionsetName(KviKvsObjectFunctionCall *c)
{
- QString szName;
+ TQString szName;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file_name",KVS_PT_STRING,0,szName)
KVSO_PARAMETERS_END(c)
@@ -216,7 +216,7 @@ bool KviKvsObject_file::functionname(KviKvsObjectFunctionCall *c)
bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
{
- QStringList modes;
+ TQStringList modes;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("file_mode",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,modes)
KVSO_PARAMETERS_END(c)
@@ -227,7 +227,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
return true;
}
#ifdef COMPILE_USE_QT4
- QIODevice::OpenMode mod,sum;
+ TQIODevice::OpenMode mod,sum;
if (modes.empty()) sum = IO_READONLY; // if no parameters given, default to ReadWrite | Append
else
{
@@ -236,7 +236,7 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
mod = IO_ReadOnly;
for(unsigned int j = 0; j < mod_num; j++)
{
- if(KviQString::equalCI(modes.at(idx), mod_tbl[j]))
+ if(KviTQString::equalCI(modes.at(idx), mod_tbl[j]))
{
mod=mod_cod[j];
break;
@@ -253,13 +253,13 @@ bool KviKvsObject_file::functionopen(KviKvsObjectFunctionCall *c)
if (!modes.first()) sum = IO_READONLY; // if no parameters given, default to ReadWrite | Append
else
{
- for ( QStringList::Iterator it = modes.begin(); it != modes.end(); ++it )
+ for ( TQStringList::Iterator it = modes.begin(); it != modes.end(); ++it )
{
mod = 0;
for(unsigned int j = 0; j < mod_num; j++)
{
- if(KviQString::equalCI((*it), mod_tbl[j]))
+ if(KviTQString::equalCI((*it), mod_tbl[j]))
{
mod=mod_cod[j];
break;
@@ -328,7 +328,7 @@ bool KviKvsObject_file::functionseek(KviKvsObjectFunctionCall *c)
bool KviKvsObject_file::functionputch(KviKvsObjectFunctionCall *c)
{
- QString szChar;
+ TQString szChar;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("char",KVS_PT_STRING,KVS_PF_OPTIONAL,szChar)
KVSO_PARAMETERS_END(c)
@@ -350,14 +350,14 @@ bool KviKvsObject_file::functiongetch(KviKvsObjectFunctionCall *c)
{
int chInt=m_pFile->getch();
if (chInt<0) c->warning(__tr("Read error occured !")); // c->error ?
- QString szChar = QChar(chInt);
+ TQString szChar = TQChar(chInt);
c->returnValue()->setString(szChar);
}
return true;
}
bool KviKvsObject_file::functionunGetch(KviKvsObjectFunctionCall *c)
{
- QString szChar;
+ TQString szChar;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("char",KVS_PT_STRING,0,szChar)
KVSO_PARAMETERS_END(c)
@@ -384,10 +384,10 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c)
else
{
char * buff = new char[uLen + 1];
- m_pFile->flush(); // advice from QFile man page (to avoid trash)
+ m_pFile->flush(); // advice from TQFile man page (to avoid trash)
int rlen = m_pFile->readBlock(buff, uLen);
buff[rlen] = '\0';
- QString szBlock(buff);
+ TQString szBlock(buff);
c->returnValue()->setString(szBlock);
}
return true;
@@ -395,7 +395,7 @@ bool KviKvsObject_file::functionreadBlock(KviKvsObjectFunctionCall *c)
bool KviKvsObject_file::functionwriteBlock(KviKvsObjectFunctionCall *c)
{
- QString szBlock;
+ TQString szBlock;
kvs_uint_t uLen;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("lenght",KVS_PT_UNSIGNEDINTEGER,0,uLen)
@@ -417,7 +417,7 @@ bool KviKvsObject_file::functionreadLine(KviKvsObjectFunctionCall *c)
c->warning(__tr("File is not open !"));
else
{
- QString buffer;
+ TQString buffer;
KviFileUtils::readLine(m_pFile,buffer);
c->returnValue()->setString(buffer);
}
@@ -425,7 +425,7 @@ bool KviKvsObject_file::functionreadLine(KviKvsObjectFunctionCall *c)
}
bool KviKvsObject_file::functionwriteLine(KviKvsObjectFunctionCall *c)
{
- QString szLine;
+ TQString szLine;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text_line",KVS_PT_STRING,0,szLine)
KVSO_PARAMETERS_END(c)
@@ -434,7 +434,7 @@ bool KviKvsObject_file::functionwriteLine(KviKvsObjectFunctionCall *c)
c->warning(__tr("File is not open !"));
else
{
- QTextStream ts(m_pFile);
+ TQTextStream ts(m_pFile);
ts << szLine;
}
return true;