Commit ae705a81 authored by Aaron J. Seigo's avatar Aaron J. Seigo
Browse files

do this properly (aka not using data())

BUG:257783
parent 32f21f69
......@@ -236,14 +236,14 @@ bool MenuView::eventFilter(QObject *watched, QEvent *event)
return KMenu::eventFilter(watched, event);
}
QString urlString = index.data(UrlRole).toString();
if (urlString.isNull()) {
QUrl url = index.data(UrlRole).toUrl();
if (url.isEmpty()) {
return KMenu::eventFilter(watched, event);
}
QMimeData *mimeData = new QMimeData();
mimeData->setData("text/uri-list", urlString.toUtf8());
mimeData->setText(mimeData->text());
mimeData->setUrls(QList<QUrl>() << url);
mimeData->setText(url.toString());
QDrag *drag = new QDrag(this);
drag->setMimeData(mimeData);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment