QProcess::startDetached deprecated in 4.6.3?
I'm writing a piece of code to download and launch a particular file outside of my application and have been running into an issue with Qt 4.6.3. I have the code tested and working on my local Qt 4.8.1 and 4.8.4 builds but when I have built the executables using 4.6.3 I do not see the same behavior of the QProcess::startDetached launching. Code snippet below, any tips?
QProcess *installer = new QProcess(this);
sh.start("tar -xvf " + filename);
QByteArray output= sh.readAll();
filename = "file.app";
QFileInfo *path2 = new QFileInfo(filename);
QString filepath = path2->absoluteFilePath() + "/Contents/MacOS/osx-intel";
What should happen and what is happening ?
I appreciate the quick response, the behavior that I am seeing is when executing the code in 4.8.4 the process starts the file.app/Contents/MacOS/osx-intel and continues on it's way. When I build on qt 4.6.3 (external build machine) the code downloads the file into the tar.gz format and does not execute the untar step at line 5. This whole code snippet is trying to deal with the mac .app format for an application. Note: seeing same behavior with linux build with the following code:
QFile launch(filename); launch.setPermissions(QFile::ReadOwner|QFile::WriteOwner|QFile::ExeOwner|QFile::ReadGroup|QFile::WriteGroup|QFile::ExeGroup|QFile::ReadOther|QFile::WriteOther|QFile::ExeOther);
QFileInfo *path = new QFileInfo(filename);
Did you check the output standard out/error from QProcess to see if it complained about something ? i.e. invalid file location etc...