• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/debugger

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • debugger
  • variable
variablecollection.cpp
Go to the documentation of this file.
1 /*
2  * KDevelop Debugger Support
3  *
4  * Copyright 2007 Hamish Rodda <[email protected]>
5  * Copyright 2008 Vladimir Prus <[email protected]>
6  * Copyright 2009 Niko Sams <[email protected]>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public
19  * License along with this program; if not, write to the
20  * Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  */
23 
24 #include "variablecollection.h"
25 
26 #include <QFont>
27 #include <QApplication>
28 
29 #include <KColorScheme>
30 #include <KLocalizedString>
31 #include <KTextEditor/TextHintInterface>
32 #include <KTextEditor/Document>
33 #include <KTextEditor/View>
34 
35 #include "../../interfaces/icore.h"
36 #include "../../interfaces/idocumentcontroller.h"
37 #include "../../interfaces/iuicontroller.h"
38 #include "../../sublime/controller.h"
39 #include "../../sublime/view.h"
40 #include "../../interfaces/idebugcontroller.h"
41 #include "../interfaces/idebugsession.h"
42 #include "../interfaces/ivariablecontroller.h"
43 #include <debug.h>
44 #include "util/texteditorhelpers.h"
45 #include "variabletooltip.h"
46 #include <sublime/area.h>
47 
48 namespace KDevelop {
49 
50 IDebugSession* currentSession()
51 {
52  return ICore::self()->debugController()->currentSession();
53 }
54 
55 IDebugSession::DebuggerState currentSessionState()
56 {
57  if (!currentSession()) return IDebugSession::NotStartedState;
58  return currentSession()->state();
59 }
60 
61 bool hasStartedSession()
62 {
63  IDebugSession::DebuggerState s = currentSessionState();
64  return s != IDebugSession::NotStartedState && s != IDebugSession::EndedState;
65 }
66 
67 Variable::Variable(TreeModel* model, TreeItem* parent,
68  const QString& expression,
69  const QString& display)
70  : TreeItem(model, parent)
71  , m_expression(expression)
72  , m_inScope(true)
73  , m_topLevel(true)
74  , m_changed(false)
75  , m_showError(false)
76  , m_format(Natural)
77 {
78  // FIXME: should not duplicate the data, instead overload 'data'
79  // and return expression_ directly.
80  if (display.isEmpty())
81  setData(QVector<QVariant>{expression, QString(), QString()});
82  else
83  setData(QVector<QVariant>{display, QString(), QString()});
84 }
85 
86 QString Variable::expression() const
87 {
88  return m_expression;
89 }
90 
91 bool Variable::inScope() const
92 {
93  return m_inScope;
94 }
95 
96 void Variable::setValue(const QString& v)
97 {
98  itemData[VariableCollection::ValueColumn] = v;
99  reportChange();
100 }
101 
102 QString Variable::value() const
103 {
104  return itemData[VariableCollection::ValueColumn].toString();
105 }
106 
107 void Variable::setType(const QString& type)
108 {
109  itemData[VariableCollection::TypeColumn] = type;
110  reportChange();
111 }
112 
113 QString Variable::type() const
114 {
115  return itemData[VariableCollection::TypeColumn].toString();
116 }
117 
118 void Variable::setTopLevel(bool v)
119 {
120  m_topLevel = v;
121 }
122 
123 void Variable::setInScope(bool v)
124 {
125  m_inScope = v;
126  for (int i=0; i < childCount(); ++i) {
127  if (auto *var = qobject_cast<Variable*>(child(i))) {
128  var->setInScope(v);
129  }
130  }
131  reportChange();
132 }
133 
134 void Variable::setShowError (bool v)
135 {
136  m_showError = v;
137  reportChange();
138 }
139 
140 bool Variable::showError()
141 {
142  return m_showError;
143 }
144 
145 
146 Variable::~Variable()
147 {
148 }
149 
150 void Variable::die()
151 {
152  removeSelf();
153  deleteLater();
154 }
155 
156 
157 void Variable::setChanged(bool c)
158 {
159  m_changed=c;
160  reportChange();
161 }
162 
163 void Variable::resetChanged()
164 {
165  setChanged(false);
166  for (int i=0; i<childCount(); ++i) {
167  TreeItem* childItem = child(i);
168  if (qobject_cast<Variable*>(childItem)) {
169  static_cast<Variable*>(childItem)->resetChanged();
170  }
171  }
172 }
173 
174 Variable::format_t Variable::str2format(const QString& str)
175 {
176  if(str==QLatin1String("Binary") || str==QLatin1String("binary")) return Binary;
177  if(str==QLatin1String("Octal") || str==QLatin1String("octal")) return Octal;
178  if(str==QLatin1String("Decimal") || str==QLatin1String("decimal")) return Decimal;
179  if(str==QLatin1String("Hexadecimal") || str==QLatin1String("hexadecimal"))return Hexadecimal;
180 
181  return Natural; // maybe most reasonable default
182 }
183 
184 QString Variable::format2str(format_t format)
185 {
186  switch(format) {
187  case Natural: return QStringLiteral("natural");
188  case Binary: return QStringLiteral("binary");
189  case Octal: return QStringLiteral("octal");
190  case Decimal: return QStringLiteral("decimal");
191  case Hexadecimal: return QStringLiteral("hexadecimal");
192  }
193  return QString();
194 }
195 
196 
197 void Variable::setFormat(Variable::format_t format)
198 {
199  if (m_format != format) {
200  m_format = format;
201  formatChanged();
202  }
203 }
204 
205 void Variable::formatChanged()
206 {
207 }
208 
209 bool Variable::isPotentialProblematicValue() const
210 {
211  const auto value = data(VariableCollection::ValueColumn, Qt::DisplayRole).toString();
212  return value == QLatin1String("0x0");
213 }
214 
215 QVariant Variable::data(int column, int role) const
216 {
217  if (m_showError) {
218  if (role == Qt::FontRole) {
219  QVariant ret = TreeItem::data(column, role);
220  QFont font = ret.value<QFont>();
221  font.setStyle(QFont::StyleItalic);
222  return font;
223  } else if (column == 1 && role == Qt::DisplayRole) {
224  return i18n("Error");
225  }
226  }
227  if (column == 1 && role == Qt::ForegroundRole)
228  {
229  KColorScheme scheme(QPalette::Active);
230  if (!m_inScope) {
231  return scheme.foreground(KColorScheme::InactiveText).color();
232  } else if (isPotentialProblematicValue()) {
233  return scheme.foreground(KColorScheme::NegativeText).color();
234  } else if (m_changed) {
235  return scheme.foreground(KColorScheme::NeutralText).color();
236  }
237  }
238  if (role == Qt::ToolTipRole) {
239  return TreeItem::data(column, Qt::DisplayRole);
240  }
241 
242  return TreeItem::data(column, role);
243 }
244 
245 Watches::Watches(TreeModel* model, TreeItem* parent)
246 : TreeItem(model, parent), finishResult_(nullptr)
247 {
248  setData(QVector<QVariant>{i18n("Auto"), QString()});
249 }
250 
251 Variable* Watches::add(const QString& expression)
252 {
253  if (!hasStartedSession()) return nullptr;
254 
255  Variable* v = currentSession()->variableController()->createVariable(
256  model(), this, expression);
257  appendChild(v);
258  v->attachMaybe();
259  if (childCount() == 1 && !isExpanded()) {
260  setExpanded(true);
261  }
262  return v;
263 }
264 
265 Variable *Watches::addFinishResult(const QString& convenienceVarible)
266 {
267  if( finishResult_ )
268  {
269  removeFinishResult();
270  }
271  finishResult_ = currentSession()->variableController()->createVariable(
272  model(), this, convenienceVarible, QStringLiteral("$ret"));
273  appendChild(finishResult_);
274  finishResult_->attachMaybe();
275  if (childCount() == 1 && !isExpanded()) {
276  setExpanded(true);
277  }
278  return finishResult_;
279 }
280 
281 void Watches::removeFinishResult()
282 {
283  if (finishResult_)
284  {
285  finishResult_->die();
286  finishResult_ = nullptr;
287  }
288 }
289 
290 void Watches::resetChanged()
291 {
292  for (int i=0; i<childCount(); ++i) {
293  TreeItem* childItem = child(i);
294  if (qobject_cast<Variable*>(childItem)) {
295  static_cast<Variable*>(childItem)->resetChanged();
296  }
297  }
298 }
299 
300 QVariant Watches::data(int column, int role) const
301 {
302 #if 0
303  if (column == 0 && role == Qt::FontRole)
304  {
305  /* FIXME: is creating font again and again efficient? */
306  QFont f = font();
307  f.setBold(true);
308  return f;
309  }
310 #endif
311  return TreeItem::data(column, role);
312 }
313 
314 void Watches::reinstall()
315 {
316  for (int i = 0; i < childItems.size(); ++i)
317  {
318  auto* v = static_cast<Variable*>(child(i));
319  v->attachMaybe();
320  }
321 }
322 
323 Locals::Locals(TreeModel* model, TreeItem* parent, const QString &name)
324 : TreeItem(model, parent)
325 {
326  setData(QVector<QVariant>{name, QString()});
327 }
328 
329 QList<Variable*> Locals::updateLocals(const QStringList& locals)
330 {
331  QSet<QString> existing, current;
332  for (int i = 0; i < childItems.size(); i++)
333  {
334  Q_ASSERT(qobject_cast<KDevelop::Variable*>(child(i)));
335  auto* var= static_cast<KDevelop::Variable*>(child(i));
336  existing << var->expression();
337  }
338 
339  for (const QString& var : locals) {
340  current << var;
341  // If we currently don't display this local var, add it.
342  if( !existing.contains( var ) ) {
343  // FIXME: passing variableCollection this way is awkward.
344  // In future, variableCollection probably should get a
345  // method to create variable.
346  Variable* v =
347  currentSession()->variableController()->createVariable(
348  ICore::self()->debugController()->variableCollection(),
349  this, var );
350  appendChild( v, false );
351  }
352  }
353 
354  for (int i = 0; i < childItems.size(); ++i) {
355  auto* v = static_cast<KDevelop::Variable*>(child(i));
356  if (!current.contains(v->expression())) {
357  removeChild(i);
358  --i;
359  // FIXME: check that -var-delete is sent.
360  delete v;
361  }
362  }
363 
364 
365  if (hasMore()) {
366  setHasMore(false);
367  }
368 
369  // Variables which changed just value are updated by a call to -var-update.
370  // Variables that changed type -- likewise.
371 
372  QList<Variable*> ret;
373  ret.reserve(childItems.size());
374  for (TreeItem* i : qAsConst(childItems)) {
375  Q_ASSERT(qobject_cast<Variable*>(i));
376  ret << static_cast<Variable*>(i);
377  }
378  return ret;
379 }
380 
381 void Locals::resetChanged()
382 {
383  for (int i=0; i<childCount(); ++i) {
384  TreeItem* childItem = child(i);
385  if (qobject_cast<Variable*>(childItem)) {
386  static_cast<Variable*>(childItem)->resetChanged();
387  }
388  }
389 }
390 
391 VariablesRoot::VariablesRoot(TreeModel* model)
392  : TreeItem(model)
393  , m_watches(new Watches(model, this))
394 {
395  appendChild(m_watches, true);
396 }
397 
398 
399 Locals* VariablesRoot::locals(const QString& name)
400 {
401  auto localsIt = m_locals.find(name);
402  if (localsIt == m_locals.end()) {
403  localsIt = m_locals.insert(name, new Locals(model(), this, name));
404  appendChild(*localsIt);
405  }
406  return *localsIt;
407 }
408 
409 QHash<QString, Locals*> VariablesRoot::allLocals() const
410 {
411  return m_locals;
412 }
413 
414 void VariablesRoot::resetChanged()
415 {
416  m_watches->resetChanged();
417  for (Locals* l : qAsConst(m_locals)) {
418  l->resetChanged();
419  }
420 }
421 
422 VariableCollection::VariableCollection(IDebugController* controller)
423  : TreeModel({i18n("Name"), i18n("Value"), i18n("Type")}, controller)
424  , m_widgetVisible(false)
425  , m_textHintProvider(this)
426 {
427  m_universe = new VariablesRoot(this);
428  setRootItem(m_universe);
429 
430  //new ModelTest(this);
431 
432  connect (ICore::self()->documentController(),
433  &IDocumentController::textDocumentCreated,
434  this,
435  &VariableCollection::textDocumentCreated );
436 
437  connect(controller, &IDebugController::currentSessionChanged,
438  this, &VariableCollection::updateAutoUpdate);
439 
440  // Qt5 signal slot syntax does not support default arguments
441  auto callUpdateAutoUpdate = [&] { updateAutoUpdate(); };
442 
443  connect(locals(), &Locals::expanded, this, callUpdateAutoUpdate);
444  connect(locals(), &Locals::collapsed, this, callUpdateAutoUpdate);
445  connect(watches(), &Watches::expanded, this, callUpdateAutoUpdate);
446  connect(watches(), &Watches::collapsed, this, callUpdateAutoUpdate);
447 }
448 
449 void VariableCollection::variableWidgetHidden()
450 {
451  m_widgetVisible = false;
452  updateAutoUpdate();
453 }
454 
455 void VariableCollection::variableWidgetShown()
456 {
457  m_widgetVisible = true;
458  updateAutoUpdate();
459 }
460 
461 void VariableCollection::updateAutoUpdate(IDebugSession* session)
462 {
463  if (!session) session = currentSession();
464  qCDebug(DEBUGGER) << session;
465  if (!session) return;
466 
467  if (!m_widgetVisible) {
468  session->variableController()->setAutoUpdate(IVariableController::UpdateNone);
469  } else {
470  QFlags<IVariableController::UpdateType> t = IVariableController::UpdateNone;
471  if (locals()->isExpanded()) t |= IVariableController::UpdateLocals;
472  if (watches()->isExpanded()) t |= IVariableController::UpdateWatches;
473  session->variableController()->setAutoUpdate(t);
474  }
475 }
476 
477 VariableCollection::~ VariableCollection()
478 {
479  for (auto* view : qAsConst(m_textHintProvidedViews)) {
480  auto* iface = qobject_cast<KTextEditor::TextHintInterface*>(view);
481  iface->unregisterTextHintProvider(&m_textHintProvider);
482  }
483 }
484 
485 void VariableCollection::textDocumentCreated(IDocument* doc)
486 {
487  connect( doc->textDocument(),
488  &KTextEditor::Document::viewCreated,
489  this, &VariableCollection::viewCreated );
490 
491  const auto views = doc->textDocument()->views();
492  for (KTextEditor::View* view : views) {
493  viewCreated( doc->textDocument(), view );
494  }
495 }
496 
497 void VariableCollection::viewCreated(KTextEditor::Document* doc,
498  KTextEditor::View* view)
499 {
500  Q_UNUSED(doc);
501  using namespace KTextEditor;
502  auto* iface = qobject_cast<TextHintInterface*>(view);
503  if( !iface )
504  return;
505 
506  if (m_textHintProvidedViews.contains(view)) {
507  return;
508  }
509  connect(view, &View::destroyed, this, [this, view](QObject* obj) {
510  Q_ASSERT(obj == view);
511  m_textHintProvidedViews.removeOne(view);
512  });
513 
514  iface->registerTextHintProvider(&m_textHintProvider);
515  m_textHintProvidedViews.append(view);
516 }
517 
518 Locals* VariableCollection::locals(const QString &name) const
519 {
520  return m_universe->locals(name.isEmpty() ? i18n("Locals") : name);
521 }
522 
523 VariableProvider::VariableProvider(VariableCollection* collection)
524  : KTextEditor::TextHintProvider()
525  , m_collection(collection)
526 {
527 }
528 
529 QString VariableProvider::textHint(KTextEditor::View* view, const KTextEditor::Cursor& cursor)
530 {
531  if (!hasStartedSession())
532  return QString();
533 
534  if (ICore::self()->uiController()->activeArea()->objectName() != QLatin1String("debug"))
535  return QString();
536 
537  //TODO: These keyboardModifiers should also hide already opened tooltip, and show another one for code area.
538  if (QApplication::keyboardModifiers() == Qt::ControlModifier ||
539  QApplication::keyboardModifiers() == Qt::AltModifier){
540  return QString();
541  }
542 
543  KTextEditor::Document* doc = view->document();
544 
545  KTextEditor::Range expressionRange = currentSession()->variableController()->expressionRangeUnderCursor(doc, cursor);
546 
547  if (!expressionRange.isValid())
548  return QString();
549  QString expression = doc->text(expressionRange).trimmed();
550 
551  // Don't do anything if there's already an open tooltip with matching range
552  if (m_collection->m_activeTooltip && m_collection->m_activeTooltip->variable()->expression() == expression)
553  return QString();
554  if (expression.isEmpty())
555  return QString();
556 
557  QPoint local = view->cursorToCoordinate(cursor);
558  QPoint global = view->mapToGlobal(local);
559  QWidget* w = view->childAt(local);
560  if (!w)
561  w = view;
562 
563  m_collection->m_activeTooltip = new VariableToolTip(w, global+QPoint(30,30), expression);
564  m_collection->m_activeTooltip->setHandleRect(KTextEditorHelpers::itemBoundingRect(view, expressionRange));
565  return QString();
566 }
567 
568 }
569 
KDevelop::TreeItem::hasMore
bool hasMore() const
Definition: treeitem.h:108
KDevelop::VariableToolTip
Definition: variabletooltip.h:39
QSet
QFont::setStyle
void setStyle(Style style)
KDevelop::Variable::expression
QString expression() const
Definition: variablecollection.cpp:86
KDevelop::Variable::Variable
Variable(TreeModel *model, TreeItem *parent, const QString &expression, const QString &display={})
Definition: variablecollection.cpp:67
KDevelop::VariableCollection::ValueColumn
Definition: variablecollection.h:220
KDevelop::Variable
Definition: variablecollection.h:48
KDevelop::IVariableController::UpdateWatches
Definition: ivariablecontroller.h:62
KDevelop::Watches::addFinishResult
Variable * addFinishResult(const QString &convenienceVarible)
Definition: variablecollection.cpp:265
KDevelop::Variable::die
void die()
Definition: variablecollection.cpp:150
KDevelop::Variable::format2str
static QString format2str(format_t format)
Definition: variablecollection.cpp:184
KDevelop::TreeItem::expanded
void expanded()
QVariant::value
T value() const
variablecollection.h
QString::trimmed
QString trimmed() const
KDevelop::Variable::Decimal
Definition: variablecollection.h:59
QWidget
KDevelop::Variable::str2format
static format_t str2format(const QString &str)
Definition: variablecollection.cpp:174
KDevelop::hasStartedSession
bool hasStartedSession()
Definition: variablecollection.cpp:61
KDevelop::VariablesRoot::locals
Locals * locals(const QString &name=QStringLiteral("Locals"))
Definition: variablecollection.cpp:399
KDevelop::TreeItem::data
virtual QVariant data(int column, int role) const
Definition: treeitem.cpp:163
KDevelop::VariableCollection::variableWidgetShown
void variableWidgetShown()
Definition: variablecollection.cpp:455
KDevelop::Watches::resetChanged
void resetChanged()
Definition: variablecollection.cpp:290
KDevelop::Variable::attachMaybe
virtual void attachMaybe(QObject *callback=nullptr, const char *callbackMethod=nullptr)=0
KDevelop::VariablesRoot::resetChanged
void resetChanged()
Definition: variablecollection.cpp:414
KDevelop::VariablesRoot::allLocals
QHash< QString, Locals * > allLocals() const
Definition: variablecollection.cpp:409
KDevelop::Variable::format_t
format_t
Definition: variablecollection.h:59
KDevelop::Variable::inScope
bool inScope() const
Definition: variablecollection.cpp:91
KDevelop::TreeItem::isExpanded
bool isExpanded() const
Definition: treeitem.h:92
KDevelop::IVariableController::UpdateNone
Definition: ivariablecontroller.h:60
KDevelop::VariableCollection::TypeColumn
Definition: variablecollection.h:221
KDevelop::VariableCollection::variableWidgetHidden
void variableWidgetHidden()
Definition: variablecollection.cpp:449
KDevelop::IDebugSession::variableController
virtual IVariableController * variableController() const =0
QList
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KDevelop::TreeItem::appendChild
void appendChild(TreeItem *child, bool initial=false)
Adds a new child and notifies the interested parties.
Definition: treeitem.cpp:51
KDevelop::Variable::setFormat
void setFormat(format_t format)
Definition: variablecollection.cpp:197
QFlags< IVariableController::UpdateType >
KDevelop::Variable::Octal
Definition: variablecollection.h:59
KDevelop::Locals::updateLocals
QList< Variable * > updateLocals(const QStringList &locals)
Definition: variablecollection.cpp:329
KDevelop::TreeModel
Definition: treemodel.h:38
KDevelop::VariableProvider::textHint
QString textHint(KTextEditor::View *view, const KTextEditor::Cursor &position) override
Definition: variablecollection.cpp:529
KDevelop::TreeItem::setHasMore
void setHasMore(bool more)
Sets a flag that tells if we have some more children that are not fetched yet.
Definition: treeitem.cpp:212
QList::reserve
void reserve(int alloc)
KDevelop::Watches::removeFinishResult
void removeFinishResult()
Definition: variablecollection.cpp:281
KDevelop::VariableCollection::locals
Locals * locals(const QString &name=QString()) const
Definition: variablecollection.cpp:518
KDevelop::Variable::setShowError
void setShowError(bool v)
Definition: variablecollection.cpp:134
QObject::deleteLater
void deleteLater()
KDevelop::TreeItem::setExpanded
void setExpanded(bool b)
Definition: treeitem.cpp:256
KDevelop::IVariableController::UpdateLocals
Definition: ivariablecontroller.h:61
QObject
KDevelop::IVariableController::createVariable
virtual Variable * createVariable(TreeModel *model, TreeItem *parent, const QString &expression, const QString &display={})=0
KDevelop::TreeItem::model
TreeModel * model()
Definition: treeitem.h:90
KDevelop::currentSessionState
IDebugSession::DebuggerState currentSessionState()
Definition: variablecollection.cpp:55
KDevelop::Watches::Watches
Watches(TreeModel *model, TreeItem *parent)
Definition: variablecollection.cpp:245
KDevelop::VariablesRoot
Definition: variablecollection.h:184
KDevelop::Watches::add
Variable * add(const QString &expression)
Definition: variablecollection.cpp:251
KDevelop::TreeItem
Definition: treeitem.h:37
variabletooltip.h
QString
KDevelop::Variable::setTopLevel
void setTopLevel(bool v)
Definition: variablecollection.cpp:118
KDevelop::Variable::setValue
void setValue(const QString &v)
Definition: variablecollection.cpp:96
QString::isEmpty
bool isEmpty() const
KDevelop::Variable::formatChanged
virtual void formatChanged()
Definition: variablecollection.cpp:205
KDevelop::Variable::Natural
Definition: variablecollection.h:59
KDevelop::TreeItem::collapsed
void collapsed()
KDevelop::Watches::reinstall
void reinstall()
Definition: variablecollection.cpp:314
KDevelop::TreeItem::setData
void setData(const QVector< QVariant > &data)
Set the data to be shown for the item itself.
Definition: treeitem.cpp:46
KDevelop::IDebugSession
Definition: idebugsession.h:54
QLatin1String
KTextEditor
Definition: breakpoint.h:31
KDevelop::Variable::showError
bool showError()
Definition: variablecollection.cpp:140
KDevelop::Variable::format
format_t format() const
Definition: variablecollection.h:95
QSet::contains
bool contains(const T &value) const
KDevelop::IVariableController::expressionRangeUnderCursor
virtual KTextEditor::Range expressionRangeUnderCursor(KTextEditor::Document *doc, const KTextEditor::Cursor &cursor)=0
KDevelop::Variable::resetChanged
void resetChanged()
Definition: variablecollection.cpp:163
KDevelop::IDebugSession::EndedState
Definition: idebugsession.h:68
KDevelop::Variable::~Variable
~Variable() override
Definition: variablecollection.cpp:146
QWidget::childAt
QWidget * childAt(int x, int y) const
KDevelop::currentSession
IDebugSession * currentSession()
Definition: variablecollection.cpp:50
KDevelop::VariableProvider::VariableProvider
VariableProvider(VariableCollection *collection)
Definition: variablecollection.cpp:523
KDevelop::variableCollection
VariableCollection * variableCollection()
Definition: variablewidget.cpp:67
KDevelop::IDebugSession::NotStartedState
Definition: idebugsession.h:62
KDevelop::Variable::Binary
Definition: variablecollection.h:59
KDevelop::VariableCollection
Definition: variablecollection.h:213
KDevelop::TreeItem::removeSelf
void removeSelf()
Definition: treeitem.cpp:112
KDevelop::VariableCollection::watches
Watches * watches() const
Definition: variablecollection.h:228
KDevelop::Variable::setInScope
void setInScope(bool v)
Definition: variablecollection.cpp:123
KDevelop::TreeItem::removeChild
void removeChild(int index)
Definition: treeitem.cpp:103
KDevelop::Variable::setChanged
void setChanged(bool c)
Definition: variablecollection.cpp:157
QObject::name
const char * name() const
KDevelop
The variables widget is passive, and is invoked by the rest of the code via two main Q_SLOTS:
Definition: breakpoint.h:34
KDevelop::Variable::type
QString type() const
Definition: variablecollection.cpp:113
KDevelop::Locals::resetChanged
void resetChanged()
Definition: variablecollection.cpp:381
KDevelop::IVariableController::setAutoUpdate
void setAutoUpdate(QFlags< UpdateType > autoUpdate)
Definition: ivariablecontroller.cpp:151
KDevelop::TreeItem::itemData
QVector< QVariant > itemData
Definition: treeitem.h:116
KDevelop::IDebugSession::state
virtual DebuggerState state() const =0
Current state of the debug session.
QFont::setBold
void setBold(bool enable)
QVector< QVariant >
KDevelop::Locals::Locals
Locals(TreeModel *model, TreeItem *parent, const QString &name)
Definition: variablecollection.cpp:323
KDevelop::Watches
Definition: variablecollection.h:140
QVariant
KDevelop::TreeItem::childCount
int childCount() const
Definition: treeitem.cpp:153
QApplication::keyboardModifiers
Qt::KeyboardModifiers keyboardModifiers()
KDevelop::TreeItem::child
TreeItem * child(int row)
Definition: treeitem.cpp:142
QHash
KDevelop::Variable::setType
void setType(const QString &type)
Definition: variablecollection.cpp:107
QFont
KDevelop::Variable::Hexadecimal
Definition: variablecollection.h:59
KDevelop::TreeItem::reportChange
void reportChange()
Report change in data of this item.
Definition: treeitem.cpp:89
KDevelop::VariableCollection::VariableCollection
VariableCollection(IDebugController *parent)
Definition: variablecollection.cpp:422
KDevelop::TreeItem::childItems
QVector< TreeItem * > childItems
Definition: treeitem.h:115
QPoint
QStringList
KDevelop::Variable::value
QString value() const
Definition: variablecollection.cpp:102
QVariant::toString
QString toString() const
KDevelop::IDebugSession::DebuggerState
DebuggerState
Definition: idebugsession.h:61
KDevelop::Locals
Definition: variablecollection.h:166
KDevelop::VariablesRoot::VariablesRoot
VariablesRoot(TreeModel *model)
Definition: variablecollection.cpp:391
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 14 2021 23:34:24 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/debugger

Skip menu "kdevplatform/debugger"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal