提交测试,基本完成

This commit is contained in:
Mike Solar
2023-08-13 12:16:22 +08:00
parent b8da134809
commit 098e06a39b
40 changed files with 3219 additions and 1782 deletions

View File

@ -56,6 +56,7 @@ void MySettingsDialog::autoStart(int state)
}
QString app = QApplication::applicationFilePath();
app.replace("/", "\\");
app += " autostart";
qDebug() << app.toStdWString().c_str();
lRet = RegSetValueEx(hKey, LENG_NAME, 0, REG_SZ, (BYTE*)app.toStdWString().c_str(), app.length()*sizeof(wchar_t));
if (lRet == ERROR_SUCCESS)
@ -63,6 +64,11 @@ void MySettingsDialog::autoStart(int state)
QMessageBox::information(this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>"));
}
RegCloseKey(hKey);
if(agree)
{
OpRequest op_request("auto_start", "true");
op_request.sendRequest();
}
}
else if (state == Qt::Unchecked) {
HKEY hRoot = HKEY_CURRENT_USER;
@ -82,6 +88,11 @@ void MySettingsDialog::autoStart(int state)
QMessageBox::information(this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>"));
}
RegCloseKey(hKey);
if(agree)
{
OpRequest op_request("auto_start", "false");
op_request.sendRequest();
}
}
}