diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-26 13:28:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-29 11:51:04 +0000 |
commit | 5f0bd2b8126ffbfb5314e922848ab9b9f901f7d9 (patch) | |
tree | 219c549a68ea3e9c705b5ce9c5873d5da8563a89 /src | |
parent | 434ef539381bbc3c19f54f914d5bda83eafdc92b (diff) |
Fix warning and assertion on OS X and Windows
We should not try to write to the selection clipboard on platforms
where selection clipboards are not supported.
Change-Id: I05a4e5a5181c0a2cd83f115e3181902a1e349ed0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/clipboard_qt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp index f7ca9764d..797f5c7f4 100644 --- a/src/core/clipboard_qt.cpp +++ b/src/core/clipboard_qt.cpp @@ -208,7 +208,7 @@ void ClipboardQt::WriteObjects(ui::ClipboardType type, const ObjectMap& objects) if (uncommittedData) QGuiApplication::clipboard()->setMimeData(uncommittedData.take(), type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); - if (type == ui::CLIPBOARD_TYPE_COPY_PASTE) { + if (type == ui::CLIPBOARD_TYPE_COPY_PASTE && IsSupportedClipboardType(ui::CLIPBOARD_TYPE_SELECTION)) { ObjectMap::const_iterator text_iter = objects.find(CBF_TEXT); if (text_iter != objects.end()) { // Copy text and SourceTag to the selection clipboard. |