Skip to content

Commit

Permalink
fix: 修复驱动扫描过程中必现设备管理器窗口崩溃
Browse files Browse the repository at this point in the history
 aptupdate前驱动扫描过程中必现设备管理器窗口崩溃

Log:  aptupdate前驱动扫描过程中必现设备管理器窗口崩溃

Bug: https://pms.uniontech.com/bug-view-238513.html
  • Loading branch information
jeffshuai authored and deepin-bot[bot] committed Jan 17, 2024
1 parent f59e986 commit e2826b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions deepin-devicemanager/src/DriverControl/DriverScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ void DriverScanner::run()

QString output = process.readAllStandardOutput();
QStringList lines = output.split("\n");
QRegExp rxlen("(\\d+\\S*)");
int pos = rxlen.indexIn(lines[1]);
if (pos > -1 && info->version().isEmpty()) {
info->m_Version = rxlen.cap(1);
if(lines.size()>=2) {
QRegExp rxlen("(\\d+\\S*)");
int pos = rxlen.indexIn(lines[1]);
if (pos > -1 && info->version().isEmpty()) {
info->m_Version = rxlen.cap(1);
}
}
}

Expand Down

0 comments on commit e2826b6

Please sign in to comment.