修复打不开自行添加的应用

master
Mike Solar 2023-09-06 21:22:06 +08:00
parent a96f802b85
commit ede78c640b
3 changed files with 5 additions and 3 deletions

View File

@ -76,7 +76,9 @@ void MainWindowLayout::clickButton(QString orig_name,QString op, QString func, Q
} }
} }
else if(op=="soft"){ 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); emit clickButton1(op, url);
}else }else
{ {

View File

@ -1372,7 +1372,7 @@ int SQLiteHelper::insert_software(QString name, QString orig_name, QString path,
time_t create_time; time_t create_time;
time(&create_time); time(&create_time);
query.addBindValue(create_time); query.addBindValue(create_time);
query.addBindValue("app"); query.addBindValue("soft");
query.addBindValue("open"); query.addBindValue("open");
query.addBindValue(path); query.addBindValue(path);
query.addBindValue(""); query.addBindValue("");