| 74 | |
| 75 | template<class T> |
| 76 | void 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 |
| 90 | void popupContextMenu_appendActions(QMenu& menu, const QList<QAction*>& actions) |