[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kleopatra/commands
From: Marc Mutz <mutz () kde ! org>
Date: 2008-02-14 10:37:21
Message-ID: 1202985441.164571.11317.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 774906 by mutz:
Chop off newlines off the end
M +7 -1 dumpcrlcachecommand.cpp
--- trunk/KDE/kdepim/kleopatra/commands/dumpcrlcachecommand.cpp #774905:774906
@@ -113,6 +113,12 @@
using namespace Kleo;
using namespace Kleo::Commands;
+static QByteArray chomped( QByteArray ba ) {
+ while ( ba.endsWith( '\n' ) || ba.endsWith( '\r' ) )
+ ba.chop( 1 );
+ return ba;
+}
+
class DumpCrlCacheCommand::Private : Command::Private {
friend class ::Kleo::Commands::DumpCrlCacheCommand;
DumpCrlCacheCommand * q_func() const { return static_cast<DumpCrlCacheCommand*>( q ); }
@@ -133,7 +139,7 @@
void slotProcessReadyReadStandardOutput() {
while ( process.canReadLine() ) {
- const QByteArray line = process.readLine();
+ const QByteArray line = chomped( process.readLine() );
if ( dialog )
dialog->append( QString::fromLocal8Bit( line ) );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic