As a workaround i have changed the way i do programatical restart. I have to use process respawn to keep phonon alive:
// Restart Application
void myApp::Restart(bool Abort)
{
// Spawn a new instance of myApplication:
#ifdef Q_OS_WIN
proc.startDetached(this->applicationFilePath());
#endif
#ifdef Q_OS_MAC
// In Mac OS the full path of aplication binary is:
// <base-path>/myApp.app/Contents/MacOS/myApp
args << (this->applicationDirPath() + "/../../../myApp.app");
proc.startDetached("open", args);
#endif
// Terminate current instance:
if (Abort) // Abort Application process (exit immediattely)
::exit(0);
else
this->exit(0); // Exit gracefully by terminating the myApp instance
}
// Restart Application
void myApp::Restart(bool Abort)
{
// Spawn a new instance of myApplication:
QProcess proc;
#ifdef Q_OS_WIN
proc.startDetached(this->applicationFilePath());
#endif
#ifdef Q_OS_MAC
// In Mac OS the full path of aplication binary is:
// <base-path>/myApp.app/Contents/MacOS/myApp
QStringList args;
args << (this->applicationDirPath() + "/../../../myApp.app");
proc.startDetached("open", args);
#endif
// Terminate current instance:
if (Abort) // Abort Application process (exit immediattely)
::exit(0);
else
this->exit(0); // Exit gracefully by terminating the myApp instance
}
To copy to clipboard, switch view to plain text mode
Maybe the phonon failure is a QT bug or i am missing some object lifetime nuance. If someone has some thoughts, i will appreciate it.
Best regards,
Bookmarks