summaryrefslogtreecommitdiffstats
path: root/src/ksvnwidgets/diffsyntax.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-04 19:54:24 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-04 19:54:24 +0000
commitd7633c195a464e4d344ada9eea61afd10110598a (patch)
tree1f2da0b135f3ed84955e340cae823f00c4ce7284 /src/ksvnwidgets/diffsyntax.cpp
parent3fa7eb804f67b2789f128075cc2522f398640250 (diff)
downloadtdesvn-d7633c195a464e4d344ada9eea61afd10110598a.tar.gz
tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.zip
Port kdesvn to TQt4
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/ksvnwidgets/diffsyntax.cpp')
-rw-r--r--src/ksvnwidgets/diffsyntax.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ksvnwidgets/diffsyntax.cpp b/src/ksvnwidgets/diffsyntax.cpp
index a38c749..9f5e573 100644
--- a/src/ksvnwidgets/diffsyntax.cpp
+++ b/src/ksvnwidgets/diffsyntax.cpp
@@ -23,26 +23,26 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
/*!
- \fn DiffSyntax::DiffSyntax(QTextEdit*)
+ \fn DiffSyntax::DiffSyntax(TQTextEdit*)
*/
- DiffSyntax::DiffSyntax(QTextEdit*aTextEdit)
- : QSyntaxHighlighter(aTextEdit)
+ DiffSyntax::DiffSyntax(TQTextEdit*aTextEdit)
+ : TQSyntaxHighlighter(aTextEdit)
{
}
/*!
- \fn DiffSyntax::highlightParagraph ( const QString & text, int endStateOfLastPara )
+ \fn DiffSyntax::highlightParagraph ( const TQString & text, int endStateOfLastPara )
*/
-int DiffSyntax::highlightParagraph ( const QString & aText, int endStateOfLastPara)
+int DiffSyntax::highlightParagraph ( const TQString & aText, int endStateOfLastPara)
{
- static QRegExp a("^\\w+:\\s.*$");
- static QRegExp b("^\\W+$");
- QColor c(0,0,0);
- QFont f(KGlobalSettings::fixedFont());
+ static TQRegExp a("^\\w+:\\s.*$");
+ static TQRegExp b("^\\W+$");
+ TQColor c(0,0,0);
+ TQFont f(KGlobalSettings::fixedFont());
int ret = 0;
if (endStateOfLastPara == 1) {
ret = 2;
@@ -53,7 +53,7 @@ int DiffSyntax::highlightParagraph ( const QString & aText, int endStateOfLastPa
}
if (a.match(aText)>-1) {
- c = QColor("#660033");
+ c = TQColor("#660033");
if (endStateOfLastPara==1||endStateOfLastPara==2) {
f.setBold(true);
} else {
@@ -61,25 +61,25 @@ int DiffSyntax::highlightParagraph ( const QString & aText, int endStateOfLastPa
}
} else if (aText.startsWith("_____" )) {
ret = 1;
- c = QColor("#1D1D8F");
+ c = TQColor("#1D1D8F");
} else if (aText.startsWith("+")) {
- c = QColor("#008B00");
+ c = TQColor("#008B00");
if (aText.startsWith("+++")) {
f.setBold(true);
}
} else if (aText.startsWith("-")) {
- c = QColor("#CD3333");
+ c = TQColor("#CD3333");
if (aText.startsWith("---")) {
f.setBold(true);
}
} else if (aText.startsWith("@@")) {
- c = QColor("#1D1D8F");
+ c = TQColor("#1D1D8F");
}
if (endStateOfLastPara==2 && ret==2) {
if (aText.startsWith(" +")) {
- c = QColor("#008B00");
+ c = TQColor("#008B00");
} else if (aText.startsWith(" -")) {
- c = QColor("#CD3333");
+ c = TQColor("#CD3333");
}
}
setFormat(0,(int)aText.length(),f,c);