[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevelop/lib/util
From: Dukju Ahn <dukjuahn () gmail ! com>
Date: 2007-05-26 13:58:36
Message-ID: 1180187916.390142.11760.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 668457 by dukjuahn:
Use correct operator to append string.
Resurrect public slots that can be used without K3Proc.
TODO: capture \r\n on window system. I couldn't test on
windows development env.
M +22 -2 processlinemaker.cpp
M +6 -0 processlinemaker.h
--- trunk/KDE/kdevelop/lib/util/processlinemaker.cpp #668456:668457
@@ -55,7 +55,7 @@
while ( (pos = stdoutbuf.indexOf('\n')) != -1)
{
QString line = stdoutbuf.left(pos);
- lineList += line;
+ lineList << line;
stdoutbuf.remove(0, pos+1);
}
emit p->receivedStdoutLines(lineList);
@@ -83,7 +83,7 @@
while ( (pos = stderrbuf.indexOf('\n')) != -1)
{
QString line = stderrbuf.left(pos);
- lineList += line;
+ lineList << line;
stderrbuf.remove(0, pos+1);
}
emit p->receivedStderrLines(lineList);
@@ -105,6 +105,26 @@
this, SLOT(slotReceivedStderr(K3Process*,char*,int)) );
}
+void ProcessLineMaker::slotReceivedStdout( const QString& s )
+{
+ d->processStdOut( s );
+}
+
+void ProcessLineMaker::slotReceivedStdout( const char* buffer )
+{
+ d->processStdOut( QString::fromLocal8Bit( buffer ) );
+}
+
+void ProcessLineMaker::slotReceivedStderr( const QString& s )
+{
+ d->processStdErr( s );
+}
+
+void ProcessLineMaker::slotReceivedStderr( const char* buffer )
+{
+ d->processStdErr( QString::fromLocal8Bit( buffer ) );
+}
+
void ProcessLineMaker::clearBuffers( )
{
d->stderrbuf = "";
--- trunk/KDE/kdevelop/lib/util/processlinemaker.h #668456:668457
@@ -47,6 +47,12 @@
ProcessLineMaker( const K3Process* );
void clearBuffers();
+public slots:
+ void slotReceivedStdout( const QString& );
+ void slotReceivedStderr( const QString& );
+ void slotReceivedStdout( const char* );
+ void slotReceivedStderr( const char* );
+
signals:
void receivedStdoutLines( const QStringList& );
void receivedStderrLines( const QStringList& );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic