[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/vcs/cvsservice
From: Robert Gruber <rgruber () users ! sourceforge ! net>
Date: 2005-04-15 10:32:04
Message-ID: 20050415103204.332A15FA () office ! kde ! org
[Download RAW message or body]
CVS commit by rgruber:
Make use of BufferedStringReader to prevent broken lines.
M cvslogpage.cpp 1.11
M cvslogpage.h 1.7
--- kdevelop/vcs/cvsservice/cvslogpage.cpp #1.10:1.11
@@ -69,4 +69,5 @@ void CVSLogPage::startLog( const QString
// "cvs log" needs to be done on relative-path basis
m_pathName = pathName;
+ m_diffStrings.clear();
DCOPRef job = m_cvsService->log( pathName );
@@ -76,5 +77,5 @@ void CVSLogPage::startLog( const QString
connectDCOPSignal( job.app(), job.obj(), "jobExited(bool, int)", \
"slotJobExited(bool, int)", true ); // We'll read the ouput directly from the job \
...
-// connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", \
"slotReceivedOutput(QString)", true ); + connectDCOPSignal( job.app(), job.obj(), \
"receivedStdout(QString)", "slotReceivedOutput(QString)", true ); // \
connectDCOPSignal( job.app(), job.obj(), "receivedStderr(QString)", \
"slotReceivedErrors(QString)", true );
@@ -124,7 +125,6 @@ void CVSLogPage::slotJobExited( bool nor
m_textBrowser->setTextFormat( QTextBrowser::PlainText );
- QStringList lines = m_cvsLogJob->output();
- for (size_t i=0; i<lines.count(); ++i) {
- QString s = lines[i];
+ for (size_t i=0; i<m_diffStrings.count(); ++i) {
+ QString s = m_diffStrings[i];
kdDebug(9006) << "Examining line: " << s << endl;
if ( rx_rev.exactMatch(s) )
@@ -192,4 +192,5 @@ void CVSLogPage::slotReceivedOutput( QSt
kdDebug(9006) << "OUTPUT: " << someOutput << endl;
+ m_diffStrings += m_outputBuffer.process(someOutput);
}
--- kdevelop/vcs/cvsservice/cvslogpage.h #1.6:1.7
@@ -15,4 +15,5 @@
#include "cvsservicedcopIface.h"
#include <qwidget.h>
+#include "bufferedstringreader.h"
class CvsJob_stub;
@@ -53,4 +54,6 @@ private:
QTextBrowser *m_textBrowser;
QString m_logTextBackup;
+ BufferedStringReader m_outputBuffer;
+ QStringList m_diffStrings;
CvsService_stub *m_cvsService;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic