Changeset View
Changeset View
Standalone View
Standalone View
src/browsers/CollectionTreeView.cpp
Show All 21 Lines | |||||
22 | #include "CollectionTreeView.h" | 22 | #include "CollectionTreeView.h" | ||
23 | 23 | | |||
24 | #include "AmarokMimeData.h" | 24 | #include "AmarokMimeData.h" | ||
25 | #include "GlobalCollectionActions.h" | 25 | #include "GlobalCollectionActions.h" | ||
26 | #include "PopupDropperFactory.h" | 26 | #include "PopupDropperFactory.h" | ||
27 | #include "SvgHandler.h" | 27 | #include "SvgHandler.h" | ||
28 | #include "browsers/CollectionSortFilterProxyModel.h" | 28 | #include "browsers/CollectionSortFilterProxyModel.h" | ||
29 | #include "browsers/CollectionTreeItemModel.h" | 29 | #include "browsers/CollectionTreeItemModel.h" | ||
30 | // #include "context/ContextView.h" | 30 | #include "context/ContextView.h" | ||
31 | #include "core/capabilities/ActionsCapability.h" | 31 | #include "core/capabilities/ActionsCapability.h" | ||
32 | #include "core/capabilities/BookmarkThisCapability.h" | 32 | #include "core/capabilities/BookmarkThisCapability.h" | ||
33 | #include "core/collections/CollectionLocation.h" | 33 | #include "core/collections/CollectionLocation.h" | ||
34 | #include "core/collections/MetaQueryMaker.h" | 34 | #include "core/collections/MetaQueryMaker.h" | ||
35 | #include "core/collections/QueryMaker.h" | 35 | #include "core/collections/QueryMaker.h" | ||
36 | #include "core/meta/Meta.h" | 36 | #include "core/meta/Meta.h" | ||
37 | #include "core/support/Amarok.h" | 37 | #include "core/support/Amarok.h" | ||
38 | #include "core/support/Debug.h" | 38 | #include "core/support/Debug.h" | ||
▲ Show 20 Lines • Show All 596 Lines • ▼ Show 20 Line(s) | 634 | if( indices.isEmpty() ) | |||
635 | return; | 635 | return; | ||
636 | 636 | | |||
637 | // When a parent item is dragged, startDrag() is called a bunch of times. Here we | 637 | // When a parent item is dragged, startDrag() is called a bunch of times. Here we | ||
638 | // prevent that: | 638 | // prevent that: | ||
639 | if( m_ongoingDrag ) | 639 | if( m_ongoingDrag ) | ||
640 | return; | 640 | return; | ||
641 | m_ongoingDrag = true; | 641 | m_ongoingDrag = true; | ||
642 | 642 | | |||
643 | /* FIXME: disabled temporarily for KF5 porting | | |||
644 | if( !m_pd ) | 643 | if( !m_pd ) | ||
645 | m_pd = The::popupDropperFactory()->createPopupDropper( Context::ContextView::self() ); | 644 | m_pd = The::popupDropperFactory()->createPopupDropper( Context::ContextView::self() ); | ||
646 | 645 | | |||
647 | if( m_pd && m_pd->isHidden() ) | 646 | if( m_pd && m_pd->isHidden() ) | ||
648 | { | 647 | { | ||
649 | if( m_filterModel ) | 648 | if( m_filterModel ) | ||
650 | { | 649 | { | ||
651 | QModelIndexList tmp; | 650 | QModelIndexList tmp; | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
697 | if ( actions.count() > 1 ) | 696 | if ( actions.count() > 1 ) | ||
698 | { | 697 | { | ||
699 | subItem = m_pd->addSubmenu( &morePud, i18n( "More..." ) ); | 698 | subItem = m_pd->addSubmenu( &morePud, i18n( "More..." ) ); | ||
700 | The::popupDropperFactory()->adjustItem( subItem ); | 699 | The::popupDropperFactory()->adjustItem( subItem ); | ||
701 | } | 700 | } | ||
702 | 701 | | |||
703 | m_pd->show(); | 702 | m_pd->show(); | ||
704 | } | 703 | } | ||
705 | */ | | |||
706 | 704 | | |||
707 | QTreeView::startDrag( supportedActions ); | 705 | QTreeView::startDrag( supportedActions ); | ||
708 | debug() << "After the drag!"; | 706 | debug() << "After the drag!"; | ||
709 | 707 | | |||
710 | if( m_pd ) | 708 | if( m_pd ) | ||
711 | { | 709 | { | ||
712 | debug() << "clearing PUD"; | 710 | debug() << "clearing PUD"; | ||
713 | connect( m_pd, &PopupDropper::fadeHideFinished, m_pd, &PopupDropper::clear ); | 711 | connect( m_pd, &PopupDropper::fadeHideFinished, m_pd, &PopupDropper::clear ); | ||
▲ Show 20 Lines • Show All 743 Lines • Show Last 20 Lines |