diff --git a/LedOK/globaldefine.h b/LedOK/globaldefine.h index 3aeb7c6..24f846f 100644 --- a/LedOK/globaldefine.h +++ b/LedOK/globaldefine.h @@ -199,6 +199,7 @@ inline int verCompare(const QString& a, const QString& b) { int bbb = bparts[i].toInt(); if(aaa != bbb) return aaa - bbb; } + if(aparts.count() == bparts.count()) return 0; return aparts.count() > bparts.count() ? aparts[cnt].toInt() : bparts[cnt].toInt(); } diff --git a/LedOK/mainwindow.cpp b/LedOK/mainwindow.cpp index 62519df..e8d6fd6 100644 --- a/LedOK/mainwindow.cpp +++ b/LedOK/mainwindow.cpp @@ -259,7 +259,7 @@ MainWindow::MainWindow(QWidget *parent) : BaseWin(parent) { qFile.close(); if(res != QDialog::Accepted) return; QApplication::quit(); - QDesktopServices::openUrl("file://"+filePath); + QDesktopServices::openUrl(QUrl::fromLocalFile(filePath)); }); menu_setting->addAction(act_update);