Skip to content

Commit

Permalink
fix: the correct get the product machine name
Browse files Browse the repository at this point in the history
the correct get the product machine name

Log: the correct get the product machine name
Bug: https://pms.uniontech.com/bug-view-267231.html
  • Loading branch information
add-uos committed Aug 22, 2024
1 parent a540a7c commit b403694
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int main(int argc, char *argv[])

int mp4Encode = -1;

Check warning on line 126 in src/main.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Finding the same expression on both sides of an operator is suspicious and might indicate a cut and paste or logic error. Please examine this code carefully to determine if it is correct.
#ifdef DTKCORE_CLASS_DConfigFile
//需要查询是否对PGUX设置MP4编码缓存特殊处理
//需要查询是否对不同机型设置MP4编码缓存特殊处理
DConfig *dconfig = DConfig::create("org.deepin.camera", "org.deepin.camera.encode");
if (dconfig && dconfig->isValid() && dconfig->keyList().contains("mp4EncodeMode")) {
mp4Encode = dconfig->value("mp4EncodeMode").toInt();
Expand All @@ -134,10 +134,10 @@ int main(int argc, char *argv[])
#endif
qInfo() << "mp4EncodeMode value is:" << get_pugx_status();
if (mp4Encode == -1) {
//判断是否是pgux
QStringList options;
options << QString(QStringLiteral("-c"));
options << QString(QStringLiteral("dmidecode -s system-product-name|awk '{print $NF}'"));
options << QString(QStringLiteral("dmidecode -t 11 | grep 'String 4' | awk '{print $NF}' && "
"dmidecode -s system-product-name|awk '{print $NF}'"));
QProcess process;
process.start(QString(QStringLiteral("bash")), options);
process.waitForFinished();
Expand Down

0 comments on commit b403694

Please sign in to comment.