fix: AI screenshot actions should save to UOS AI assistant instead of…#756
Merged
deepin-bot[bot] merged 1 commit intoNov 17, 2025
Merged
fix: AI screenshot actions should save to UOS AI assistant instead of…#756deepin-bot[bot] merged 1 commit into
deepin-bot[bot] merged 1 commit into
Conversation
… clipboard only - Modified mouseDblClickEF() to call saveScreenShot() when isHideToolBar is true in AI screenshot mode - Updated Enter key shortcuts (returnSC, enterSC) to use saveScreenShot() instead of saveScreenShotToClipboardOnly() in AI mode - Ensures screenshotSaved signal is triggered to emit CustomDone signal for UOS AI integration - Maintains backward compatibility for normal screenshot workflow and scrollshot functionality This fix resolves the issue where AI screenshot Q&A feature incorrectly saved screenshots to clipboard only, now properly sends screenshots to UOS AI assistant input box as expected. 修复:AI截图操作应保存到UOS AI助手而非仅保存到剪贴板 - 修改mouseDblClickEF()方法,在AI截图模式下(isHideToolBar为true时)调用saveScreenShot() - 更新Enter键快捷键(returnSC, enterSC),在AI模式下使用saveScreenShot()而非saveScreenShotToClipboardOnly() - 确保触发screenshotSaved信号以发送CustomDone信号给UOS AI集成 - 保持对普通截图工作流程和滚动截图功能的向后兼容性 此修复解决了AI截图问答功能错误地仅将截图保存到剪贴板的问题, 现在能够正确地将截图发送到UOS AI助手输入框中。 bug: https://pms.uniontech.com/bug-view-334287.html
deepin pr auto review我来对这段代码进行审查:
改进建议: // 添加私有辅助方法
void MainWindow::handleSaveAction()
{
if (status::shot == m_functionType) {
if (isHideToolBar) {
saveScreenShot();
} else {
saveScreenShotToClipboardOnly();
}
}
}
void MainWindow::initSaveShortcut()
{
// Return键处理
connect(returnSC, &QShortcut::activated, this, [this] {
if (status::shot == m_functionType || status::scrollshot == m_functionType) {
qCDebug(dsrApp) << "shortcut : returnSC (key: enter)";
handleSaveAction();
}
});
// Enter键处理
connect(enterSC, &QShortcut::activated, this, [this] {
if (status::shot == m_functionType || status::scrollshot == m_functionType) {
qCDebug(dsrApp) << "shortcut : enterSC (key: enter)";
handleSaveAction();
}
if (status::record == m_functionType && Utils::isWaylandMode)
m_showButtons->showContentButtons(KEY_ENTER);
});
}
int MainWindow::mouseDblClickEF(QMouseEvent *mouseEvent, bool &needRepaint)
{
if (mouseEvent->button() == Qt::LeftButton) {
if (status::shot == m_functionType) {
qCDebug(dsrApp) << "双击鼠标按钮!进行截图保存!";
handleSaveAction();
}
}
return 1;
}改进后的代码:
其他建议:
|
lzwind
approved these changes
Nov 17, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev, lzwind 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 |
Member
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
2608839
into
linuxdeepin:develop/snipe
8 of 9 checks passed
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.
… clipboard only
This fix resolves the issue where AI screenshot Q&A feature incorrectly saved screenshots to clipboard only, now properly sends screenshots to UOS AI assistant input box as expected.
修复:AI截图操作应保存到UOS AI助手而非仅保存到剪贴板
此修复解决了AI截图问答功能错误地仅将截图保存到剪贴板的问题,
现在能够正确地将截图发送到UOS AI助手输入框中。
bug: https://pms.uniontech.com/bug-view-334287.html