1 /*
2     SPDX-FileCopyrightText: 2016 Aetf <aetf@unlimitedcodeworks.xyz>
3 
4     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5 */
6 
7 #include "testvariablecontroller.h"
8 
9 #include <KTextEditor/Range>
10 
11 using namespace KDevelop;
12 using KTextEditor::Range;
13 using KTextEditor::Document;
14 using KTextEditor::Cursor;
15 
TestVariableController(IDebugSession * parent)16 TestVariableController::TestVariableController(IDebugSession* parent)
17     : IVariableController(parent)
18     , m_updatedTimes(0)
19 {
20 }
21 
createVariable(TreeModel * model,TreeItem * parent,const QString & expression,const QString & display)22 Variable* TestVariableController::createVariable(TreeModel* model, TreeItem* parent,
23                                                  const QString& expression,
24                                                  const QString& display)
25 {
26     Q_UNUSED(model);
27     Q_UNUSED(parent);
28     Q_UNUSED(expression);
29     Q_UNUSED(display);
30 
31     return nullptr;
32 }
33 
expressionRangeUnderCursor(Document * doc,const Cursor & cursor)34 Range TestVariableController::expressionRangeUnderCursor(Document* doc,
35                                                          const Cursor& cursor)
36 {
37     Q_UNUSED(doc);
38     Q_UNUSED(cursor);
39 
40     return {};
41 }
42 
addWatch(Variable * variable)43 void TestVariableController::addWatch(Variable* variable)
44 {
45     Q_UNUSED(variable);
46 }
47 
addWatchpoint(Variable * variable)48 void TestVariableController::addWatchpoint(Variable* variable)
49 {
50     Q_UNUSED(variable);
51 }
52 
update()53 void TestVariableController::update()
54 {
55     ++m_updatedTimes;
56 }
57 
updatedTimes() const58 int TestVariableController::updatedTimes() const
59 {
60     return m_updatedTimes;
61 }
62