Skip to content

Commit

Permalink
feat: improve coding selection settings
Browse files Browse the repository at this point in the history
improve coding selection settings

Log: improve coding selection settings
Task: https://pms.uniontech.com/task-view-359615.html
  • Loading branch information
add-uos authored and deepin-bot[bot] committed Aug 19, 2024
1 parent 84a9aa5 commit a050fbf
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 100 deletions.
10 changes: 10 additions & 0 deletions src/common/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2958,6 +2958,16 @@ DSettingsDialog *MainWindow::initSettings()
}

connect(&Settings::get(), &Settings::setDecodeModel, this, [=](QString key, QVariant value){
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 @@ -2975,6 +2975,16 @@ DSettingsDialog *Platform_MainWindow::initSettings()
}

connect(&Settings::get(), &Settings::setDecodeModel, this, [=](QString key, QVariant value){
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

0 comments on commit a050fbf

Please sign in to comment.