summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/framestackwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/debugger/framestackwidget.cpp')
-rw-r--r--languages/cpp/debugger/framestackwidget.cpp136
1 files changed, 68 insertions, 68 deletions
diff --git a/languages/cpp/debugger/framestackwidget.cpp b/languages/cpp/debugger/framestackwidget.cpp
index e731a1ee..fb0246e6 100644
--- a/languages/cpp/debugger/framestackwidget.cpp
+++ b/languages/cpp/debugger/framestackwidget.cpp
@@ -21,11 +21,11 @@
#include <kdebug.h>
#include <kglobalsettings.h>
-#include <qheader.h>
-#include <qlistbox.h>
-#include <qregexp.h>
-#include <qstrlist.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqregexp.h>
+#include <tqstrlist.h>
+#include <tqpainter.h>
#include <ctype.h>
@@ -39,9 +39,9 @@ namespace GDBDebugger
{
FramestackWidget::FramestackWidget(GDBController* controller,
- QWidget *parent,
+ TQWidget *parent,
const char *name, WFlags f)
- : QListView(parent, name, f),
+ : TQListView(parent, name, f),
viewedThread_(0),
controller_(controller),
mayUpdate_( false )
@@ -49,19 +49,19 @@ FramestackWidget::FramestackWidget(GDBController* controller,
setRootIsDecorated(true);
setSorting(-1);
setSelectionMode(Single);
- addColumn(QString::null); // Frame number
- addColumn(QString::null); // function name/address
- addColumn(QString::null); // source
+ addColumn(TQString::null); // Frame number
+ addColumn(TQString::null); // function name/address
+ addColumn(TQString::null); // source
header()->hide();
// FIXME: maybe, all debugger components should derive from
// a base class that does this connect.
- connect(controller, SIGNAL(event(GDBController::event_t)),
- this, SLOT(slotEvent(GDBController::event_t)));
+ connect(controller, TQT_SIGNAL(event(GDBController::event_t)),
+ this, TQT_SLOT(slotEvent(GDBController::event_t)));
- connect( this, SIGNAL(clicked(QListViewItem*)),
- this, SLOT(slotSelectionChanged(QListViewItem*)) );
+ connect( this, TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
}
@@ -72,11 +72,11 @@ FramestackWidget::~FramestackWidget()
/***************************************************************************/
-QListViewItem *FramestackWidget::lastChild() const
+TQListViewItem *FramestackWidget::lastChild() const
{
- QListViewItem* child = firstChild();
+ TQListViewItem* child = firstChild();
if (child)
- while (QListViewItem* nextChild = child->nextSibling())
+ while (TQListViewItem* nextChild = child->nextSibling())
child = nextChild;
return child;
@@ -88,12 +88,12 @@ void FramestackWidget::clear()
{
viewedThread_ = 0;
- QListView::clear();
+ TQListView::clear();
}
/***************************************************************************/
-void FramestackWidget::slotSelectionChanged(QListViewItem *thisItem)
+void FramestackWidget::slotSelectionChanged(TQListViewItem *thisItem)
{
ThreadStackItem *thread = dynamic_cast<ThreadStackItem*> (thisItem);
if (thread)
@@ -110,7 +110,7 @@ void FramestackWidget::slotSelectionChanged(QListViewItem *thisItem)
// Switch to the target thread.
if (frame->threadNo() != -1)
controller_->addCommand(
- new GDBCommand(QString("-thread-select %1")
+ new GDBCommand(TQString("-thread-select %1")
.arg(frame->threadNo()).ascii()));
viewedThread_ = findThread(frame->threadNo());
@@ -186,7 +186,7 @@ void FramestackWidget::slotEvent(GDBController::event_t e)
}
}
-void FramestackWidget::showEvent(QShowEvent*)
+void FramestackWidget::showEvent(TQShowEvent*)
{
if (controller_->stateIsOn(s_appRunning|s_dbgBusy|s_dbgNotStarted|s_shuttingDown))
return;
@@ -208,7 +208,7 @@ void FramestackWidget::getBacktrace(int min_frame, int max_frame)
maxFrame_ = max_frame;
controller_->addCommand(
- new GDBCommand(QString("-stack-info-depth %1").arg(max_frame+1),
+ new GDBCommand(TQString("-stack-info-depth %1").arg(max_frame+1),
this,
&FramestackWidget::handleStackDepth));
}
@@ -223,7 +223,7 @@ void FramestackWidget::handleStackDepth(const GDBMI::ResultRecord& r)
maxFrame_ = existing_frames;
//add the following command to the front, so noone switches threads in between
controller_->addCommandToFront(
- new GDBCommand(QString("-stack-list-frames %1 %2")
+ new GDBCommand(TQString("-stack-list-frames %1 %2")
.arg(minFrame_).arg(maxFrame_),
this, &FramestackWidget::parseGDBBacktraceList));
}
@@ -235,7 +235,7 @@ void FramestackWidget::getBacktraceForThread(int threadNo)
{
// Switch to the target thread.
controller_->addCommand(
- new GDBCommand(QString("-thread-select %1")
+ new GDBCommand(TQString("-thread-select %1")
.arg(threadNo).ascii()));
viewedThread_ = findThread(threadNo);
@@ -247,7 +247,7 @@ void FramestackWidget::getBacktraceForThread(int threadNo)
{
// Switch back to the original thread.
controller_->addCommand(
- new GDBCommand(QString("-thread-select %1")
+ new GDBCommand(TQString("-thread-select %1")
.arg(currentThread).ascii()));
}
}
@@ -271,15 +271,15 @@ void FramestackWidget::handleThreadList(const GDBMI::ResultRecord& r)
// Really threaded program.
for(unsigned i = 0, e = ids.results.size(); i != e; ++i)
{
- QString id = ids.results[i]->value->literal();
+ TQString id = ids.results[i]->value->literal();
controller_->addCommand(
- new GDBCommand(QString("-thread-select %1").arg(id).ascii(),
+ new GDBCommand(TQString("-thread-select %1").arg(id).ascii(),
this, &FramestackWidget::handleThread));
}
controller_->addCommand(
- new GDBCommand(QString("-thread-select %1")
+ new GDBCommand(TQString("-thread-select %1")
.arg(controller_->currentThread()).ascii()));
}
@@ -292,13 +292,13 @@ void FramestackWidget::handleThreadList(const GDBMI::ResultRecord& r)
void FramestackWidget::handleThread(const GDBMI::ResultRecord& r)
{
- QString id = r["new-thread-id"].literal();
+ TQString id = r["new-thread-id"].literal();
int id_num = id.toInt();
- QString name_column;
- QString func_column;
- QString args_column;
- QString source_column;
+ TQString name_column;
+ TQString func_column;
+ TQString args_column;
+ TQString source_column;
formatFrame(r["frame"], func_column, source_column);
@@ -329,7 +329,7 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r)
Q_ASSERT(dynamic_cast<const GDBMI::ListValue*>(&frames));
// Remove "..." item, if there's one.
- QListViewItem* last;
+ TQListViewItem* last;
if (viewedThread_)
{
last = viewedThread_->firstChild();
@@ -352,13 +352,13 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r)
// For now, just produce string simular to gdb
// console output. In future we might have a table,
// or something better.
- QString frameDesc;
+ TQString frameDesc;
- QString name_column;
- QString func_column;
- QString source_column;
+ TQString name_column;
+ TQString func_column;
+ TQString source_column;
- QString level_s = frame["level"].literal();
+ TQString level_s = frame["level"].literal();
int level = level_s.toInt();
name_column = "#" + level_s;
@@ -377,7 +377,7 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r)
}
if (has_more_frames)
{
- QListViewItem* item;
+ TQListViewItem* item;
if (viewedThread_)
item = new FrameStackItem(viewedThread_, lastLevel+1, "...");
else
@@ -404,7 +404,7 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r)
ThreadStackItem *FramestackWidget::findThread(int threadNo)
{
- QListViewItem *sibling = firstChild();
+ TQListViewItem *sibling = firstChild();
while (sibling)
{
ThreadStackItem *thread = dynamic_cast<ThreadStackItem*> (sibling);
@@ -422,7 +422,7 @@ ThreadStackItem *FramestackWidget::findThread(int threadNo)
FrameStackItem *FramestackWidget::findFrame(int frameNo, int threadNo)
{
- QListViewItem* frameItem = 0;
+ TQListViewItem* frameItem = 0;
if (threadNo != -1)
{
@@ -445,8 +445,8 @@ FrameStackItem *FramestackWidget::findFrame(int frameNo, int threadNo)
}
void FramestackWidget::formatFrame(const GDBMI::Value& frame,
- QString& func_column,
- QString& source_column)
+ TQString& func_column,
+ TQString& source_column)
{
func_column = source_column = "";
@@ -476,15 +476,15 @@ void FramestackWidget::formatFrame(const GDBMI::Value& frame,
}
-void FramestackWidget::drawContentsOffset( QPainter * p, int ox, int oy,
+void FramestackWidget::drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch )
{
- QListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch);
+ TQListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch);
int s1_x = header()->sectionPos(1);
int s1_w = header()->sectionSize(1);
- QRect section1(s1_x, contentsHeight(), s1_w, viewport()->height());
+ TQRect section1(s1_x, contentsHeight(), s1_w, viewport()->height());
p->fillRect(section1, KGlobalSettings::alternateBackgroundColor());
}
@@ -495,8 +495,8 @@ void FramestackWidget::drawContentsOffset( QPainter * p, int ox, int oy,
FrameStackItem::FrameStackItem(FramestackWidget *parent,
unsigned frameNo,
- const QString &name)
- : QListViewItem(parent, parent->lastChild()),
+ const TQString &name)
+ : TQListViewItem(parent, parent->lastChild()),
frameNo_(frameNo),
threadNo_(-1)
{
@@ -507,8 +507,8 @@ FrameStackItem::FrameStackItem(FramestackWidget *parent,
FrameStackItem::FrameStackItem(ThreadStackItem *parent,
unsigned frameNo,
- const QString &name)
- : QListViewItem(parent, parent->lastChild()),
+ const TQString &name)
+ : TQListViewItem(parent, parent->lastChild()),
frameNo_(frameNo),
threadNo_(parent->threadNo())
{
@@ -522,11 +522,11 @@ FrameStackItem::~FrameStackItem()
// **************************************************************************
-QListViewItem *FrameStackItem::lastChild() const
+TQListViewItem *FrameStackItem::lastChild() const
{
- QListViewItem* child = firstChild();
+ TQListViewItem* child = firstChild();
if (child)
- while (QListViewItem* nextChild = child->nextSibling())
+ while (TQListViewItem* nextChild = child->nextSibling())
child = nextChild;
return child;
@@ -547,7 +547,7 @@ void FrameStackItem::setOpen(bool open)
}
}
#endif
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
}
// **************************************************************************
@@ -555,7 +555,7 @@ void FrameStackItem::setOpen(bool open)
// **************************************************************************
ThreadStackItem::ThreadStackItem(FramestackWidget *parent, unsigned threadNo)
-: QListViewItem(parent),
+: TQListViewItem(parent),
threadNo_(threadNo)
{
setText(0, i18n("Thread %1").arg(threadNo_));
@@ -569,11 +569,11 @@ ThreadStackItem::~ThreadStackItem()
// **************************************************************************
-QListViewItem *ThreadStackItem::lastChild() const
+TQListViewItem *ThreadStackItem::lastChild() const
{
- QListViewItem* child = firstChild();
+ TQListViewItem* child = firstChild();
if (child)
- while (QListViewItem* nextChild = child->nextSibling())
+ while (TQListViewItem* nextChild = child->nextSibling())
child = nextChild;
return child;
@@ -609,31 +609,31 @@ void ThreadStackItem::setOpen(bool open)
setText(2, savedSource_);
}
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
}
-void FrameStackItem::paintCell(QPainter * p, const QColorGroup & cg,
+void FrameStackItem::paintCell(TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
if (column % 2)
{
- cg2.setColor(QColorGroup::Base,
+ cg2.setColor(TQColorGroup::Base,
KGlobalSettings::alternateBackgroundColor());
}
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}
-void ThreadStackItem::paintCell(QPainter * p, const QColorGroup & cg,
+void ThreadStackItem::paintCell(TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
if (column % 2)
{
- cg2.setColor(QColorGroup::Base,
+ cg2.setColor(TQColorGroup::Base,
KGlobalSettings::alternateBackgroundColor());
}
- QListViewItem::paintCell(p, cg2, column, width, align);
+ TQListViewItem::paintCell(p, cg2, column, width, align);
}