From bfe8875e2119568786b1e98710d44f898313add4 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 27 Mar 2017 16:04:33 +0200
Subject: [PATCH] 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>
---
 src/core/clipboard_qt.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp
index 3f4b2eb17..9d2ff4c0e 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));
-- 
GitLab