From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/kfontinst/kfile-plugin/KFileFont.cpp | 68 +++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'kcontrol/kfontinst/kfile-plugin') diff --git a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp index 112e3562b..430e9c8b8 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.contains("Bold", false)) + else if(str.tqcontains("Bold", false)) return FC_WEIGHT_BOLD; - else if(str.contains("Heavy", false)) + else if(str.tqcontains("Heavy", false)) return FC_WEIGHT_HEAVY; - else if(str.contains("Black", false)) + else if(str.tqcontains("Black", false)) return FC_WEIGHT_BLACK; - else if(str.contains("ExtraBold", false)) + else if(str.tqcontains("ExtraBold", false)) return FC_WEIGHT_EXTRABOLD; - else if(str.contains("UltraBold", false)) + else if(str.tqcontains("UltraBold", false)) return FC_WEIGHT_ULTRABOLD; - else if(str.contains("ExtraLight", false)) + else if(str.tqcontains("ExtraLight", false)) return FC_WEIGHT_EXTRALIGHT; - else if(str.contains("UltraLight", false)) + else if(str.tqcontains("UltraLight", false)) return FC_WEIGHT_ULTRALIGHT; - else if(str.contains("Light", false)) + else if(str.tqcontains("Light", false)) return FC_WEIGHT_LIGHT; - else if(str.contains("Medium", false) || str.contains("Normal", false) || str.contains("Roman", false)) + else if(str.tqcontains("Medium", false) || str.tqcontains("Normal", false) || str.tqcontains("Roman", false)) return FC_WEIGHT_MEDIUM; - else if(str.contains("Regular", false)) + else if(str.tqcontains("Regular", false)) return FC_WEIGHT_REGULAR; - else if(str.contains("SemiBold", false)) + else if(str.tqcontains("SemiBold", false)) return FC_WEIGHT_SEMIBOLD; - else if(str.contains("DemiBold", false)) + else if(str.tqcontains("DemiBold", false)) return FC_WEIGHT_DEMIBOLD; - else if(str.contains("Thin", false)) + else if(str.tqcontains("Thin", false)) return FC_WEIGHT_THIN; - else if(str.contains("Book", false)) + else if(str.tqcontains("Book", false)) return FC_WEIGHT_NORMAL; - else if(str.contains("Demi", false)) + else if(str.tqcontains("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.contains("UltraCondensed", false)) + else if(str.tqcontains("UltraCondensed", false)) return FC_WIDTH_ULTRACONDENSED; - else if(str.contains("ExtraCondensed", false)) + else if(str.tqcontains("ExtraCondensed", false)) return FC_WIDTH_EXTRACONDENSED; - else if(str.contains("SemiCondensed", false)) + else if(str.tqcontains("SemiCondensed", false)) return FC_WIDTH_SEMICONDENSED; - else if(str.contains("Condensed", false)) + else if(str.tqcontains("Condensed", false)) return FC_WIDTH_CONDENSED; - else if(str.contains("SemiExpanded", false)) + else if(str.tqcontains("SemiExpanded", false)) return FC_WIDTH_SEMIEXPANDED; - else if(str.contains("UltraExpanded", false)) + else if(str.tqcontains("UltraExpanded", false)) return FC_WIDTH_ULTRAEXPANDED; - else if(str.contains("ExtraExpanded", false)) + else if(str.tqcontains("ExtraExpanded", false)) return FC_WIDTH_EXTRAEXPANDED; - else if(str.contains("Expanded", false)) + else if(str.tqcontains("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.find("FullName ")) + if(0==line.tqfind("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.find("FamilyName ")) + else if(0==line.tqfind("FamilyName ")) { family=line.mid(11); foundFamily=true; } - else if(0==line.find("Weight ")) + else if(0==line.tqfind("Weight ")) intWeight=strToWeight(line.mid(7)); - else if(0==line.find("ItalicAngle ")) + else if(0==line.tqfind("ItalicAngle ")) intSlant=0.0f==line.mid(12).toFloat() ? FC_SLANT_ROMAN : FC_SLANT_ITALIC; - 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 ")) + 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 ")) foundry=getFoundry(line.mid(7).latin1()); - else if(0==line.find("StartCharMetrics")) + else if(0==line.tqfind("StartCharMetrics")) break; } else - if(0==line.find("StartFontMetrics")) + if(0==line.tqfind("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.find("Oblique") || -1!=full.find("Slanted"))) + if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.tqfind("Oblique") || -1!=full.tqfind("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.contains(entry->foundry, false)) + if(foundryAll.length()==entry->len && foundryAll.tqcontains(entry->foundry, false)) { foundryAll=entry->foundry; break; -- cgit v1.2.3