Repository navigation
fix: disable open-file menu action on success/failure pages - #490
Merged
deepin-bot[bot] merged 1 commit intoSep 18, 2026
Merged
deepin-bot[bot] merged 1 commit into
deepin-bot[bot] merged 1 commit into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates refreshPage() so the Open file action is disabled on both success and failure pages, preventing users from invoking an unsupported file-selection flow whose selections would otherwise be discarded. Flow diagram for disabling Open file on terminal pagesflowchart TD
Refresh["refreshPage()"] --> Page{Current page}
Page -->|PI_Success| Success["Show success page"]
Page -->|PI_Failure| Failure["Show failure page"]
Success --> DisableSuccess["m_pOpenAction.setEnabled(false)"]
Failure --> DisableFailure["m_pOpenAction.setEnabled(false)"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
In refreshPage(), the PI_Success and PI_Failure branches only called setTitleButtonStyle(false, false) to hide custom title bar buttons but did not disable the m_pOpenAction menu action. This left the 'Open file' menu item clickable on the compression success/failure pages, and since slotChoosefiles() has no PI_Success/PI_Failure branch, the selected files were silently discarded. Add m_pOpenAction->setEnabled(false) to both branches, consistent with the PI_UnCompress branch which already manages m_pOpenAction state. Since m_pOpenAction is shared state, also restore it when leaving these pages: resetMainwindow() re-enables it (covers returning to home), the PI_UnCompress branch re-enables it from bModifiable in non-external permission mode (covers failure retry), and slotChoosefiles() now returns early on success/failure as a defensive guard. Fixes: PMS-248123
LiHua000
force-pushed
the
agent/pms-bug-bot/078c9722d02b
branch
from
September 18, 2026 08:32
f9e5665 to
0133b9e
Compare
max-lvs
approved these changes
Sep 18, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In refreshPage(), the PI_Success and PI_Failure branches only called setTitleButtonStyle(false, false) to hide custom title bar buttons but did not disable the m_pOpenAction menu action. This left the 'Open file' menu item clickable on the compression success/failure pages, and since slotChoosefiles() has no PI_Success/PI_Failure branch, the selected files were silently discarded.
Add m_pOpenAction->setEnabled(false) to both branches, consistent with the PI_UnCompress branch (line 329) which already manages m_pOpenAction state.
Fixes: PMS-248123
Summary by Sourcery
Prevent file selection from being available on compression result pages and restore the action when returning to an active workflow.
Bug Fixes:
Enhancements: