Hello everyone, I've a function which save my firebird db.
Qt Code:
  1. if(!QFile::exists(QString("%1/Db/TSF_CARNET_REVEILS.FDB").arg(qApp->applicationDirPath())))
  2. {
  3. QMessageBox::critical(this,AppName,"Fichier de base de données introuvable.");
  4. return;
  5. }
  6.  
  7. QProcess proc_copy_db;
  8. QString cmd_proc = QString("copy \"%1\\Db\\TSF_CARNET_REVEILS.FDB\" \"%1\\Db\SaveDb\"").arg(qApp->applicationDirPath().replace("/", "\\"), QDate::currentDate().toString("dd_MM_yyyy"));
  9. proc_copy_db.start(cmd_proc);
  10.  
  11. if (!proc_copy_db.waitForStarted())
  12. return ;
  13.  
  14. proc_copy_db.closeWriteChannel();
  15.  
  16. if (!proc_copy_db.waitForFinished())
  17. return;
To copy to clipboard, switch view to plain text mode 
The problem is that the process exit from waitForStarted. I've tried to obtain the exitCode and Error but always I've 0 and Unknow Error.
Can anyone tell me where I'm wrong and what to do to resolve this problem.
This function is lunched by button clik.
Many thanks in advance.
Best regards.