Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the correct get the product machine name #308

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
format.setDefaultFormat(format);
set_wayland_status(1);

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 @@
#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
Loading