Skip to content

Commit 36d3c2b

Browse files
fix: Fix screenshot file path not returned when called via third-party interface
Third-party applications (such as mail clients) call screenshots via the D-Bus StartScreenshotFor3rd interface and expect the file path to be returned through the D-Bus Done signal. bug: https://pms.uniontech.com/bug-view-350301.html
1 parent 427b004 commit 36d3c2b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main_window.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ void MainWindow::initSaveShortcut()
12681268
connect(returnSC, &QShortcut::activated, this, [=] {
12691269
if (status::shot == m_functionType || status::scrollshot == m_functionType) {
12701270
qCDebug(dsrApp) << "shortcut : returnSC (key: enter)";
1271-
if (status::shot == m_functionType && isHideToolBar) {
1271+
if (status::shot == m_functionType && (isHideToolBar || m_shotWithPath)) {
12721272
saveScreenShot();
12731273
} else {
12741274
saveScreenShotToClipboardOnly();
@@ -1279,7 +1279,7 @@ void MainWindow::initSaveShortcut()
12791279
connect(enterSC, &QShortcut::activated, this, [=] {
12801280
if (status::shot == m_functionType || status::scrollshot == m_functionType) {
12811281
qCDebug(dsrApp) << "shortcut : enterSC (key: enter)";
1282-
if (status::shot == m_functionType && isHideToolBar) {
1282+
if (status::shot == m_functionType && (isHideToolBar || m_shotWithPath)) {
12831283
saveScreenShot();
12841284
} else {
12851285
saveScreenShotToClipboardOnly();
@@ -5014,7 +5014,7 @@ int MainWindow::mouseDblClickEF(QMouseEvent *mouseEvent, bool &needRepaint)
50145014
if (mouseEvent->button() == Qt::LeftButton) {
50155015
if (status::shot == m_functionType) {
50165016
qCDebug(dsrApp) << "双击鼠标按钮!进行截图保存!";
5017-
if (isHideToolBar) {
5017+
if (isHideToolBar || m_shotWithPath) {
50185018
saveScreenShot();
50195019
} else {
50205020
saveScreenShotToClipboardOnly();
@@ -7573,7 +7573,7 @@ void MainWindow::confirm()
75737573
return;
75747574
}
75757575

7576-
if (!isHideToolBar) {
7576+
if (!isHideToolBar && !m_shotWithPath) {
75777577
saveScreenShotToClipboardOnly();
75787578
} else {
75797579
saveScreenShot();

0 commit comments

Comments
 (0)