diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/translators/tellico_xml.cpp | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/translators/tellico_xml.cpp')
-rw-r--r-- | src/translators/tellico_xml.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/translators/tellico_xml.cpp b/src/translators/tellico_xml.cpp index 8e7ac61..cddae3b 100644 --- a/src/translators/tellico_xml.cpp +++ b/src/translators/tellico_xml.cpp @@ -17,11 +17,11 @@ #include <libxml/parser.h> // has to be before valid.h #include <libxml/valid.h> -#include <qregexp.h> +#include <tqregexp.h> -const QString Tellico::XML::nsXSL = QString::fromLatin1("http://www.w3.org/1999/XSL/Transform"); -const QString Tellico::XML::nsBibtexml = QString::fromLatin1("http://bibtexml.sf.net/"); -const QString Tellico::XML::dtdBibtexml = QString::fromLatin1("bibtexml.dtd"); +const TQString Tellico::XML::nsXSL = TQString::tqfromLatin1("http://www.w3.org/1999/XSL/Transform"); +const TQString Tellico::XML::nsBibtexml = TQString::tqfromLatin1("http://bibtexml.sf.net/"); +const TQString Tellico::XML::dtdBibtexml = TQString::tqfromLatin1("bibtexml.dtd"); /* * VERSION 2 added namespaces, changed to multiple elements, @@ -48,36 +48,36 @@ const QString Tellico::XML::dtdBibtexml = QString::fromLatin1("bibtexml.dtd"); * VERSION 10 added the game board collection. */ const uint Tellico::XML::syntaxVersion = 10; -const QString Tellico::XML::nsTellico = QString::fromLatin1("http://periapsis.org/tellico/"); +const TQString Tellico::XML::nsTellico = TQString::tqfromLatin1("http://periapsis.org/tellico/"); -const QString Tellico::XML::nsBookcase = QString::fromLatin1("http://periapsis.org/bookcase/"); -const QString Tellico::XML::nsDublinCore = QString::fromLatin1("http://purl.org/dc/elements/1.1/"); -const QString Tellico::XML::nsZing = QString::fromLatin1("http://www.loc.gov/zing/srw/"); -const QString Tellico::XML::nsZingDiag = QString::fromLatin1("http://www.loc.gov/zing/srw/diagnostic/"); +const TQString Tellico::XML::nsBookcase = TQString::tqfromLatin1("http://periapsis.org/bookcase/"); +const TQString Tellico::XML::nsDublinCore = TQString::tqfromLatin1("http://purl.org/dc/elements/1.1/"); +const TQString Tellico::XML::nsZing = TQString::tqfromLatin1("http://www.loc.gov/zing/srw/"); +const TQString Tellico::XML::nsZingDiag = TQString::tqfromLatin1("http://www.loc.gov/zing/srw/diagnostic/"); -QString Tellico::XML::pubTellico(int version) { - return QString::fromLatin1("-//Robby Stephenson/DTD Tellico V%1.0//EN").arg(version); +TQString Tellico::XML::pubTellico(int version) { + return TQString::tqfromLatin1("-//Robby Stephenson/DTD Tellico V%1.0//EN").tqarg(version); } -QString Tellico::XML::dtdTellico(int version) { - return QString::fromLatin1("http://periapsis.org/tellico/dtd/v%1/tellico.dtd").arg(version); +TQString Tellico::XML::dtdTellico(int version) { + return TQString::tqfromLatin1("http://periapsis.org/tellico/dtd/v%1/tellico.dtd").tqarg(version); } -bool Tellico::XML::validXMLElementName(const QString& name_) { +bool Tellico::XML::validXMLElementName(const TQString& name_) { return xmlValidateNameValue((xmlChar *)name_.utf8().data()); } -QString Tellico::XML::elementName(const QString& name_) { - QString name = name_; +TQString Tellico::XML::elementName(const TQString& name_) { + TQString name = name_; // change white space to dashes - name.replace(QRegExp(QString::fromLatin1("\\s+")), QString::fromLatin1("-")); + name.tqreplace(TQRegExp(TQString::tqfromLatin1("\\s+")), TQString::tqfromLatin1("-")); // first cut, if it passes, we're done if(XML::validXMLElementName(name)) { return name; } // next check first characters IS_DIGIT is defined in libxml/vali.d - for(uint i = 0; i < name.length() && (!IS_LETTER(name[i].unicode()) || name[i] == '_'); ++i) { + for(uint i = 0; i < name.length() && (!IS_LETTER(name[i].tqunicode()) || name[i] == '_'); ++i) { name = name.mid(1); } if(name.isEmpty() || XML::validXMLElementName(name)) { |