MCPcopy Create free account
hub / github.com/KDE/kdevelop / filterDroppedItems

Function filterDroppedItems

plugins/projectmanagerview/projecttreeview.cpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75template<class T>
76void filterDroppedItems(QList<T*> &items, ProjectBaseItem* dest)
77{
78 for (int i = items.size() - 1; i >= 0; --i)
79 {
80 //No drag and drop from and to same location
81 if (items[i]->parent() == dest)
82 items.removeAt(i);
83 //No moving between projects (technically feasible if the projectmanager is the same though...)
84 else if (items[i]->project() != dest->project())
85 items.removeAt(i);
86 }
87}
88
89//TODO test whether this could be replaced by projectbuildsetwidget.cpp::showContextMenu_appendActions
90void popupContextMenu_appendActions(QMenu& menu, const QList<QAction*>& actions)

Callers 1

dropEventMethod · 0.85

Calls 3

sizeMethod · 0.45
parentMethod · 0.45
projectMethod · 0.45

Tested by

no test coverage detected