forked from qt-creator/qt-creator
Remove unused private functions
As found by Cppcheck. Change-Id: I697ea69992425ff41e35990ad00be312b35ba70a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user