add linux.
This commit is contained in:
@ -60,7 +60,12 @@ Widget::~Widget() {
|
||||
void Widget::start() {
|
||||
m_progressBar->setValue(0);
|
||||
auto filePath = m_fileEditor->text();
|
||||
if (!std::filesystem::exists(Amass::StringUtility::UTF8ToGBK(filePath.toStdString()))) {
|
||||
#ifdef Q_OS_WIN
|
||||
auto path = Amass::StringUtility::UTF8ToGBK(filePath.toStdString());
|
||||
#else
|
||||
auto path = filePath.toStdString();
|
||||
#endif
|
||||
if (!std::filesystem::exists(path)) {
|
||||
QMessageBox::warning(this, "升级", "升级文件不存在!");
|
||||
return;
|
||||
}
|
||||
@ -72,7 +77,7 @@ void Widget::start() {
|
||||
|
||||
std::error_code error;
|
||||
setMessage("尝试发现设备......");
|
||||
auto device = discovery->find("UVC Camera", error);
|
||||
auto device = discovery->find(DeviceDiscovery::DeviceName, error);
|
||||
if (!device) {
|
||||
QMessageBox::warning(this, "升级", "未检测到模组,请尝试重新插入模组!");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user