Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/foldermodel.cpp
Show First 20 Lines • Show All 869 Lines • ▼ Show 20 Line(s) | 812 | { | |||
---|---|---|---|---|---|
870 | Qt::MouseButtons buttons(dropEvent->property("buttons").toInt()); | 870 | Qt::MouseButtons buttons(dropEvent->property("buttons").toInt()); | ||
871 | Qt::KeyboardModifiers modifiers(dropEvent->property("modifiers").toInt()); | 871 | Qt::KeyboardModifiers modifiers(dropEvent->property("modifiers").toInt()); | ||
872 | 872 | | |||
873 | QDropEvent ev(pos, possibleActions, mimeData, buttons, modifiers); | 873 | QDropEvent ev(pos, possibleActions, mimeData, buttons, modifiers); | ||
874 | ev.setDropAction(proposedAction); | 874 | ev.setDropAction(proposedAction); | ||
875 | 875 | | |||
876 | QUrl dropTargetUrl; | 876 | QUrl dropTargetUrl; | ||
877 | 877 | | |||
878 | // So we get to run mostLocalUrl() over the current URL. | ||||
879 | if (item.isNull()) { | ||||
880 | item = m_dirModel->dirLister()->rootItem(); | ||||
881 | } | ||||
882 | | ||||
878 | if (item.isNull()) { | 883 | if (item.isNull()) { | ||
879 | dropTargetUrl = m_dirModel->dirLister()->url(); | 884 | dropTargetUrl = m_dirModel->dirLister()->url(); | ||
880 | } else if (m_parseDesktopFiles && item.isDesktopFile()) { | 885 | } else if (m_parseDesktopFiles && item.isDesktopFile()) { | ||
881 | const KDesktopFile file(item.targetUrl().path()); | 886 | const KDesktopFile file(item.targetUrl().path()); | ||
882 | 887 | | |||
883 | if (file.readType() == QLatin1String("Link")) { | 888 | if (file.readType() == QLatin1String("Link")) { | ||
884 | dropTargetUrl = QUrl(file.readUrl()); | 889 | dropTargetUrl = QUrl(file.readUrl()); | ||
885 | } else { | 890 | } else { | ||
▲ Show 20 Lines • Show All 697 Lines • Show Last 20 Lines |