summaryrefslogtreecommitdiffstats
path: root/src/kvilib/ext/kvi_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/ext/kvi_config.cpp')
-rw-r--r--src/kvilib/ext/kvi_config.cpp266
1 files changed, 133 insertions, 133 deletions
diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp
index eb3dc0bc..c0eb124e 100644
--- a/src/kvilib/ext/kvi_config.cpp
+++ b/src/kvilib/ext/kvi_config.cpp
@@ -34,7 +34,7 @@
#include "kvi_file.h"
-KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit)
+KviConfig::KviConfig(const TQString &filename,FileMode f,bool bLocal8Bit)
{
m_bLocal8Bit = bLocal8Bit;
m_szFileName = filename;
@@ -42,7 +42,7 @@ KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit)
m_szGroup = KVI_CONFIG_DEFAULT_GROUP;
m_bPreserveEmptyGroups = false;
m_bReadOnly = (f == KviConfig::Read);
- m_pDict = new KviPointerHashTable<QString,KviConfigGroup>(17,false);
+ m_pDict = new KviPointerHashTable<TQString,KviConfigGroup>(17,false);
m_pDict->setAutoDelete(true);
if(f != KviConfig::Write)load();
}
@@ -50,12 +50,12 @@ KviConfig::KviConfig(const QString &filename,FileMode f,bool bLocal8Bit)
KviConfig::KviConfig(const char* filename,FileMode f,bool bLocal8Bit)
{
m_bLocal8Bit = bLocal8Bit;
- m_szFileName = QString::fromUtf8(filename);
+ m_szFileName = TQString::fromUtf8(filename);
m_bDirty = false;
m_szGroup = KVI_CONFIG_DEFAULT_GROUP;
m_bPreserveEmptyGroups = false;
m_bReadOnly = (f == KviConfig::Read);
- m_pDict = new KviPointerHashTable<QString,KviConfigGroup>(17,false);
+ m_pDict = new KviPointerHashTable<TQString,KviConfigGroup>(17,false);
m_pDict->setAutoDelete(true);
if(f != KviConfig::Write)load();
}
@@ -70,20 +70,20 @@ KviConfig::~KviConfig()
void KviConfig::clear()
{
delete m_pDict;
- m_pDict = new KviPointerHashTable<QString,KviConfigGroup>(17,false);
+ m_pDict = new KviPointerHashTable<TQString,KviConfigGroup>(17,false);
m_pDict->setAutoDelete(true);
m_bDirty = false;
m_szGroup = KVI_CONFIG_DEFAULT_GROUP;
}
-void KviConfig::clearGroup(const QString & szGroup)
+void KviConfig::clearGroup(const TQString & szGroup)
{
m_bDirty = true;
m_pDict->remove(szGroup);
- if(!m_pDict->find(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one
+ if(!m_pDict->tqfind(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one
}
-void KviConfig::clearKey(const QString & szKey)
+void KviConfig::clearKey(const TQString & szKey)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
@@ -99,13 +99,13 @@ void KviConfig::getContentsString(KviStr &buffer)
buffer.append('\n');
int sections = 0;
int keys = 0;
- KviPointerHashTableIterator<QString,KviStrDict> it(*m_pDict);
+ KviPointerHashTableIterator<TQString,KviStrDict> it(*m_pDict);
while(it.current()){
buffer.append(" Section [");
buffer.append(it.currentKey());
buffer.append("]\n");
int sectionKeys = 0;
- KviPointerHashTableIterator<QString,KviStr> it2(*it.current());
+ KviPointerHashTableIterator<TQString,KviStr> it2(*it.current());
while(it2.current()){
buffer.append(" Key [");
buffer.append(it2.currentKey());
@@ -279,10 +279,10 @@ bool KviConfig::load()
if(!tmp.isEmpty())
{
- QString szGroup = m_bLocal8Bit ?
- QString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
- QString::fromUtf8(tmp.ptr(),tmp.len());
- p_group = m_pDict->find(szGroup);
+ TQString szGroup = m_bLocal8Bit ?
+ TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
+ TQString::fromUtf8(tmp.ptr(),tmp.len());
+ p_group = m_pDict->tqfind(szGroup);
if(!p_group)
{
p_group = new KviConfigGroup(17,false);
@@ -304,17 +304,17 @@ bool KviConfig::load()
tmp.stripRightWhiteSpace(); // No external spaces at all in keys
if(!tmp.isEmpty())
{
- QString szKey = m_bLocal8Bit ?
- QString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
- QString::fromUtf8(tmp.ptr(),tmp.len());
+ TQString szKey = m_bLocal8Bit ?
+ TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
+ TQString::fromUtf8(tmp.ptr(),tmp.len());
z++;
while(*z && ((*z == ' ') || (*z == '\t')))z++;
if(*z)
{
tmp.hexDecode(z);
- QString * pVal = new QString( m_bLocal8Bit ?
- QString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
- QString::fromUtf8(tmp.ptr(),tmp.len())
+ TQString * pVal = new TQString( m_bLocal8Bit ?
+ TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
+ TQString::fromUtf8(tmp.ptr(),tmp.len())
);
if(!p_group)
{
@@ -324,13 +324,13 @@ bool KviConfig::load()
p_group->setAutoDelete(true);
m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group);
}
- p_group->replace(szKey,pVal);
+ p_group->tqreplace(szKey,pVal);
} else {
// we in fact need this (mercy :D)
// otherwise the empty options will be treated as non-existing ones
// and will get the defaults (which is bad)
- QString * pVal = new QString(QString::null);
- p_group->replace(szKey,pVal);
+ TQString * pVal = new TQString(TQString());
+ p_group->tqreplace(szKey,pVal);
}
}
}
@@ -362,7 +362,7 @@ bool KviConfig::load()
bool KviConfig::load()
{
- QFile f(m_szFileName);
+ TQFile f(m_szFileName);
if(!f.open(IO_ReadOnly))return false;
@@ -389,8 +389,8 @@ bool KviConfig::load()
dataLine.hexDecode();
if(dataLine.hasData())
{
- QString szUtf8 = QString::fromUtf8(dataLine.ptr());
- p_group = m_pDict->find(szUtf8);
+ TQString szUtf8 = TQString::fromUtf8(dataLine.ptr());
+ p_group = m_pDict->tqfind(szUtf8);
if(!p_group)
{
@@ -412,7 +412,7 @@ bool KviConfig::load()
dataLine.stripLeftWhiteSpace(); // strip any whitespace added externally
dataLine.hexDecode();
//insert (replace items if needed)
- QString *p_data=new QString(QString::fromUtf8(dataLine.ptr()));
+ TQString *p_data=new TQString(TQString::fromUtf8(dataLine.ptr()));
if(!p_group)
{
// ops...we're missing a group
@@ -421,8 +421,8 @@ bool KviConfig::load()
p_group->setAutoDelete(true);
m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group);
}
- QString szName = QString::fromUtf8(name.ptr());
- p_group->replace(szName,p_data);
+ TQString szName = TQString::fromUtf8(name.ptr());
+ p_group->tqreplace(szName,p_data);
}
}
break;
@@ -497,12 +497,12 @@ bool KviConfig::save()
if(!f.openForWriting())return false;
if(f.writeBlock("# KVIrc configuration file\n",27) != 27)return false;
- KviPointerHashTableIterator<QString,KviConfigGroup> it(*m_pDict);
+ KviPointerHashTableIterator<TQString,KviConfigGroup> it(*m_pDict);
while (it.current())
{
if((it.current()->count() != 0) || (m_bPreserveEmptyGroups))
{
- KviStr group(m_bLocal8Bit ? KviQString::toLocal8Bit(it.currentKey()) : KviQString::toUtf8(it.currentKey()));
+ KviStr group(m_bLocal8Bit ? KviTQString::toLocal8Bit(it.currentKey()) : KviTQString::toUtf8(it.currentKey()));
group.hexEncodeWithTable(encode_table);
if(!f.putChar('['))return false;
@@ -513,10 +513,10 @@ bool KviConfig::save()
KviConfigGroupIterator it2(*dict);
KviStr szName,szValue;
- while(QString * p_str = it2.current())
+ while(TQString * p_str = it2.current())
{
- szName = m_bLocal8Bit ? KviQString::toLocal8Bit(it2.currentKey()) : KviQString::toUtf8(it2.currentKey());
- szValue = m_bLocal8Bit ? KviQString::toLocal8Bit(*p_str) : KviQString::toUtf8(*p_str);
+ szName = m_bLocal8Bit ? KviTQString::toLocal8Bit(it2.currentKey()) : KviTQString::toUtf8(it2.currentKey());
+ szValue = m_bLocal8Bit ? KviTQString::toLocal8Bit(*p_str) : KviTQString::toUtf8(*p_str);
szName.hexEncodeWithTable(encode_table);
szValue.hexEncodeWhiteSpace();
@@ -534,7 +534,7 @@ bool KviConfig::save()
return true;
}
-void KviConfig::setGroup(const QString & szGroup)
+void KviConfig::setGroup(const TQString & szGroup)
{
m_szGroup = szGroup;
if(m_bPreserveEmptyGroups)
@@ -547,21 +547,21 @@ void KviConfig::setGroup(const QString & szGroup)
}
}
-bool KviConfig::hasKey(const QString & szKey)
+bool KviConfig::hasKey(const TQString & szKey)
{
KviConfigGroup * p_group = getCurrentGroup();
- return (p_group->find(szKey) != 0);
+ return (p_group->tqfind(szKey) != 0);
}
-bool KviConfig::hasGroup(const QString & szGroup)
+bool KviConfig::hasGroup(const TQString & szGroup)
{
- return (m_pDict->find(szGroup) != 0);
+ return (m_pDict->tqfind(szGroup) != 0);
}
KviConfigGroup * KviConfig::getCurrentGroup()
{
if(m_szGroup.isEmpty())m_szGroup = KVI_CONFIG_DEFAULT_GROUP;
- KviConfigGroup * p_group = m_pDict->find(m_szGroup);
+ KviConfigGroup * p_group = m_pDict->tqfind(m_szGroup);
if(!p_group)
{
//create the group
@@ -574,20 +574,20 @@ KviConfigGroup * KviConfig::getCurrentGroup()
////////////////////////////////// KviStr
-void KviConfig::writeEntry(const QString & szKey,const QString & szValue)
+void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data=new QString(szValue);
- p_group->replace(szKey,p_data);
+ TQString *p_data=new TQString(szValue);
+ p_group->tqreplace(szKey,p_data);
}
// FIXME: #warning "We have probs here ?"
-QString KviConfig::readEntry(const QString & szKey,const QString & szDefault)
+TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)
{
m_szStrBuffer = szDefault;
@@ -597,72 +597,72 @@ QString KviConfig::readEntry(const QString & szKey,const QString & szDefault)
return m_szStrBuffer;
}
-//////////////////////////////////// QString
+//////////////////////////////////// TQString
/*
-QString KviConfig::readQStringEntry(const char *szKey,const QString &szDefault)
+TQString KviConfig::readTQStringEntry(const char *szKey,const TQString &szDefault)
{
KviStrDict * p_group = getCurrentGroup();
- KviStr * p_str = p_group->find(szKey);
+ KviStr * p_str = p_group->tqfind(szKey);
if(!p_str)return szDefault;
- return QString::fromUtf8(p_str->ptr());
+ return TQString::fromUtf8(p_str->ptr());
}
*/
/*
-void KviConfig::writeEntry(const char *szKey,const QString &szValue)
+void KviConfig::writeEntry(const char *szKey,const TQString &szValue)
{
m_bDirty = true;
KviStrDict * p_group = getCurrentGroup();
- p_group->replace(szKey,new KviStr(szValue.utf8().data()));
+ p_group->tqreplace(szKey,new KviStr(szValue.utf8().data()));
}
*/
-////////////////////////////////// QStringList
+////////////////////////////////// TQStringList
-static QString g_szConfigStringListSeparator(",\\[ITEM],");
+static TQString g_szConfigStringListSeparator(",\\[ITEM],");
-QStringList KviConfig::readStringListEntry(const QString & szKey,const QStringList &list)
+TQStringList KviConfig::readStringListEntry(const TQString & szKey,const TQStringList &list)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return list;
#ifdef COMPILE_USE_QT4
return p_str->split(g_szConfigStringListSeparator);
#else
- return QStringList::split(g_szConfigStringListSeparator,*p_str);
+ return TQStringList::split(g_szConfigStringListSeparator,*p_str);
#endif
}
-void KviConfig::writeEntry(const QString & szKey,const QStringList &list)
+void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data=new QString(list.join(g_szConfigStringListSeparator));
- p_group->replace(szKey,p_data);
+ TQString *p_data=new TQString(list.join(g_szConfigStringListSeparator));
+ p_group->tqreplace(szKey,p_data);
}
////////////////////////////////// KviValueList<int>
-KviValueList<int> KviConfig::readIntListEntry(const QString & szKey,const KviValueList<int> &list)
+KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviValueList<int> &list)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)
{
//debug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1());
return list;
}
#ifdef COMPILE_USE_QT4
- QStringList sl = p_str->split(",");
+ TQStringList sl = p_str->split(",");
#else
- QStringList sl = QStringList::split(",",*p_str);
+ TQStringList sl = TQStringList::split(",",*p_str);
#endif
KviValueList<int> ret;
//debug("Got option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),p_str->latin1());
- for(QStringList::Iterator it = sl.begin();it != sl.end();++it)
+ for(TQStringList::Iterator it = sl.begin();it != sl.end();++it)
{
bool bOk;
int iTmp = (*it).toInt(&bOk);
@@ -673,7 +673,7 @@ KviValueList<int> KviConfig::readIntListEntry(const QString & szKey,const KviVal
}
-void KviConfig::writeEntry(const QString & szKey,const KviValueList<int> &list)
+void KviConfig::writeEntry(const TQString & szKey,const KviValueList<int> &list)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
@@ -685,26 +685,26 @@ void KviConfig::writeEntry(const QString & szKey,const KviValueList<int> &list)
}
//debug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr());
- p_group->replace(szKey,new QString(szData.ptr()));
+ p_group->tqreplace(szKey,new TQString(szData.ptr()));
}
////////////////////////////////// KviPixmap
// FIXME: #warning "Spaces in image names ?"
-void KviConfig::writeEntry(const QString & szKey,const KviPixmap &pixmap)
+void KviConfig::writeEntry(const TQString & szKey,const KviPixmap &pixmap)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data=new QString();
+ TQString *p_data=new TQString();
KviStringConversion::toString(pixmap,*p_data);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-KviPixmap KviConfig::readPixmapEntry(const QString & szKey,const KviPixmap &pixDef)
+KviPixmap KviConfig::readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(p_str)
{
KviPixmap ret("");
@@ -716,40 +716,40 @@ KviPixmap KviConfig::readPixmapEntry(const QString & szKey,const KviPixmap &pixD
////////////////////////////////// KviMsgType
-void KviConfig::writeEntry(const QString & szKey,const KviMsgType &msg)
+void KviConfig::writeEntry(const TQString & szKey,const KviMsgType &msg)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString szData;
+ TQString szData;
KviStringConversion::toString(msg,szData);
- p_group->replace(szKey,new QString(szData));
+ p_group->tqreplace(szKey,new TQString(szData));
}
-KviMsgType KviConfig::readMsgTypeEntry(const QString & szKey,const KviMsgType &msgDef)
+KviMsgType KviConfig::readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return msgDef;
KviMsgType ret = msgDef;
KviStringConversion::fromString(*p_str,ret);
return ret;
}
-////////////////////////////////// QColor
+////////////////////////////////// TQColor
-void KviConfig::writeEntry(const QString & szKey,const QColor &clr)
+void KviConfig::writeEntry(const TQString & szKey,const TQColor &clr)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
KviStr szData(KviStr::Format,"%d,%d,%d",clr.red(),clr.green(),clr.blue());
- p_group->replace(szKey,new QString(szData.ptr()));
+ p_group->tqreplace(szKey,new TQString(szData.ptr()));
}
-QColor KviConfig::readColorEntry(const QString & szKey,const QColor &clr)
+TQColor KviConfig::readColorEntry(const TQString & szKey,const TQColor &clr)
{
KviConfigGroup * p_group = getCurrentGroup();
- QColor color(clr);
- QString * pointer_that_IS_initialized = p_group->find(szKey);
+ TQColor color(clr);
+ TQString * pointer_that_IS_initialized = p_group->tqfind(szKey);
if(pointer_that_IS_initialized)
@@ -778,35 +778,35 @@ QColor KviConfig::readColorEntry(const QString & szKey,const QColor &clr)
return color;
}
-////////////////////////////////// QFont
+////////////////////////////////// TQFont
-void KviConfig::getFontProperties(KviStr & buffer,QFont *fnt)
+void KviConfig::getFontProperties(KviStr & buffer,TQFont *fnt)
{
- QString tmp;
+ TQString tmp;
KviStringConversion::toString(*fnt,tmp);
buffer = tmp;
}
-void KviConfig::writeEntry(const QString & szKey,QFont &fnt)
+void KviConfig::writeEntry(const TQString & szKey,TQFont &fnt)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data = new QString();
+ TQString *p_data = new TQString();
KviStringConversion::toString(fnt,*p_data);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-void KviConfig::setFontProperties(KviStr & str,QFont *fnt)
+void KviConfig::setFontProperties(KviStr & str,TQFont *fnt)
{
KviStringConversion::fromString(str.ptr(),*fnt);
}
-QFont KviConfig::readFontEntry(const QString & szKey,const QFont &fnt)
+TQFont KviConfig::readFontEntry(const TQString & szKey,const TQFont &fnt)
{
- QFont font(fnt);
+ TQFont font(fnt);
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(p_str)
{
//FontEntry=Arial,12,9,0,100,italic,underline,strikeout,
@@ -819,58 +819,58 @@ QFont KviConfig::readFontEntry(const QString & szKey,const QFont &fnt)
////////////////////////////////// bool
-void KviConfig::writeEntry(const QString & szKey,bool bTrue)
+void KviConfig::writeEntry(const TQString & szKey,bool bTrue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data = new QString(bTrue ? "true" : "false");
- p_group->replace(szKey,p_data);
+ TQString *p_data = new TQString(bTrue ? "true" : "false");
+ p_group->tqreplace(szKey,p_data);
}
-bool KviConfig::readBoolEntry(const QString & szKey,bool bTrue)
+bool KviConfig::readBoolEntry(const TQString & szKey,bool bTrue)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return bTrue;
- static QString szTrue = "true";
- return (KviQString::toLower(*p_str) == szTrue);
+ static TQString szTrue = "true";
+ return (KviTQString::toLower(*p_str) == szTrue);
}
-////////////////////////////////// QRect
+////////////////////////////////// TQRect
-void KviConfig::writeEntry(const QString & szKey,const QRect &rct)
+void KviConfig::writeEntry(const TQString & szKey,const TQRect &rct)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString szBuf;
+ TQString szBuf;
KviStringConversion::toString(rct,szBuf);
- p_group->replace(szKey,new QString(szBuf));
+ p_group->tqreplace(szKey,new TQString(szBuf));
}
-QRect KviConfig::readRectEntry(const QString & szKey,const QRect &rct)
+TQRect KviConfig::readRectEntry(const TQString & szKey,const TQRect &rct)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * str = p_group->find(szKey);
+ TQString * str = p_group->tqfind(szKey);
if(!str)return rct;
- QRect ret;
+ TQRect ret;
return KviStringConversion::fromString(*str,ret) ? ret : rct;
}
////////////////////////////////// unsigned short
-void KviConfig::writeEntry(const QString & szKey,unsigned short usValue)
+void KviConfig::writeEntry(const TQString & szKey,unsigned short usValue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data = new QString();
+ TQString *p_data = new TQString();
p_data->setNum(usValue);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-unsigned short int KviConfig::readUShortEntry(const QString & szKey,unsigned short int usDefault)
+unsigned short int KviConfig::readUShortEntry(const TQString & szKey,unsigned short int usDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return usDefault;
bool bOk;
unsigned short int usVal=p_str->toUShort(&bOk);
@@ -887,13 +887,13 @@ void KviConfig::writeEntry(const char *szKey,unsigned long lValue)
KviStrDict * p_group = getCurrentGroup();
KviStr *p_data = new KviStr();
p_data->setNum(lValue);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault)
{
KviStrDict * p_group = getCurrentGroup();
- KviStr * p_str = p_group->find(szKey);
+ KviStr * p_str = p_group->tqfind(szKey);
if(!p_str)return lDefault;
bool bOk;
unsigned long lVal=p_str->toULong(&bOk);
@@ -903,19 +903,19 @@ unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault
////////////////////////////////// int
-void KviConfig::writeEntry(const QString & szKey,int iValue)
+void KviConfig::writeEntry(const TQString & szKey,int iValue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data = new QString();
+ TQString *p_data = new TQString();
p_data->setNum(iValue);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-int KviConfig::readIntEntry(const QString & szKey,int iDefault)
+int KviConfig::readIntEntry(const TQString & szKey,int iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return iDefault;
bool bOk;
int iVal=p_str->toInt(&bOk);
@@ -924,19 +924,19 @@ int KviConfig::readIntEntry(const QString & szKey,int iDefault)
////////////////////////////////// unsigned int
-void KviConfig::writeEntry(const QString & szKey,unsigned int iValue)
+void KviConfig::writeEntry(const TQString & szKey,unsigned int iValue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data = new QString();
+ TQString *p_data = new TQString();
p_data->setNum(iValue);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-unsigned int KviConfig::readUIntEntry(const QString & szKey,unsigned int iDefault)
+unsigned int KviConfig::readUIntEntry(const TQString & szKey,unsigned int iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return iDefault;
bool bOk;
unsigned int iVal=p_str->toUInt(&bOk);
@@ -945,19 +945,19 @@ unsigned int KviConfig::readUIntEntry(const QString & szKey,unsigned int iDefaul
////////////////////////////////// char
-void KviConfig::writeEntry(const QString & szKey,char iValue)
+void KviConfig::writeEntry(const TQString & szKey,char iValue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_data = new QString();
+ TQString * p_data = new TQString();
p_data->setNum(iValue);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-char KviConfig::readCharEntry(const QString & szKey,char iDefault)
+char KviConfig::readCharEntry(const TQString & szKey,char iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return iDefault;
bool bOk;
char iVal=(char)p_str->toInt(&bOk);
@@ -966,19 +966,19 @@ char KviConfig::readCharEntry(const QString & szKey,char iDefault)
////////////////////////////////// unsigned char
-void KviConfig::writeEntry(const QString & szKey,unsigned char iValue)
+void KviConfig::writeEntry(const TQString & szKey,unsigned char iValue)
{
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
- QString *p_data = new QString();
+ TQString *p_data = new TQString();
p_data->setNum(iValue);
- p_group->replace(szKey,p_data);
+ p_group->tqreplace(szKey,p_data);
}
-unsigned char KviConfig::readUCharEntry(const QString & szKey,unsigned char iDefault)
+unsigned char KviConfig::readUCharEntry(const TQString & szKey,unsigned char iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- QString * p_str = p_group->find(szKey);
+ TQString * p_str = p_group->tqfind(szKey);
if(!p_str)return iDefault;
bool bOk;
unsigned char iVal=(unsigned char)p_str->toUInt(&bOk);