1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[Fix] Fixed icon in bookmark when dropping from site icon

This commit is contained in:
nowrep 2012-01-22 20:13:50 +01:00
parent e163a8cd81
commit ab342fa161
2 changed files with 2 additions and 2 deletions

View File

@ -575,7 +575,7 @@ void BookmarksToolbar::dropEvent(QDropEvent* e)
QString title = mime->text();
QUrl url = mime->urls().at(0);
QIcon icon = mime->imageData().value<QIcon>();
QIcon icon = IconProvider::iconFromImage(qvariant_cast<QImage>(mime->imageData()));
m_bookmarksModel->saveBookmark(url, title, icon, "bookmarksToolbar");
}

View File

@ -58,7 +58,7 @@ void SiteIcon::mouseMoveEvent(QMouseEvent* e)
QMimeData* mime = new QMimeData;
mime->setUrls(QList<QUrl>() << m_locationBar->webView()->url());
mime->setText(m_locationBar->webView()->title());
mime->setImageData(QVariant::fromValue(icon()));
mime->setImageData(icon().pixmap(16, 16).toImage());
drag->setMimeData(mime);
drag->setPixmap(icon().pixmap(16, 16));