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

List:       kde-commits
Subject:    kdevelop/parts/perforce
From:       Harald Fernengel <harald () trolltech ! com>
Date:       2002-12-12 21:00:54
[Download RAW message or body]

CVS commit by harald: 

remove the crappy perforce diff headers


  M +9 -1      perforcepart.cpp   1.8


--- kdevelop/parts/perforce/perforcepart.cpp  #1.7:1.8
@@ -15,4 +15,5 @@
 #include <qfileinfo.h>
 #include <qpopupmenu.h>
+#include <qregexp.h>
 #include <kpopupmenu.h>
 #include <kdebug.h>
@@ -211,6 +212,13 @@ void PerforcePart::slotDiffFinished( con
     }
 
+    // strip the ==== headers
+    static QRegExp rx( "(^|\\n)====.*====\\n" );
+    rx.setMinimal( true );
+    QString strippedDiff = diff;
+    strippedDiff.replace( rx, QString::null );
+    qDebug ( "got diff:\n" + strippedDiff );
+
     Q_ASSERT( diffFrontend() );
-    diffFrontend()->showDiff( diff );    
+    diffFrontend()->showDiff( strippedDiff );
 }
 


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

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