diff --git a/OfficeAssistant_msvc/applicationmanager.cpp b/OfficeAssistant_msvc/applicationmanager.cpp index 3a5b264..d6801ca 100644 --- a/OfficeAssistant_msvc/applicationmanager.cpp +++ b/OfficeAssistant_msvc/applicationmanager.cpp @@ -171,7 +171,7 @@ void ApplicationManager::onclick1(QString op, QString func, QString path, QStrin DeviceRequest *device_request = new DeviceRequest;//构造函数里面会自动发送请求 delete device_request; } - if(software_ok&&app_ok) + if (software_ok && app_ok) { QMessageBox::information(this, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("更新成功")); emit refresh_tab(); diff --git a/OfficeAssistant_msvc/mainwindowlayout.cpp b/OfficeAssistant_msvc/mainwindowlayout.cpp index d92dd84..76dfa3c 100644 --- a/OfficeAssistant_msvc/mainwindowlayout.cpp +++ b/OfficeAssistant_msvc/mainwindowlayout.cpp @@ -76,7 +76,9 @@ void MainWindowLayout::clickButton(QString orig_name,QString op, QString func, Q } } else if(op=="soft"){ - ShellExecute(GetDesktopWindow(), L"open",path.toStdWString().c_str(),L"",initial_position.toStdWString().c_str(),SW_SHOW); + path.replace("/", "\\"); + initial_position.replace("/", "\\"); + WinExec(path.toStdString().c_str(), SW_SHOW); emit clickButton1(op, url); }else { diff --git a/OfficeAssistant_msvc/sqlitehelper.cpp b/OfficeAssistant_msvc/sqlitehelper.cpp index f89eb9d..8be2424 100644 --- a/OfficeAssistant_msvc/sqlitehelper.cpp +++ b/OfficeAssistant_msvc/sqlitehelper.cpp @@ -1372,7 +1372,7 @@ int SQLiteHelper::insert_software(QString name, QString orig_name, QString path, time_t create_time; time(&create_time); query.addBindValue(create_time); - query.addBindValue("app"); + query.addBindValue("soft"); query.addBindValue("open"); query.addBindValue(path); query.addBindValue("");