Help for KProcess

Jens R. Calame calame at rz.uni-potsdam.de
Sun Jan 2 21:46:19 GMT 2000


Am Mit, 29 Dez 1999 schrieben Sie:
> 
> Hello,
> 
> I have a problem with KProcess.
> Here this that I would want to make:
> I have a directory containing a MySQL database who serves me of pattern (/usr/mysql/modele).
> I create a new database who is going to serve me for my software (for example /usr/mysql/THOMAS).
> I must copy the whole some tables of the database "modele" toward the database "THOMAS"
> I use the for it orders: cp  /usr/mysql/modele/*  /usr/mysql/THOMAS
> 
> After numerous tests with KProcess I don't have any result. Here the used code.
>  Someone would can he say me this who doesn't go.
> 
> Thank you.
> 
> source = "/var/mysql/modele/*";
> 
> destination = "/var/mysql/" + base + QString("/");
> 
> KShellProcess proc;
> 
> proc.clearArguments();
> 
> proc << "cp " + (QString) "'" + source + (QString) "' '" + destination + (QString) "'";

Maybe this line is not correct. KShellProcess has to get the
application-parameters one by one. That means you should try to do it this way:

proc << cp << source << destination;

I hope it works.

> 
> proc.start(KProcess::Block,KProcess::AllOutput); */
> 
> 

Jens R. Calame
-- 
Error reduces
Your expensive computer
To a simple stone.
(NetPositive)




More information about the KDevelop mailing list