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:
@@ -293,9 +293,6 @@ public:
|
||||
{ return _beginLine; }
|
||||
|
||||
private:
|
||||
void setArguments(const QVector<Block> &arguments)
|
||||
{ _arguments = arguments; }
|
||||
|
||||
void addArgument(const Block &block)
|
||||
{ _arguments.append(block); }
|
||||
|
||||
|
||||
@@ -225,18 +225,6 @@ int ExpressionUnderCursor::startOfExpression_helper(BackwardsScanner &tk, int in
|
||||
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)
|
||||
{
|
||||
BackwardsScanner scanner(cursor, _languageFeatures);
|
||||
|
||||
@@ -50,7 +50,6 @@ public:
|
||||
private:
|
||||
int startOfExpression(BackwardsScanner &tk, int index);
|
||||
int startOfExpression_helper(BackwardsScanner &tk, int index);
|
||||
bool isAccessToken(const Token &tk);
|
||||
|
||||
private:
|
||||
bool _jumpedComma;
|
||||
|
||||
@@ -1080,25 +1080,6 @@ void ObjectValue::accept(ValueVisitor *visitor) const
|
||||
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
|
||||
{
|
||||
for (auto it = m_members.cbegin(), end = m_members.cend(); it != end; ++it) {
|
||||
|
||||
@@ -526,10 +526,6 @@ public:
|
||||
QString originId() const
|
||||
{ return m_originId; }
|
||||
|
||||
|
||||
private:
|
||||
bool checkPrototype(const ObjectValue *prototype, QSet<const ObjectValue *> *processed) const;
|
||||
|
||||
private:
|
||||
ValueOwner *m_valueOwner;
|
||||
QHash<QString, PropertyData> m_members;
|
||||
|
||||
@@ -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