From ac9530027e8bc0f03411714653356c83bdf61a10 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 8 Nov 2011 19:15:33 +1000 Subject: [PATCH] Try QDesktopServices::openUrl as well if the other method fails --- preferencesdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/preferencesdialog.cpp b/preferencesdialog.cpp index 6fb1a035..5179402f 100644 --- a/preferencesdialog.cpp +++ b/preferencesdialog.cpp @@ -286,6 +286,10 @@ void PreferencesDialog::Save() apppath=QApplication::instance()->applicationDirPath().section("/",0,-3); if (proc.startDetached("open",QStringList() << apppath)) { QApplication::instance()->exit(); + } else { + if (QDesktopServices::openUrl(apppath)) { + QApplication::instance()->exit(); + } else 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); } /*qDebug() << "Hi Jimbo! :)"; qDebug() << "applicationFilePath:" << QApplication::instance()->applicationFilePath();