mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
Being specific about which open is called on mac
This commit is contained in:
parent
e088d09723
commit
250cdae0e5
@ -279,13 +279,17 @@ void PreferencesDialog::Save()
|
|||||||
// <base-path>/myApp.app/Contents/MacOS/myApp
|
// <base-path>/myApp.app/Contents/MacOS/myApp
|
||||||
//apppath=QApplication::instance()->applicationDirPath()+"/../../../SleepyHead.app";
|
//apppath=QApplication::instance()->applicationDirPath()+"/../../../SleepyHead.app";
|
||||||
apppath=QApplication::instance()->applicationDirPath().section("/",0,-3);
|
apppath=QApplication::instance()->applicationDirPath().section("/",0,-3);
|
||||||
if (QDesktopServices::openUrl(apppath)) {
|
bool success=false;
|
||||||
QApplication::instance()->exit();
|
//if (QDesktopServices::openUrl(apppath)) {
|
||||||
} else if (QProcess::startDetached("open",QStringList() << apppath)) {
|
// success=true;
|
||||||
QApplication::instance()->exit();
|
//} else
|
||||||
} else {
|
if (QProcess::startDetached("/usr/bin/open",QStringList() << apppath)) {
|
||||||
QMessageBox::warning(this,"Gah!","If you can read this, two seperate application restart commands didn't work. Mark want's to know the following string:"+apppath,QMessageBox::Ok);
|
success=true;
|
||||||
}
|
}
|
||||||
|
if (!success) {
|
||||||
|
QMessageBox::warning(this,"Gah!","If you can read this, two seperate application restart commands didn't work. Mark want's to know the following string:"+apppath,QMessageBox::Ok);
|
||||||
|
} else QApplication::instance()->exit();
|
||||||
|
|
||||||
#else
|
#else
|
||||||
apppath=QApplication::instance()->applicationFilePath();
|
apppath=QApplication::instance()->applicationFilePath();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user