summaryrefslogtreecommitdiffstats
path: root/part/kxesyntaxhighlighter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'part/kxesyntaxhighlighter.cpp')
-rw-r--r--part/kxesyntaxhighlighter.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/part/kxesyntaxhighlighter.cpp b/part/kxesyntaxhighlighter.cpp
index c783077..8397244 100644
--- a/part/kxesyntaxhighlighter.cpp
+++ b/part/kxesyntaxhighlighter.cpp
@@ -19,18 +19,18 @@
#include <iostream>
-#include <qcolor.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <ktextedit.h>
// Regular expressions for parsing XML borrowed from:
// http://www.cs.sfu.ca/~cameron/REX.html
-KXESyntaxHighlighter::KXESyntaxHighlighter(QTextEdit *textEdit)
- : QSyntaxHighlighter(textEdit)
+KXESyntaxHighlighter::KXESyntaxHighlighter(TQTextEdit *textEdit)
+ : TQSyntaxHighlighter(textEdit)
{
m_clrDefaultText.setRgb(0, 0, 0);
m_clrElementName.setRgb(128, 0, 0);
@@ -46,10 +46,10 @@ KXESyntaxHighlighter::~KXESyntaxHighlighter()
}
-int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOfLastPara)
+int KXESyntaxHighlighter::highlightParagraph(const TQString& text, int endStateOfLastPara)
{
- //first I format the given line to default so any remaining highlighting is removed (Qt does not do it by itself)
- setFormat(0 , text.length(), QColor(0, 0, 0));
+ //first I format the given line to default so any remaining highlighting is removed (TQt does not do it by itself)
+ setFormat(0 , text.length(), TQColor(0, 0, 0));
int iBracketNesting = 0;
m_eParserState = parsingNone;
@@ -58,7 +58,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
if(endStateOfLastPara == 1)
{
- QRegExp patternComment("[^-]*-([^-][^-]*-)*->"); // search end of comment
+ TQRegExp patternComment("[^-]*-([^-][^-]*-)*->"); // search end of comment
pos=patternComment.search(text, i);
if(pos >= 0) // end comment found ?
@@ -137,7 +137,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
if(m_eParserState == expectAttributeValue)
{
- QRegExp patternAttribute("\"[^<\"]*\"|'[^<']*'"); // search attribute value
+ TQRegExp patternAttribute("\"[^<\"]*\"|'[^<']*'"); // search attribute value
pos=patternAttribute.search(text, i);
if(pos == (int) i) // attribute value found ?
@@ -162,7 +162,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
case '!':
if(m_eParserState == expectElementNameOrSlash)
{
- QRegExp patternComment("<!--[^-]*-([^-][^-]*-)*->"); // search comment
+ TQRegExp patternComment("<!--[^-]*-([^-][^-]*-)*->"); // search comment
pos=patternComment.search(text, i-1);
if(pos == (int) i-1) // comment found ?
@@ -178,7 +178,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
}
else
{ // Try find multiline comment
- QRegExp patternCommentStart("<!--"); // search comment start
+ TQRegExp patternCommentStart("<!--"); // search comment start
pos=patternCommentStart.search(text, i-1);
if(pos == (int)i-1) // comment found ?
@@ -207,7 +207,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
return 0;
}
-int KXESyntaxHighlighter::processDefaultText(int i, const QString& text)
+int KXESyntaxHighlighter::processDefaultText(int i, const TQString& text)
{
int l = 0; // length of matched text
@@ -216,7 +216,7 @@ int KXESyntaxHighlighter::processDefaultText(int i, const QString& text)
case expectElementNameOrSlash:
case expectElementName:
{
- QRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search element name
+ TQRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search element name
int pos=patternName.search(text, i);
if(pos == i) // found ?
@@ -233,7 +233,7 @@ int KXESyntaxHighlighter::processDefaultText(int i, const QString& text)
case expectAtttributeOrEndOfElement:
{
- QRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search attribute name
+ TQRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search attribute name
int pos=patternName.search(text, i);
if(pos == i) // found ?