linux not use gbk.
This commit is contained in:
parent
8f72fbded7
commit
7c2a29740b
@ -453,7 +453,11 @@ void DeviceConnection::requestOta(const QString &firmware, const QString &file)
|
|||||||
Task task;
|
Task task;
|
||||||
task.command = "a22devicefirmware_setdata";
|
task.command = "a22devicefirmware_setdata";
|
||||||
task.task = [this, file, firmware]() {
|
task.task = [this, file, firmware]() {
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
std::ifstream ifs(file.toStdString(), std::ifstream::binary);
|
||||||
|
#else
|
||||||
std::ifstream ifs(Amass::StringUtility::UTF8ToGBK(file.toStdString()), std::ifstream::binary);
|
std::ifstream ifs(Amass::StringUtility::UTF8ToGBK(file.toStdString()), std::ifstream::binary);
|
||||||
|
#endif
|
||||||
m_uploadBuffer = std::vector<uint8_t>((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
|
m_uploadBuffer = std::vector<uint8_t>((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
|
||||||
m_sendedSize = 0;
|
m_sendedSize = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user