[Webkit-unassigned] [Bug 26710] [Qt] Qt needs Clipboard::files() implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 3 21:50:42 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26710


Benjamin Meyer <ben at meyerhome.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ben at meyerhome.net




--- Comment #1 from Benjamin Meyer <ben at meyerhome.net>  2009-10-03 21:50:41 PDT ---
Is there a test page for this feature?  Is it suppose to return the file names
ore the file contents?

First pass:

 PassRefPtr<FileList> ClipboardQt::files() const
 {
-    notImplemented();
-    return 0;
+    if (policy() != ClipboardReadable)
+        return FileList::create();
+
+    RefPtr<FileList> fileList = FileList::create();
+    QList<QUrl> urls = m_readableData->urls();
+    foreach (QUrl url, urls) {
+        if (url.scheme() != QLatin1String("file"))
+            continue;
+        fileList->append(File::create(url.toLocalFile()));
+    }
+
+    return fileList.release();
 }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list