summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-27 16:04:33 +0200
committerMichael BrĂ¼ning <michael.bruning@qt.io>2017-04-04 07:02:21 +0000
commitbfe8875e2119568786b1e98710d44f898313add4 (patch)
tree4b660d4434363e9dce5494ac601454048dc8fbea /src
parentff15dec87970a6ed9fdb1f41c344ec9513853ae8 (diff)
Fix assert in autotest on windows
Chromium now asserts if the clipboard lists the same mimetype twice. Change-Id: Ibfcbb9a7953a8b4b55035e633e0f2740257af6ad Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/clipboard_qt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp
index 3f4b2eb1..9d2ff4c0 100644
--- a/src/core/clipboard_qt.cpp
+++ b/src/core/clipboard_qt.cpp
@@ -294,7 +294,7 @@ void ClipboardQt::ReadAvailableTypes(ui::ClipboardType type, std::vector<base::s
const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection);
if (!mimeData)
return;
- if (mimeData->hasImage())
+ if (mimeData->hasImage() && !mimeData->formats().contains(QStringLiteral("image/png")))
types->push_back(toString16(QStringLiteral("image/png")));
Q_FOREACH (const QString &mimeType, mimeData->formats())
types->push_back(toString16(mimeType));