From 33f08e93132a53bf14f41f5f1e567eeea832b336 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/softwareimporters.cpp | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'src/softwareimporters.cpp') diff --git a/src/softwareimporters.cpp b/src/softwareimporters.cpp index f7361b1..2c49bca 100644 --- a/src/softwareimporters.cpp +++ b/src/softwareimporters.cpp @@ -132,15 +132,15 @@ TQString SoftwareImporters::fromICS(const TQString &ics) // Remove escaped '\' characters and append the text to the body int pos = 0; - while ( (pos = result.tqfind('\\', pos)) != -1 ) { + while ( (pos = result.find('\\', pos)) != -1 ) { if ((uint)pos == result.length() - 1) // End of string break; if (result[pos+1] == 'n') { - result.tqreplace(pos, 2, '\n'); + result.replace(pos, 2, '\n'); } else if (result[pos+1] == 'r') { - result.tqreplace(pos, 2, '\r'); + result.replace(pos, 2, '\r'); } else if (result[pos+1] == 't') { - result.tqreplace(pos, 2, '\t'); + result.replace(pos, 2, '\t'); } else if (result[pos] == '\\') { result.remove(pos, 1); // Take care of "\\", "\,", "\;" and other escaped characters I haven't noticed ++pos; @@ -153,34 +153,34 @@ TQString SoftwareImporters::fromICS(const TQString &ics) TQString SoftwareImporters::fromTomboy(TQString tomboy) { // The first line is the note title, and we already have it, so we remove it (yes, that's pretty stupid to duplicate it in the content...): - tomboy = tomboy.mid(tomboy.tqfind("\n")).stripWhiteSpace(); + tomboy = tomboy.mid(tomboy.find("\n")).stripWhiteSpace(); // Font styles and decorations: - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); // Highlight not supported by TQTextEdit: - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); // Font sizes: - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); // Internal links to other notes aren't supported yet by BasKet Note Pads: - tomboy.tqreplace("", ""); - tomboy.tqreplace("", ""); + tomboy.replace("", ""); + tomboy.replace("", ""); // In the Tomboy file, new lines are "\n" and not "
": - tomboy.tqreplace("\n", "
\n"); + tomboy.replace("\n", "
\n"); // Preserve consecutive spaces: return "" + tomboy + ""; @@ -264,7 +264,7 @@ void SoftwareImporters::importKJots() } else if (buf.left(3) != "\\ID") { // Don't care of the ID // Remove escaped '\' characters and append the text to the body int pos = 0; - while ( (pos = buf.tqfind('\\', pos)) != -1 ) + while ( (pos = buf.find('\\', pos)) != -1 ) if (buf[++pos] == '\\') buf.remove(pos, 1); body.append(buf + "\n"); @@ -379,7 +379,7 @@ void SoftwareImporters::importStickyNotes() TQStringList list = dir.entryList(); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // For each folder - if ( (*it).tqcontains("gnome", false) ) { + if ( (*it).contains("gnome", false) ) { TQString fullPath = TQDir::home().absPath() + "/" + (*it) + "/stickynotes_applet"; if (dir.exists(fullPath)) founds += fullPath; @@ -457,9 +457,9 @@ void SoftwareImporters::importTomboy() // Isolate "CONTENT"! TQString xml = loadUtf8FileToString(dirPath + *it); - xml = xml.mid(xml.tqfind("") + 1); - xml = xml.mid(0, xml.tqfind("")); + xml = xml.mid(xml.find("") + 1); + xml = xml.mid(0, xml.find("")); if (!title.isEmpty() && !/*content*/xml.isEmpty()) insertTitledNote(basket, title, fromTomboy(xml/*content*/), TQt::RichText); @@ -598,8 +598,8 @@ void SoftwareImporters::importKnowIt() if(stream.atEnd()) break; - int i = line.tqfind("Entry") + 6; - int n = line.tqfind(' ', i); + int i = line.find("Entry") + 6; + int n = line.find(' ', i); level = line.mid(i, n - i).toInt(); name = line.mid(n+1); text = ""; -- cgit v1.2.1