@ -1841,6 +1841,18 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
}
if(pMimeData->hasHtml())
{
QString qsHtml = pMimeData->html();
QString url = UBApplication::urlFromHtml(qsHtml);
if(!("" == url))
downloadURL(url, pPos);
return;
if (pMimeData->hasUrls())
QList<QUrl> urls = pMimeData->urls();
@ -17,6 +17,7 @@
#include <QtGui>
#include <QtWebKit>
#include <QtXml>
#if defined(Q_WS_MACX)
#include <Carbon/Carbon.h>
@ -629,3 +630,18 @@ QString UBApplication::globalStyleSheet()
return style;
QString UBApplication::urlFromHtml(QString html)
QString url;
QDomDocument domDoc;
domDoc.setContent(html);
QDomElement rootElem = domDoc.documentElement();
url = rootElem.attribute("src");
qDebug() << url;
return url;
@ -88,6 +88,7 @@ class UBApplication : public QtSingleApplication
bool isVerbose() { return mIsVerbose;}
void setVerbose(bool verbose){mIsVerbose = verbose;}
static QString urlFromHtml(QString html);
signals: