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

List:       kde-devel
Subject:    Re: Interacting with KProcess
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2008-09-30 15:27:19
Message-ID: 20080930152719.GA31663 () ugly ! local
[Download RAW message or body]

On Tue, Sep 30, 2008 at 08:58:28PM +0800, Yew Ming Chen wrote:
>        QString readAllData(m_kprocess->readAll());
>        QStringList lines = readAllData.split(QRegExp("[\\r\\n]+"),
>
such newline handling is usually broken. see
http://techbase.kde.org/Development/Tutorials/Common_Programming_Mistakes#Reading_QString_from_a_KProcess
(the last bullet point should be outdated as of qt 4.4).

> Any help would be really appreciated.
> 
it might be that the process wants a TTY. you can verify that by playing
with input redirection on the command line.
if it is indeed the case, you'd have to use KPtyProcess then. there are
examples how to do that all over kde (use lxr.kde.org).

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Confusion, chaos, panic - my work here is done.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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