src/gui/kernel/qmime_win.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
child 30 5dc02b23752f
equal deleted inserted replaced
6:dee5afe5301f 8:3f74d0d4af4c
   638 
   638 
   639             return setData(result, pmedium);
   639             return setData(result, pmedium);
   640         } else if (getCf(formatetc) == CF_INETURL_W) {
   640         } else if (getCf(formatetc) == CF_INETURL_W) {
   641             QList<QUrl> urls = mimeData->urls();
   641             QList<QUrl> urls = mimeData->urls();
   642             QByteArray result;
   642             QByteArray result;
   643             QString url = urls.at(0).toString();
   643             if (!urls.isEmpty()) {
   644             result = QByteArray((const char *)url.utf16(), url.length() * sizeof(ushort));
   644                 QString url = urls.at(0).toString();
       
   645                 result = QByteArray((const char *)url.utf16(), url.length() * sizeof(ushort));
       
   646             }
   645             result.append('\0');
   647             result.append('\0');
   646             result.append('\0');
   648             result.append('\0');
   647             return setData(result, pmedium);
   649             return setData(result, pmedium);
   648         } else if (getCf(formatetc) == CF_INETURL) {
   650         } else if (getCf(formatetc) == CF_INETURL) {
   649             QList<QUrl> urls = mimeData->urls();
   651             QList<QUrl> urls = mimeData->urls();
   650             QByteArray result = urls.at(0).toString().toLocal8Bit();
   652             QByteArray result;
       
   653             if (!urls.isEmpty())
       
   654                 result = urls.at(0).toString().toLocal8Bit();
   651             return setData(result, pmedium);
   655             return setData(result, pmedium);
   652         }
   656         }
   653     }
   657     }
   654 
   658 
   655     return false;
   659     return false;