OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2010 Sencha, Inc. All rights reserved. | 5 * Copyright (C) 2010 Sencha, Inc. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 if (policy() != ClipboardReadable || !m_readableData->hasUrls()) | 200 if (policy() != ClipboardReadable || !m_readableData->hasUrls()) |
201 return FileList::create(); | 201 return FileList::create(); |
202 | 202 |
203 RefPtr<FileList> fileList = FileList::create(); | 203 RefPtr<FileList> fileList = FileList::create(); |
204 QList<QUrl> urls = m_readableData->urls(); | 204 QList<QUrl> urls = m_readableData->urls(); |
205 | 205 |
206 for (int i = 0; i < urls.size(); i++) { | 206 for (int i = 0; i < urls.size(); i++) { |
207 QUrl url = urls[i]; | 207 QUrl url = urls[i]; |
208 if (url.scheme() != QLatin1String("file")) | 208 if (url.scheme() != QLatin1String("file")) |
209 continue; | 209 continue; |
210 fileList->append(File::create(url.toLocalFile(), File::AllContentTypes))
; | 210 fileList->append(File::create(url.toLocalFile())); |
211 } | 211 } |
212 | 212 |
213 return fileList.release(); | 213 return fileList.release(); |
214 } | 214 } |
215 | 215 |
216 void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) | 216 void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) |
217 { | 217 { |
218 setDragImage(image, 0, point); | 218 setDragImage(image, 0, point); |
219 } | 219 } |
220 | 220 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 if (isForCopyAndPaste() && policy() == ClipboardReadable) { | 358 if (isForCopyAndPaste() && policy() == ClipboardReadable) { |
359 const QStringList types = m_readableData->formats(); | 359 const QStringList types = m_readableData->formats(); |
360 for (int i = 0; i < types.count(); ++i) | 360 for (int i = 0; i < types.count(); ++i) |
361 items->addPasteboardItem(types.at(i)); | 361 items->addPasteboardItem(types.at(i)); |
362 } | 362 } |
363 return items; | 363 return items; |
364 } | 364 } |
365 #endif | 365 #endif |
366 | 366 |
367 } | 367 } |
OLD | NEW |