summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/variablewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/debugger/variablewidget.cpp')
-rw-r--r--languages/cpp/debugger/variablewidget.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/languages/cpp/debugger/variablewidget.cpp b/languages/cpp/debugger/variablewidget.cpp
index 4adf33c2..a8c9f594 100644
--- a/languages/cpp/debugger/variablewidget.cpp
+++ b/languages/cpp/debugger/variablewidget.cpp
@@ -26,7 +26,7 @@
#include <tqheader.h>
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqhbox.h>
#include <tqpainter.h>
#include <tqpushbutton.h>
@@ -36,7 +36,7 @@
#include <klocale.h>
#include <tqpoint.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -47,14 +47,14 @@
/** The variables widget is passive, and is invoked by the rest of the
code via two main slots:
- - slotDbgStatus
+ - slotDbgtqStatus
- slotCurrentFrame
The first is received the program status changes and the second is
recieved after current frame in the debugger can possibly changes.
The widget has a list item for each frame/thread combination, with
- variables as children. However, at each moment only one item is shown.
+ variables as tqchildren. 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")
- .arg(var->gdbExpression()),
+ .tqarg(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")
- .arg(controller_->currentFrame())
- .arg(controller_->currentFrame())
+ .tqarg(controller_->currentFrame())
+ .tqarg(controller_->currentFrame())
.ascii(),
this,
&VariableTree::argumentsReady));
@@ -607,7 +607,7 @@ void VariableTree::maybeTip(const TQPoint &p)
VarItem * item = dynamic_cast<VarItem*>( itemAt( p ) );
if ( item )
{
- TQRect r = itemRect( item );
+ TQRect r = tqitemRect( item );
if ( r.isValid() )
tip( r, item->tipText() );
}
@@ -882,8 +882,8 @@ void VarItem::handleCliPrint(const TQValueVector<TQString>& lines)
{
controller_->addCommand(
new GDBCommand(TQString("-var-create %1 * \"%2\"")
- .arg(varobjName_)
- .arg(r.cap(1)),
+ .tqarg(varobjName_)
+ .tqarg(r.cap(1)),
this,
&VarItem::varobjCreated,
// On initial create, errors get reported
@@ -988,7 +988,7 @@ void VariableTree::keyPressEvent(TQKeyEvent* e)
void VariableTree::copyToClipboard(TQListViewItem* item)
{
- TQClipboard *qb = KApplication::clipboard();
+ TQClipboard *qb = KApplication::tqclipboard();
TQString text = item->text( 1 );
qb->setText( text, TQClipboard::Clipboard );
@@ -1078,7 +1078,7 @@ VarItem::VarItem(TrimmableItem *parent,
oldSpecialRepresentationSet_(false),
format_(natural),
numChildren_(0),
- childrenFetched_(false),
+ tqchildrenFetched_(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),
- childrenFetched_(false),
+ tqchildrenFetched_(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 children.
+ // Set type and tqchildren.
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").arg(varobjIndex++);
+ varobjName_ = TQString("KDEV%1").tqarg(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").arg(expression_),
+ TQString("print %1").tqarg(expression_),
this,
&VarItem::handleCliPrint));
}
@@ -1177,7 +1177,7 @@ void VarItem::createVarobj()
{
controller_->addCommand(
new CliCommand(
- TQString("print /x &%1").arg(expression_),
+ TQString("print /x &%1").tqarg(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\"")
- .arg(varobjName_)
- .arg(expression_),
+ .tqarg(varobjName_)
+ .tqarg(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 children might be no longer valid,
+ // Type changed, the tqchildren 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")
- .arg(varobjName_).arg(varobjFormatName())));
+ .tqarg(varobjName_).tqarg(varobjFormatName())));
}
// Get the initial value.
@@ -1247,7 +1247,7 @@ void VarItem::setVarobjName(const TQString& name)
if (isOpen())
{
- // This regets children list.
+ // This regets tqchildren list.
setOpen(true);
}
}
@@ -1333,18 +1333,18 @@ void VarItem::valueDone(const GDBMI::ResultRecord& r)
}
void VarItem::createChildren(const GDBMI::ResultRecord& r,
- bool children_of_fake)
+ bool tqchildren_of_fake)
{
- const GDBMI::Value& children = r["children"];
+ const GDBMI::Value& tqchildren = r["tqchildren"];
/* 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 (!children_of_fake && children.size() > 0)
+ if (!tqchildren_of_fake && tqchildren.size() > 0)
{
- TQString exp = children[0]["exp"].literal();
+ TQString exp = tqchildren[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 < children.size(); ++i)
+ for (unsigned i = 0; i < tqchildren.size(); ++i)
{
- TQString exp = children[i]["exp"].literal();
+ TQString exp = tqchildren[i]["exp"].literal();
// For artificial accessibility nodes,
- // fetch their children.
+ // fetch their tqchildren.
if (exp == "public" || exp == "protected" || exp == "private")
{
- TQString name = children[i]["name"].literal();
+ TQString name = tqchildren[i]["name"].literal();
controller_->addCommand(new GDBCommand(
- "-var-list-children \"" +
+ "-var-list-tqchildren \"" +
name + "\"",
this,
- &VarItem::childrenOfFakesDone));
+ &VarItem::tqchildrenOfFakesDone));
}
else
{
- /* All children of structures that are not artifical
+ /* All tqchildren 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(children[i]["name"].literal());
+ existing->setVarobjName(tqchildren[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, children[i], format_, baseObject);
+ v = new VarItem(this, tqchildren[i], format_, baseObject);
}
}
}
}
-void VarItem::childrenDone(const GDBMI::ResultRecord& r)
+void VarItem::tqchildrenDone(const GDBMI::ResultRecord& r)
{
createChildren(r, false);
- childrenFetched_ = true;
+ tqchildrenFetched_ = true;
}
-void VarItem::childrenOfFakesDone(const GDBMI::ResultRecord& r)
+void VarItem::tqchildrenOfFakesDone(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").arg(varobjName_)
- .arg(new_value)));
+ new GDBCommand(TQString("-var-assign \"%1\" %2").tqarg(varobjName_)
+ .tqarg(new_value)));
// And immediately reload it from gdb,
// so that it's display format is the one gdb uses,
@@ -1624,7 +1624,7 @@ void VarItem::updateSpecialRepresentation(const TQString& xs)
s = s.mid(i+2);
}
- // A hack to nicely display TQStrings. The content of TQString is unicode
+ // A hack to nicely display TQStrings. The content of TQString is tqunicode
// for for ASCII only strings we get ascii character mixed with \000.
// Remove those \000 now.
@@ -1661,14 +1661,14 @@ void VarItem::recreateLocallyMaybe()
{
controller_->addCommand(
new CliCommand(
- TQString("print /x &%1").arg(expression_),
+ TQString("print /x &%1").tqarg(expression_),
this,
&VarItem::handleCurrentAddress,
true));
controller_->addCommand(
new CliCommand(
- TQString("whatis %1").arg(expression_),
+ TQString("whatis %1").tqarg(expression_),
this,
&VarItem::handleType));
}
@@ -1688,12 +1688,12 @@ void VarItem::setOpen(bool open)
{
TQListViewItem::setOpen(open);
- if (open && !childrenFetched_)
+ if (open && !tqchildrenFetched_)
{
controller_->addCommand(new GDBCommand(
- "-var-list-children \"" + varobjName_ + "\"",
+ "-var-list-tqchildren \"" + varobjName_ + "\"",
this,
- &VarItem::childrenDone));
+ &VarItem::tqchildrenDone));
}
}
@@ -1712,7 +1712,7 @@ bool VarItem::handleSpecialTypes()
return false;
varTree->controller()->addCommand(
new ResultlessCommand(TQString("print $kdev_d=%1.d")
- .arg(gdbExpression()),
+ .tqarg(gdbExpression()),
true /* ignore error */));
if (varTree->controller()->qtVersion() >= 4)
@@ -1736,7 +1736,7 @@ bool VarItem::handleSpecialTypes()
else
varTree->controller()->addCommand(
new ValueSpecialRepresentationCommand(
- this, "print ($kdev_s>0) ? (*((char*)&$kdev_d.unicode[0])@$kdev_s) : \"\""));
+ this, "print ($kdev_s>0) ? (*((char*)&$kdev_d.tqunicode[0])@$kdev_s) : \"\""));
return true;
}
@@ -1760,7 +1760,7 @@ void VarItem::setFormat(format_t f)
if (numChildren_)
{
- // If variable has children, change format for children.
+ // If variable has tqchildren, change format for tqchildren.
// - 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")
- .arg(varobjName_).arg(varobjFormatName())));
+ .tqarg(varobjName_).tqarg(varobjFormatName())));
updateValue();
}
@@ -1853,7 +1853,7 @@ void VarItem::paintCell(TQPainter *p, const TQColorGroup &cg,
if (!alive_)
{
/* Draw this as disabled. */
- TQListViewItem::paintCell(p, varTree()->TQWidget::palette().disabled(),
+ TQListViewItem::paintCell(p, varTree()->TQWidget::tqpalette().disabled(),
column, width, align);
}
else
@@ -1876,7 +1876,7 @@ VariableTree* VarItem::varTree() const
void VarItem::unhookFromGdb()
{
- // Unhook children first, so that child varitems are deleted
+ // Unhook tqchildren 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;
- childrenFetched_ = false;
+ tqchildrenFetched_ = false;
emit varobjNameChange(varobjName_, "");
@@ -1894,7 +1894,7 @@ void VarItem::unhookFromGdb()
{
controller_->addCommand(
new GDBCommand(
- TQString("-var-delete \"%1\"").arg(varobjName_)));
+ TQString("-var-delete \"%1\"").tqarg(varobjName_)));
}
varobjName_ = "";