Index: lib/project/envvartools.cpp
===================================================================
RCS file: /home/kde/kdevelop/lib/project/envvartools.cpp,v
retrieving revision 1.1
diff -u -r1.1 envvartools.cpp
--- lib/project/envvartools.cpp	25 Jul 2003 19:54:20 -0000	1.1
+++ lib/project/envvartools.cpp	28 Jul 2003 14:33:29 -0000
@@ -10,11 +10,12 @@
  ***************************************************************************/
 
 #include "envvartools.h"
+#include <qregexp.h>
 
 QString EnvVarTools::quote( const QString & arg )
 {
     QString res = arg;
-    res.replace(QString::fromLatin1("'"), QString::fromLatin1("'\\''"));
+    res.replace(QRegExp(QString::fromLatin1("'")), QString::fromLatin1("'\\''"));
     res.prepend("\"");
     res.append("\"");
     return res;
Index: parts/cppsupport/cppnewclassdlg.cpp
===================================================================
RCS file: /home/kde/kdevelop/parts/cppsupport/cppnewclassdlg.cpp,v
retrieving revision 1.46
diff -u -r1.46 cppnewclassdlg.cpp
--- parts/cppsupport/cppnewclassdlg.cpp	27 Jul 2003 15:03:57 -0000	1.46
+++ parts/cppsupport/cppnewclassdlg.cpp	28 Jul 2003 14:33:30 -0000
@@ -48,6 +48,41 @@
 #include "parsedmethod.h"
 #include "classgeneratorconfig.h"
 
+#if QT_VERSION < 0x030100
+// copied from qt-3.2/src/tools/qregexp.cpp
+/*!
+  Returns the string \a str with every regexp special character
+  escaped with a backslash. The special characters are $, (, ), *, +,
+  ., ?, [, \, ], ^, {, | and }.
+
+  Example:
+  \code
+     s1 = QRegExp::escape( "bingo" );   // s1 == "bingo"
+     s2 = QRegExp::escape( "f(x)" );    // s2 == "f\\(x\\)"
+  \endcode
+
+  This function is useful to construct regexp patterns dynamically:
+
+  \code
+    QRegExp rx( "(" + QRegExp::escape(name) +
+		"|" + QRegExp::escape(alias) + ")" );
+  \endcode
+*/
+QString QRegExp_escape(const QString& str )
+{
+    static const char meta[] = "$()*+.?[\\]^{|}";
+    QString quoted = str;
+    int i = 0;
+
+    while ( i < (int) quoted.length() ) {
+	if ( strchr(meta, quoted[i].latin1()) != 0 )
+	    quoted.insert( i++, "\\" );
+	i++;
+    }
+    return quoted;
+}
+#endif
+
 CppNewClassDialog::CppNewClassDialog(KDevPlugin *part, QWidget *parent, const char *name)
 	: CppNewClassDialogBase(parent, name)
 {
@@ -1002,7 +1037,11 @@
   className = dlg.classname_edit->text().simplifyWhiteSpace();
   QString temp = className;
   className.replace(QRegExp("template *<.*> *(class *)?"), "");
-  templateStr = temp.replace(QRegExp(QRegExp::escape(className)), "");
+#if QT_VERSION < 0x030100
+  templateStr = temp.replace(QRegExp(QRegExp_escape(className)), "");
+#else
+  templateStr = temp.replace(QRegExp(QRegExp::escape(QRegExp(className))), "");
+#endif
   templateStr.replace(QRegExp(" *class *$"), "");
 
   templateParams = templateStr;
@@ -1722,7 +1761,11 @cvs server: Diffing parts/cppsupport/newclass_templates
@
   QString className = name.simplifyWhiteSpace();
   QString temp = className;
   className.replace(QRegExp("template *<.*> *(class *)?"), "");
-  QString templateStr = temp.replace(QRegExp(QRegExp::escape(className)), "");
+#if QT_VERSION < 0x030100
+  QString templateStr = temp.replace(QRegExp(QRegExp_escape(className)), "");
+#else
+  QString templateStr = temp.replace(QRegExp::escape(className), "");
+#endif
   templateStr.replace(QRegExp(" *class *$"), "");
   return templateStr;
 }
@@ -1737,7 +1780,11 @@
   QString className = name.simplifyWhiteSpace();
   QString temp = className;
   className.replace(QRegExp("template *<.*> *(class *)?"), "");
+#if QT_VERSION < 0x030100
+  QString templateStr = temp.replace(QRegExp(QRegExp_escape(className)), "");
+#else
   QString templateStr = temp.replace(QRegExp(QRegExp::escape(className)), "");
+#endif
   templateStr.replace(QRegExp(" *class *$"), "");
 
   QString templateParams = templateStr;
@@ -1753,7 +1800,11 @@
   QString className = name.simplifyWhiteSpace();
   QString temp = className;
   className.replace(QRegExp("<.*> *"), "");
+#if QT_VERSION < 0x030100
+  QString templateStr = temp.replace(QRegExp(QRegExp_escape(className)), "");
+#else
   QString templateStr = temp.replace(QRegExp(QRegExp::escape(className)), "");
+#endif
   return templateStr;
 }
 
Index: parts/grepview/grepdlg.cpp
===================================================================
RCS file: /home/kde/kdevelop/parts/grepview/grepdlg.cpp,v
retrieving revision 1.18
diff -u -r1.18 grepdlg.cpp
--- parts/grepview/grepdlg.cpp	15 Jul 2003 07:34:19 -0000	1.18
+++ parts/grepview/grepdlg.cpp	28 Jul 2003 14:33:30 -0000
@@ -33,6 +33,10 @@
 
 #include "grepviewpart.h"
 
+#ifndef KDE_IS_VERSION
+#define KDE_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
+#define KDE_IS_VERSION(a,b,c) ( KDE_VERSION >= KDE_MAKE_VERSION(a,b,c) )
+#endif
 
 const char *template_desc[] = {
     "verbatim",
@@ -209,6 +213,7 @@
     }
     return list;
 }
+
 
 GrepDialog::~GrepDialog()
 {
