Remove unused private functions

As found by Cppcheck.

Change-Id: I697ea69992425ff41e35990ad00be312b35ba70a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Alessandro Portale
2020-09-20 23:40:16 +02:00
parent 35bab3a021
commit c68f49fefa
7 changed files with 0 additions and 78 deletions

View File

@@ -136,41 +136,6 @@ void Selector::mouseRelease(QMouseEvent *event, GraphicsScene *scene)
m_rect = QRectF();
}
bool Selector::isOverMovableItem(const QPointF &pos, GraphicsScene *scene)
{
auto intersect = [pos](QGraphicsObject *item) {
return item->mapRectToScene(item->boundingRect()).contains(pos);
};
const auto frames = scene->keyframes();
for (auto *frame : frames) {
if (intersect(frame))
return true;
if (auto *leftHandle = frame->leftHandle()) {
if (intersect(leftHandle))
return true;
}
if (auto *rightHandle = frame->rightHandle()) {
if (intersect(rightHandle))
return true;
}
}
return false;
}
bool Selector::isOverSelectedKeyframe(const QPointF &pos, GraphicsScene *scene)
{
const auto frames = scene->selectedKeyframes();
for (auto *frame : frames) {
QRectF frameRect = frame->mapRectToScene(frame->boundingRect());
if (frameRect.contains(pos))
return true;
}
return false;
}
bool Selector::select(const SelectionTool &tool, const QPointF &pos, GraphicsScene *scene)
{
auto selectWidthTool = [this,

View File

@@ -50,10 +50,6 @@ public:
void mouseRelease(QMouseEvent *event, GraphicsScene *scene);
private:
bool isOverSelectedKeyframe(const QPointF &pos, GraphicsScene *scene);
bool isOverMovableItem(const QPointF &pos, GraphicsScene *scene);
bool select(const SelectionTool &tool, const QPointF &pos, GraphicsScene *scene);
bool pressSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene);