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

feat: improve coding selection settings #508

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions src/common/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,17 @@
}
}

connect(&Settings::get(), &Settings::setDecodeModel, this, [=](QString key, QVariant value){

Check warning on line 2960 in src/common/mainwindow.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Parameter 'key' is passed by value. It could be passed as a const reference which is usually faster and recommended in C++.
if (key == "base.decode.select" && value.toInt() == 3){
DDialog msgBox;
msgBox.setIcon(QIcon(":/resources/icons/warning.svg"));
msgBox.setTitle(tr("Professional mode is only for professionals to use"));
msgBox.setMessage(tr("During the adaptation process, there may be issues such as screen distortion, freezing, stuttering, torn images, \n"
"unsynchronized audio and video, and player crashes. Please use with caution."));
msgBox.addButton(tr("OK"), true, DDialog::ButtonType::ButtonRecommend);
msgBox.setOnButtonClickedClose(true);
msgBox.exec();
}
if (key == "base.decode.select") {
int decodeType = Settings::get().settings()->getOption(QString("base.decode.select")).toInt();
if (decodeType != 3) {
Expand Down
10 changes: 10 additions & 0 deletions src/common/platform/platform_mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2974,7 +2974,17 @@
}
}

connect(&Settings::get(), &Settings::setDecodeModel, this, [=](QString key, QVariant value){

Check warning on line 2977 in src/common/platform/platform_mainwindow.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Parameter 'key' is passed by value. It could be passed as a const reference which is usually faster and recommended in C++.
if (key == "base.decode.select" && value.toInt() == 3){
DDialog msgBox;
msgBox.setIcon(QIcon(":/resources/icons/warning.svg"));
msgBox.setTitle(tr("Professional mode is only for professionals to use"));
msgBox.setMessage(tr("During the adaptation process, there may be issues such as screen distortion, freezing, stuttering, torn images, \n"
"unsynchronized audio and video, and player crashes. Please use with caution."));
msgBox.addButton(tr("OK"), true, DDialog::ButtonType::ButtonRecommend);
msgBox.setOnButtonClickedClose(true);
msgBox.exec();
}
if (key == "base.decode.select") {
int decodeType = Settings::get().settings()->getOption(QString("base.decode.select")).toInt();
if (decodeType != 3) {
Expand Down
Loading
Loading