diff options
Diffstat (limited to 'languages/cpp/debugger/variablewidget.cpp')
-rw-r--r-- | languages/cpp/debugger/variablewidget.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/languages/cpp/debugger/variablewidget.cpp b/languages/cpp/debugger/variablewidget.cpp index 653a4b33..bc598978 100644 --- a/languages/cpp/debugger/variablewidget.cpp +++ b/languages/cpp/debugger/variablewidget.cpp @@ -54,7 +54,7 @@ recieved after current frame in the debugger can possibly changes. The widget has a list item for each frame/thread combination, with - variables as tqchildren. However, at each moment only one item is shown. + variables as children. However, at each moment only one item is shown. When handling the slotCurrentFrame, we check if variables for the current frame are available. If yes, we simply show the corresponding item. Otherwise, we fetch the new data from debugger. @@ -338,7 +338,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) controller_->addCommand( new GDBCommand( TQString("-data-evaluate-expression &%1") - .tqarg(var->gdbExpression()), + .arg(var->gdbExpression()), this, &VariableTree::handleAddressComputed, true /*handles error*/)); @@ -505,8 +505,8 @@ void VariableTree::updateCurrentFrame() controller_->addCommand( new GDBCommand(TQString("-stack-list-arguments 0 %1 %2") - .tqarg(controller_->currentFrame()) - .tqarg(controller_->currentFrame()) + .arg(controller_->currentFrame()) + .arg(controller_->currentFrame()) .ascii(), this, &VariableTree::argumentsReady)); @@ -882,8 +882,8 @@ void VarItem::handleCliPrint(const TQValueVector<TQString>& lines) { controller_->addCommand( new GDBCommand(TQString("-var-create %1 * \"%2\"") - .tqarg(varobjName_) - .tqarg(r.cap(1)), + .arg(varobjName_) + .arg(r.cap(1)), this, &VarItem::varobjCreated, // On initial create, errors get reported @@ -1078,7 +1078,7 @@ VarItem::VarItem(TrimmableItem *parent, oldSpecialRepresentationSet_(false), format_(natural), numChildren_(0), - tqchildrenFetched_(false), + childrenFetched_(false), updateUnconditionally_(false), frozen_(frozen), initialCreation_(true), @@ -1123,7 +1123,7 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, oldSpecialRepresentationSet_(false), format_(format), numChildren_(0), - tqchildrenFetched_(false), + childrenFetched_(false), updateUnconditionally_(false), frozen_(false), initialCreation_(false), @@ -1146,7 +1146,7 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, controller_ = varTree()->controller(); - // Set type and tqchildren. + // Set type and children. originalValueType_ = varobj["type"].literal(); numChildren_ = varobj["numchild"].literal().toInt(); setExpandable(numChildren_ != 0); @@ -1159,7 +1159,7 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, void VarItem::createVarobj() { TQString old = varobjName_; - varobjName_ = TQString("KDEV%1").tqarg(varobjIndex++); + varobjName_ = TQString("KDEV%1").arg(varobjIndex++); emit varobjNameChange(old, varobjName_); if (frozen_) @@ -1169,7 +1169,7 @@ void VarItem::createVarobj() // variable and we create variable object from that. controller_->addCommand( new CliCommand( - TQString("print %1").tqarg(expression_), + TQString("print %1").arg(expression_), this, &VarItem::handleCliPrint)); } @@ -1177,7 +1177,7 @@ void VarItem::createVarobj() { controller_->addCommand( new CliCommand( - TQString("print /x &%1").tqarg(expression_), + TQString("print /x &%1").arg(expression_), this, &VarItem::handleCurrentAddress, true)); @@ -1186,8 +1186,8 @@ void VarItem::createVarobj() // Need to quote expression, otherwise gdb won't like // spaces inside it. new GDBCommand(TQString("-var-create %1 * \"%2\"") - .tqarg(varobjName_) - .tqarg(expression_), + .arg(varobjName_) + .arg(expression_), this, &VarItem::varobjCreated, initialCreation_ ? false : true)); @@ -1209,7 +1209,7 @@ void VarItem::varobjCreated(const GDBMI::ResultRecord& r) originalValueType_ = r["type"].literal(); if (!oldType.isEmpty() && oldType != originalValueType_) { - // Type changed, the tqchildren might be no longer valid, + // Type changed, the children might be no longer valid, // so delete them. for(TQListViewItem* child = firstChild(); child; ) { @@ -1239,7 +1239,7 @@ void VarItem::setVarobjName(const TQString& name) { controller_->addCommand( new GDBCommand(TQString("-var-set-format \"%1\" %2") - .tqarg(varobjName_).tqarg(varobjFormatName()))); + .arg(varobjName_).arg(varobjFormatName()))); } // Get the initial value. @@ -1247,7 +1247,7 @@ void VarItem::setVarobjName(const TQString& name) if (isOpen()) { - // This regets tqchildren list. + // This regets children list. setOpen(true); } } @@ -1333,18 +1333,18 @@ void VarItem::valueDone(const GDBMI::ResultRecord& r) } void VarItem::createChildren(const GDBMI::ResultRecord& r, - bool tqchildren_of_fake) + bool children_of_fake) { - const GDBMI::Value& tqchildren = r["tqchildren"]; + const GDBMI::Value& children = r["children"]; /* In order to figure out which variable objects correspond to base class subobject, we first must detect if *this is a structure type. We use present of 'public'/'private'/'protected' fake child as an indicator. */ bool structureType = false; - if (!tqchildren_of_fake && tqchildren.size() > 0) + if (!children_of_fake && children.size() > 0) { - TQString exp = tqchildren[0]["exp"].literal(); + TQString exp = children[0]["exp"].literal(); bool ok = false; exp.toInt(&ok); if (!ok || exp[0] != '*') @@ -1353,23 +1353,23 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, } } - for (unsigned i = 0; i < tqchildren.size(); ++i) + for (unsigned i = 0; i < children.size(); ++i) { - TQString exp = tqchildren[i]["exp"].literal(); + TQString exp = children[i]["exp"].literal(); // For artificial accessibility nodes, - // fetch their tqchildren. + // fetch their children. if (exp == "public" || exp == "protected" || exp == "private") { - TQString name = tqchildren[i]["name"].literal(); + TQString name = children[i]["name"].literal(); controller_->addCommand(new GDBCommand( - "-var-list-tqchildren \"" + + "-var-list-children \"" + name + "\"", this, - &VarItem::tqchildrenOfFakesDone)); + &VarItem::childrenOfFakesDone)); } else { - /* All tqchildren of structures that are not artifical + /* All children of structures that are not artifical are base subobjects. */ bool baseObject = structureType; @@ -1388,7 +1388,7 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, } if (existing) { - existing->setVarobjName(tqchildren[i]["name"].literal()); + existing->setVarobjName(children[i]["name"].literal()); } else { @@ -1396,20 +1396,20 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, << exp << " " << baseObject << "\n"; // Propagate format from parent. VarItem* v = 0; - v = new VarItem(this, tqchildren[i], format_, baseObject); + v = new VarItem(this, children[i], format_, baseObject); } } } } -void VarItem::tqchildrenDone(const GDBMI::ResultRecord& r) +void VarItem::childrenDone(const GDBMI::ResultRecord& r) { createChildren(r, false); - tqchildrenFetched_ = true; + childrenFetched_ = true; } -void VarItem::tqchildrenOfFakesDone(const GDBMI::ResultRecord& r) +void VarItem::childrenOfFakesDone(const GDBMI::ResultRecord& r) { createChildren(r, true); } @@ -1603,8 +1603,8 @@ void VarItem::updateValue() void VarItem::setValue(const TQString& new_value) { controller_->addCommand( - new GDBCommand(TQString("-var-assign \"%1\" %2").tqarg(varobjName_) - .tqarg(new_value))); + new GDBCommand(TQString("-var-assign \"%1\" %2").arg(varobjName_) + .arg(new_value))); // And immediately reload it from gdb, // so that it's display format is the one gdb uses, @@ -1661,14 +1661,14 @@ void VarItem::recreateLocallyMaybe() { controller_->addCommand( new CliCommand( - TQString("print /x &%1").tqarg(expression_), + TQString("print /x &%1").arg(expression_), this, &VarItem::handleCurrentAddress, true)); controller_->addCommand( new CliCommand( - TQString("whatis %1").tqarg(expression_), + TQString("whatis %1").arg(expression_), this, &VarItem::handleType)); } @@ -1688,12 +1688,12 @@ void VarItem::setOpen(bool open) { TQListViewItem::setOpen(open); - if (open && !tqchildrenFetched_) + if (open && !childrenFetched_) { controller_->addCommand(new GDBCommand( - "-var-list-tqchildren \"" + varobjName_ + "\"", + "-var-list-children \"" + varobjName_ + "\"", this, - &VarItem::tqchildrenDone)); + &VarItem::childrenDone)); } } @@ -1712,7 +1712,7 @@ bool VarItem::handleSpecialTypes() return false; varTree->controller()->addCommand( new ResultlessCommand(TQString("print $kdev_d=%1.d") - .tqarg(gdbExpression()), + .arg(gdbExpression()), true /* ignore error */)); if (varTree->controller()->qtVersion() >= 4) @@ -1760,7 +1760,7 @@ void VarItem::setFormat(format_t f) if (numChildren_) { - // If variable has tqchildren, change format for tqchildren. + // If variable has children, change format for children. // - for structures, that's clearly right // - for arrays, that's clearly right // - for pointers, this can be confusing, but nobody ever wants to @@ -1775,7 +1775,7 @@ void VarItem::setFormat(format_t f) { controller_->addCommand( new GDBCommand(TQString("-var-set-format \"%1\" %2") - .tqarg(varobjName_).tqarg(varobjFormatName()))); + .arg(varobjName_).arg(varobjFormatName()))); updateValue(); } @@ -1876,7 +1876,7 @@ VariableTree* VarItem::varTree() const void VarItem::unhookFromGdb() { - // Unhook tqchildren first, so that child varitems are deleted + // Unhook children first, so that child varitems are deleted // before parent. Strictly speaking, we can avoid calling // -var-delete on child varitems, but that's a bit cheesy, for(TQListViewItem* child = firstChild(); @@ -1886,7 +1886,7 @@ void VarItem::unhookFromGdb() } alive_ = false; - tqchildrenFetched_ = false; + childrenFetched_ = false; emit varobjNameChange(varobjName_, ""); @@ -1894,7 +1894,7 @@ void VarItem::unhookFromGdb() { controller_->addCommand( new GDBCommand( - TQString("-var-delete \"%1\"").tqarg(varobjName_))); + TQString("-var-delete \"%1\"").arg(varobjName_))); } varobjName_ = ""; |