summaryrefslogtreecommitdiffstats
path: root/kcontrol/kfontinst
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
commit9a3f0aacd44fb866833ebcb852df3cd31475cb33 (patch)
tree9f699684624f4e78e13e7dd2393a103cc6fa8274 /kcontrol/kfontinst
parent341ad02235b9c85cd31782225181ed475b74eaa3 (diff)
downloadtdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.tar.gz
tdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/kfontinst')
-rw-r--r--kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp6
-rw-r--r--kcontrol/kfontinst/kfile-plugin/KFileFont.cpp68
-rw-r--r--kcontrol/kfontinst/kfontinst/FontEngine.cpp2
-rw-r--r--kcontrol/kfontinst/kfontinst/Fontmap.cpp14
-rw-r--r--kcontrol/kfontinst/kfontinst/Main.cpp2
-rw-r--r--kcontrol/kfontinst/kfontinst/XConfig.cpp4
-rw-r--r--kcontrol/kfontinst/kio/KioFonts.cpp48
-rw-r--r--kcontrol/kfontinst/kio/KioFonts.h2
-rw-r--r--kcontrol/kfontinst/lib/FcEngine.cpp56
-rw-r--r--kcontrol/kfontinst/lib/Misc.cpp14
10 files changed, 108 insertions, 108 deletions
diff --git a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp
index bf5017d5b..53295963e 100644
--- a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp
+++ b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp
@@ -391,7 +391,7 @@ void CKCmFontInst::fileHighlighted(const KFileItem *item)
? list->getFirst()
: NULL;
- if(previewItem && list && list->tqcontains(previewItem)) // OK, check its been selected - not deselected!!!
+ if(previewItem && list && list->contains(previewItem)) // OK, check its been selected - not deselected!!!
itsPreview->openURL(previewItem->url());
}
#endif
@@ -551,7 +551,7 @@ void CKCmFontInst::infoMessage(const TQString &msg)
static TQString family(const TQString &name)
{
- int commaPos=name.tqfind(',');
+ int commaPos=name.find(',');
return -1==commaPos ? name : name.left(commaPos);
}
@@ -571,7 +571,7 @@ void CKCmFontInst::updateInformation(int, int fonts)
TQString fam(family(item->text()));
size+=item->size();
- if(-1==families.tqfindIndex(fam))
+ if(-1==families.findIndex(fam))
families+=fam;
}
}
diff --git a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp
index 430e9c8b8..112e3562b 100644
--- a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp
+++ b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp
@@ -44,35 +44,35 @@ static int strToWeight(const TQString &str)
{
if(NULL==str)
return FC_WEIGHT_MEDIUM;
- else if(str.tqcontains("Bold", false))
+ else if(str.contains("Bold", false))
return FC_WEIGHT_BOLD;
- else if(str.tqcontains("Heavy", false))
+ else if(str.contains("Heavy", false))
return FC_WEIGHT_HEAVY;
- else if(str.tqcontains("Black", false))
+ else if(str.contains("Black", false))
return FC_WEIGHT_BLACK;
- else if(str.tqcontains("ExtraBold", false))
+ else if(str.contains("ExtraBold", false))
return FC_WEIGHT_EXTRABOLD;
- else if(str.tqcontains("UltraBold", false))
+ else if(str.contains("UltraBold", false))
return FC_WEIGHT_ULTRABOLD;
- else if(str.tqcontains("ExtraLight", false))
+ else if(str.contains("ExtraLight", false))
return FC_WEIGHT_EXTRALIGHT;
- else if(str.tqcontains("UltraLight", false))
+ else if(str.contains("UltraLight", false))
return FC_WEIGHT_ULTRALIGHT;
- else if(str.tqcontains("Light", false))
+ else if(str.contains("Light", false))
return FC_WEIGHT_LIGHT;
- else if(str.tqcontains("Medium", false) || str.tqcontains("Normal", false) || str.tqcontains("Roman", false))
+ else if(str.contains("Medium", false) || str.contains("Normal", false) || str.contains("Roman", false))
return FC_WEIGHT_MEDIUM;
- else if(str.tqcontains("Regular", false))
+ else if(str.contains("Regular", false))
return FC_WEIGHT_REGULAR;
- else if(str.tqcontains("SemiBold", false))
+ else if(str.contains("SemiBold", false))
return FC_WEIGHT_SEMIBOLD;
- else if(str.tqcontains("DemiBold", false))
+ else if(str.contains("DemiBold", false))
return FC_WEIGHT_DEMIBOLD;
- else if(str.tqcontains("Thin", false))
+ else if(str.contains("Thin", false))
return FC_WEIGHT_THIN;
- else if(str.tqcontains("Book", false))
+ else if(str.contains("Book", false))
return FC_WEIGHT_NORMAL;
- else if(str.tqcontains("Demi", false))
+ else if(str.contains("Demi", false))
return FC_WEIGHT_NORMAL;
else
return FC_WEIGHT_MEDIUM;
@@ -83,21 +83,21 @@ static int strToWidth(const TQString &str)
{
if(str.isEmpty())
return FC_WIDTH_NORMAL;
- else if(str.tqcontains("UltraCondensed", false))
+ else if(str.contains("UltraCondensed", false))
return FC_WIDTH_ULTRACONDENSED;
- else if(str.tqcontains("ExtraCondensed", false))
+ else if(str.contains("ExtraCondensed", false))
return FC_WIDTH_EXTRACONDENSED;
- else if(str.tqcontains("SemiCondensed", false))
+ else if(str.contains("SemiCondensed", false))
return FC_WIDTH_SEMICONDENSED;
- else if(str.tqcontains("Condensed", false))
+ else if(str.contains("Condensed", false))
return FC_WIDTH_CONDENSED;
- else if(str.tqcontains("SemiExpanded", false))
+ else if(str.contains("SemiExpanded", false))
return FC_WIDTH_SEMIEXPANDED;
- else if(str.tqcontains("UltraExpanded", false))
+ else if(str.contains("UltraExpanded", false))
return FC_WIDTH_ULTRAEXPANDED;
- else if(str.tqcontains("ExtraExpanded", false))
+ else if(str.contains("ExtraExpanded", false))
return FC_WIDTH_EXTRAEXPANDED;
- else if(str.tqcontains("Expanded", false))
+ else if(str.contains("Expanded", false))
return FC_WIDTH_EXPANDED;
else
return FC_WIDTH_NORMAL;
@@ -201,7 +201,7 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt
if(inMetrics)
{
- if(0==line.tqfind("FullName "))
+ if(0==line.find("FullName "))
{
full=line.mid(9);
#ifndef KFI_FC_NO_WIDTHS
@@ -209,24 +209,24 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt
#endif
foundName=true;
}
- else if(0==line.tqfind("FamilyName "))
+ else if(0==line.find("FamilyName "))
{
family=line.mid(11);
foundFamily=true;
}
- else if(0==line.tqfind("Weight "))
+ else if(0==line.find("Weight "))
intWeight=strToWeight(line.mid(7));
- else if(0==line.tqfind("ItalicAngle "))
+ else if(0==line.find("ItalicAngle "))
intSlant=0.0f==line.mid(12).toFloat() ? FC_SLANT_ROMAN : FC_SLANT_ITALIC;
- else if(0==line.tqfind("IsFixedPitch "))
- intSpacing=0==line.mid(13).tqfind("false", 0, false) ? FC_PROPORTIONAL : FC_MONO;
- else if(0==line.tqfind("Notice "))
+ else if(0==line.find("IsFixedPitch "))
+ intSpacing=0==line.mid(13).find("false", 0, false) ? FC_PROPORTIONAL : FC_MONO;
+ else if(0==line.find("Notice "))
foundry=getFoundry(line.mid(7).latin1());
- else if(0==line.tqfind("StartCharMetrics"))
+ else if(0==line.find("StartCharMetrics"))
break;
}
else
- if(0==line.tqfind("StartFontMetrics"))
+ if(0==line.find("StartFontMetrics"))
inMetrics=true;
};
f.close();
@@ -237,7 +237,7 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt
foundFamily=true;
}
- if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.tqfind("Oblique") || -1!=full.tqfind("Slanted")))
+ if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.find("Oblique") || -1!=full.find("Slanted")))
intItalic=FC_SLANT_OBLIQUE;
}
@@ -372,7 +372,7 @@ bool KFileFontPlugin::readInfo(KFileMetaInfo& info, uint what)
const FoundryMap *entry;
for(entry=map; NULL!=entry->foundry; entry++)
- if(foundryAll.length()==entry->len && foundryAll.tqcontains(entry->foundry, false))
+ if(foundryAll.length()==entry->len && foundryAll.contains(entry->foundry, false))
{
foundryAll=entry->foundry;
break;
diff --git a/kcontrol/kfontinst/kfontinst/FontEngine.cpp b/kcontrol/kfontinst/kfontinst/FontEngine.cpp
index 7f14d556f..dffa60f2d 100644
--- a/kcontrol/kfontinst/kfontinst/FontEngine.cpp
+++ b/kcontrol/kfontinst/kfontinst/FontEngine.cpp
@@ -157,7 +157,7 @@ CFontEngine::EWeight CFontEngine::strToWeight(const char *str)
static void removeSymbols(TQString &str)
{
- str.tqreplace(TQRegExp("[\\-\\[\\]()]"), " ");
+ str.replace(TQRegExp("[\\-\\[\\]()]"), " ");
int len=str.length();
TQChar space(' ');
diff --git a/kcontrol/kfontinst/kfontinst/Fontmap.cpp b/kcontrol/kfontinst/kfontinst/Fontmap.cpp
index c8e63c403..8b04ef7bd 100644
--- a/kcontrol/kfontinst/kfontinst/Fontmap.cpp
+++ b/kcontrol/kfontinst/kfontinst/Fontmap.cpp
@@ -113,7 +113,7 @@ static TQString createX11PsName(const TQString &font)
unsigned int ch;
bool newWord=true;
- newName.tqreplace(TQRegExp("\\-"), "_");
+ newName.replace(TQRegExp("\\-"), "_");
for(ch=0; ch<newName.length(); ++ch)
{
@@ -136,7 +136,7 @@ static TQString createX11PsName(const TQString &font)
}
}
- newName.tqreplace(" ", TQString());
+ newName.replace(" ", TQString());
return newName;
}
@@ -180,7 +180,7 @@ static TQString getEntry(TQStringList &list, const TQString &name)
end(list.end());
for( ; it!=end; ++it)
- if(0==(*it).tqfind('/'+name+' '))
+ if(0==(*it).find('/'+name+' '))
return *it;
return TQString::null;
@@ -188,7 +188,7 @@ static TQString getEntry(TQStringList &list, const TQString &name)
inline bool isAlias(const TQString &entry)
{
- return -1==entry.tqfindRev(TQRegExp(")\\s*;\\s*$"));
+ return -1==entry.findRev(TQRegExp(")\\s*;\\s*$"));
}
static void addEntry(TQStringList &list, const TQString &name, const TQString &file, const TQString &fmapDir)
@@ -209,7 +209,7 @@ static void addEntry(TQStringList &list, const TQString &name, const TQString &f
str << '/' << name << " (";
- if(0==file.tqfind(fmapDir))
+ if(0==file.find(fmapDir))
str << file.mid(fmapDir.length());
else
str << file;
@@ -309,7 +309,7 @@ bool create(const TQString &dir, CFontEngine &fe)
TQString fName(Misc::fileSyntax(CFcEngine::getFcString(fs->fonts[i], FC_FILE)));
FcBool scalable=FcFalse;
- if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.tqfind(dir)) &&
+ if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.find(dir)) &&
FcResultMatch==FcPatternGetBool(fs->fonts[i], FC_SCALABLE, 0, &scalable) && scalable)
{
const TQStringList *existing=old.getEntries(fName);
@@ -552,7 +552,7 @@ CFile::CFile(const TQString &dir)
const TQStringList * CFile::getEntries(const TQString &fname)
{
- TEntry *entry=findEntry(0==fname.tqfind(itsDir) ? fname.mid(itsDir.length()) : fname, false);
+ TEntry *entry=findEntry(0==fname.find(itsDir) ? fname.mid(itsDir.length()) : fname, false);
return entry ? &entry->entries : NULL;
}
diff --git a/kcontrol/kfontinst/kfontinst/Main.cpp b/kcontrol/kfontinst/kfontinst/Main.cpp
index f0e6d3152..6db9b83c8 100644
--- a/kcontrol/kfontinst/kfontinst/Main.cpp
+++ b/kcontrol/kfontinst/kfontinst/Main.cpp
@@ -285,7 +285,7 @@ int main(int argc, char *argv[])
bool found=false;
while((dir=FcStrListNext(list)))
- if(0==KFI::Misc::dirSyntax((const char *)dir).tqfind(folder))
+ if(0==KFI::Misc::dirSyntax((const char *)dir).find(folder))
found=true;
if(!found)
diff --git a/kcontrol/kfontinst/kfontinst/XConfig.cpp b/kcontrol/kfontinst/kfontinst/XConfig.cpp
index 36bd153df..112ab3d3c 100644
--- a/kcontrol/kfontinst/kfontinst/XConfig.cpp
+++ b/kcontrol/kfontinst/kfontinst/XConfig.cpp
@@ -748,9 +748,9 @@ CXConfig::TPath::EType CXConfig::TPath::getType(const TQString &d)
{
TQString str(d);
- str.tqreplace(TQRegExp("\\s*"), "");
+ str.replace(TQRegExp("\\s*"), "");
- return 0==str.tqfind("unix/:")
+ return 0==str.find("unix/:")
? FONT_SERVER
: "fontconfig"==str
? FONT_CONFIG
diff --git a/kcontrol/kfontinst/kio/KioFonts.cpp b/kcontrol/kfontinst/kio/KioFonts.cpp
index cefa5188d..cef1fd9dd 100644
--- a/kcontrol/kfontinst/kio/KioFonts.cpp
+++ b/kcontrol/kfontinst/kio/KioFonts.cpp
@@ -136,7 +136,7 @@ static TQString removeMultipleExtension(const KURL &url)
TQString fname(url.fileName());
int pos;
- if(-1!=(pos=fname.tqfindRev(TQString::tqfromLatin1(constMultipleExtension))))
+ if(-1!=(pos=fname.findRev(TQString::tqfromLatin1(constMultipleExtension))))
fname=fname.left(pos);
return fname;
@@ -147,7 +147,7 @@ static TQString modifyName(const TQString &fname)
static const char constSymbols[]={ '-', ' ', ':', 0 };
TQString rv(fname);
- int dotPos=rv.tqfindRev('.');
+ int dotPos=rv.findRev('.');
if(-1!=dotPos)
{
@@ -158,7 +158,7 @@ static TQString modifyName(const TQString &fname)
}
for(int s=0; constSymbols[s]; ++s)
- rv=rv.tqreplace(constSymbols[s], '_');
+ rv=rv.replace(constSymbols[s], '_');
return rv;
}
@@ -427,7 +427,7 @@ static KURL getRedirect(const KURL &u)
sect(CKioFonts::getSect(path));
path.remove(sect);
- path.tqreplace("//", "/");
+ path.replace("//", "/");
redirect.setPath(path);
KFI_DBUG << "Redirect from " << u.path() << " to " << redirect.path() << endl;
@@ -441,7 +441,7 @@ static bool nonRootSys(const KURL &u)
static TQString getFontFolder(const TQString &defaultDir, const TQString &root, TQStringList &dirs)
{
- if(dirs.tqcontains(defaultDir))
+ if(dirs.contains(defaultDir))
return defaultDir;
else
{
@@ -450,7 +450,7 @@ static TQString getFontFolder(const TQString &defaultDir, const TQString &root,
bool found=false;
for(it=dirs.begin(); it!=end && !found; ++it)
- if(0==(*it).tqfind(root))
+ if(0==(*it).find(root))
return *it;
}
@@ -494,7 +494,7 @@ static bool isAAfm(const TQString &fname)
{
line=stream.readLine();
- if(line.tqcontains("StartFontMetrics"))
+ if(line.contains("StartFontMetrics"))
{
file.close();
return true;
@@ -646,11 +646,11 @@ static bool getFontList(const TQStringList &files, TQMap<TQString, TQString> &ma
{
TQString name(Misc::getFile(*it)),
path(Misc::getDir(*it));
- TQValueList<FontList>::Iterator entry=list.tqfind(FontList(name));
+ TQValueList<FontList>::Iterator entry=list.find(FontList(name));
if(entry!=list.end())
{
- if(!(*entry).paths.tqcontains(path))
+ if(!(*entry).paths.contains(path))
(*entry).paths.append(path);
}
else
@@ -688,11 +688,11 @@ static bool getFontList(const TQStringList &files, TQMap<TQString, TQString> &ma
if((*pIt).orig[i]!=(*pBegin).orig[i])
{
(*pIt).modified=(*pIt).orig.mid(i);
- (*pIt).modified=(*pIt).modified.tqreplace('/', '_');
+ (*pIt).modified=(*pIt).modified.replace('/', '_');
if((*pBegin).modified.isEmpty())
{
(*pBegin).modified=(*pBegin).orig.mid(i);
- (*pBegin).modified=(*pBegin).modified.tqreplace('/', '_');
+ (*pBegin).modified=(*pBegin).modified.replace('/', '_');
}
break;
}
@@ -806,9 +806,9 @@ CKioFonts::CKioFonts(const TQCString &pool, const TQCString &app)
{
TQString str(paths[path]);
- str.tqreplace(TQRegExp("\\s*"), "");
+ str.replace(TQRegExp("\\s*"), "");
- if(0==str.tqfind("unix/:"))
+ if(0==str.find("unix/:"))
itsUsingXfsFpe=true;
else if("fontconfig"==str)
itsUsingFcFpe=true;
@@ -1751,9 +1751,9 @@ void CKioFonts::special(const TQByteArray &a)
finished();
break;
case SPECIAL_RECONFIG: // Only itended to be called from kcmfontinst - when a user has re-enabled doX or doGs
- if(itsRoot && !itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location))
+ if(itsRoot && !itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location))
itsFolders[FOLDER_SYS].modified.add(itsFolders[FOLDER_SYS].location);
- else if(!itsRoot && !itsFolders[FOLDER_USER].modified.tqcontains(itsFolders[FOLDER_USER].location))
+ else if(!itsRoot && !itsFolders[FOLDER_USER].modified.contains(itsFolders[FOLDER_USER].location))
itsFolders[FOLDER_USER].modified.add(itsFolders[FOLDER_USER].location);
doModified();
@@ -1831,7 +1831,7 @@ void CKioFonts::doModified()
//
// If a non-default folder has been modified, always configure X
if(NULL==strchr(itsKfiParams, 'x') &&
- (itsFolders[FOLDER_SYS].modified.count()>1 || !itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)))
+ (itsFolders[FOLDER_SYS].modified.count()>1 || !itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)))
{
if(0==itsKfiParams[0])
strcpy(itsKfiParams, "-x");
@@ -1850,7 +1850,7 @@ void CKioFonts::doModified()
KFI_DBUG << "RUN(root): kfontinst " << itsKfiParams << ' ' << *it << endl;
}
- if(itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location))
+ if(itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location))
{
itsHasSys=true;
itsAddToSysFc=false;
@@ -1862,7 +1862,7 @@ void CKioFonts::doModified()
TQCString cmd;
createRootRefreshCmd(cmd, itsFolders[FOLDER_SYS].modified, false);
- if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location))
+ if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location))
{
itsHasSys=true;
itsAddToSysFc=false;
@@ -2039,7 +2039,7 @@ bool CKioFonts::updateFontList()
if(!file.isEmpty())
{
- if(!itsRoot && 0==file.tqfind(home))
+ if(!itsRoot && 0==file.find(home))
folder=FOLDER_USER;
TQValueList<FcPattern *> &patterns=
@@ -2079,14 +2079,14 @@ CKioFonts::EFolder CKioFonts::getFolder(const KURL &url)
TQMap<TQString, TQValueList<FcPattern *> >::Iterator CKioFonts::getMap(const KURL &url)
{
EFolder folder(getFolder(url));
- TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.tqfind(removeMultipleExtension(url));
+ TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.find(removeMultipleExtension(url));
if(it==itsFolders[folder].fontMap.end()) // Perhaps it was fonts:/System/times.ttf ???
{
FcPattern *pat=getEntry(folder, url.fileName(), false);
if(pat)
- it=itsFolders[folder].fontMap.tqfind(CFcEngine::createName(pat));
+ it=itsFolders[folder].fontMap.find(CFcEngine::createName(pat));
}
return it;
@@ -2180,7 +2180,7 @@ bool CKioFonts::getSourceFiles(const KURL &src, TQStringList &files)
uEnd=urls.end();
for(uIt=urls.begin(); uIt!=uEnd; ++uIt)
- if(-1==files.tqfindIndex((*uIt).path()))
+ if(-1==files.findIndex((*uIt).path()))
files.append((*uIt).path());
}
}
@@ -2290,7 +2290,7 @@ bool CKioFonts::confirmMultiple(const KURL &url, const TQStringList &files, EFol
{
TQString name(CFcEngine::createName(pat));
- if(-1==fonts.tqfindIndex(name))
+ if(-1==fonts.findIndex(name))
fonts.append(name);
}
}
@@ -2356,7 +2356,7 @@ bool CKioFonts::checkUrl(const KURL &u, bool rootOk)
if(itsRoot)
{
if((isSysFolder(sect) || isUserFolder(sect)) &&
- (itsFolders[FOLDER_SYS].fontMap.end()==itsFolders[FOLDER_SYS].fontMap.tqfind(sect)))
+ (itsFolders[FOLDER_SYS].fontMap.end()==itsFolders[FOLDER_SYS].fontMap.find(sect)))
//CPD: TODO: || it has a font specified! e.g. fonts:/System/Times -> even in have a fonts:/System font, redirect
//should still happen
{
diff --git a/kcontrol/kfontinst/kio/KioFonts.h b/kcontrol/kfontinst/kio/KioFonts.h
index 32d5a384e..66a2b01b9 100644
--- a/kcontrol/kfontinst/kio/KioFonts.h
+++ b/kcontrol/kfontinst/kio/KioFonts.h
@@ -82,7 +82,7 @@ class CKioFonts : public KIO::SlaveBase
CDirList() { }
CDirList(const TQString &str) : TQStringList(str) { }
- void add(const TQString &d) { if ( tqcontains(d)) append(d); }
+ void add(const TQString &d) { if ( contains(d)) append(d); }
};
struct TFolder
diff --git a/kcontrol/kfontinst/lib/FcEngine.cpp b/kcontrol/kfontinst/lib/FcEngine.cpp
index ec4f833a3..2b3d40737 100644
--- a/kcontrol/kfontinst/lib/FcEngine.cpp
+++ b/kcontrol/kfontinst/lib/FcEngine.cpp
@@ -185,72 +185,72 @@ static int fcSpacing(int spacing)
static int strToWeight(const TQString &str, TQString &newStr)
{
- if(0==str.tqfind(i18n(KFI_WEIGHT_THIN), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_THIN), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_THIN).length());
return FC_WEIGHT_THIN;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_EXTRALIGHT), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_EXTRALIGHT), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_EXTRALIGHT).length());
return FC_WEIGHT_EXTRALIGHT;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_ULTRALIGHT), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_ULTRALIGHT), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_ULTRALIGHT).length());
return FC_WEIGHT_ULTRALIGHT;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_LIGHT), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_LIGHT), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_LIGHT).length());
return FC_WEIGHT_LIGHT;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_REGULAR), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_REGULAR), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_REGULAR).length());
return FC_WEIGHT_REGULAR;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_NORMAL), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_NORMAL), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_NORMAL).length());
return FC_WEIGHT_NORMAL;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_MEDIUM), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_MEDIUM), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_MEDIUM).length());
return FC_WEIGHT_MEDIUM;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_DEMIBOLD), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_DEMIBOLD), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_DEMIBOLD).length());
return FC_WEIGHT_SEMIBOLD;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_SEMIBOLD), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_SEMIBOLD), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_SEMIBOLD).length());
return FC_WEIGHT_SEMIBOLD;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_BOLD), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_BOLD), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_BOLD).length());
return FC_WEIGHT_BOLD;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_EXTRABOLD), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_EXTRABOLD), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_EXTRABOLD).length());
return FC_WEIGHT_EXTRABOLD;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_ULTRABOLD), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_ULTRABOLD), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_ULTRABOLD).length());
return FC_WEIGHT_ULTRABOLD;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_BLACK), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_BLACK), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_BLACK).length());
return FC_WEIGHT_BLACK;
}
- if(0==str.tqfind(i18n(KFI_WEIGHT_HEAVY), 0, false))
+ if(0==str.find(i18n(KFI_WEIGHT_HEAVY), 0, false))
{
newStr=str.mid(i18n(KFI_WEIGHT_HEAVY).length());
return FC_WEIGHT_HEAVY;
@@ -263,47 +263,47 @@ static int strToWeight(const TQString &str, TQString &newStr)
#ifndef KFI_FC_NO_WIDTHS
static int strToWidth(const TQString &str, TQString &newStr)
{
- if(0==str.tqfind(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_ULTRACONDENSED).length());
return FC_WIDTH_ULTRACONDENSED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_EXTRACONDENSED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_EXTRACONDENSED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_EXTRACONDENSED).length());
return FC_WIDTH_EXTRACONDENSED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_CONDENSED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_CONDENSED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_CONDENSED).length());
return FC_WIDTH_CONDENSED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_SEMICONDENSED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_SEMICONDENSED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_SEMICONDENSED).length());
return FC_WIDTH_SEMICONDENSED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_NORMAL), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_NORMAL), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_NORMAL).length());
return FC_WIDTH_NORMAL;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_SEMIEXPANDED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_SEMIEXPANDED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_SEMIEXPANDED).length());
return FC_WIDTH_SEMIEXPANDED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_EXPANDED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_EXPANDED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_EXPANDED).length());
return FC_WIDTH_EXPANDED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_EXTRAEXPANDED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_EXTRAEXPANDED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_EXTRAEXPANDED).length());
return FC_WIDTH_EXTRAEXPANDED;
}
- if(0==str.tqfind(i18n(KFI_WIDTH_ULTRAEXPANDED), 0, false))
+ if(0==str.find(i18n(KFI_WIDTH_ULTRAEXPANDED), 0, false))
{
newStr=str.mid(i18n(KFI_WIDTH_ULTRAEXPANDED).length());
return FC_WIDTH_ULTRAEXPANDED;
@@ -316,9 +316,9 @@ static int strToWidth(const TQString &str, TQString &newStr)
static int strToSlant(const TQString &str)
{
- if(-1!=str.tqfind(i18n(KFI_SLANT_ITALIC)))
+ if(-1!=str.find(i18n(KFI_SLANT_ITALIC)))
return FC_SLANT_ITALIC;
- if(-1!=str.tqfind(i18n(KFI_SLANT_OBLIQUE)))
+ if(-1!=str.find(i18n(KFI_SLANT_OBLIQUE)))
return FC_SLANT_OBLIQUE;
return FC_SLANT_ROMAN;
}
@@ -867,7 +867,7 @@ bool CFcEngine::getInfo(const KURL &url, int faceNo, TQString &full, TQString &f
{
int pos;
- if(-1==(pos=itsDescriptiveName.tqfind(", "))) // No style information...
+ if(-1==(pos=itsDescriptiveName.find(", "))) // No style information...
family=itsDescriptiveName;
else
family=itsDescriptiveName.left(pos);
@@ -948,7 +948,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all)
TQTextStream stream(&file);
thumbUrl=stream.readLine();
- isThumbnailUrl=0==thumbUrl.tqfind(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all);
+ isThumbnailUrl=0==thumbUrl.find(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all);
file.close();
}
@@ -1003,7 +1003,7 @@ void CFcEngine::parseName(const TQString &name, int faceNo, bool all)
itsDescriptiveName=name;
itsSpacing=FC_PROPORTIONAL;
- if(-1==(pos=name.tqfind(", "))) // No style information...
+ if(-1==(pos=name.find(", "))) // No style information...
{
itsWeight=FC_WEIGHT_NORMAL;
#ifndef KFI_FC_NO_WIDTHS
diff --git a/kcontrol/kfontinst/lib/Misc.cpp b/kcontrol/kfontinst/lib/Misc.cpp
index 6e87c9b02..1e779b514 100644
--- a/kcontrol/kfontinst/lib/Misc.cpp
+++ b/kcontrol/kfontinst/lib/Misc.cpp
@@ -65,9 +65,9 @@ TQString dirSyntax(const TQString &d)
{
TQString ds(d);
- ds.tqreplace("//", "/");
+ ds.replace("//", "/");
- int slashPos=ds.tqfindRev('/');
+ int slashPos=ds.findRev('/');
if(slashPos!=(((int)ds.length())-1))
ds.append('/');
@@ -84,9 +84,9 @@ TQString xDirSyntax(const TQString &d)
{
TQString ds(d);
- ds.tqreplace("//", "/");
+ ds.replace("//", "/");
- int slashPos=ds.tqfindRev('/');
+ int slashPos=ds.findRev('/');
if(slashPos==(((int)ds.length())-1))
ds.remove(slashPos, 1);
@@ -100,7 +100,7 @@ TQString getDir(const TQString &f)
{
TQString d(f);
- int slashPos=d.tqfindRev('/');
+ int slashPos=d.findRev('/');
if(slashPos!=-1)
d.remove(slashPos+1, d.length());
@@ -112,7 +112,7 @@ TQString getFile(const TQString &f)
{
TQString d(f);
- int slashPos=d.tqfindRev('/');
+ int slashPos=d.findRev('/');
if(slashPos!=-1)
d.remove(0, slashPos+1);
@@ -152,7 +152,7 @@ bool doCmd(const TQString &cmd, const TQString &p1, const TQString &p2, const TQ
TQString changeExt(const TQString &f, const TQString &newExt)
{
TQString newStr(f);
- int dotPos=newStr.tqfindRev('.');
+ int dotPos=newStr.findRev('.');
if(-1==dotPos)
newStr+=TQChar('.')+newExt;