ledok
This commit is contained in:
parent
57ea8006bb
commit
dc8e119c0c
|
@ -228,6 +228,7 @@ MainWindow::MainWindow(QWidget *parent) : BaseWin(parent) {
|
|||
auto url = updates["url"].toString();
|
||||
auto idx = url.lastIndexOf('.');
|
||||
if(idx!=-1) filePath += url.midRef(idx);
|
||||
qDebug()<<"filePath"<<filePath;
|
||||
QFile qFile(filePath);
|
||||
if(! qFile.open(QFile::WriteOnly)) {
|
||||
QMessageBox::critical(this, tr("Fail"), tr("Cannot Save File")+": "+qFile.errorString()+"\n"+filePath);
|
||||
|
@ -258,7 +259,7 @@ MainWindow::MainWindow(QWidget *parent) : BaseWin(parent) {
|
|||
qFile.close();
|
||||
if(res != QDialog::Accepted) return;
|
||||
QApplication::quit();
|
||||
QDesktopServices::openUrl(filePath);
|
||||
QDesktopServices::openUrl("file://"+filePath);
|
||||
});
|
||||
menu_setting->addAction(act_update);
|
||||
|
||||
|
@ -278,7 +279,8 @@ MainWindow::MainWindow(QWidget *parent) : BaseWin(parent) {
|
|||
}
|
||||
#ifdef Q_OS_WIN
|
||||
updates = json["win"].toObject();
|
||||
#elif Q_OS_MAC
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
updates = json["mac"].toObject();
|
||||
#endif
|
||||
if(verCompare(updates["ver"].toString(), APP_VERSION) > 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user