mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
SideBarTreeView is derived from KTreeView
svn path=/trunk/KDE/kdebase/apps/; revision=835181
This commit is contained in:
parent
f28ee3152a
commit
d49c1d89f9
1 changed files with 5 additions and 5 deletions
|
@ -80,7 +80,7 @@ bool SidebarTreeView::event(QEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QTreeView::event(event);
|
return KTreeView::event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SidebarTreeView::startDrag(Qt::DropActions supportedActions)
|
void SidebarTreeView::startDrag(Qt::DropActions supportedActions)
|
||||||
|
@ -90,7 +90,7 @@ void SidebarTreeView::startDrag(Qt::DropActions supportedActions)
|
||||||
|
|
||||||
void SidebarTreeView::dragEnterEvent(QDragEnterEvent* event)
|
void SidebarTreeView::dragEnterEvent(QDragEnterEvent* event)
|
||||||
{
|
{
|
||||||
QTreeView::dragEnterEvent(event);
|
KTreeView::dragEnterEvent(event);
|
||||||
if (event->mimeData()->hasUrls()) {
|
if (event->mimeData()->hasUrls()) {
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
}
|
}
|
||||||
|
@ -98,13 +98,13 @@ void SidebarTreeView::dragEnterEvent(QDragEnterEvent* event)
|
||||||
|
|
||||||
void SidebarTreeView::dragLeaveEvent(QDragLeaveEvent* event)
|
void SidebarTreeView::dragLeaveEvent(QDragLeaveEvent* event)
|
||||||
{
|
{
|
||||||
QTreeView::dragLeaveEvent(event);
|
KTreeView::dragLeaveEvent(event);
|
||||||
setDirtyRegion(m_dropRect);
|
setDirtyRegion(m_dropRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SidebarTreeView::dragMoveEvent(QDragMoveEvent* event)
|
void SidebarTreeView::dragMoveEvent(QDragMoveEvent* event)
|
||||||
{
|
{
|
||||||
QTreeView::dragMoveEvent(event);
|
KTreeView::dragMoveEvent(event);
|
||||||
|
|
||||||
// TODO: remove this code when the issue #160611 is solved in Qt 4.4
|
// TODO: remove this code when the issue #160611 is solved in Qt 4.4
|
||||||
const QModelIndex index = indexAt(event->pos());
|
const QModelIndex index = indexAt(event->pos());
|
||||||
|
@ -122,7 +122,7 @@ void SidebarTreeView::dropEvent(QDropEvent* event)
|
||||||
{
|
{
|
||||||
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
|
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
|
||||||
if (urls.isEmpty()) {
|
if (urls.isEmpty()) {
|
||||||
QTreeView::dropEvent(event);
|
KTreeView::dropEvent(event);
|
||||||
} else {
|
} else {
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
const QModelIndex index = indexAt(event->pos());
|
const QModelIndex index = indexAt(event->pos());
|
||||||
|
|
Loading…
Reference in a new issue