summaryrefslogtreecommitdiffstats
path: root/kttsd/filters/xhtml2ssml
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 22:17:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 22:17:08 +0000
commitf138d74fe16092003b06f5bde9663841929cde7f (patch)
treee9c497a0e59bc7d34264ac9404740d2ea76f3de4 /kttsd/filters/xhtml2ssml
parent3a3c4b256baee79bdcfe72c5e01b9ded9b525900 (diff)
downloadtdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.tar.gz
tdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.zip
TQt4 port kdeaccessibility
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd/filters/xhtml2ssml')
-rw-r--r--kttsd/filters/xhtml2ssml/Doxyfile4
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.cpp8
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.h4
-rw-r--r--kttsd/filters/xhtml2ssml/xmlelement.cpp6
-rw-r--r--kttsd/filters/xhtml2ssml/xmlelement.h4
5 files changed, 13 insertions, 13 deletions
diff --git a/kttsd/filters/xhtml2ssml/Doxyfile b/kttsd/filters/xhtml2ssml/Doxyfile
index 0061358..6313df1 100644
--- a/kttsd/filters/xhtml2ssml/Doxyfile
+++ b/kttsd/filters/xhtml2ssml/Doxyfile
@@ -17,7 +17,7 @@ ABBREVIATE_BRIEF = "The $name class" \
is \
provides \
specifies \
- contains \
+ tqcontains \
represents \
a \
an \
@@ -120,7 +120,7 @@ FILE_PATTERNS = *.c \
*.tlh \
*.diff \
*.patch \
- *.moc \
+ *.tqmoc \
*.xpm \
*.dox
RECURSIVE = yes
diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
index 5649cc9..916ec48 100644
--- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
+++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
@@ -63,7 +63,7 @@ bool XHTMLToSSMLParser::startElement(const TQString &, const TQString &, const T
// append to the output string.
TQString toelement = m_xhtml2ssml[fromelement];
if(toelement)
- m_output.append(XMLElement::fromQString(toelement).startTag());
+ m_output.append(XMLElement::fromTQString(toelement).startTag());
return true;
}
@@ -71,7 +71,7 @@ bool XHTMLToSSMLParser::endElement(const TQString &, const TQString &, const TQS
TQString fromelement = qName;
TQString toelement = m_xhtml2ssml[fromelement];
if(toelement)
- m_output.append(XMLElement::fromQString(toelement).endTag());
+ m_output.append(XMLElement::fromTQString(toelement).endTag());
return true;
}
@@ -94,10 +94,10 @@ bool XHTMLToSSMLParser::readFileConfigEntry(const TQString &line) {
if(line.stripWhiteSpace().startsWith("#")) {
return true;
}
- // break into QStringList
+ // break into TQStringList
// the second parameter to split is the string, with all space simplified and all space around the : removed, i.e
// "something : somethingelse" -> "something:somethingelse"
- TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":"));
+ TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().tqreplace(" :", ":").tqreplace(": ", ":"));
if(keyvalue.count() != 2)
return false;
m_xhtml2ssml[keyvalue[0]] = keyvalue[1];
diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.h b/kttsd/filters/xhtml2ssml/xhtml2ssml.h
index 4668d90..a4eae56 100644
--- a/kttsd/filters/xhtml2ssml/xhtml2ssml.h
+++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.h
@@ -25,7 +25,7 @@
#include <tqxml.h>
#include <tqmap.h>
-typedef TQMap<TQString, TQString> QStringMap;
+typedef TQMap<TQString, TQString> TQStringMap;
class TQString;
class XHTMLToSSMLParser : public TQXmlDefaultHandler {
@@ -53,7 +53,7 @@ public:
private:
/// Dict of xhtml tags -> ssml tags
- QStringMap m_xhtml2ssml;
+ TQStringMap m_xhtml2ssml;
/// The output of the conversion
TQString m_output;
};
diff --git a/kttsd/filters/xhtml2ssml/xmlelement.cpp b/kttsd/filters/xhtml2ssml/xmlelement.cpp
index 920fd57..45952ae 100644
--- a/kttsd/filters/xhtml2ssml/xmlelement.cpp
+++ b/kttsd/filters/xhtml2ssml/xmlelement.cpp
@@ -74,12 +74,12 @@ TQString XMLElement::attribute(const TQString &attr) {
return m_attrmapper[attr];
}
-TQString XMLElement::toQString() {
+TQString XMLElement::toTQString() {
TQString tag = startTag();
return tag.left(tag.length() - 1).right(tag.length() - 2);
}
-XMLElement XMLElement::fromQString(const TQString &str) {
+XMLElement XMLElement::fromTQString(const TQString &str) {
TQStringList sections = TQStringList::split(" ", str);
TQString tagname = sections[0];
XMLElement e(tagname.latin1());
@@ -91,7 +91,7 @@ XMLElement XMLElement::fromQString(const TQString &str) {
for(int i = 0; i < sectionsCount; ++i) {
TQStringList list = TQStringList::split("=", sections[i]);
if(list.count() != 2) {
- std::cerr << "XMLElement::fromQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n";
+ std::cerr << "XMLElement::fromTQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n";
return XMLElement(" ");
}
e.setAttribute(list[0], list[1].left(list[1].length() - 1).right(list[1].length() -2));
diff --git a/kttsd/filters/xhtml2ssml/xmlelement.h b/kttsd/filters/xhtml2ssml/xmlelement.h
index f92e933..11c7cef 100644
--- a/kttsd/filters/xhtml2ssml/xmlelement.h
+++ b/kttsd/filters/xhtml2ssml/xmlelement.h
@@ -75,11 +75,11 @@ public:
/// Had issues with TQMap and custom classes. For now you can just convert to/from TQString and use
/// That as the key/value pair.
/// @returns A TQString representation of the XMLAttribute.
- TQString toQString();
+ TQString toTQString();
/// Create an XMLElement from a TQString.
/// @param str The TQString to convert from. Must be of the following syntax- "foo name=\"bar\""
- static XMLElement fromQString(const TQString &str);
+ static XMLElement fromTQString(const TQString &str);
private:
/// The name of the tag.