summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/qt/ClipboardQt.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebCore/platform/qt/ClipboardQt.cpp
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes
Diffstat (limited to 'Source/WebCore/platform/qt/ClipboardQt.cpp')
-rw-r--r--Source/WebCore/platform/qt/ClipboardQt.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/WebCore/platform/qt/ClipboardQt.cpp b/Source/WebCore/platform/qt/ClipboardQt.cpp
index e1569926e..6212f58b8 100644
--- a/Source/WebCore/platform/qt/ClipboardQt.cpp
+++ b/Source/WebCore/platform/qt/ClipboardQt.cpp
@@ -48,9 +48,8 @@
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
-#include <QGuiApplication>
#include <QClipboard>
-#include <QImage>
+#include <QGuiApplication>
#include <QList>
#include <QMimeData>
#include <QStringList>
@@ -183,13 +182,13 @@ bool ClipboardQt::setData(const String& type, const String& data)
}
// extensions beyond IE's API
-HashSet<String> ClipboardQt::types() const
+ListHashSet<String> ClipboardQt::types() const
{
if (policy() != ClipboardReadable && policy() != ClipboardTypesReadable)
- return HashSet<String>();
+ return ListHashSet<String>();
ASSERT(m_readableData);
- HashSet<String> result;
+ ListHashSet<String> result;
QStringList formats = m_readableData->formats();
for (int i = 0; i < formats.count(); ++i)
result.add(formats.at(i));
@@ -244,7 +243,7 @@ DragImageRef ClipboardQt::createDragImage(IntPoint& dragLoc) const
if (!m_dragImage)
return 0;
dragLoc = m_dragLoc;
- return new QImage(*m_dragImage->image()->nativeImageForCurrentFrame());
+ return m_dragImage->image()->nativeImageForCurrentFrame();
}
@@ -274,9 +273,9 @@ void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, co
CachedImage* cachedImage = getCachedImage(element);
if (!cachedImage || !cachedImage->imageForRenderer(element->renderer()) || !cachedImage->isLoaded())
return;
- QImage* image = cachedImage->imageForRenderer(element->renderer())->nativeImageForCurrentFrame();
- if (image)
- m_writableData->setImageData(*image);
+ QPixmap* pixmap = cachedImage->imageForRenderer(element->renderer())->nativeImageForCurrentFrame();
+ if (pixmap)
+ m_writableData->setImageData(*pixmap);
QList<QUrl> urls;
urls.append(url);