[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/ctags
From:       Dirk Mueller <mueller () kde ! org>
Date:       2003-09-02 0:35:55
[Download RAW message or body]

CVS commit by mueller: 

KRegExp -> QRegExp


  M +11 -11    ctagspart.cpp   1.19


--- kdevelop/parts/ctags/ctagspart.cpp  #1.18:1.19
@@ -22,5 +22,5 @@
 #include <kmessagebox.h>
 #include <kprocess.h>
-#include <kregexp.h>
+#include <qregexp.h>
 
 #include "kdevcore.h"
@@ -189,18 +189,18 @@ bool CTagsPart::loadTagsFile()
     
     QTextStream stream(&f);
-    KRegExp re("^([^\t]*)\t([^\t]*)\t([^;]*);\"\t(.*)$");
+    QRegExp re("^([^\t]*)\t([^\t]*)\t([^;]*);\"\t(.*)$");
         
-    QCString line;
+    QString line;
     while (!stream.atEnd()) {
         line = stream.readLine().latin1();
         //        kdDebug() << "Line: " << line << endl;
-        if (!re.match(line))
+        if (re.search(line) == -1)
             continue;
 
         
-        QString tag = re.group(1);
-        QString file = re.group(2);
-        QString pattern = re.group(3);
-        QString extfield = re.group(4);
+        QString tag = re.cap(1);
+        QString file = re.cap(2);
+        QString pattern = re.cap(3);
+        QString extfield = re.cap(4);
         //        kdDebug() <<"Tag " << tag << ", file " << file << ", pattern "
         //                  << pattern << ", extfield " << extfield << endl;
@@ -210,7 +210,7 @@ bool CTagsPart::loadTagsFile()
 
         CTagsTagInfo ti;
-        ti.fileName = re.group(2);
-        ti.pattern = re.group(3);
-        ti.kind = re.group(4)[0];
+        ti.fileName = re.cap(2);
+        ti.pattern = re.cap(3);
+        ti.kind = re.cap(4)[0].latin1();
         (*tiit).append(ti);
         


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic