summaryrefslogtreecommitdiffstats
path: root/poxml/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'poxml/parser.h')
-rw-r--r--poxml/parser.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/poxml/parser.h b/poxml/parser.h
index f63f6cef..923723c5 100644
--- a/poxml/parser.h
+++ b/poxml/parser.h
@@ -1,9 +1,9 @@
#ifndef PARSER_H
#define PARSER_H
-#include <qxml.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqxml.h>
+#include <tqmap.h>
+#include <tqregexp.h>
struct BlockInfo {
int start_line;
@@ -31,13 +31,13 @@ class MsgBlock {
MsgBlock(const MsgBlock &rhs ) {
*this = rhs;
}
- QValueList<BlockInfo> lines;
- QString tag;
- QString comment;
- QString msgid;
- QString msgid_plural;
- QString msgstr;
- QStringList msgstr_plurals;
+ TQValueList<BlockInfo> lines;
+ TQString tag;
+ TQString comment;
+ TQString msgid;
+ TQString msgid_plural;
+ TQString msgstr;
+ TQStringList msgstr_plurals;
int start, end;
bool do_not_split;
@@ -59,14 +59,14 @@ class ParaCounter
{
public:
ParaCounter() { current = 0; }
- void addAnchor(QString anchor) { anchors.insert(anchor, current); }
+ void addAnchor(TQString anchor) { anchors.insert(anchor, current); }
void increasePara() { current++; }
- QMap<QString, int> anchors;
+ TQMap<TQString, int> anchors;
int current;
};
-class MsgList : public QValueList<MsgBlock>
+class MsgList : public TQValueList<MsgBlock>
{
public:
MsgList() {}
@@ -77,48 +77,48 @@ class StructureParser : public QXmlDefaultHandler
{
public:
bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString &ch);
- static bool isCuttingTag(const QString &tag);
- static bool isSingleTag(const QString &qName);
- static bool isLiteralTag(const QString &qName);
- void setDocumentLocator ( QXmlLocator * l ) { locator = l; }
- bool skippedEntity ( const QString & name );
- bool fatalError ( const QXmlParseException & );
- bool comment ( const QString & );
- bool error(const QXmlParseException &e ) { return fatalError(e); }
- bool warning(const QXmlParseException &e ) { return fatalError(e); }
+ bool startElement( const TQString&, const TQString&, const TQString& ,
+ const TQXmlAttributes& );
+ bool endElement( const TQString&, const TQString&, const TQString& );
+ bool characters( const TQString &ch);
+ static bool isCuttingTag(const TQString &tag);
+ static bool isSingleTag(const TQString &qName);
+ static bool isLiteralTag(const TQString &qName);
+ void setDocumentLocator ( TQXmlLocator * l ) { locator = l; }
+ bool skippedEntity ( const TQString & name );
+ bool fatalError ( const TQXmlParseException & );
+ bool comment ( const TQString & );
+ bool error(const TQXmlParseException &e ) { return fatalError(e); }
+ bool warning(const TQXmlParseException &e ) { return fatalError(e); }
MsgList getList() const { return list; }
MsgList splitMessage(const MsgBlock &message);
virtual bool startCDATA();
virtual bool endCDATA();
- static bool closureTag(const QString& message, const QString &tag);
- static bool isClosure(const QString &message);
- static void descape(QString &message);
- static QString escapeLiterals( const QString &contents);
- static QString descapeLiterals( const QString &contents);
- static void cleanupTags( QString &contents );
- static void removeEmptyTags( QString &contents);
- static void stripWhiteSpace( QString &contents);
+ static bool closureTag(const TQString& message, const TQString &tag);
+ static bool isClosure(const TQString &message);
+ static void descape(TQString &message);
+ static TQString escapeLiterals( const TQString &contents);
+ static TQString descapeLiterals( const TQString &contents);
+ static void cleanupTags( TQString &contents );
+ static void removeEmptyTags( TQString &contents);
+ static void stripWhiteSpace( TQString &contents);
private:
bool formatMessage(MsgBlock &message) const;
- QXmlLocator *locator;
- QString message;
+ TQXmlLocator *locator;
+ TQString message;
int inside, startline, startcol;
int line;
MsgList list;
- mutable QRegExp infos_reg;
- mutable QRegExp do_not_split_reg;
+ mutable TQRegExp infos_reg;
+ mutable TQRegExp do_not_split_reg;
};
-void outputMsg(const char *prefix, const QString &message);
+void outputMsg(const char *prefix, const TQString &message);
MsgList parseXML(const char *filename);
-QString escapePO(QString msgid);
+TQString escapePO(TQString msgid);
#endif