Skip to content

Commit

Permalink
fix: 修复设置项保存失败问题 (#448)
Browse files Browse the repository at this point in the history
修复从自定义切制软硬解码后保存失败问题

Log: 修复部分已知问题
  • Loading branch information
pengfeixx authored Apr 17, 2024
1 parent e62b8bf commit 947607c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 46 deletions.
3 changes: 1 addition & 2 deletions src/common/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2849,8 +2849,7 @@ void MainWindow::handleSettings(DSettingsDialog *dsd)
msgBox.addButton(tr("Restart"), true, DDialog::ButtonType::ButtonWarning);
msgBox.setOnButtonClickedClose(true);
if (msgBox.exec() == 1) {
if (Settings::get().settings()->getOption(QString("base.decode.select")).toInt() == 3)
Settings::get().settings()->setOption("set.start.crash", "2");
Settings::get().settings()->setOption("set.start.crash", "2");
qApp->exit();
QProcess::startDetached(qApp->applicationFilePath(), QStringList() << "--restart");
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/common/platform/platform_mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2874,8 +2874,7 @@ void Platform_MainWindow::handleSettings(DSettingsDialog *dsd)
msgBox.addButton(tr("Restart"), true, DDialog::ButtonType::ButtonWarning);
msgBox.setOnButtonClickedClose(true);
if (msgBox.exec() == 1) {
if (Settings::get().settings()->getOption(QString("base.decode.select")).toInt() == 3)
Settings::get().settings()->setOption("set.start.crash", "2");
Settings::get().settings()->setOption("set.start.crash", "2");
qApp->exit();
QProcess::startDetached(qApp->applicationFilePath(), QStringList() << "--restart");
} else {
Expand Down
40 changes: 21 additions & 19 deletions translations/deepin-movie_bo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,37 @@
<message>
<location filename="../src/widgets/mircastshowwidget.cpp" line="57"/>
<source>Exit Miracast</source>
<translation type="unfinished"></translation>
<translation>ཕྱིར་འཐེན་ཡོལ་བ།</translation>
</message>
<message>
<location filename="../src/widgets/mircastshowwidget.cpp" line="74"/>
<source>Projecting...
Please do not exit the Movie app during the process.</source>
<translation type="unfinished"></translation>
<translation>གྲིབ་གཟུགས་འཕེན་པ།
བརྒྱུད་རིམ་འདིའི་ཁྲོད་དུ་གློག་བརྙན་བཀོལ་སྤྱོད་ཀྱི་གོ་རིམ་ལས་ཕྱིར་འབུད་མི་རུང།。</translation>
</message>
<message>
<location filename="../src/widgets/mircastshowwidget.cpp" line="102"/>
<source>Display device</source>
<translation type="unfinished"></translation>
<translation>སྒྲིག་ཆས་མངོན་པ།</translation>
</message>
</context>
<context>
<name>MircastWidget</name>
<message>
<location filename="../src/widgets/mircastwidget.cpp" line="71"/>
<source>Project to</source>
<translation type="unfinished"></translation>
<translation>རྣམ་གྲངས་ཐོན་པ།</translation>
</message>
<message>
<location filename="../src/widgets/mircastwidget.cpp" line="369"/>
<source>Searching for devices...</source>
<translation type="unfinished"></translation>
<translation>འཚོལ་ཞིབ་སྒྲིག་ཆས་འཚོལ་ཞིབ་བྱེད་བཞིན་ཡོད།...</translation>
</message>
<message>
<location filename="../src/widgets/mircastwidget.cpp" line="378"/>
<source>No Miracast display devices were found. Please connect the device and your computer to the same WLAN network.</source>
<translation type="unfinished"></translation>
<translation>Mirrasttstst སྒྲིག་ཆས་དང་རྩིས་འཁོར་གཉིས་WLANདྲ་རྒྱ་གཅིག་ཏུ་སྦྲེལ་རོགས།</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -324,22 +325,22 @@ Please do not exit the Movie app during the process.</source>
<message>
<location filename="../src/common/settings_translation.cpp" line="64"/>
<source>Customize</source>
<translation type="unfinished"></translation>
<translation>རང་ཉིད་མཚན་ཉིད་འཇོག་པ།</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="65"/>
<source>Decode mode</source>
<translation type="unfinished"></translation>
<translation>མ་དཔེ་འགྲེལ་སྟངས།</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="66"/>
<source>Video out</source>
<translation type="unfinished"></translation>
<translation>བརྙན་ལམ་ཕྱིར་གཏོང་།</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="67"/>
<source>Rendering engine</source>
<translation type="unfinished"></translation>
<translation>སྒུལ་བྱེད་འཕྲུལ་འཁོར་ལ་ཚོས་རྒྱག་དགོས།</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="322"/>
Expand Down Expand Up @@ -372,7 +373,8 @@ Please do not exit the Movie app during the process.</source>
<location filename="../src/common/mainwindow.cpp" line="2872"/>
<source>The custom decoding method needs to be restarted before it can take effect,
and whether to restart it?</source>
<translation type="unfinished"></translation>
<translation>མཚན་ཉིད་འཇོག་པའི་ཨང་སྒྲིག་བྱེད་ཐབས་ལ་བསྐྱར་དུ་སྒོ་འབྱེད་དགོས་ན་གཞི་ནས་ནུས་པ་འཐོན་
དེ་བཞིན་བསྐྱར་དུ་འགོ་ཚུགས་པ་ཡིན་ནམ།</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3261"/>
Expand Down Expand Up @@ -837,13 +839,13 @@ and whether to restart it?</source>
<location filename="../src/common/mainwindow.cpp" line="2848"/>
<location filename="../src/common/mainwindow.cpp" line="2873"/>
<source>Cancel</source>
<translation type="unfinished">འདོར་བ། </translation>
<translation>མེད་པར་བཟོ་དགོས།</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="2849"/>
<location filename="../src/common/mainwindow.cpp" line="2874"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>བསྐྱར་དུ་འགོ་འཛུགས་དགོས།</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="3054"/>
Expand Down Expand Up @@ -1272,13 +1274,13 @@ and whether to restart it?</source>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2873"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2899"/>
<source>Cancel</source>
<translation type="unfinished">འདོར་བ། </translation>
<translation>མེད་པར་བཟོ་དགོས།</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2874"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2900"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>བསྐྱར་དུ་འགོ་འཛུགས་དགོས།</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3064"/>
Expand Down Expand Up @@ -1470,7 +1472,7 @@ and whether to restart it?</source>
<message>
<location filename="../src/widgets/platform/platform_toolbox_proxy.cpp" line="1190"/>
<source>Miracast</source>
<translation type="unfinished"></translation>
<translation>སྨི་ལ་ཁ་སི་ཐེ།</translation>
</message>
<message>
<location filename="../src/widgets/platform/platform_toolbox_proxy.cpp" line="2132"/>
Expand Down Expand Up @@ -1605,7 +1607,7 @@ and whether to restart it?</source>
<location filename="../src/widgets/toolbox_proxy.cpp" line="1314"/>
<location filename="../src/widgets/toolbox_proxy.cpp" line="2859"/>
<source>Miracast</source>
<translation type="unfinished"></translation>
<translation>སྨི་ལ་ཁ་སི་ཐེ།</translation>
</message>
<message>
<location filename="../src/widgets/toolbox_proxy.cpp" line="2306"/>
Expand All @@ -1629,15 +1631,15 @@ and whether to restart it?</source>
<message>
<location filename="../src/widgets/toolbox_proxy.cpp" line="2842"/>
<source>Volume</source>
<translation type="unfinished"></translation>
<translation>རྒྱུགས་ཤོག</translation>
</message>
</context>
<context>
<name>dmr::VolumeButton</name>
<message>
<location filename="../src/widgets/toolbutton.cpp" line="19"/>
<source>Volume</source>
<translation type="unfinished"></translation>
<translation>རྒྱུགས་ཤོག</translation>
</message>
</context>
</TS>
23 changes: 12 additions & 11 deletions translations/deepin-movie_ug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,27 +319,27 @@ Please do not exit the Movie app during the process.</source>
<message>
<location filename="../src/common/settings_translation.cpp" line="63"/>
<source>Software decoding</source>
<translation>يۇمشال دېتال ئارقىلىق كود يېيىش</translation>
<translation>يۇمشال دېتال ئارقىلىق كود يېيىشيۇمشاق دېتاللارنى سىزىش</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="64"/>
<source>Customize</source>
<translation type="unfinished"></translation>
<translation>خاسلاشتۇرۇش</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="65"/>
<source>Decode mode</source>
<translation type="unfinished"></translation>
<translation>كودنى يوقىتىش ھالىتى</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="66"/>
<source>Video out</source>
<translation type="unfinished"></translation>
<translation>ۋىدېئو چىقىرىش</translation>
</message>
<message>
<location filename="../src/common/settings_translation.cpp" line="67"/>
<source>Rendering engine</source>
<translation type="unfinished"></translation>
<translation>يوقىتىش ماتورى</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="322"/>
Expand Down Expand Up @@ -372,7 +372,8 @@ Please do not exit the Movie app during the process.</source>
<location filename="../src/common/mainwindow.cpp" line="2872"/>
<source>The custom decoding method needs to be restarted before it can take effect,
and whether to restart it?</source>
<translation type="unfinished"></translation>
<translation>ئۆزى بەلگىلەش ئۇسۇلىنى قوللىنىشتىن بۇرۇن قايتا قوزغىتىشقا توغرا كېلىدۇ ،
يەنە قايتا قوزغىتىش كېرەكمۇ يوق؟</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3261"/>
Expand Down Expand Up @@ -837,13 +838,13 @@ and whether to restart it?</source>
<location filename="../src/common/mainwindow.cpp" line="2848"/>
<location filename="../src/common/mainwindow.cpp" line="2873"/>
<source>Cancel</source>
<translation type="unfinished">بىكار قىلىش</translation>
<translation>بىكار قىلىشئەمەلدىن قالدۇرۇش</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="2849"/>
<location filename="../src/common/mainwindow.cpp" line="2874"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>قايتا قوزغىتىش</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="3054"/>
Expand Down Expand Up @@ -1272,13 +1273,13 @@ and whether to restart it?</source>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2873"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2899"/>
<source>Cancel</source>
<translation type="unfinished">بىكار قىلىش</translation>
<translation>ئەمەلدىن قالدۇرۇش</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2874"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2900"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>قايتا قوزغىتىش</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3064"/>
Expand Down Expand Up @@ -1629,7 +1630,7 @@ and whether to restart it?</source>
<message>
<location filename="../src/widgets/toolbox_proxy.cpp" line="2842"/>
<source>Volume</source>
<translation type="unfinished">ئاۋاز</translation>
<translation>ئاۋازئاۋاز چوڭلۇقى</translation>
</message>
</context>
<context>
Expand Down
8 changes: 4 additions & 4 deletions translations/deepin-movie_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,13 +838,13 @@ and whether to restart it?</source>
<location filename="../src/common/mainwindow.cpp" line="2848"/>
<location filename="../src/common/mainwindow.cpp" line="2873"/>
<source>Cancel</source>
<translation></translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="2849"/>
<location filename="../src/common/mainwindow.cpp" line="2874"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>重启</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="3054"/>
Expand Down Expand Up @@ -1273,13 +1273,13 @@ and whether to restart it?</source>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2873"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2899"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2874"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2900"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>重启</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3064"/>
Expand Down
8 changes: 4 additions & 4 deletions translations/deepin-movie_zh_HK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,13 +838,13 @@ and whether to restart it?</source>
<location filename="../src/common/mainwindow.cpp" line="2848"/>
<location filename="../src/common/mainwindow.cpp" line="2873"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="2849"/>
<location filename="../src/common/mainwindow.cpp" line="2874"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="3054"/>
Expand Down Expand Up @@ -1273,13 +1273,13 @@ and whether to restart it?</source>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2873"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2899"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2874"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2900"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>重啓</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3064"/>
Expand Down
8 changes: 4 additions & 4 deletions translations/deepin-movie_zh_TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,13 +838,13 @@ and whether to restart it?</source>
<location filename="../src/common/mainwindow.cpp" line="2848"/>
<location filename="../src/common/mainwindow.cpp" line="2873"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="2849"/>
<location filename="../src/common/mainwindow.cpp" line="2874"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>重啓</translation>
</message>
<message>
<location filename="../src/common/mainwindow.cpp" line="3054"/>
Expand Down Expand Up @@ -1273,13 +1273,13 @@ and whether to restart it?</source>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2873"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2899"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
<translation>取消</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2874"/>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="2900"/>
<source>Restart</source>
<translation type="unfinished"></translation>
<translation>重啓</translation>
</message>
<message>
<location filename="../src/common/platform/platform_mainwindow.cpp" line="3064"/>
Expand Down

0 comments on commit 947607c

Please sign in to comment.