mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[Fix] Fixed icon in bookmark when dropping from site icon
This commit is contained in:
parent
e163a8cd81
commit
ab342fa161
@ -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");
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user