Hi!
I'm working on program where two types of documents are created and afterwards opened. For opening I'm using QProcess in a thread. The problem is that when try to open files it only opens the last one twice.
Here are parts of code.
Main program:
Qt Code:
  1. openMe open1;
  2. openMe open2;
  3. .
  4. .
  5. .
  6. .
  7. void class::someFunc(){
  8. open1.setFname(fname1);
  9. open1.start();
  10. open2.setFname(fname2):
  11. open2.start();
  12. }
To copy to clipboard, switch view to plain text mode 

openMe class looks like this:
Qt Code:
  1. QString fname;
  2. openMe::openMe()
  3. {
  4. fname="";
  5. }
  6. void openMe::run(){
  7. fname.replace("/","\\\\");
  8. p.start("cmd.exe", QStringList() << /c << fname);
  9. p.waitForFinished();
  10.  
  11. }
  12.  
  13. void openMe::setFname(QString name){
  14. fname=name;
  15. }
To copy to clipboard, switch view to plain text mode 

As I mentioned earlier opening files separately works great but when running simultaneously it only opens last file twice. Is there some obvious issue or expected behaviour?

-Ville-