Fix qclipboard autotest on Windows.
Emit changed signal only if the clipboard is not owned, in which case QClipboard does it. Task-number: QTBUG-24184 Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
844b096d67
commit
e0d9fade03
@ -283,14 +283,17 @@ bool QWindowsClipboard::clipboardViewerWndProc(HWND hwnd, UINT message, WPARAM w
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case WM_DRAWCLIPBOARD:
|
case WM_DRAWCLIPBOARD: {
|
||||||
|
const bool owned = ownsClipboard();
|
||||||
if (QWindowsContext::verboseOLE)
|
if (QWindowsContext::verboseOLE)
|
||||||
qDebug("Clipboard changed");
|
qDebug("Clipboard changed owned %d", owned);
|
||||||
emitChanged(QClipboard::Clipboard);
|
if (!owned) // changed is emitted by QClipboard in that case.
|
||||||
|
emitChanged(QClipboard::Clipboard);
|
||||||
// clean up the clipboard object if we no longer own the clipboard
|
// clean up the clipboard object if we no longer own the clipboard
|
||||||
if (!ownsClipboard() && m_data)
|
if (!owned && m_data)
|
||||||
releaseIData();
|
releaseIData();
|
||||||
propagateClipboardMessage(message, wParam, lParam);
|
propagateClipboardMessage(message, wParam, lParam);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
// Recommended shutdown
|
// Recommended shutdown
|
||||||
|
@ -16,7 +16,6 @@ wince* {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mac: CONFIG += insignificant_test # QTBUG-23057
|
mac: CONFIG += insignificant_test # QTBUG-23057
|
||||||
win32:CONFIG += insignificant_test # QTBUG-24184
|
|
||||||
|
|
||||||
load(testcase) # for target.path and installTestHelperApp()
|
load(testcase) # for target.path and installTestHelperApp()
|
||||||
installTestHelperApp("../copier/copier",copier,copier)
|
installTestHelperApp("../copier/copier",copier,copier)
|
||||||
|
Loading…
Reference in New Issue
Block a user