summaryrefslogtreecommitdiffstats
path: root/src/kvilib/ext/kvi_config.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit72aaee9802d447ee21340b011856b9b355a58f1a (patch)
treef97a68e4f75e6c25c8492e03fdfe6983fb0aa199 /src/kvilib/ext/kvi_config.cpp
parent5d03948cd3558c613fae1fad109635f860babcbb (diff)
downloadkvirc-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/kvilib/ext/kvi_config.cpp')
-rw-r--r--src/kvilib/ext/kvi_config.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp
index c0eb124e..fc14dfaf 100644
--- a/src/kvilib/ext/kvi_config.cpp
+++ b/src/kvilib/ext/kvi_config.cpp
@@ -80,7 +80,7 @@ void KviConfig::clearGroup(const TQString & szGroup)
{
m_bDirty = true;
m_pDict->remove(szGroup);
- if(!m_pDict->tqfind(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one
+ if(!m_pDict->find(m_szGroup))m_szGroup = KVI_CONFIG_DEFAULT_GROUP; //removed the current one
}
void KviConfig::clearKey(const TQString & szKey)
@@ -282,7 +282,7 @@ bool KviConfig::load()
TQString szGroup = m_bLocal8Bit ?
TQString::fromLocal8Bit(tmp.ptr(),tmp.len()) :
TQString::fromUtf8(tmp.ptr(),tmp.len());
- p_group = m_pDict->tqfind(szGroup);
+ p_group = m_pDict->find(szGroup);
if(!p_group)
{
p_group = new KviConfigGroup(17,false);
@@ -324,13 +324,13 @@ bool KviConfig::load()
p_group->setAutoDelete(true);
m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group);
}
- p_group->tqreplace(szKey,pVal);
+ p_group->replace(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)
TQString * pVal = new TQString(TQString());
- p_group->tqreplace(szKey,pVal);
+ p_group->replace(szKey,pVal);
}
}
}
@@ -390,7 +390,7 @@ bool KviConfig::load()
if(dataLine.hasData())
{
TQString szUtf8 = TQString::fromUtf8(dataLine.ptr());
- p_group = m_pDict->tqfind(szUtf8);
+ p_group = m_pDict->find(szUtf8);
if(!p_group)
{
@@ -422,7 +422,7 @@ bool KviConfig::load()
m_pDict->insert(KVI_CONFIG_DEFAULT_GROUP,p_group);
}
TQString szName = TQString::fromUtf8(name.ptr());
- p_group->tqreplace(szName,p_data);
+ p_group->replace(szName,p_data);
}
}
break;
@@ -550,18 +550,18 @@ void KviConfig::setGroup(const TQString & szGroup)
bool KviConfig::hasKey(const TQString & szKey)
{
KviConfigGroup * p_group = getCurrentGroup();
- return (p_group->tqfind(szKey) != 0);
+ return (p_group->find(szKey) != 0);
}
bool KviConfig::hasGroup(const TQString & szGroup)
{
- return (m_pDict->tqfind(szGroup) != 0);
+ return (m_pDict->find(szGroup) != 0);
}
KviConfigGroup * KviConfig::getCurrentGroup()
{
if(m_szGroup.isEmpty())m_szGroup = KVI_CONFIG_DEFAULT_GROUP;
- KviConfigGroup * p_group = m_pDict->tqfind(m_szGroup);
+ KviConfigGroup * p_group = m_pDict->find(m_szGroup);
if(!p_group)
{
//create the group
@@ -579,7 +579,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data=new TQString(szValue);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
// FIXME: #warning "We have probs here ?"
@@ -587,7 +587,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQString & szValue)
TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)
{
m_szStrBuffer = szDefault;
@@ -603,7 +603,7 @@ TQString KviConfig::readEntry(const TQString & szKey,const TQString & szDefault)
TQString KviConfig::readTQStringEntry(const char *szKey,const TQString &szDefault)
{
KviStrDict * p_group = getCurrentGroup();
- KviStr * p_str = p_group->tqfind(szKey);
+ KviStr * p_str = p_group->find(szKey);
if(!p_str)return szDefault;
return TQString::fromUtf8(p_str->ptr());
}
@@ -614,7 +614,7 @@ void KviConfig::writeEntry(const char *szKey,const TQString &szValue)
{
m_bDirty = true;
KviStrDict * p_group = getCurrentGroup();
- p_group->tqreplace(szKey,new KviStr(szValue.utf8().data()));
+ p_group->replace(szKey,new KviStr(szValue.utf8().data()));
}
*/
@@ -625,7 +625,7 @@ static TQString g_szConfigStringListSeparator(",\\[ITEM],");
TQStringList KviConfig::readStringListEntry(const TQString & szKey,const TQStringList &list)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return list;
#ifdef COMPILE_USE_QT4
return p_str->split(g_szConfigStringListSeparator);
@@ -639,7 +639,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data=new TQString(list.join(g_szConfigStringListSeparator));
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
////////////////////////////////// KviValueList<int>
@@ -647,7 +647,7 @@ void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list)
KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviValueList<int> &list)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)
{
//debug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1());
@@ -685,7 +685,7 @@ void KviConfig::writeEntry(const TQString & 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->tqreplace(szKey,new TQString(szData.ptr()));
+ p_group->replace(szKey,new TQString(szData.ptr()));
}
////////////////////////////////// KviPixmap
@@ -698,13 +698,13 @@ void KviConfig::writeEntry(const TQString & szKey,const KviPixmap &pixmap)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data=new TQString();
KviStringConversion::toString(pixmap,*p_data);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
KviPixmap KviConfig::readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(p_str)
{
KviPixmap ret("");
@@ -722,13 +722,13 @@ void KviConfig::writeEntry(const TQString & szKey,const KviMsgType &msg)
KviConfigGroup * p_group = getCurrentGroup();
TQString szData;
KviStringConversion::toString(msg,szData);
- p_group->tqreplace(szKey,new TQString(szData));
+ p_group->replace(szKey,new TQString(szData));
}
KviMsgType KviConfig::readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return msgDef;
KviMsgType ret = msgDef;
KviStringConversion::fromString(*p_str,ret);
@@ -742,14 +742,14 @@ 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->tqreplace(szKey,new TQString(szData.ptr()));
+ p_group->replace(szKey,new TQString(szData.ptr()));
}
TQColor KviConfig::readColorEntry(const TQString & szKey,const TQColor &clr)
{
KviConfigGroup * p_group = getCurrentGroup();
TQColor color(clr);
- TQString * pointer_that_IS_initialized = p_group->tqfind(szKey);
+ TQString * pointer_that_IS_initialized = p_group->find(szKey);
if(pointer_that_IS_initialized)
@@ -793,7 +793,7 @@ void KviConfig::writeEntry(const TQString & szKey,TQFont &fnt)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
KviStringConversion::toString(fnt,*p_data);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
@@ -806,7 +806,7 @@ TQFont KviConfig::readFontEntry(const TQString & szKey,const TQFont &fnt)
{
TQFont font(fnt);
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(p_str)
{
//FontEntry=Arial,12,9,0,100,italic,underline,strikeout,
@@ -824,13 +824,13 @@ void KviConfig::writeEntry(const TQString & szKey,bool bTrue)
m_bDirty = true;
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString(bTrue ? "true" : "false");
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
bool KviConfig::readBoolEntry(const TQString & szKey,bool bTrue)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return bTrue;
static TQString szTrue = "true";
return (KviTQString::toLower(*p_str) == szTrue);
@@ -844,13 +844,13 @@ void KviConfig::writeEntry(const TQString & szKey,const TQRect &rct)
KviConfigGroup * p_group = getCurrentGroup();
TQString szBuf;
KviStringConversion::toString(rct,szBuf);
- p_group->tqreplace(szKey,new TQString(szBuf));
+ p_group->replace(szKey,new TQString(szBuf));
}
TQRect KviConfig::readRectEntry(const TQString & szKey,const TQRect &rct)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * str = p_group->tqfind(szKey);
+ TQString * str = p_group->find(szKey);
if(!str)return rct;
TQRect ret;
return KviStringConversion::fromString(*str,ret) ? ret : rct;
@@ -864,13 +864,13 @@ void KviConfig::writeEntry(const TQString & szKey,unsigned short usValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(usValue);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
unsigned short int KviConfig::readUShortEntry(const TQString & szKey,unsigned short int usDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(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->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
unsigned long KviConfig::readULongEntry(const char *szKey,unsigned long lDefault)
{
KviStrDict * p_group = getCurrentGroup();
- KviStr * p_str = p_group->tqfind(szKey);
+ KviStr * p_str = p_group->find(szKey);
if(!p_str)return lDefault;
bool bOk;
unsigned long lVal=p_str->toULong(&bOk);
@@ -909,13 +909,13 @@ void KviConfig::writeEntry(const TQString & szKey,int iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(iValue);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
int KviConfig::readIntEntry(const TQString & szKey,int iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
int iVal=p_str->toInt(&bOk);
@@ -930,13 +930,13 @@ void KviConfig::writeEntry(const TQString & szKey,unsigned int iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(iValue);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
unsigned int KviConfig::readUIntEntry(const TQString & szKey,unsigned int iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
unsigned int iVal=p_str->toUInt(&bOk);
@@ -951,13 +951,13 @@ void KviConfig::writeEntry(const TQString & szKey,char iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_data = new TQString();
p_data->setNum(iValue);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
char KviConfig::readCharEntry(const TQString & szKey,char iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
char iVal=(char)p_str->toInt(&bOk);
@@ -972,13 +972,13 @@ void KviConfig::writeEntry(const TQString & szKey,unsigned char iValue)
KviConfigGroup * p_group = getCurrentGroup();
TQString *p_data = new TQString();
p_data->setNum(iValue);
- p_group->tqreplace(szKey,p_data);
+ p_group->replace(szKey,p_data);
}
unsigned char KviConfig::readUCharEntry(const TQString & szKey,unsigned char iDefault)
{
KviConfigGroup * p_group = getCurrentGroup();
- TQString * p_str = p_group->tqfind(szKey);
+ TQString * p_str = p_group->find(szKey);
if(!p_str)return iDefault;
bool bOk;
unsigned char iVal=(unsigned char)p_str->toUInt(&bOk);