diff options
Diffstat (limited to 'src/softwareimporters.cpp')
-rw-r--r-- | src/softwareimporters.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
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("<bold>", "<b>"); - tomboy.tqreplace("</bold>", "</b>"); - tomboy.tqreplace("<italic>", "<i>"); - tomboy.tqreplace("</italic>", "</i>"); - tomboy.tqreplace("<strikethrough>", "<span style='text-decoration: line-through'>"); - tomboy.tqreplace("</strikethrough>", "</span>"); + tomboy.replace("<bold>", "<b>"); + tomboy.replace("</bold>", "</b>"); + tomboy.replace("<italic>", "<i>"); + tomboy.replace("</italic>", "</i>"); + tomboy.replace("<strikethrough>", "<span style='text-decoration: line-through'>"); + tomboy.replace("</strikethrough>", "</span>"); // Highlight not supported by TQTextEdit: - tomboy.tqreplace("<highlight>", "<span style='color:#ff0080'>"); - tomboy.tqreplace("</highlight>", "</span>"); + tomboy.replace("<highlight>", "<span style='color:#ff0080'>"); + tomboy.replace("</highlight>", "</span>"); // Font sizes: - tomboy.tqreplace("<size:small>", "<span style='font-size: 7pt'>"); - tomboy.tqreplace("</size:small>", "</span>"); - tomboy.tqreplace("<size:large>", "<span style='font-size: 16pt'>"); - tomboy.tqreplace("</size:large>", "</span>"); - tomboy.tqreplace("<size:huge>", "<span style='font-size: 20pt'>"); - tomboy.tqreplace("</size:huge>", "</span>"); + tomboy.replace("<size:small>", "<span style='font-size: 7pt'>"); + tomboy.replace("</size:small>", "</span>"); + tomboy.replace("<size:large>", "<span style='font-size: 16pt'>"); + tomboy.replace("</size:large>", "</span>"); + tomboy.replace("<size:huge>", "<span style='font-size: 20pt'>"); + tomboy.replace("</size:huge>", "</span>"); // Internal links to other notes aren't supported yet by BasKet Note Pads: - tomboy.tqreplace("<link:internal>", ""); - tomboy.tqreplace("</link:internal>", ""); + tomboy.replace("<link:internal>", ""); + tomboy.replace("</link:internal>", ""); // In the Tomboy file, new lines are "\n" and not "<br>": - tomboy.tqreplace("\n", "<br>\n"); + tomboy.replace("\n", "<br>\n"); // Preserve consecutive spaces: return "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body>" + tomboy + "</body></html>"; @@ -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 "<note-content version="0.1">CONTENT</note-content>"! TQString xml = loadUtf8FileToString(dirPath + *it); - xml = xml.mid(xml.tqfind("<note-content ")); - xml = xml.mid(xml.tqfind(">") + 1); - xml = xml.mid(0, xml.tqfind("</note-content>")); + xml = xml.mid(xml.find("<note-content ")); + xml = xml.mid(xml.find(">") + 1); + xml = xml.mid(0, xml.find("</note-content>")); 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 = ""; |