Re: [Interest] Qt and bash scripts

2012-07-01 Thread Phil
On 02/07/12 14:41, Mandeep Sandhu wrote: > > As Thiago mentioned, why aren't you using QDir/QFileInfo for this > requirement? You don't need to run 'ls' to get a dir's contents. Or > did you use ls just to illustrate your problem? Yes, it's just an example. > Also, in your sample code, you're cal

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Mandeep Sandhu
On Mon, Jul 2, 2012 at 7:08 AM, Phil wrote: > On 01/07/12 22:27, Thiago Macieira wrote: >> On domingo, 1 de julho de 2012 22.12.50, Phil wrote: >>> { >>> QProcess myProcess; >>> QString str; >>> >>> myProcess.start( "ls" ); >>> >>> if (!myProcess.waitForFinished()) >>>

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Phil
On 01/07/12 22:27, Thiago Macieira wrote: > On domingo, 1 de julho de 2012 22.12.50, Phil wrote: >> { >> QProcess myProcess; >> QString str; >> >> myProcess.start( "ls" ); >> >> if (!myProcess.waitForFinished()) >>qDebug()<< "Make failed:"<< myProcess.errorStri

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Thiago Macieira
On domingo, 1 de julho de 2012 22.12.50, Phil wrote: > { > QProcess myProcess; > QString str; > > myProcess.start( "ls" ); > > if (!myProcess.waitForFinished()) > qDebug() << "Make failed:" << myProcess.errorString(); > else > { > qDebug() << "Make

Re: [Interest] Qt and bash scripts

2012-07-01 Thread R. Reucher
On Sunday 01 July 2012 14:12:50 Phil wrote: > On 01/07/12 21:38, Thiago Macieira wrote: > >> I had also tried start() but the output still goes to the console. Is it > >> possible to have the directory list inserted into a string or string > >> list? > > > > Please show us the code you used when y

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Phil
On 01/07/12 21:38, Thiago Macieira wrote: >> >> I had also tried start() but the output still goes to the console. Is it >> possible to have the directory list inserted into a string or string list? > > Please show us the code you used when you used start(). { QProcess myProcess; QString

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Thiago Macieira
On domingo, 1 de julho de 2012 21.33.07, Phil wrote: > On 01/07/12 21:10, Thiago Macieira wrote: > > On domingo, 1 de julho de 2012 19.10.51, Phil wrote: > >> myProcess.startDetached("ls"); > > > > You started detached. You don't get the output of a detached execution. > > You > > need to use

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Phil
On 01/07/12 21:10, Thiago Macieira wrote: > On domingo, 1 de julho de 2012 19.10.51, Phil wrote: >> myProcess.startDetached("ls"); > > You started detached. You don't get the output of a detached execution. You > need to use start() to communicate with a process. > Thanks Thiago for your rep

Re: [Interest] Qt and bash scripts

2012-07-01 Thread Thiago Macieira
On domingo, 1 de julho de 2012 19.10.51, Phil wrote: > myProcess.startDetached("ls"); You started detached. You don't get the output of a detached execution. You need to use start() to communicate with a process. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel

[Interest] Qt and bash scripts

2012-07-01 Thread Phil
Thank you for reading this. The following is an example of what I'm attempting. I'd like a string or a string list to contain the output from ls. Array, in my example, is always empty. QProcess myProcess; myProcess.startDetached("ls"); QByteArray array = myProcess.readAllStanda