提交测试,基本完成
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user