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

@@ -293,9 +293,6 @@ public:
{ return _beginLine; } { return _beginLine; }
private: private:
void setArguments(const QVector<Block> &arguments)
{ _arguments = arguments; }
void addArgument(const Block &block) void addArgument(const Block &block)
{ _arguments.append(block); } { _arguments.append(block); }

View File

@@ -225,18 +225,6 @@ int ExpressionUnderCursor::startOfExpression_helper(BackwardsScanner &tk, int in
return index; return index;
} }
bool ExpressionUnderCursor::isAccessToken(const Token &tk)
{
switch (tk.kind()) {
case T_COLON_COLON:
case T_DOT: case T_ARROW:
case T_DOT_STAR: case T_ARROW_STAR:
return true;
default:
return false;
} // switch
}
QString ExpressionUnderCursor::operator()(const QTextCursor &cursor) QString ExpressionUnderCursor::operator()(const QTextCursor &cursor)
{ {
BackwardsScanner scanner(cursor, _languageFeatures); BackwardsScanner scanner(cursor, _languageFeatures);

View File

@@ -50,7 +50,6 @@ public:
private: private:
int startOfExpression(BackwardsScanner &tk, int index); int startOfExpression(BackwardsScanner &tk, int index);
int startOfExpression_helper(BackwardsScanner &tk, int index); int startOfExpression_helper(BackwardsScanner &tk, int index);
bool isAccessToken(const Token &tk);
private: private:
bool _jumpedComma; bool _jumpedComma;

View File

@@ -1080,25 +1080,6 @@ void ObjectValue::accept(ValueVisitor *visitor) const
visitor->visit(this); visitor->visit(this);
} }
bool ObjectValue::checkPrototype(const ObjectValue *, QSet<const ObjectValue *> *) const
{
#if 0
const int previousSize = processed->size();
processed->insert(this);
if (previousSize != processed->size()) {
if (this == proto)
return false;
if (prototype() && ! prototype()->checkPrototype(proto, processed))
return false;
return true;
}
#endif
return false;
}
void ObjectValue::processMembers(MemberProcessor *processor) const void ObjectValue::processMembers(MemberProcessor *processor) const
{ {
for (auto it = m_members.cbegin(), end = m_members.cend(); it != end; ++it) { for (auto it = m_members.cbegin(), end = m_members.cend(); it != end; ++it) {

View File

@@ -526,10 +526,6 @@ public:
QString originId() const QString originId() const
{ return m_originId; } { return m_originId; }
private:
bool checkPrototype(const ObjectValue *prototype, QSet<const ObjectValue *> *processed) const;
private: private:
ValueOwner *m_valueOwner; ValueOwner *m_valueOwner;
QHash<QString, PropertyData> m_members; QHash<QString, PropertyData> m_members;

View File

@@ -136,41 +136,6 @@ void Selector::mouseRelease(QMouseEvent *event, GraphicsScene *scene)
m_rect = QRectF(); 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) bool Selector::select(const SelectionTool &tool, const QPointF &pos, GraphicsScene *scene)
{ {
auto selectWidthTool = [this, auto selectWidthTool = [this,

View File

@@ -50,10 +50,6 @@ public:
void mouseRelease(QMouseEvent *event, GraphicsScene *scene); void mouseRelease(QMouseEvent *event, GraphicsScene *scene);
private: 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 select(const SelectionTool &tool, const QPointF &pos, GraphicsScene *scene);
bool pressSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene); bool pressSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene);