Initial TQt conversion

pull/1/head
Slávek Banko 11 years ago
parent 1ace27a985
commit 9dab0e253e

@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes="" x_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1092,19 +1092,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1231,8 +1231,8 @@ if test $kde_qtver = 3; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi fi
if test "$PKG_CONFIG" != "no" ; then if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then if $PKG_CONFIG --exists tqt-mt ; then
kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix qt-mt`" kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix tqt-mt`"
fi fi
fi fi
fi fi
@ -1333,7 +1333,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host. dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1391,7 +1391,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host. dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1455,8 +1455,8 @@ if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi fi
if test "$PKG_CONFIG" != "no" ; then if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then if $PKG_CONFIG --exists tqt-mt ; then
qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir qt-mt`" qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir tqt-mt`"
fi fi
fi fi
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes" qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
@ -1465,9 +1465,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=ntqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=ntqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1481,8 +1481,8 @@ if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi fi
if test "$PKG_CONFIG" != "no" ; then if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then if $PKG_CONFIG --exists tqt-mt ; then
qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir qt-mt`" qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir tqt-mt`"
fi fi
fi fi
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries" qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
@ -2058,7 +2058,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <ntqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2619,7 +2619,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <ntqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -3464,7 +3464,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE( AC_TRY_COMPILE(
[ [
#include <qglobal.h> #include <ntqglobal.h>
#if Q_EXPORT - 0 != 0 #if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */ /* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */ /* if Q_EXPORT is nonempty, this will break compilation */
@ -4714,7 +4714,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <ntqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -5560,7 +5560,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR) AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR) AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5581,7 +5581,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

@ -8,11 +8,11 @@
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include <kiconloader.h> #include <kiconloader.h>
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
#include <qdialog.h> #include <ntqdialog.h>
#include <qkeycode.h> #include <ntqkeycode.h>
#include <qpainter.h> #include <ntqpainter.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qbitmap.h> #include <ntqbitmap.h>
#include "debugger.h" #include "debugger.h"
#include "brkpt.h" #include "brkpt.h"
#include "dbgdriver.h" #include "dbgdriver.h"
@ -24,18 +24,18 @@
#include "mydebug.h" #include "mydebug.h"
class BreakpointItem : public QListViewItem, public Breakpoint class BreakpointItem : public TQListViewItem, public Breakpoint
{ {
public: public:
BreakpointItem(QListView* list, const Breakpoint& bp); BreakpointItem(TQListView* list, const Breakpoint& bp);
void updateFrom(const Breakpoint& bp); void updateFrom(const Breakpoint& bp);
void display(); /* sets icon and visible texts */ void display(); /* sets icon and visible texts */
bool enabled() const { return Breakpoint::enabled; } bool enabled() const { return Breakpoint::enabled; }
}; };
BreakpointTable::BreakpointTable(QWidget* parent, const char* name) : BreakpointTable::BreakpointTable(TQWidget* parent, const char* name) :
QWidget(parent, name), TQWidget(parent, name),
m_debugger(0), m_debugger(0),
m_bpEdit(this, "bpedit"), m_bpEdit(this, "bpedit"),
m_list(this, "bptable"), m_list(this, "bptable"),
@ -53,9 +53,9 @@ BreakpointTable::BreakpointTable(QWidget* parent, const char* name) :
connect(&m_bpEdit, SIGNAL(returnPressed()), this, SLOT(addBP())); connect(&m_bpEdit, SIGNAL(returnPressed()), this, SLOT(addBP()));
initListAndIcons(); initListAndIcons();
connect(&m_list, SIGNAL(currentChanged(QListViewItem*)), SLOT(updateUI())); connect(&m_list, SIGNAL(currentChanged(TQListViewItem*)), SLOT(updateUI()));
// double click on item is same as View code // double click on item is same as View code
connect(&m_list, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(viewBP())); connect(&m_list, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(viewBP()));
// need mouse button events // need mouse button events
m_list.viewport()->installEventFilter(this); m_list.viewport()->installEventFilter(this);
@ -76,10 +76,10 @@ BreakpointTable::BreakpointTable(QWidget* parent, const char* name) :
m_btEnaDis.setText(i18n("&Disable")); m_btEnaDis.setText(i18n("&Disable"));
// make a dummy button to get the size of the alternate label // make a dummy button to get the size of the alternate label
{ {
QSize size = m_btEnaDis.sizeHint(); TQSize size = m_btEnaDis.sizeHint();
QPushButton dummy(this); TQPushButton dummy(this);
dummy.setText(i18n("&Enable")); dummy.setText(i18n("&Enable"));
QSize sizeAlt = dummy.sizeHint(); TQSize sizeAlt = dummy.sizeHint();
if (sizeAlt.width() > size.width()) if (sizeAlt.width() > size.width())
size.setWidth(sizeAlt.width()); size.setWidth(sizeAlt.width());
if (sizeAlt.height() > size.height()) if (sizeAlt.height() > size.height())
@ -123,7 +123,7 @@ void BreakpointTable::updateBreakList()
{ {
std::list<BreakpointItem*> deletedItems; std::list<BreakpointItem*> deletedItems;
for (QListViewItem* it = m_list.firstChild(); it != 0; it = it->nextSibling()) { for (TQListViewItem* it = m_list.firstChild(); it != 0; it = it->nextSibling()) {
deletedItems.push_back(static_cast<BreakpointItem*>(it)); deletedItems.push_back(static_cast<BreakpointItem*>(it));
} }
@ -151,8 +151,8 @@ nextItem:;
} }
} }
BreakpointItem::BreakpointItem(QListView* list, const Breakpoint& bp) : BreakpointItem::BreakpointItem(TQListView* list, const Breakpoint& bp) :
QListViewItem(list), TQListViewItem(list),
Breakpoint(bp) Breakpoint(bp)
{ {
display(); display();
@ -167,7 +167,7 @@ void BreakpointItem::updateFrom(const Breakpoint& bp)
void BreakpointTable::addBP() void BreakpointTable::addBP()
{ {
// set a breakpoint at the specified text // set a breakpoint at the specified text
QString bpText = m_bpEdit.text(); TQString bpText = m_bpEdit.text();
bpText = bpText.stripWhiteSpace(); bpText = bpText.stripWhiteSpace();
if (m_debugger->isReady()) if (m_debugger->isReady())
{ {
@ -181,7 +181,7 @@ void BreakpointTable::addBP()
void BreakpointTable::addWP() void BreakpointTable::addWP()
{ {
// set a watchpoint for the specified expression // set a watchpoint for the specified expression
QString wpExpr = m_bpEdit.text(); TQString wpExpr = m_bpEdit.text();
wpExpr = wpExpr.stripWhiteSpace(); wpExpr = wpExpr.stripWhiteSpace();
if (m_debugger->isReady()) { if (m_debugger->isReady()) {
Breakpoint* bp = new Breakpoint; Breakpoint* bp = new Breakpoint;
@ -242,11 +242,11 @@ void BreakpointTable::updateUI()
m_btConditional.setEnabled(enableChkpt); m_btConditional.setEnabled(enableChkpt);
} }
bool BreakpointTable::eventFilter(QObject* ob, QEvent* ev) bool BreakpointTable::eventFilter(TQObject* ob, TQEvent* ev)
{ {
if (ev->type() == QEvent::MouseButtonPress) if (ev->type() == TQEvent::MouseButtonPress)
{ {
QMouseEvent* mev = static_cast<QMouseEvent*>(ev); TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
if (mev->button() == MidButton) { if (mev->button() == MidButton) {
// enable or disable the clicked-on item // enable or disable the clicked-on item
BreakpointItem* bp = BreakpointItem* bp =
@ -258,30 +258,30 @@ bool BreakpointTable::eventFilter(QObject* ob, QEvent* ev)
return true; return true;
} }
} }
return QWidget::eventFilter(ob, ev); return TQWidget::eventFilter(ob, ev);
} }
class ConditionalDlg : public QDialog class ConditionalDlg : public TQDialog
{ {
public: public:
ConditionalDlg(QWidget* parent); ConditionalDlg(TQWidget* parent);
~ConditionalDlg(); ~ConditionalDlg();
void setCondition(const QString& text) { m_condition.setText(text); } void setCondition(const TQString& text) { m_condition.setText(text); }
QString condition() { return m_condition.text(); } TQString condition() { return m_condition.text(); }
void setIgnoreCount(uint count); void setIgnoreCount(uint count);
uint ignoreCount(); uint ignoreCount();
protected: protected:
QLabel m_conditionLabel; TQLabel m_conditionLabel;
QLineEdit m_condition; TQLineEdit m_condition;
QLabel m_ignoreLabel; TQLabel m_ignoreLabel;
QLineEdit m_ignoreCount; TQLineEdit m_ignoreCount;
QPushButton m_buttonOK; TQPushButton m_buttonOK;
QPushButton m_buttonCancel; TQPushButton m_buttonCancel;
QVBoxLayout m_layout; TQVBoxLayout m_layout;
QGridLayout m_inputs; TQGridLayout m_inputs;
QHBoxLayout m_buttons; TQHBoxLayout m_buttons;
}; };
void BreakpointTable::conditionalBP() void BreakpointTable::conditionalBP()
@ -302,10 +302,10 @@ void BreakpointTable::conditionalBP()
dlg.setCondition(bp->condition); dlg.setCondition(bp->condition);
dlg.setIgnoreCount(bp->ignoreCount); dlg.setIgnoreCount(bp->ignoreCount);
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != TQDialog::Accepted)
return; return;
QString conditionInput = dlg.condition(); TQString conditionInput = dlg.condition();
int ignoreCount = dlg.ignoreCount(); int ignoreCount = dlg.ignoreCount();
m_debugger->conditionalBreakpoint(id, conditionInput, ignoreCount); m_debugger->conditionalBreakpoint(id, conditionInput, ignoreCount);
} }
@ -324,13 +324,13 @@ void BreakpointTable::initListAndIcons()
m_list.setSorting(-1); m_list.setSorting(-1);
// add pixmaps // add pixmaps
QPixmap brkena = UserIcon("brkena.xpm"); TQPixmap brkena = UserIcon("brkena.xpm");
QPixmap brkdis = UserIcon("brkdis.xpm"); TQPixmap brkdis = UserIcon("brkdis.xpm");
QPixmap watchena = UserIcon("watchena.xpm"); TQPixmap watchena = UserIcon("watchena.xpm");
QPixmap watchdis = UserIcon("watchdis.xpm"); TQPixmap watchdis = UserIcon("watchdis.xpm");
QPixmap brktmp = UserIcon("brktmp.xpm"); TQPixmap brktmp = UserIcon("brktmp.xpm");
QPixmap brkcond = UserIcon("brkcond.xpm"); TQPixmap brkcond = UserIcon("brkcond.xpm");
QPixmap brkorph = UserIcon("brkorph.xpm"); TQPixmap brkorph = UserIcon("brkorph.xpm");
/* /*
* There are 32 different pixmaps: The basic enabled or disabled * There are 32 different pixmaps: The basic enabled or disabled
@ -339,11 +339,11 @@ void BreakpointTable::initListAndIcons()
* the same sequence for watchpoints. * the same sequence for watchpoints.
*/ */
m_icons.resize(32); m_icons.resize(32);
QPixmap canvas(16,16); TQPixmap canvas(16,16);
for (int i = 0; i < 32; i++) { for (int i = 0; i < 32; i++) {
{ {
QPainter p(&canvas); TQPainter p(&canvas);
// clear canvas // clear canvas
p.fillRect(0,0, canvas.width(),canvas.height(), cyan); p.fillRect(0,0, canvas.width(),canvas.height(), cyan);
// basic icon // basic icon
@ -393,42 +393,42 @@ void BreakpointItem::display()
setText(0, Breakpoint::text); setText(0, Breakpoint::text);
} else if (!fileName.isEmpty()) { } else if (!fileName.isEmpty()) {
// use only the file name portion // use only the file name portion
QString file = fileName; TQString file = fileName;
int slash = file.findRev('/'); int slash = file.findRev('/');
if (slash >= 0) { if (slash >= 0) {
file = file.mid(slash+1); file = file.mid(slash+1);
} }
// correct zero-based line-numbers // correct zero-based line-numbers
setText(0, file + ":" + QString::number(lineNo+1)); setText(0, file + ":" + TQString::number(lineNo+1));
} else { } else {
setText(0, "*" + address.asString()); setText(0, "*" + address.asString());
} }
int c = 0; int c = 0;
setText(++c, address.asString()); setText(++c, address.asString());
QString tmp; TQString tmp;
if (hitCount == 0) { if (hitCount == 0) {
setText(++c, QString()); setText(++c, TQString());
} else { } else {
tmp.setNum(hitCount); tmp.setNum(hitCount);
setText(++c, tmp); setText(++c, tmp);
} }
if (ignoreCount == 0) { if (ignoreCount == 0) {
setText(++c, QString()); setText(++c, TQString());
} else { } else {
tmp.setNum(ignoreCount); tmp.setNum(ignoreCount);
setText(++c, tmp); setText(++c, tmp);
} }
if (condition.isEmpty()) { if (condition.isEmpty()) {
setText(++c, QString()); setText(++c, TQString());
} else { } else {
setText(++c, condition); setText(++c, condition);
} }
} }
ConditionalDlg::ConditionalDlg(QWidget* parent) : ConditionalDlg::ConditionalDlg(TQWidget* parent) :
QDialog(parent, "conditional", true), TQDialog(parent, "conditional", true),
m_conditionLabel(this, "condLabel"), m_conditionLabel(this, "condLabel"),
m_condition(this, "condition"), m_condition(this, "condition"),
m_ignoreLabel(this, "ignoreLabel"), m_ignoreLabel(this, "ignoreLabel"),
@ -439,7 +439,7 @@ ConditionalDlg::ConditionalDlg(QWidget* parent) :
m_inputs(2, 2, 10), m_inputs(2, 2, 10),
m_buttons(4) m_buttons(4)
{ {
QString title = kapp->caption(); TQString title = kapp->caption();
title += i18n(": Conditional breakpoint"); title += i18n(": Conditional breakpoint");
setCaption(title); setCaption(title);
@ -494,14 +494,14 @@ ConditionalDlg::~ConditionalDlg()
uint ConditionalDlg::ignoreCount() uint ConditionalDlg::ignoreCount()
{ {
bool ok; bool ok;
QString input = m_ignoreCount.text(); TQString input = m_ignoreCount.text();
uint result = input.toUInt(&ok); uint result = input.toUInt(&ok);
return ok ? result : 0; return ok ? result : 0;
} }
void ConditionalDlg::setIgnoreCount(uint count) void ConditionalDlg::setIgnoreCount(uint count)
{ {
QString text; TQString text;
// set empty if ignore count is zero // set empty if ignore count is zero
if (count > 0) { if (count > 0) {
text.setNum(count); text.setNum(count);

@ -7,45 +7,45 @@
#ifndef BRKPT_H #ifndef BRKPT_H
#define BRKPT_H #define BRKPT_H
#include <qlistview.h> #include <ntqlistview.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qvaluevector.h> #include <ntqvaluevector.h>
class KDebugger; class KDebugger;
class BreakpointItem; class BreakpointItem;
class BreakpointTable : public QWidget class BreakpointTable : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
BreakpointTable(QWidget* parent, const char* name); BreakpointTable(TQWidget* parent, const char* name);
~BreakpointTable(); ~BreakpointTable();
void setDebugger(KDebugger* deb) { m_debugger = deb; } void setDebugger(KDebugger* deb) { m_debugger = deb; }
protected: protected:
KDebugger* m_debugger; KDebugger* m_debugger;
QLineEdit m_bpEdit; TQLineEdit m_bpEdit;
QListView m_list; TQListView m_list;
QPushButton m_btAddBP; TQPushButton m_btAddBP;
QPushButton m_btAddWP; TQPushButton m_btAddWP;
QPushButton m_btRemove; TQPushButton m_btRemove;
QPushButton m_btEnaDis; TQPushButton m_btEnaDis;
QPushButton m_btViewCode; TQPushButton m_btViewCode;
QPushButton m_btConditional; TQPushButton m_btConditional;
QHBoxLayout m_layout; TQHBoxLayout m_layout;
QVBoxLayout m_listandedit; TQVBoxLayout m_listandedit;
QVBoxLayout m_buttons; TQVBoxLayout m_buttons;
QValueVector<QPixmap> m_icons; TQValueVector<TQPixmap> m_icons;
void insertBreakpoint(int num, bool temp, bool enabled, QString location, void insertBreakpoint(int num, bool temp, bool enabled, TQString location,
QString fileName = 0, int lineNo = -1, TQString fileName = 0, int lineNo = -1,
int hits = 0, uint ignoreCount = 0, int hits = 0, uint ignoreCount = 0,
QString condition = QString()); TQString condition = TQString());
void initListAndIcons(); void initListAndIcons();
virtual bool eventFilter(QObject* ob, QEvent* ev); virtual bool eventFilter(TQObject* ob, TQEvent* ev);
friend class BreakpointItem; friend class BreakpointItem;
@ -60,7 +60,7 @@ signals:
* @param lineNo specifies the line number (0-based!). * @param lineNo specifies the line number (0-based!).
* @param address specifies the exact address of the breakpoint. * @param address specifies the exact address of the breakpoint.
*/ */
void activateFileLine(const QString& file, int lineNo, const DbgAddr& address); void activateFileLine(const TQString& file, int lineNo, const DbgAddr& address);
public slots: public slots:
virtual void addBP(); virtual void addBP();
virtual void addWP(); virtual void addWP();

@ -6,7 +6,7 @@
#include "dbgdriver.h" #include "dbgdriver.h"
#include "exprwnd.h" #include "exprwnd.h"
#include <qstringlist.h> #include <ntqstringlist.h>
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> /* strtol, atoi */ #include <stdlib.h> /* strtol, atoi */
#include <algorithm> #include <algorithm>
@ -61,7 +61,7 @@ int DebuggerDriver::commSetupDoneC()
} }
bool DebuggerDriver::startup(QString cmdStr) bool DebuggerDriver::startup(TQString cmdStr)
{ {
// clear command queues // clear command queues
delete m_activeCmd; delete m_activeCmd;
@ -74,9 +74,9 @@ bool DebuggerDriver::startup(QString cmdStr)
if (cmdStr.isEmpty()) if (cmdStr.isEmpty())
cmdStr = defaultInvocation(); cmdStr = defaultInvocation();
QStringList cmd = QStringList::split(' ', cmdStr); TQStringList cmd = TQStringList::split(' ', cmdStr);
clearArguments(); clearArguments();
for (QStringList::iterator i = cmd.begin(); i != cmd.end(); ++i) { for (TQStringList::iterator i = cmd.begin(); i != cmd.end(); ++i) {
*this << *i; *this << *i;
} }
@ -118,7 +118,7 @@ void DebuggerDriver::slotExited(KProcess*)
CmdQueueItem* DebuggerDriver::executeCmdString(DbgCommand cmd, CmdQueueItem* DebuggerDriver::executeCmdString(DbgCommand cmd,
QString cmdString, bool clearLow) TQString cmdString, bool clearLow)
{ {
// place a new command into the high-priority queue // place a new command into the high-priority queue
CmdQueueItem* cmdItem = new CmdQueueItem(cmd, cmdString); CmdQueueItem* cmdItem = new CmdQueueItem(cmd, cmdString);
@ -130,7 +130,7 @@ CmdQueueItem* DebuggerDriver::executeCmdString(DbgCommand cmd,
m_state = DSinterrupted; m_state = DSinterrupted;
kill(SIGINT); kill(SIGINT);
ASSERT(m_activeCmd != 0); ASSERT(m_activeCmd != 0);
TRACE(QString().sprintf("interrupted the command %d", TRACE(TQString().sprintf("interrupted the command %d",
(m_activeCmd ? m_activeCmd->m_cmd : -1))); (m_activeCmd ? m_activeCmd->m_cmd : -1)));
delete m_activeCmd; delete m_activeCmd;
m_activeCmd = 0; m_activeCmd = 0;
@ -152,14 +152,14 @@ bool CmdQueueItem::IsEqualCmd::operator()(CmdQueueItem* cmd) const
} }
CmdQueueItem* DebuggerDriver::queueCmdString(DbgCommand cmd, CmdQueueItem* DebuggerDriver::queueCmdString(DbgCommand cmd,
QString cmdString, QueueMode mode) TQString cmdString, QueueMode mode)
{ {
// place a new command into the low-priority queue // place a new command into the low-priority queue
std::list<CmdQueueItem*>::iterator i; std::list<CmdQueueItem*>::iterator i;
CmdQueueItem* cmdItem = 0; CmdQueueItem* cmdItem = 0;
switch (mode) { switch (mode) {
case QMoverrideMoreEqual: case TQMoverrideMoreEqual:
case QMoverride: case TQMoverride:
// check whether gdb is currently processing this command // check whether gdb is currently processing this command
if (m_activeCmd != 0 && if (m_activeCmd != 0 &&
m_activeCmd->m_cmd == cmd && m_activeCmd->m_cmdString == cmdString) m_activeCmd->m_cmd == cmd && m_activeCmd->m_cmdString == cmdString)
@ -171,7 +171,7 @@ CmdQueueItem* DebuggerDriver::queueCmdString(DbgCommand cmd,
if (i != m_lopriCmdQueue.end()) { if (i != m_lopriCmdQueue.end()) {
// found one // found one
cmdItem = *i; cmdItem = *i;
if (mode == QMoverrideMoreEqual) { if (mode == TQMoverrideMoreEqual) {
// All commands are equal, but some are more equal than others... // All commands are equal, but some are more equal than others...
// put this command in front of all others // put this command in front of all others
m_lopriCmdQueue.erase(i); m_lopriCmdQueue.erase(i);
@ -180,7 +180,7 @@ CmdQueueItem* DebuggerDriver::queueCmdString(DbgCommand cmd,
break; break;
} // else none found, so add it } // else none found, so add it
// drop through // drop through
case QMnormal: case TQMnormal:
cmdItem = new CmdQueueItem(cmd, cmdString); cmdItem = new CmdQueueItem(cmd, cmdString);
m_lopriCmdQueue.push_back(cmdItem); m_lopriCmdQueue.push_back(cmdItem);
} }
@ -282,7 +282,7 @@ void DebuggerDriver::slotCommandRead(KProcess*)
// re-receive delayed output // re-receive delayed output
while (!m_delayedOutput.empty()) { while (!m_delayedOutput.empty()) {
QByteArray delayed = m_delayedOutput.front(); TQByteArray delayed = m_delayedOutput.front();
m_delayedOutput.pop(); m_delayedOutput.pop();
slotReceiveOutput(0, const_cast<char*>(delayed.data()), delayed.size()); slotReceiveOutput(0, const_cast<char*>(delayed.data()), delayed.size());
} }
@ -304,7 +304,7 @@ void DebuggerDriver::slotReceiveOutput(KProcess*, char* buffer, int buflen)
* output, it will be re-sent by commandRead when it gets the * output, it will be re-sent by commandRead when it gets the
* acknowledgment for the uncommitted command. * acknowledgment for the uncommitted command.
*/ */
m_delayedOutput.push(QByteArray().duplicate(buffer, buflen)); m_delayedOutput.push(TQByteArray().duplicate(buffer, buflen));
return; return;
} }
// write to log file (do not log delayed output - it would appear twice) // write to log file (do not log delayed output - it would appear twice)
@ -321,7 +321,7 @@ void DebuggerDriver::slotReceiveOutput(KProcess*, char* buffer, int buflen)
*/ */
if (m_activeCmd == 0 && m_state != DSinterrupted) { if (m_activeCmd == 0 && m_state != DSinterrupted) {
// ignore the output // ignore the output
TRACE("ignoring stray output: " + QString::fromLatin1(buffer, buflen)); TRACE("ignoring stray output: " + TQString::fromLatin1(buffer, buflen));
return; return;
} }
ASSERT(m_state == DSrunning || m_state == DSrunningLow || m_state == DSinterrupted); ASSERT(m_state == DSrunning || m_state == DSrunningLow || m_state == DSinterrupted);
@ -354,7 +354,7 @@ void DebuggerDriver::slotReceiveOutput(KProcess*, char* buffer, int buflen)
* for the full prompt string. * for the full prompt string.
* *
* Note: Using the regular expression here is most expensive, because * Note: Using the regular expression here is most expensive, because
* it translates m_output to a QString each time. * it translates m_output to a TQString each time.
* *
* Note: It could nevertheless happen that a character sequence that is * Note: It could nevertheless happen that a character sequence that is
* equal to the prompt string appears at the end of the output, * equal to the prompt string appears at the end of the output,
@ -376,8 +376,8 @@ void DebuggerDriver::slotReceiveOutput(KProcess*, char* buffer, int buflen)
promptStart = m_outputLen-m_promptMinLen; promptStart = m_outputLen-m_promptMinLen;
} }
} else { } else {
QString output = QString::fromLatin1(m_output, m_outputLen); TQString output = TQString::fromLatin1(m_output, m_outputLen);
#if QT_VERSION >= 300 #if TQT_VERSION >= 300
promptStart = m_promptRE.search(output); promptStart = m_promptRE.search(output);
#else #else
promptStart = m_promptRE.match(output); promptStart = m_promptRE.match(output);
@ -413,7 +413,7 @@ void DebuggerDriver::slotReceiveOutput(KProcess*, char* buffer, int buflen)
*m_output = '\0'; *m_output = '\0';
// also clear delayed output if interrupted // also clear delayed output if interrupted
if (m_state == DSinterrupted) { if (m_state == DSinterrupted) {
m_delayedOutput = std::queue<QByteArray>(); m_delayedOutput = std::queue<TQByteArray>();
} }
/* /*
@ -451,7 +451,7 @@ void DebuggerDriver::dequeueCmdByVar(VarTree* var)
} }
QString DebuggerDriver::editableValue(VarTree* value) TQString DebuggerDriver::editableValue(VarTree* value)
{ {
// by default, let the user edit what is visible // by default, let the user edit what is visible
return value->value(); return value->value();
@ -464,7 +464,7 @@ StackFrame::~StackFrame()
} }
DbgAddr::DbgAddr(const QString& aa) : DbgAddr::DbgAddr(const TQString& aa) :
a(aa) a(aa)
{ {
cleanAddr(); cleanAddr();
@ -483,25 +483,25 @@ void DbgAddr::cleanAddr()
} }
} }
void DbgAddr::operator=(const QString& aa) void DbgAddr::operator=(const TQString& aa)
{ {
a = aa; a = aa;
fnoffs = QString(); fnoffs = TQString();
cleanAddr(); cleanAddr();
} }
/* Re-attach 0x in front of the address */ /* Re-attach 0x in front of the address */
QString DbgAddr::asString() const TQString DbgAddr::asString() const
{ {
if (a.isEmpty()) if (a.isEmpty())
return QString(); return TQString();
else else
return "0x" + a; return "0x" + a;
} }
bool operator==(const DbgAddr& a1, const DbgAddr& a2) bool operator==(const DbgAddr& a1, const DbgAddr& a2)
{ {
return QString::compare(a1.a, a2.a) == 0; return TQString::compare(a1.a, a2.a) == 0;
} }
bool operator>(const DbgAddr& a1, const DbgAddr& a2) bool operator>(const DbgAddr& a1, const DbgAddr& a2)
@ -510,7 +510,7 @@ bool operator>(const DbgAddr& a1, const DbgAddr& a2)
return true; return true;
if (a1.a.length() < a2.a.length()) if (a1.a.length() < a2.a.length())
return false; return false;
return QString::compare(a1.a, a2.a) > 0; return TQString::compare(a1.a, a2.a) > 0;
} }

@ -7,9 +7,9 @@
#ifndef DBGDRIVER_H #ifndef DBGDRIVER_H
#define DBGDRIVER_H #define DBGDRIVER_H
#include <qfile.h> #include <ntqfile.h>
#include <qregexp.h> #include <ntqregexp.h>
#include <qcstring.h> #include <ntqcstring.h>
#include <kprocess.h> #include <kprocess.h>
#include <queue> #include <queue>
#include <list> #include <list>
@ -19,7 +19,7 @@ class VarTree;
class ExprValue; class ExprValue;
class ExprWnd; class ExprWnd;
class KDebugger; class KDebugger;
class QStringList; class TQStringList;
/** /**
@ -27,14 +27,14 @@ class QStringList;
*/ */
struct DbgAddr struct DbgAddr
{ {
QString a; TQString a;
QString fnoffs; TQString fnoffs;
DbgAddr() { } DbgAddr() { }
DbgAddr(const QString& aa); DbgAddr(const TQString& aa);
DbgAddr(const DbgAddr& src) : a(src.a), fnoffs(src.fnoffs) { } DbgAddr(const DbgAddr& src) : a(src.a), fnoffs(src.fnoffs) { }
void operator=(const QString& aa); void operator=(const TQString& aa);
void operator=(const DbgAddr& src) { a = src.a; fnoffs = src.fnoffs; } void operator=(const DbgAddr& src) { a = src.a; fnoffs = src.fnoffs; }
QString asString() const; TQString asString() const;
bool isEmpty() const { return a.isEmpty(); } bool isEmpty() const { return a.isEmpty(); }
protected: protected:
void cleanAddr(); void cleanAddr();
@ -83,7 +83,7 @@ enum DbgCommand {
DCprint, DCprint,
DCprintDeref, DCprintDeref,
DCprintStruct, DCprintStruct,
DCprintQStringStruct, DCprintTQStringStruct,
DCframe, DCframe,
DCfindType, DCfindType,
DCinfosharedlib, DCinfosharedlib,
@ -142,13 +142,13 @@ struct Breakpoint;
struct CmdQueueItem struct CmdQueueItem
{ {
DbgCommand m_cmd; DbgCommand m_cmd;
QString m_cmdString; TQString m_cmdString;
bool m_committed; /* just a debugging aid */ bool m_committed; /* just a debugging aid */
// remember which expression when printing an expression // remember which expression when printing an expression
VarTree* m_expr; VarTree* m_expr;
ExprWnd* m_exprWnd; ExprWnd* m_exprWnd;
// remember file position // remember file position
QString m_fileName; TQString m_fileName;
int m_lineNo; int m_lineNo;
// the breakpoint info // the breakpoint info
Breakpoint* m_brkpt; Breakpoint* m_brkpt;
@ -156,7 +156,7 @@ struct CmdQueueItem
// whether command was emitted due to direct user request (only set when relevant) // whether command was emitted due to direct user request (only set when relevant)
bool m_byUser; bool m_byUser;
CmdQueueItem(DbgCommand cmd, const QString& str) : CmdQueueItem(DbgCommand cmd, const TQString& str) :
m_cmd(cmd), m_cmd(cmd),
m_cmdString(str), m_cmdString(str),
m_committed(false), m_committed(false),
@ -170,10 +170,10 @@ struct CmdQueueItem
struct IsEqualCmd struct IsEqualCmd
{ {
IsEqualCmd(DbgCommand cmd, const QString& str) : m_cmd(cmd), m_str(str) { } IsEqualCmd(DbgCommand cmd, const TQString& str) : m_cmd(cmd), m_str(str) { }
bool operator()(CmdQueueItem*) const; bool operator()(CmdQueueItem*) const;
DbgCommand m_cmd; DbgCommand m_cmd;
const QString& m_str; const TQString& m_str;
}; };
}; };
@ -189,14 +189,14 @@ struct Breakpoint
} type; } type;
bool temporary; bool temporary;
bool enabled; bool enabled;
QString location; TQString location;
QString text; /* text if set using DCbreaktext */ TQString text; /* text if set using DCbreaktext */
DbgAddr address; /* exact address of breakpoint */ DbgAddr address; /* exact address of breakpoint */
QString condition; /* condition as printed by gdb */ TQString condition; /* condition as printed by gdb */
int ignoreCount; /* ignore next that may hits */ int ignoreCount; /* ignore next that may hits */
int hitCount; /* as reported by gdb */ int hitCount; /* as reported by gdb */
// the following items repeat the location, but in a better usable way // the following items repeat the location, but in a better usable way
QString fileName; TQString fileName;
int lineNo; /* zero-based line number */ int lineNo; /* zero-based line number */
Breakpoint(); Breakpoint();
bool isOrphaned() const { return id < 0; } bool isOrphaned() const { return id < 0; }
@ -207,7 +207,7 @@ struct Breakpoint
*/ */
struct FrameInfo struct FrameInfo
{ {
QString fileName; TQString fileName;
int lineNo; /* zero-based line number */ int lineNo; /* zero-based line number */
DbgAddr address; /* exact address of PC */ DbgAddr address; /* exact address of PC */
}; };
@ -229,8 +229,8 @@ struct StackFrame : FrameInfo
struct ThreadInfo : FrameInfo struct ThreadInfo : FrameInfo
{ {
int id; /* gdb's number */ int id; /* gdb's number */
QString threadName; /* the SYSTAG */ TQString threadName; /* the SYSTAG */
QString function; /* where thread is halted */ TQString function; /* where thread is halted */
bool hasFocus; /* the thread whose stack we are watching */ bool hasFocus; /* the thread whose stack we are watching */
}; };
@ -239,10 +239,10 @@ struct ThreadInfo : FrameInfo
*/ */
struct RegisterInfo struct RegisterInfo
{ {
QString regName; TQString regName;
QString rawValue; TQString rawValue;
QString cookedValue; /* may be empty */ TQString cookedValue; /* may be empty */
QString type; /* of vector register if not empty */ TQString type; /* of vector register if not empty */
}; };
/** /**
@ -251,7 +251,7 @@ struct RegisterInfo
struct DisassembledCode struct DisassembledCode
{ {
DbgAddr address; DbgAddr address;
QString code; TQString code;
}; };
/** /**
@ -260,7 +260,7 @@ struct DisassembledCode
struct MemoryDump struct MemoryDump
{ {
DbgAddr address; DbgAddr address;
QString dump; TQString dump;
}; };
/** /**
@ -277,22 +277,22 @@ public:
DebuggerDriver(); DebuggerDriver();
virtual ~DebuggerDriver() = 0; virtual ~DebuggerDriver() = 0;
virtual QString driverName() const = 0; virtual TQString driverName() const = 0;
/** /**
* Returns the default command string to invoke the debugger driver. * Returns the default command string to invoke the debugger driver.
*/ */
virtual QString defaultInvocation() const = 0; virtual TQString defaultInvocation() const = 0;
/** /**
* Returns a list of options that can be turned on and off. * Returns a list of options that can be turned on and off.
*/ */
virtual QStringList boolOptionList() const = 0; virtual TQStringList boolOptionList() const = 0;
virtual bool startup(QString cmdStr); virtual bool startup(TQString cmdStr);
void setLogFileName(const QString& fname) { m_logFileName = fname; } void setLogFileName(const TQString& fname) { m_logFileName = fname; }
protected: protected:
QString m_runCmd; TQString m_runCmd;
enum DebuggerState { enum DebuggerState {
DSidle, /* gdb waits for input */ DSidle, /* gdb waits for input */
@ -315,7 +315,7 @@ protected:
char* m_output; /* normal gdb output */ char* m_output; /* normal gdb output */
size_t m_outputLen; /* amount of data so far accumulated in m_output */ size_t m_outputLen; /* amount of data so far accumulated in m_output */
size_t m_outputAlloc; /* space available in m_output */ size_t m_outputAlloc; /* space available in m_output */
std::queue<QByteArray> m_delayedOutput; /* output colleced while we have receivedOutput */ std::queue<TQByteArray> m_delayedOutput; /* output colleced while we have receivedOutput */
/* but before signal wroteStdin arrived */ /* but before signal wroteStdin arrived */
public: public:
@ -326,21 +326,21 @@ public:
*/ */
virtual CmdQueueItem* executeCmd(DbgCommand, virtual CmdQueueItem* executeCmd(DbgCommand,
bool clearLow = false) = 0; bool clearLow = false) = 0;
virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg, virtual CmdQueueItem* executeCmd(DbgCommand, TQString strArg,
bool clearLow = false) = 0; bool clearLow = false) = 0;
virtual CmdQueueItem* executeCmd(DbgCommand, int intArg, virtual CmdQueueItem* executeCmd(DbgCommand, int intArg,
bool clearLow = false) = 0; bool clearLow = false) = 0;
virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg, int intArg, virtual CmdQueueItem* executeCmd(DbgCommand, TQString strArg, int intArg,
bool clearLow = false) = 0; bool clearLow = false) = 0;
virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg1, QString strArg2, virtual CmdQueueItem* executeCmd(DbgCommand, TQString strArg1, TQString strArg2,
bool clearLow = false) = 0; bool clearLow = false) = 0;
virtual CmdQueueItem* executeCmd(DbgCommand, int intArg1, int intArg2, virtual CmdQueueItem* executeCmd(DbgCommand, int intArg1, int intArg2,
bool clearLow = false) = 0; bool clearLow = false) = 0;
enum QueueMode { enum QueueMode {
QMnormal, /* queues the command last */ TQMnormal, /* queues the command last */
QMoverride, /* removes an already queued command */ TQMoverride, /* removes an already queued command */
QMoverrideMoreEqual /* ditto, also puts the command first in the queue */ TQMoverrideMoreEqual /* ditto, also puts the command first in the queue */
}; };
/** /**
@ -349,13 +349,13 @@ public:
*/ */
virtual CmdQueueItem* queueCmd(DbgCommand, virtual CmdQueueItem* queueCmd(DbgCommand,
QueueMode mode) = 0; QueueMode mode) = 0;
virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg, virtual CmdQueueItem* queueCmd(DbgCommand, TQString strArg,
QueueMode mode) = 0; QueueMode mode) = 0;
virtual CmdQueueItem* queueCmd(DbgCommand, int intArg, virtual CmdQueueItem* queueCmd(DbgCommand, int intArg,
QueueMode mode) = 0; QueueMode mode) = 0;
virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg, int intArg, virtual CmdQueueItem* queueCmd(DbgCommand, TQString strArg, int intArg,
QueueMode mode) = 0; QueueMode mode) = 0;
virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg1, QString strArg2, virtual CmdQueueItem* queueCmd(DbgCommand, TQString strArg1, TQString strArg2,
QueueMode mode) = 0; QueueMode mode) = 0;
/** /**
@ -381,14 +381,14 @@ public:
virtual void interruptInferior() = 0; virtual void interruptInferior() = 0;
/** /**
* Specifies the command that prints the QString data. * Specifies the command that prints the TQString data.
*/ */
virtual void setPrintQStringDataCmd(const char* cmd) = 0; virtual void setPrintTQStringDataCmd(const char* cmd) = 0;
/** /**
* Parses the output as an array of QChars. * Parses the output as an array of TQChars.
*/ */
virtual ExprValue* parseQCharArray(const char* output, bool wantErrorValue, bool qt3like) = 0; virtual ExprValue* parseTQCharArray(const char* output, bool wantErrorValue, bool qt3like) = 0;
/** /**
* Parses a back-trace (the output of the DCbt command). * Parses a back-trace (the output of the DCbt command).
@ -405,7 +405,7 @@ public:
* output values are undefined in this case. * output values are undefined in this case.
*/ */
virtual bool parseFrameChange(const char* output, int& frameNo, virtual bool parseFrameChange(const char* output, int& frameNo,
QString& file, int& lineNo, DbgAddr& address) = 0; TQString& file, int& lineNo, DbgAddr& address) = 0;
/** /**
* Parses a list of breakpoints. * Parses a list of breakpoints.
@ -436,7 +436,7 @@ public:
* @return False if there was no breakpoint. * @return False if there was no breakpoint.
*/ */
virtual bool parseBreakpoint(const char* output, int& id, virtual bool parseBreakpoint(const char* output, int& id,
QString& file, int& lineNo, QString& address) = 0; TQString& file, int& lineNo, TQString& address) = 0;
/** /**
* Parses the output of the DCinfolocals command. * Parses the output of the DCinfolocals command.
@ -462,13 +462,13 @@ public:
* Parses the output of the DCcd command. * Parses the output of the DCcd command.
* @return false if the message is an error message. * @return false if the message is an error message.
*/ */
virtual bool parseChangeWD(const char* output, QString& message) = 0; virtual bool parseChangeWD(const char* output, TQString& message) = 0;
/** /**
* Parses the output of the DCexecutable command. * Parses the output of the DCexecutable command.
* @return false if an error occured. * @return false if an error occured.
*/ */
virtual bool parseChangeExecutable(const char* output, QString& message) = 0; virtual bool parseChangeExecutable(const char* output, TQString& message) = 0;
/** /**
* Parses the output of the DCcorefile command. * Parses the output of the DCcorefile command.
@ -486,18 +486,18 @@ public:
* Parses the output of commands that execute (a piece of) the program. * Parses the output of commands that execute (a piece of) the program.
* @return The inclusive OR of zero or more of the StopFlags. * @return The inclusive OR of zero or more of the StopFlags.
*/ */
virtual uint parseProgramStopped(const char* output, QString& message) = 0; virtual uint parseProgramStopped(const char* output, TQString& message) = 0;
/** /**
* Parses the output of the DCsharedlibs command. * Parses the output of the DCsharedlibs command.
*/ */
virtual QStringList parseSharedLibs(const char* output) = 0; virtual TQStringList parseSharedLibs(const char* output) = 0;
/** /**
* Parses the output of the DCfindType command. * Parses the output of the DCfindType command.
* @return true if a type was found. * @return true if a type was found.
*/ */
virtual bool parseFindType(const char* output, QString& type) = 0; virtual bool parseFindType(const char* output, TQString& type) = 0;
/** /**
* Parses the output of the DCinforegisters command. * Parses the output of the DCinforegisters command.
@ -509,7 +509,7 @@ public:
* two addresses could not be found. * two addresses could not be found.
*/ */
virtual bool parseInfoLine(const char* output, virtual bool parseInfoLine(const char* output,
QString& addrFrom, QString& addrTo) = 0; TQString& addrFrom, TQString& addrTo) = 0;
/** /**
* Parses the ouput of the DCdisassemble command. * Parses the ouput of the DCdisassemble command.
@ -520,19 +520,19 @@ public:
* Parses a memory dump. Returns an empty string if no error was found; * Parses a memory dump. Returns an empty string if no error was found;
* otherwise it contains an error message. * otherwise it contains an error message.
*/ */
virtual QString parseMemoryDump(const char* output, std::list<MemoryDump>& memdump) = 0; virtual TQString parseMemoryDump(const char* output, std::list<MemoryDump>& memdump) = 0;
/** /**
* Parses the output of the DCsetvariable command. Returns an empty * Parses the output of the DCsetvariable command. Returns an empty
* string if no error was found; otherwise it contains an error * string if no error was found; otherwise it contains an error
* message. * message.
*/ */
virtual QString parseSetVariable(const char* output) = 0; virtual TQString parseSetVariable(const char* output) = 0;
/** /**
* Returns a value that the user can edit. * Returns a value that the user can edit.
*/ */
virtual QString editableValue(VarTree* value); virtual TQString editableValue(VarTree* value);
protected: protected:
/** Removes all commands from the low-priority queue. */ /** Removes all commands from the low-priority queue. */
@ -550,13 +550,13 @@ protected:
* Helper function that queues the given command string in the * Helper function that queues the given command string in the
* low-priority queue. * low-priority queue.
*/ */
CmdQueueItem* queueCmdString(DbgCommand cmd, QString cmdString, CmdQueueItem* queueCmdString(DbgCommand cmd, TQString cmdString,
QueueMode mode); QueueMode mode);
/** /**
* Helper function that queues the given command string in the * Helper function that queues the given command string in the
* high-priority queue. * high-priority queue.
*/ */
CmdQueueItem* executeCmdString(DbgCommand cmd, QString cmdString, CmdQueueItem* executeCmdString(DbgCommand cmd, TQString cmdString,
bool clearLow); bool clearLow);
void writeCommand(); void writeCommand();
virtual void commandFinished(CmdQueueItem* cmd) = 0; virtual void commandFinished(CmdQueueItem* cmd) = 0;
@ -568,11 +568,11 @@ protected:
char m_prompt[10]; char m_prompt[10];
size_t m_promptMinLen; size_t m_promptMinLen;
char m_promptLastChar; char m_promptLastChar;
QRegExp m_promptRE; TQRegExp m_promptRE;
// log file // log file
QString m_logFileName; TQString m_logFileName;
QFile m_logFile; TQFile m_logFile;
public slots: public slots:
void dequeueCmdByVar(VarTree* var); void dequeueCmdByVar(VarTree* var);
@ -604,7 +604,7 @@ signals:
* should NOT be changed). * should NOT be changed).
* @param address specifies the exact address of the PC or is empty. * @param address specifies the exact address of the PC or is empty.
*/ */
void activateFileLine(const QString& file, int lineNo, const DbgAddr& address); void activateFileLine(const TQString& file, int lineNo, const DbgAddr& address);
/** /**
* This signal is emitted when a command that starts the inferior has * This signal is emitted when a command that starts the inferior has

@ -19,8 +19,8 @@
#include <kkeydialog.h> #include <kkeydialog.h>
#include <kanimwidget.h> #include <kanimwidget.h>
#include <kwin.h> #include <kwin.h>
#include <qlistbox.h> #include <ntqlistbox.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include "dbgmainwnd.h" #include "dbgmainwnd.h"
#include "debugger.h" #include "debugger.h"
#include "commandids.h" #include "commandids.h"
@ -41,7 +41,7 @@ DebuggerMainWnd::DebuggerMainWnd(const char* name) :
KDockMainWindow(0, name), KDockMainWindow(0, name),
DebuggerMainWndBase() DebuggerMainWndBase()
{ {
QPixmap p; TQPixmap p;
KDockWidget* dw0 = createDockWidget("Source", p, 0, i18n("Source")); KDockWidget* dw0 = createDockWidget("Source", p, 0, i18n("Source"));
m_filesWindow = new WinStack(dw0, "files"); m_filesWindow = new WinStack(dw0, "files");
@ -52,7 +52,7 @@ DebuggerMainWnd::DebuggerMainWnd(const char* name) :
setMainDockWidget(dw0); setMainDockWidget(dw0);
KDockWidget* dw1 = createDockWidget("Stack", p, 0, i18n("Stack")); KDockWidget* dw1 = createDockWidget("Stack", p, 0, i18n("Stack"));
m_btWindow = new QListBox(dw1, "backtrace"); m_btWindow = new TQListBox(dw1, "backtrace");
dw1->setWidget(m_btWindow); dw1->setWidget(m_btWindow);
KDockWidget* dw2 = createDockWidget("Locals", p, 0, i18n("Locals")); KDockWidget* dw2 = createDockWidget("Locals", p, 0, i18n("Locals"));
m_localVariables = new ExprWnd(dw2, i18n("Variable"), "locals"); m_localVariables = new ExprWnd(dw2, i18n("Variable"), "locals");
@ -86,33 +86,33 @@ DebuggerMainWnd::DebuggerMainWnd(const char* name) :
connect(m_watches, SIGNAL(addWatch()), SLOT(slotAddWatch())); connect(m_watches, SIGNAL(addWatch()), SLOT(slotAddWatch()));
connect(m_watches, SIGNAL(deleteWatch()), m_debugger, SLOT(slotDeleteWatch())); connect(m_watches, SIGNAL(deleteWatch()), m_debugger, SLOT(slotDeleteWatch()));
connect(m_watches, SIGNAL(textDropped(const QString&)), SLOT(slotAddWatch(const QString&))); connect(m_watches, SIGNAL(textDropped(const TQString&)), SLOT(slotAddWatch(const TQString&)));
connect(&m_filesWindow->m_findDlg, SIGNAL(closed()), SLOT(updateUI())); connect(&m_filesWindow->m_findDlg, SIGNAL(closed()), SLOT(updateUI()));
connect(m_filesWindow, SIGNAL(newFileLoaded()), connect(m_filesWindow, SIGNAL(newFileLoaded()),
SLOT(slotNewFileLoaded())); SLOT(slotNewFileLoaded()));
connect(m_filesWindow, SIGNAL(toggleBreak(const QString&,int,const DbgAddr&,bool)), connect(m_filesWindow, SIGNAL(toggleBreak(const TQString&,int,const DbgAddr&,bool)),
this, SLOT(slotToggleBreak(const QString&,int,const DbgAddr&,bool))); this, SLOT(slotToggleBreak(const TQString&,int,const DbgAddr&,bool)));
connect(m_filesWindow, SIGNAL(enadisBreak(const QString&,int,const DbgAddr&)), connect(m_filesWindow, SIGNAL(enadisBreak(const TQString&,int,const DbgAddr&)),
this, SLOT(slotEnaDisBreak(const QString&,int,const DbgAddr&))); this, SLOT(slotEnaDisBreak(const TQString&,int,const DbgAddr&)));
connect(m_debugger, SIGNAL(activateFileLine(const QString&,int,const DbgAddr&)), connect(m_debugger, SIGNAL(activateFileLine(const TQString&,int,const DbgAddr&)),
m_filesWindow, SLOT(activate(const QString&,int,const DbgAddr&))); m_filesWindow, SLOT(activate(const TQString&,int,const DbgAddr&)));
connect(m_debugger, SIGNAL(executableUpdated()), connect(m_debugger, SIGNAL(executableUpdated()),
m_filesWindow, SLOT(reloadAllFiles())); m_filesWindow, SLOT(reloadAllFiles()));
connect(m_debugger, SIGNAL(updatePC(const QString&,int,const DbgAddr&,int)), connect(m_debugger, SIGNAL(updatePC(const TQString&,int,const DbgAddr&,int)),
m_filesWindow, SLOT(updatePC(const QString&,int,const DbgAddr&,int))); m_filesWindow, SLOT(updatePC(const TQString&,int,const DbgAddr&,int)));
// value popup communication // value popup communication
connect(m_filesWindow, SIGNAL(initiateValuePopup(const QString&)), connect(m_filesWindow, SIGNAL(initiateValuePopup(const TQString&)),
m_debugger, SLOT(slotValuePopup(const QString&))); m_debugger, SLOT(slotValuePopup(const TQString&)));
connect(m_debugger, SIGNAL(valuePopup(const QString&)), connect(m_debugger, SIGNAL(valuePopup(const TQString&)),
m_filesWindow, SLOT(slotShowValueTip(const QString&))); m_filesWindow, SLOT(slotShowValueTip(const TQString&)));
// disassembling // disassembling
connect(m_filesWindow, SIGNAL(disassemble(const QString&, int)), connect(m_filesWindow, SIGNAL(disassemble(const TQString&, int)),
m_debugger, SLOT(slotDisassemble(const QString&, int))); m_debugger, SLOT(slotDisassemble(const TQString&, int)));
connect(m_debugger, SIGNAL(disassembled(const QString&,int,const std::list<DisassembledCode>&)), connect(m_debugger, SIGNAL(disassembled(const TQString&,int,const std::list<DisassembledCode>&)),
m_filesWindow, SLOT(slotDisassembled(const QString&,int,const std::list<DisassembledCode>&))); m_filesWindow, SLOT(slotDisassembled(const TQString&,int,const std::list<DisassembledCode>&)));
connect(m_filesWindow, SIGNAL(moveProgramCounter(const QString&,int,const DbgAddr&)), connect(m_filesWindow, SIGNAL(moveProgramCounter(const TQString&,int,const DbgAddr&)),
m_debugger, SLOT(setProgramCounter(const QString&,int,const DbgAddr&))); m_debugger, SLOT(setProgramCounter(const TQString&,int,const DbgAddr&)));
// program stopped // program stopped
connect(m_debugger, SIGNAL(programStopped()), SLOT(slotProgramStopped())); connect(m_debugger, SIGNAL(programStopped()), SLOT(slotProgramStopped()));
connect(&m_backTimer, SIGNAL(timeout()), SLOT(slotBackTimer())); connect(&m_backTimer, SIGNAL(timeout()), SLOT(slotBackTimer()));
@ -120,8 +120,8 @@ DebuggerMainWnd::DebuggerMainWnd(const char* name) :
connect(this, SIGNAL(setTabWidth(int)), m_filesWindow, SIGNAL(setTabWidth(int))); connect(this, SIGNAL(setTabWidth(int)), m_filesWindow, SIGNAL(setTabWidth(int)));
// connect breakpoint table // connect breakpoint table
connect(m_bpTable, SIGNAL(activateFileLine(const QString&,int,const DbgAddr&)), connect(m_bpTable, SIGNAL(activateFileLine(const TQString&,int,const DbgAddr&)),
m_filesWindow, SLOT(activate(const QString&,int,const DbgAddr&))); m_filesWindow, SLOT(activate(const TQString&,int,const DbgAddr&)));
connect(m_debugger, SIGNAL(updateUI()), m_bpTable, SLOT(updateUI())); connect(m_debugger, SIGNAL(updateUI()), m_bpTable, SLOT(updateUI()));
connect(m_debugger, SIGNAL(breakpointsChanged()), m_bpTable, SLOT(updateBreakList())); connect(m_debugger, SIGNAL(breakpointsChanged()), m_bpTable, SLOT(updateBreakList()));
connect(m_debugger, SIGNAL(breakpointsChanged()), m_bpTable, SLOT(updateUI())); connect(m_debugger, SIGNAL(breakpointsChanged()), m_bpTable, SLOT(updateUI()));
@ -129,8 +129,8 @@ DebuggerMainWnd::DebuggerMainWnd(const char* name) :
connect(m_debugger, SIGNAL(registersChanged(const std::list<RegisterInfo>&)), connect(m_debugger, SIGNAL(registersChanged(const std::list<RegisterInfo>&)),
m_registers, SLOT(updateRegisters(const std::list<RegisterInfo>&))); m_registers, SLOT(updateRegisters(const std::list<RegisterInfo>&)));
connect(m_debugger, SIGNAL(memoryDumpChanged(const QString&, const std::list<MemoryDump>&)), connect(m_debugger, SIGNAL(memoryDumpChanged(const TQString&, const std::list<MemoryDump>&)),
m_memoryWindow, SLOT(slotNewMemoryDump(const QString&, const std::list<MemoryDump>&))); m_memoryWindow, SLOT(slotNewMemoryDump(const TQString&, const std::list<MemoryDump>&)));
connect(m_debugger, SIGNAL(saveProgramSpecific(KConfigBase*)), connect(m_debugger, SIGNAL(saveProgramSpecific(KConfigBase*)),
m_memoryWindow, SLOT(saveProgramSpecific(KConfigBase*))); m_memoryWindow, SLOT(saveProgramSpecific(KConfigBase*)));
connect(m_debugger, SIGNAL(restoreProgramSpecific(KConfigBase*)), connect(m_debugger, SIGNAL(restoreProgramSpecific(KConfigBase*)),
@ -146,8 +146,8 @@ DebuggerMainWnd::DebuggerMainWnd(const char* name) :
connect(dockManager, SIGNAL(change()), SLOT(updateUI())); connect(dockManager, SIGNAL(change()), SLOT(updateUI()));
// popup menu of the local variables window // popup menu of the local variables window
connect(m_localVariables, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), connect(m_localVariables, SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
this, SLOT(slotLocalsPopup(QListViewItem*, const QPoint&))); this, SLOT(slotLocalsPopup(TQListViewItem*, const TQPoint&)));
restoreSettings(kapp->config()); restoreSettings(kapp->config());
@ -211,7 +211,7 @@ void DebuggerMainWnd::initKAction()
(void)KStdAction::findPrev(m_filesWindow, SLOT(slotFindBackward()), actionCollection(), "view_findprev"); (void)KStdAction::findPrev(m_filesWindow, SLOT(slotFindBackward()), actionCollection(), "view_findprev");
i18n("Source &code"); i18n("Source &code");
struct { QString text; QWidget* w; QString id; } dw[] = { struct { TQString text; TQWidget* w; TQString id; } dw[] = {
{ i18n("Stac&k"), m_btWindow, "view_stack"}, { i18n("Stac&k"), m_btWindow, "view_stack"},
{ i18n("&Locals"), m_localVariables, "view_locals"}, { i18n("&Locals"), m_localVariables, "view_locals"},
{ i18n("&Watched expressions"), m_watches, "view_watched_expressions"}, { i18n("&Watched expressions"), m_watches, "view_watched_expressions"},
@ -295,8 +295,8 @@ void DebuggerMainWnd::initKAction()
"edit_value"); "edit_value");
// all actions force an UI update // all actions force an UI update
QValueList<KAction*> actions = actionCollection()->actions(); TQValueList<KAction*> actions = actionCollection()->actions();
QValueList<KAction*>::Iterator it = actions.begin(); TQValueList<KAction*>::Iterator it = actions.begin();
for (; it != actions.end(); ++it) { for (; it != actions.end(); ++it) {
connect(*it, SIGNAL(activated()), this, SLOT(updateUI())); connect(*it, SIGNAL(activated()), this, SLOT(updateUI()));
} }
@ -336,7 +336,7 @@ bool DebuggerMainWnd::queryClose()
void DebuggerMainWnd::saveProperties(KConfig* config) void DebuggerMainWnd::saveProperties(KConfig* config)
{ {
// session management // session management
QString executable = ""; TQString executable = "";
if (m_debugger != 0) { if (m_debugger != 0) {
executable = m_debugger->executable(); executable = m_debugger->executable();
} }
@ -346,7 +346,7 @@ void DebuggerMainWnd::saveProperties(KConfig* config)
void DebuggerMainWnd::readProperties(KConfig* config) void DebuggerMainWnd::readProperties(KConfig* config)
{ {
// session management // session management
QString execName = config->readEntry("executable"); TQString execName = config->readEntry("executable");
TRACE("readProperties: executable=" + execName); TRACE("readProperties: executable=" + execName);
if (!execName.isEmpty()) { if (!execName.isEmpty()) {
@ -384,7 +384,7 @@ void DebuggerMainWnd::restoreSettings(KConfig* config)
// Workaround bug #87787: KDockManager stores the titles of the KDockWidgets // Workaround bug #87787: KDockManager stores the titles of the KDockWidgets
// in the config files, although they are localized: // in the config files, although they are localized:
// If the user changes the language, the titles remain in the previous language. // If the user changes the language, the titles remain in the previous language.
struct { QString text; QWidget* w; } dw[] = { struct { TQString text; TQWidget* w; } dw[] = {
{ i18n("Stack"), m_btWindow }, { i18n("Stack"), m_btWindow },
{ i18n("Locals"), m_localVariables }, { i18n("Locals"), m_localVariables },
{ i18n("Watches"), m_watches }, { i18n("Watches"), m_watches },
@ -399,7 +399,7 @@ void DebuggerMainWnd::restoreSettings(KConfig* config)
KDockWidget* w = dockParent(dw[i].w); KDockWidget* w = dockParent(dw[i].w);
w->setTabPageLabel(dw[i].text); w->setTabPageLabel(dw[i].text);
// this actually changes the captions in the tabs: // this actually changes the captions in the tabs:
QEvent ev(QEvent::CaptionChange); TQEvent ev(TQEvent::CaptionChange);
w->event(&ev); w->event(&ev);
} }
@ -473,7 +473,7 @@ void DebuggerMainWnd::updateUI()
} }
// update statusbar // update statusbar
QString newStatus; TQString newStatus;
if (m_debugger->isProgramActive()) if (m_debugger->isProgramActive())
newStatus = m_statusActive; newStatus = m_statusActive;
if (newStatus != m_lastActiveStatusText) { if (newStatus != m_lastActiveStatusText) {
@ -482,7 +482,7 @@ void DebuggerMainWnd::updateUI()
} }
} }
void DebuggerMainWnd::dockUpdateHelper(QString action, QWidget* w) void DebuggerMainWnd::dockUpdateHelper(TQString action, TQWidget* w)
{ {
KToggleAction* item = KToggleAction* item =
static_cast<KToggleAction*>(actionCollection()->action(action)); static_cast<KToggleAction*>(actionCollection()->action(action));
@ -499,12 +499,12 @@ void DebuggerMainWnd::updateLineItems()
void DebuggerMainWnd::slotAddWatch() void DebuggerMainWnd::slotAddWatch()
{ {
if (m_debugger != 0) { if (m_debugger != 0) {
QString t = m_watches->watchText(); TQString t = m_watches->watchText();
m_debugger->addWatch(t); m_debugger->addWatch(t);
} }
} }
void DebuggerMainWnd::slotAddWatch(const QString& text) void DebuggerMainWnd::slotAddWatch(const TQString& text)
{ {
if (m_debugger != 0) { if (m_debugger != 0) {
m_debugger->addWatch(text); m_debugger->addWatch(text);
@ -518,7 +518,7 @@ void DebuggerMainWnd::slotNewFileLoaded()
m_filesWindow->updateLineItems(m_debugger); m_filesWindow->updateLineItems(m_debugger);
} }
KDockWidget* DebuggerMainWnd::dockParent(QWidget* w) KDockWidget* DebuggerMainWnd::dockParent(TQWidget* w)
{ {
while ((w = w->parentWidget()) != 0) { while ((w = w->parentWidget()) != 0) {
if (w->isA("KDockWidget")) if (w->isA("KDockWidget"))
@ -527,13 +527,13 @@ KDockWidget* DebuggerMainWnd::dockParent(QWidget* w)
return 0; return 0;
} }
bool DebuggerMainWnd::isDockVisible(QWidget* w) bool DebuggerMainWnd::isDockVisible(TQWidget* w)
{ {
KDockWidget* d = dockParent(w); KDockWidget* d = dockParent(w);
return d != 0 && d->mayBeHide(); return d != 0 && d->mayBeHide();
} }
bool DebuggerMainWnd::canChangeDockVisibility(QWidget* w) bool DebuggerMainWnd::canChangeDockVisibility(TQWidget* w)
{ {
KDockWidget* d = dockParent(w); KDockWidget* d = dockParent(w);
return d != 0 && (d->mayBeHide() || d->mayBeShow()); return d != 0 && (d->mayBeHide() || d->mayBeShow());
@ -550,7 +550,7 @@ void DebuggerMainWnd::fixDockConfig(KConfig* c, bool upgrade)
static const char newVersion[] = "0.0.5"; static const char newVersion[] = "0.0.5";
const char* from = upgrade ? oldVersion : newVersion; const char* from = upgrade ? oldVersion : newVersion;
const char* to = upgrade ? newVersion : oldVersion; const char* to = upgrade ? newVersion : oldVersion;
QMap<QString,QString> e = c->entryMap(dockGroup); TQMap<TQString,TQString> e = c->entryMap(dockGroup);
if (e["Version"] != from) if (e["Version"] != from)
return; return;
@ -559,7 +559,7 @@ void DebuggerMainWnd::fixDockConfig(KConfig* c, bool upgrade)
TRACE(upgrade ? "upgrading dockconfig" : "downgrading dockconfig"); TRACE(upgrade ? "upgrading dockconfig" : "downgrading dockconfig");
// turn all orientation entries from 0 to 1 and from 1 to 0 // turn all orientation entries from 0 to 1 and from 1 to 0
QMap<QString,QString>::Iterator i; TQMap<TQString,TQString>::Iterator i;
for (i = e.begin(); i != e.end(); ++i) for (i = e.begin(); i != e.end(); ++i)
{ {
if (i.key().right(12) == ":orientation") { if (i.key().right(12) == ":orientation") {
@ -577,15 +577,15 @@ TTYWindow* DebuggerMainWnd::ttyWindow()
return m_ttyWindow; return m_ttyWindow;
} }
bool DebuggerMainWnd::debugProgram(const QString& exe, const QString& lang) bool DebuggerMainWnd::debugProgram(const TQString& exe, const TQString& lang)
{ {
// check the file name // check the file name
QFileInfo fi(exe); TQFileInfo fi(exe);
bool success = fi.isFile(); bool success = fi.isFile();
if (!success) if (!success)
{ {
QString msg = i18n("`%1' is not a file or does not exist"); TQString msg = i18n("`%1' is not a file or does not exist");
KMessageBox::sorry(this, msg.arg(exe)); KMessageBox::sorry(this, msg.arg(exe));
} }
else else
@ -602,7 +602,7 @@ bool DebuggerMainWnd::debugProgram(const QString& exe, const QString& lang)
m_filesWindow->setExtraDirectory(m_lastDirectory); m_filesWindow->setExtraDirectory(m_lastDirectory);
// set caption to basename part of executable // set caption to basename part of executable
QString caption = fi.fileName(); TQString caption = fi.fileName();
setCaption(caption); setCaption(caption);
} }
else else
@ -634,7 +634,7 @@ void DebuggerMainWnd::slotDebuggerStarting()
DebuggerMainWndBase::slotDebuggerStarting(); DebuggerMainWndBase::slotDebuggerStarting();
} }
void DebuggerMainWnd::slotToggleBreak(const QString& fileName, int lineNo, void DebuggerMainWnd::slotToggleBreak(const TQString& fileName, int lineNo,
const DbgAddr& address, bool temp) const DbgAddr& address, bool temp)
{ {
// lineNo is zero-based // lineNo is zero-based
@ -643,7 +643,7 @@ void DebuggerMainWnd::slotToggleBreak(const QString& fileName, int lineNo,
} }
} }
void DebuggerMainWnd::slotEnaDisBreak(const QString& fileName, int lineNo, void DebuggerMainWnd::slotEnaDisBreak(const TQString& fileName, int lineNo,
const DbgAddr& address) const DbgAddr& address)
{ {
// lineNo is zero-based // lineNo is zero-based
@ -652,9 +652,9 @@ void DebuggerMainWnd::slotEnaDisBreak(const QString& fileName, int lineNo,
} }
} }
QString DebuggerMainWnd::createOutputWindow() TQString DebuggerMainWnd::createOutputWindow()
{ {
QString tty = DebuggerMainWndBase::createOutputWindow(); TQString tty = DebuggerMainWndBase::createOutputWindow();
if (!tty.isEmpty()) { if (!tty.isEmpty()) {
connect(m_outputTermProc, SIGNAL(processExited(KProcess*)), connect(m_outputTermProc, SIGNAL(processExited(KProcess*)),
SLOT(slotTermEmuExited())); SLOT(slotTermEmuExited()));
@ -692,13 +692,13 @@ void DebuggerMainWnd::slotBackTimer()
void DebuggerMainWnd::slotRecentExec(const KURL& url) void DebuggerMainWnd::slotRecentExec(const KURL& url)
{ {
QString exe = url.path(); TQString exe = url.path();
debugProgram(exe, ""); debugProgram(exe, "");
} }
QString DebuggerMainWnd::makeSourceFilter() TQString DebuggerMainWnd::makeSourceFilter()
{ {
QString f; TQString f;
f = m_sourceFilter + " " + m_headerFilter + i18n("|All source files\n"); f = m_sourceFilter + " " + m_headerFilter + i18n("|All source files\n");
f += m_sourceFilter + i18n("|Source files\n"); f += m_sourceFilter + i18n("|Source files\n");
f += m_headerFilter + i18n("|Header files\n"); f += m_headerFilter + i18n("|Header files\n");
@ -709,10 +709,10 @@ QString DebuggerMainWnd::makeSourceFilter()
/* /*
* Pop up the context menu in the locals window * Pop up the context menu in the locals window
*/ */
void DebuggerMainWnd::slotLocalsPopup(QListViewItem*, const QPoint& pt) void DebuggerMainWnd::slotLocalsPopup(TQListViewItem*, const TQPoint& pt)
{ {
QPopupMenu* popup = TQPopupMenu* popup =
static_cast<QPopupMenu*>(factory()->container("popup_locals", this)); static_cast<TQPopupMenu*>(factory()->container("popup_locals", this));
if (popup == 0) { if (popup == 0) {
return; return;
} }
@ -731,7 +731,7 @@ void DebuggerMainWnd::slotLocalsToWatch()
VarTree* item = m_localVariables->selectedItem(); VarTree* item = m_localVariables->selectedItem();
if (item != 0 && m_debugger != 0) { if (item != 0 && m_debugger != 0) {
QString text = item->computeExpr(); TQString text = item->computeExpr();
m_debugger->addWatch(text); m_debugger->addWatch(text);
} }
} }
@ -742,7 +742,7 @@ void DebuggerMainWnd::slotLocalsToWatch()
void DebuggerMainWnd::slotEditValue() void DebuggerMainWnd::slotEditValue()
{ {
// does one of the value trees have the focus // does one of the value trees have the focus
QWidget* f = kapp->focusWidget(); TQWidget* f = kapp->focusWidget();
ExprWnd* wnd; ExprWnd* wnd;
if (f == m_localVariables) { if (f == m_localVariables) {
wnd = m_localVariables; wnd = m_localVariables;
@ -763,7 +763,7 @@ void DebuggerMainWnd::slotEditValue()
{ {
TRACE("edit value"); TRACE("edit value");
// determine the text to edit // determine the text to edit
QString text = m_debugger->driver()->editableValue(expr); TQString text = m_debugger->driver()->editableValue(expr);
wnd->editValue(expr, text); wnd->editValue(expr, text);
} }
} }
@ -772,10 +772,10 @@ void DebuggerMainWnd::slotFileOpen()
{ {
// start browsing in the active file's directory // start browsing in the active file's directory
// fall back to last used directory (executable) // fall back to last used directory (executable)
QString dir = m_lastDirectory; TQString dir = m_lastDirectory;
QString fileName = m_filesWindow->activeFileName(); TQString fileName = m_filesWindow->activeFileName();
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
QFileInfo fi(fileName); TQFileInfo fi(fileName);
dir = fi.dirPath(); dir = fi.dirPath();
} }
@ -785,7 +785,7 @@ void DebuggerMainWnd::slotFileOpen()
if (!fileName.isEmpty()) if (!fileName.isEmpty())
{ {
QFileInfo fi(fileName); TQFileInfo fi(fileName);
m_lastDirectory = fi.dirPath(); m_lastDirectory = fi.dirPath();
m_filesWindow->setExtraDirectory(m_lastDirectory); m_filesWindow->setExtraDirectory(m_lastDirectory);
m_filesWindow->activateFile(fileName); m_filesWindow->activateFile(fileName);
@ -797,7 +797,7 @@ void DebuggerMainWnd::slotFileExe()
if (m_debugger->isIdle()) if (m_debugger->isIdle())
{ {
// open a new executable // open a new executable
QString executable = myGetFileName(i18n("Select the executable to debug"), TQString executable = myGetFileName(i18n("Select the executable to debug"),
m_lastDirectory, 0, this); m_lastDirectory, 0, this);
if (executable.isEmpty()) if (executable.isEmpty())
return; return;
@ -810,7 +810,7 @@ void DebuggerMainWnd::slotFileCore()
{ {
if (m_debugger->canStart()) if (m_debugger->canStart())
{ {
QString corefile = myGetFileName(i18n("Select core dump"), TQString corefile = myGetFileName(i18n("Select core dump"),
m_lastDirectory, 0, this); m_lastDirectory, 0, this);
if (!corefile.isEmpty()) { if (!corefile.isEmpty()) {
m_debugger->useCoreFile(corefile, false); m_debugger->useCoreFile(corefile, false);
@ -838,7 +838,7 @@ void DebuggerMainWnd::slotExecUntil()
{ {
if (m_debugger != 0) if (m_debugger != 0)
{ {
QString file; TQString file;
int lineNo; int lineNo;
if (m_filesWindow->activeLine(file, lineNo)) if (m_filesWindow->activeLine(file, lineNo))
m_debugger->runUntil(file, lineNo); m_debugger->runUntil(file, lineNo);
@ -850,7 +850,7 @@ void DebuggerMainWnd::slotExecAttach()
#ifdef PS_COMMAND #ifdef PS_COMMAND
ProcAttachPS dlg(this); ProcAttachPS dlg(this);
// seed filter with executable name // seed filter with executable name
QFileInfo fi = m_debugger->executable(); TQFileInfo fi = m_debugger->executable();
dlg.filterEdit->setText(fi.fileName()); dlg.filterEdit->setText(fi.fileName());
#else #else
ProcAttach dlg(this); ProcAttach dlg(this);

@ -7,15 +7,15 @@
#ifndef DBGMAINWND_H #ifndef DBGMAINWND_H
#define DBGMAINWND_H #define DBGMAINWND_H
#include <qtimer.h> #include <ntqtimer.h>
#include <kdockwidget.h> #include <kdockwidget.h>
#include "mainwndbase.h" #include "mainwndbase.h"
#include "regwnd.h" #include "regwnd.h"
class KRecentFilesAction; class KRecentFilesAction;
class WinStack; class WinStack;
class QListBox; class TQListBox;
class QCString; class TQCString;
class ExprWnd; class ExprWnd;
class BreakpointTable; class BreakpointTable;
class ThreadList; class ThreadList;
@ -29,7 +29,7 @@ public:
DebuggerMainWnd(const char* name); DebuggerMainWnd(const char* name);
~DebuggerMainWnd(); ~DebuggerMainWnd();
bool debugProgram(const QString& exe, const QString& lang); bool debugProgram(const TQString& exe, const TQString& lang);
protected: protected:
// session properties // session properties
@ -44,7 +44,7 @@ protected:
// view windows // view windows
WinStack* m_filesWindow; WinStack* m_filesWindow;
QListBox* m_btWindow; TQListBox* m_btWindow;
ExprWnd* m_localVariables; ExprWnd* m_localVariables;
WatchWindow* m_watches; WatchWindow* m_watches;
RegisterView* m_registers; RegisterView* m_registers;
@ -53,7 +53,7 @@ protected:
ThreadList* m_threads; ThreadList* m_threads;
MemoryWindow* m_memoryWindow; MemoryWindow* m_memoryWindow;
QTimer m_backTimer; TQTimer m_backTimer;
// recent execs in File menu // recent execs in File menu
KRecentFilesAction* m_recentExecAction; KRecentFilesAction* m_recentExecAction;
@ -61,19 +61,19 @@ protected:
protected: protected:
virtual bool queryClose(); virtual bool queryClose();
virtual TTYWindow* ttyWindow(); virtual TTYWindow* ttyWindow();
virtual QString createOutputWindow(); virtual TQString createOutputWindow();
KDockWidget* dockParent(QWidget* w); KDockWidget* dockParent(TQWidget* w);
bool isDockVisible(QWidget* w); bool isDockVisible(TQWidget* w);
bool canChangeDockVisibility(QWidget* w); bool canChangeDockVisibility(TQWidget* w);
void dockUpdateHelper(QString action, QWidget* w); void dockUpdateHelper(TQString action, TQWidget* w);
void fixDockConfig(KConfig* c, bool upgrade); void fixDockConfig(KConfig* c, bool upgrade);
QString makeSourceFilter(); TQString makeSourceFilter();
// to avoid flicker when the status bar is updated, // to avoid flicker when the status bar is updated,
// we store the last string that we put there // we store the last string that we put there
QString m_lastActiveStatusText; TQString m_lastActiveStatusText;
bool m_animRunning; bool m_animRunning;
signals: signals:
@ -83,17 +83,17 @@ public slots:
virtual void updateUI(); virtual void updateUI();
virtual void updateLineItems(); virtual void updateLineItems();
void slotAddWatch(); void slotAddWatch();
void slotAddWatch(const QString& text); void slotAddWatch(const TQString& text);
void slotNewFileLoaded(); void slotNewFileLoaded();
void slotNewStatusMsg(); void slotNewStatusMsg();
void slotDebuggerStarting(); void slotDebuggerStarting();
void slotToggleBreak(const QString&, int, const DbgAddr&, bool); void slotToggleBreak(const TQString&, int, const DbgAddr&, bool);
void slotEnaDisBreak(const QString&, int, const DbgAddr&); void slotEnaDisBreak(const TQString&, int, const DbgAddr&);
void slotTermEmuExited(); void slotTermEmuExited();
void slotProgramStopped(); void slotProgramStopped();
void slotBackTimer(); void slotBackTimer();
void slotRecentExec(const KURL& url); void slotRecentExec(const KURL& url);
void slotLocalsPopup(QListViewItem*, const QPoint& pt); void slotLocalsPopup(TQListViewItem*, const TQPoint& pt);
void slotLocalsToWatch(); void slotLocalsToWatch();
void slotEditValue(); void slotEditValue();

@ -11,10 +11,10 @@
#include "exprwnd.h" #include "exprwnd.h"
#include "pgmsettings.h" #include "pgmsettings.h"
#include "programconfig.h" #include "programconfig.h"
#include <qregexp.h> #include <ntqregexp.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qlistbox.h> #include <ntqlistbox.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
@ -27,11 +27,11 @@
#include "mydebug.h" #include "mydebug.h"
KDebugger::KDebugger(QWidget* parent, KDebugger::KDebugger(TQWidget* parent,
ExprWnd* localVars, ExprWnd* localVars,
ExprWnd* watchVars, ExprWnd* watchVars,
QListBox* backtrace) : TQListBox* backtrace) :
QObject(parent, "debugger"), TQObject(parent, "debugger"),
m_ttyLevel(ttyFull), m_ttyLevel(ttyFull),
m_memoryFormat(MDTword | MDThex), m_memoryFormat(MDTword | MDThex),
m_haveExecutable(false), m_haveExecutable(false),
@ -47,14 +47,14 @@ KDebugger::KDebugger(QWidget* parent,
{ {
m_envVars.setAutoDelete(true); m_envVars.setAutoDelete(true);
connect(&m_localVariables, SIGNAL(expanded(QListViewItem*)), connect(&m_localVariables, SIGNAL(expanded(TQListViewItem*)),
SLOT(slotExpanding(QListViewItem*))); SLOT(slotExpanding(TQListViewItem*)));
connect(&m_watchVariables, SIGNAL(expanded(QListViewItem*)), connect(&m_watchVariables, SIGNAL(expanded(TQListViewItem*)),
SLOT(slotExpanding(QListViewItem*))); SLOT(slotExpanding(TQListViewItem*)));
connect(&m_localVariables, SIGNAL(editValueCommitted(VarTree*, const QString&)), connect(&m_localVariables, SIGNAL(editValueCommitted(VarTree*, const TQString&)),
SLOT(slotValueEdited(VarTree*, const QString&))); SLOT(slotValueEdited(VarTree*, const TQString&)));
connect(&m_watchVariables, SIGNAL(editValueCommitted(VarTree*, const QString&)), connect(&m_watchVariables, SIGNAL(editValueCommitted(VarTree*, const TQString&)),
SLOT(slotValueEdited(VarTree*, const QString&))); SLOT(slotValueEdited(VarTree*, const TQString&)));
connect(&m_btWindow, SIGNAL(highlighted(int)), SLOT(gotoFrame(int))); connect(&m_btWindow, SIGNAL(highlighted(int)), SLOT(gotoFrame(int)));
@ -90,16 +90,16 @@ const char DebuggerCmdStr[] = "DebuggerCmdStr";
const char TTYLevelEntry[] = "TTYLevel"; const char TTYLevelEntry[] = "TTYLevel";
const char KDebugger::DriverNameEntry[] = "DriverName"; const char KDebugger::DriverNameEntry[] = "DriverName";
bool KDebugger::debugProgram(const QString& name, bool KDebugger::debugProgram(const TQString& name,
DebuggerDriver* driver) DebuggerDriver* driver)
{ {
if (m_d != 0 && m_d->isRunning()) if (m_d != 0 && m_d->isRunning())
{ {
QApplication::setOverrideCursor(waitCursor); TQApplication::setOverrideCursor(waitCursor);
stopDriver(); stopDriver();
QApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
if (m_d->isRunning() || m_haveExecutable) { if (m_d->isRunning() || m_haveExecutable) {
/* timed out! We can't really do anything useful now */ /* timed out! We can't really do anything useful now */
@ -111,8 +111,8 @@ bool KDebugger::debugProgram(const QString& name,
} }
// wire up the driver // wire up the driver
connect(driver, SIGNAL(activateFileLine(const QString&,int,const DbgAddr&)), connect(driver, SIGNAL(activateFileLine(const TQString&,int,const DbgAddr&)),
this, SIGNAL(activateFileLine(const QString&,int,const DbgAddr&))); this, SIGNAL(activateFileLine(const TQString&,int,const DbgAddr&)));
connect(driver, SIGNAL(processExited(KProcess*)), SLOT(gdbExited(KProcess*))); connect(driver, SIGNAL(processExited(KProcess*)), SLOT(gdbExited(KProcess*)));
connect(driver, SIGNAL(commandReceived(CmdQueueItem*,const char*)), connect(driver, SIGNAL(commandReceived(CmdQueueItem*,const char*)),
SLOT(parse(CmdQueueItem*,const char*))); SLOT(parse(CmdQueueItem*,const char*)));
@ -152,8 +152,8 @@ bool KDebugger::debugProgram(const QString& name,
// set remote target // set remote target
if (!m_remoteDevice.isEmpty()) { if (!m_remoteDevice.isEmpty()) {
m_d->executeCmd(DCtargetremote, m_remoteDevice); m_d->executeCmd(DCtargetremote, m_remoteDevice);
m_d->queueCmd(DCbt, DebuggerDriver::QMoverride); m_d->queueCmd(DCbt, DebuggerDriver::TQMoverride);
m_d->queueCmd(DCframe, 0, DebuggerDriver::QMnormal); m_d->queueCmd(DCframe, 0, DebuggerDriver::TQMnormal);
m_programActive = true; m_programActive = true;
m_haveExecutable = true; m_haveExecutable = true;
} }
@ -176,7 +176,7 @@ void KDebugger::shutdown()
} }
} }
void KDebugger::useCoreFile(QString corefile, bool batch) void KDebugger::useCoreFile(TQString corefile, bool batch)
{ {
m_corefile = corefile; m_corefile = corefile;
if (!batch) { if (!batch) {
@ -185,7 +185,7 @@ void KDebugger::useCoreFile(QString corefile, bool batch)
} }
} }
void KDebugger::setAttachPid(const QString& pid) void KDebugger::setAttachPid(const TQString& pid)
{ {
m_attachedPid = pid; m_attachedPid = pid;
} }
@ -203,13 +203,13 @@ void KDebugger::programRun()
} else { } else {
// gdb command: run // gdb command: run
m_d->executeCmd(DCrun, true); m_d->executeCmd(DCrun, true);
m_corefile = QString(); m_corefile = TQString();
m_programActive = true; m_programActive = true;
} }
m_programRunning = true; m_programRunning = true;
} }
void KDebugger::attachProgram(const QString& pid) void KDebugger::attachProgram(const TQString& pid)
{ {
if (!isReady()) if (!isReady())
return; return;
@ -225,7 +225,7 @@ void KDebugger::programRunAgain()
{ {
if (canSingleStep()) { if (canSingleStep()) {
m_d->executeCmd(DCrun, true); m_d->executeCmd(DCrun, true);
m_corefile = QString(); m_corefile = TQString();
m_programRunning = true; m_programRunning = true;
} }
} }
@ -282,11 +282,11 @@ void KDebugger::programKill()
} }
} }
bool KDebugger::runUntil(const QString& fileName, int lineNo) bool KDebugger::runUntil(const TQString& fileName, int lineNo)
{ {
if (isReady() && m_programActive && !m_programRunning) { if (isReady() && m_programActive && !m_programRunning) {
// strip off directory part of file name // strip off directory part of file name
QString file = fileName; TQString file = fileName;
int offset = file.findRev("/"); int offset = file.findRev("/");
if (offset >= 0) { if (offset >= 0) {
file.remove(0, offset+1); file.remove(0, offset+1);
@ -306,10 +306,10 @@ void KDebugger::programBreak()
} }
} }
void KDebugger::programArgs(QWidget* parent) void KDebugger::programArgs(TQWidget* parent)
{ {
if (m_haveExecutable) { if (m_haveExecutable) {
QStringList allOptions = m_d->boolOptionList(); TQStringList allOptions = m_d->boolOptionList();
PgmArgs dlg(parent, m_executable, m_envVars, allOptions); PgmArgs dlg(parent, m_executable, m_envVars, allOptions);
dlg.setArgs(m_programArgs); dlg.setArgs(m_programArgs);
dlg.setWd(m_programWD); dlg.setWd(m_programWD);
@ -321,7 +321,7 @@ void KDebugger::programArgs(QWidget* parent)
} }
} }
void KDebugger::programSettings(QWidget* parent) void KDebugger::programSettings(TQWidget* parent)
{ {
if (!m_haveExecutable) if (!m_haveExecutable)
return; return;
@ -331,14 +331,14 @@ void KDebugger::programSettings(QWidget* parent)
dlg.m_chooseDriver.setDebuggerCmd(m_debuggerCmd); dlg.m_chooseDriver.setDebuggerCmd(m_debuggerCmd);
dlg.m_output.setTTYLevel(m_ttyLevel); dlg.m_output.setTTYLevel(m_ttyLevel);
if (dlg.exec() == QDialog::Accepted) if (dlg.exec() == TQDialog::Accepted)
{ {
m_debuggerCmd = dlg.m_chooseDriver.debuggerCmd(); m_debuggerCmd = dlg.m_chooseDriver.debuggerCmd();
m_ttyLevel = TTYLevel(dlg.m_output.ttyLevel()); m_ttyLevel = TTYLevel(dlg.m_output.ttyLevel());
} }
} }
bool KDebugger::setBreakpoint(QString file, int lineNo, bool KDebugger::setBreakpoint(TQString file, int lineNo,
const DbgAddr& address, bool temporary) const DbgAddr& address, bool temporary)
{ {
if (!isReady()) { if (!isReady()) {
@ -406,14 +406,14 @@ CmdQueueItem* KDebugger::executeBreakpoint(const Breakpoint* bp, bool queueOnly)
else if (bp->address.isEmpty()) else if (bp->address.isEmpty())
{ {
// strip off directory part of file name // strip off directory part of file name
QString file = bp->fileName; TQString file = bp->fileName;
int offset = file.findRev("/"); int offset = file.findRev("/");
if (offset >= 0) { if (offset >= 0) {
file.remove(0, offset+1); file.remove(0, offset+1);
} }
if (queueOnly) { if (queueOnly) {
cmd = m_d->queueCmd(bp->temporary ? DCtbreakline : DCbreakline, cmd = m_d->queueCmd(bp->temporary ? DCtbreakline : DCbreakline,
file, bp->lineNo, DebuggerDriver::QMoverride); file, bp->lineNo, DebuggerDriver::TQMoverride);
} else { } else {
cmd = m_d->executeCmd(bp->temporary ? DCtbreakline : DCbreakline, cmd = m_d->executeCmd(bp->temporary ? DCtbreakline : DCbreakline,
file, bp->lineNo); file, bp->lineNo);
@ -423,7 +423,7 @@ CmdQueueItem* KDebugger::executeBreakpoint(const Breakpoint* bp, bool queueOnly)
{ {
if (queueOnly) { if (queueOnly) {
cmd = m_d->queueCmd(bp->temporary ? DCtbreakaddr : DCbreakaddr, cmd = m_d->queueCmd(bp->temporary ? DCtbreakaddr : DCbreakaddr,
bp->address.asString(), DebuggerDriver::QMoverride); bp->address.asString(), DebuggerDriver::TQMoverride);
} else { } else {
cmd = m_d->executeCmd(bp->temporary ? DCtbreakaddr : DCbreakaddr, cmd = m_d->executeCmd(bp->temporary ? DCtbreakaddr : DCbreakaddr,
bp->address.asString()); bp->address.asString());
@ -432,7 +432,7 @@ CmdQueueItem* KDebugger::executeBreakpoint(const Breakpoint* bp, bool queueOnly)
return cmd; return cmd;
} }
bool KDebugger::enableDisableBreakpoint(QString file, int lineNo, bool KDebugger::enableDisableBreakpoint(TQString file, int lineNo,
const DbgAddr& address) const DbgAddr& address)
{ {
BrkptIterator bp = breakpointByFilePos(file, lineNo, address); BrkptIterator bp = breakpointByFilePos(file, lineNo, address);
@ -463,7 +463,7 @@ bool KDebugger::enableDisableBreakpoint(BrkptIterator bp)
} }
bool KDebugger::conditionalBreakpoint(BrkptIterator bp, bool KDebugger::conditionalBreakpoint(BrkptIterator bp,
const QString& condition, const TQString& condition,
int ignoreCount) int ignoreCount)
{ {
if (bp == m_brkpts.end()) if (bp == m_brkpts.end())
@ -495,7 +495,7 @@ bool KDebugger::conditionalBreakpoint(BrkptIterator bp,
} }
if (changed) { if (changed) {
// get the changes // get the changes
m_d->queueCmd(DCinfobreak, DebuggerDriver::QMoverride); m_d->queueCmd(DCinfobreak, DebuggerDriver::TQMoverride);
} }
} else { } else {
bp->condition = condition; bp->condition = condition;
@ -647,7 +647,7 @@ void KDebugger::gdbExited(KProcess*)
if (m_explicitKill) { if (m_explicitKill) {
TRACE(m_d->driverName() + " exited normally"); TRACE(m_d->driverName() + " exited normally");
} else { } else {
QString msg = i18n("%1 exited unexpectedly.\n" TQString msg = i18n("%1 exited unexpectedly.\n"
"Restart the session (e.g. with File|Executable)."); "Restart the session (e.g. with File|Executable).");
KMessageBox::error(parentWidget(), msg.arg(m_d->driverName())); KMessageBox::error(parentWidget(), msg.arg(m_d->driverName()));
} }
@ -658,19 +658,19 @@ void KDebugger::gdbExited(KProcess*)
m_programActive = false; m_programActive = false;
m_programRunning = false; m_programRunning = false;
m_explicitKill = false; m_explicitKill = false;
m_debuggerCmd = QString(); /* use global setting at next start! */ m_debuggerCmd = TQString(); /* use global setting at next start! */
m_attachedPid = QString(); /* we are no longer attached to a process */ m_attachedPid = TQString(); /* we are no longer attached to a process */
m_ttyLevel = ttyFull; m_ttyLevel = ttyFull;
m_brkpts.clear(); m_brkpts.clear();
// erase PC // erase PC
emit updatePC(QString(), -1, DbgAddr(), 0); emit updatePC(TQString(), -1, DbgAddr(), 0);
} }
QString KDebugger::getConfigForExe(const QString& name) TQString KDebugger::getConfigForExe(const TQString& name)
{ {
QFileInfo fi(name); TQFileInfo fi(name);
QString pgmConfigFile = fi.dirPath(true); TQString pgmConfigFile = fi.dirPath(true);
if (!pgmConfigFile.isEmpty()) { if (!pgmConfigFile.isEmpty()) {
pgmConfigFile += '/'; pgmConfigFile += '/';
} }
@ -679,11 +679,11 @@ QString KDebugger::getConfigForExe(const QString& name)
return pgmConfigFile; return pgmConfigFile;
} }
void KDebugger::openProgramConfig(const QString& name) void KDebugger::openProgramConfig(const TQString& name)
{ {
ASSERT(m_programConfig == 0); ASSERT(m_programConfig == 0);
QString pgmConfigFile = getConfigForExe(name); TQString pgmConfigFile = getConfigForExe(name);
m_programConfig = new ProgramConfig(pgmConfigFile); m_programConfig = new ProgramConfig(pgmConfigFile);
} }
@ -708,7 +708,7 @@ void KDebugger::saveProgramSettings()
m_programConfig->writeEntry(OptionsSelected, m_boolOptions); m_programConfig->writeEntry(OptionsSelected, m_boolOptions);
m_programConfig->writeEntry(DebuggerCmdStr, m_debuggerCmd); m_programConfig->writeEntry(DebuggerCmdStr, m_debuggerCmd);
m_programConfig->writeEntry(TTYLevelEntry, int(m_ttyLevel)); m_programConfig->writeEntry(TTYLevelEntry, int(m_ttyLevel));
QString driverName; TQString driverName;
if (m_d != 0) if (m_d != 0)
driverName = m_d->driverName(); driverName = m_d->driverName();
m_programConfig->writeEntry(DriverNameEntry, driverName); m_programConfig->writeEntry(DriverNameEntry, driverName);
@ -716,10 +716,10 @@ void KDebugger::saveProgramSettings()
// write environment variables // write environment variables
m_programConfig->deleteGroup(EnvironmentGroup); m_programConfig->deleteGroup(EnvironmentGroup);
m_programConfig->setGroup(EnvironmentGroup); m_programConfig->setGroup(EnvironmentGroup);
QDictIterator<EnvVar> it = m_envVars; TQDictIterator<EnvVar> it = m_envVars;
EnvVar* var; EnvVar* var;
QString varName; TQString varName;
QString varValue; TQString varValue;
for (int i = 0; (var = it) != 0; ++it, ++i) { for (int i = 0; (var = it) != 0; ++it, ++i) {
varName.sprintf(Variable, i); varName.sprintf(Variable, i);
varValue.sprintf(Value, i); varValue.sprintf(Value, i);
@ -745,7 +745,7 @@ void KDebugger::saveProgramSettings()
emit saveProgramSpecific(m_programConfig); emit saveProgramSpecific(m_programConfig);
} }
void KDebugger::overrideProgramArguments(const QString& args) void KDebugger::overrideProgramArguments(const TQString& args)
{ {
ASSERT(m_programConfig != 0); ASSERT(m_programConfig != 0);
m_programConfig->setGroup(GeneralGroup); m_programConfig->setGroup(GeneralGroup);
@ -762,18 +762,18 @@ void KDebugger::restoreProgramSettings()
*/ */
// m_debuggerCmd has been read in already // m_debuggerCmd has been read in already
// m_ttyLevel has been read in already // m_ttyLevel has been read in already
QString pgmArgs = m_programConfig->readEntry(ProgramArgs); TQString pgmArgs = m_programConfig->readEntry(ProgramArgs);
QString pgmWd = m_programConfig->readEntry(WorkingDirectory); TQString pgmWd = m_programConfig->readEntry(WorkingDirectory);
QStringList boolOptions = m_programConfig->readListEntry(OptionsSelected); TQStringList boolOptions = m_programConfig->readListEntry(OptionsSelected);
m_boolOptions = QStringList(); m_boolOptions = TQStringList();
// read environment variables // read environment variables
m_programConfig->setGroup(EnvironmentGroup); m_programConfig->setGroup(EnvironmentGroup);
m_envVars.clear(); m_envVars.clear();
QDict<EnvVar> pgmVars; TQDict<EnvVar> pgmVars;
EnvVar* var; EnvVar* var;
QString varName; TQString varName;
QString varValue; TQString varValue;
for (int i = 0;; ++i) { for (int i = 0;; ++i) {
varName.sprintf(Variable, i); varName.sprintf(Variable, i);
varValue.sprintf(Value, i); varValue.sprintf(Value, i);
@ -781,7 +781,7 @@ void KDebugger::restoreProgramSettings()
/* entry not present, assume that we've hit them all */ /* entry not present, assume that we've hit them all */
break; break;
} }
QString name = m_programConfig->readEntry(varName); TQString name = m_programConfig->readEntry(varName);
if (name.isEmpty()) { if (name.isEmpty()) {
// skip empty names // skip empty names
continue; continue;
@ -805,7 +805,7 @@ void KDebugger::restoreProgramSettings()
/* entry not present, assume that we've hit them all */ /* entry not present, assume that we've hit them all */
break; break;
} }
QString expr = m_programConfig->readEntry(varName); TQString expr = m_programConfig->readEntry(varName);
if (expr.isEmpty()) { if (expr.isEmpty()) {
// skip empty expressions // skip empty expressions
continue; continue;
@ -821,15 +821,15 @@ void KDebugger::restoreProgramSettings()
* Reads the debugger command line from the program settings. The config * Reads the debugger command line from the program settings. The config
* group must have been set by the caller. * group must have been set by the caller.
*/ */
QString KDebugger::readDebuggerCmd() TQString KDebugger::readDebuggerCmd()
{ {
QString debuggerCmd = m_programConfig->readEntry(DebuggerCmdStr); TQString debuggerCmd = m_programConfig->readEntry(DebuggerCmdStr);
// always let the user confirm the debugger cmd if we are root // always let the user confirm the debugger cmd if we are root
if (::geteuid() == 0) if (::geteuid() == 0)
{ {
if (!debuggerCmd.isEmpty()) { if (!debuggerCmd.isEmpty()) {
QString msg = i18n( TQString msg = i18n(
"The settings for this program specify " "The settings for this program specify "
"the following debugger command:\n%1\n" "the following debugger command:\n%1\n"
"Shall this command be used?"); "Shall this command be used?");
@ -837,7 +837,7 @@ QString KDebugger::readDebuggerCmd()
!= KMessageBox::Yes) != KMessageBox::Yes)
{ {
// don't use it // don't use it
debuggerCmd = QString(); debuggerCmd = TQString();
} }
} }
} }
@ -858,7 +858,7 @@ const char Condition[] = "Condition";
void KDebugger::saveBreakpoints(ProgramConfig* config) void KDebugger::saveBreakpoints(ProgramConfig* config)
{ {
QString groupName; TQString groupName;
int i = 0; int i = 0;
for (BrkptIterator bp = m_brkpts.begin(); bp != m_brkpts.end(); ++bp) for (BrkptIterator bp = m_brkpts.begin(); bp != m_brkpts.end(); ++bp)
{ {
@ -909,7 +909,7 @@ void KDebugger::saveBreakpoints(ProgramConfig* config)
void KDebugger::restoreBreakpoints(ProgramConfig* config) void KDebugger::restoreBreakpoints(ProgramConfig* config)
{ {
QString groupName; TQString groupName;
/* /*
* We recognize the end of the list if there is no Enabled entry * We recognize the end of the list if there is no Enabled entry
* present. * present.
@ -945,7 +945,7 @@ void KDebugger::restoreBreakpoints(ProgramConfig* config)
// the new breakpoint is disabled or conditionalized later // the new breakpoint is disabled or conditionalized later
// in newBreakpoint() // in newBreakpoint()
} }
m_d->queueCmd(DCinfobreak, DebuggerDriver::QMoverride); m_d->queueCmd(DCinfobreak, DebuggerDriver::TQMoverride);
} }
@ -954,7 +954,7 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
{ {
ASSERT(cmd != 0); /* queue mustn't be empty */ ASSERT(cmd != 0); /* queue mustn't be empty */
TRACE(QString(__PRETTY_FUNCTION__) + " parsing " + output); TRACE(TQString(__PRETTY_FUNCTION__) + " parsing " + output);
switch (cmd->m_cmd) { switch (cmd->m_cmd) {
case DCtargetremote: case DCtargetremote:
@ -989,7 +989,7 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
} }
else if (!m_attachedPid.isEmpty()) else if (!m_attachedPid.isEmpty())
{ {
m_d->queueCmd(DCattach, m_attachedPid, DebuggerDriver::QMoverride); m_d->queueCmd(DCattach, m_attachedPid, DebuggerDriver::TQMoverride);
m_programActive = true; m_programActive = true;
m_programRunning = true; m_programRunning = true;
} }
@ -999,12 +999,12 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
} }
else else
{ {
m_d->queueCmd(DCinfolinemain, DebuggerDriver::QMnormal); m_d->queueCmd(DCinfolinemain, DebuggerDriver::TQMnormal);
} }
if (!m_statusMessage.isEmpty()) if (!m_statusMessage.isEmpty())
emit updateStatusMessage(); emit updateStatusMessage();
} else { } else {
QString msg = m_d->driverName() + ": " + m_statusMessage; TQString msg = m_d->driverName() + ": " + m_statusMessage;
KMessageBox::sorry(parentWidget(), msg); KMessageBox::sorry(parentWidget(), msg);
m_executable = ""; m_executable = "";
m_corefile = ""; /* don't process core file */ m_corefile = ""; /* don't process core file */
@ -1021,14 +1021,14 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
// do not reset m_corefile // do not reset m_corefile
} else { } else {
// report error // report error
QString msg = m_d->driverName() + ": " + QString(output); TQString msg = m_d->driverName() + ": " + TQString(output);
KMessageBox::sorry(parentWidget(), msg); KMessageBox::sorry(parentWidget(), msg);
// if core file was loaded from command line, revert to info line main // if core file was loaded from command line, revert to info line main
if (!cmd->m_byUser) { if (!cmd->m_byUser) {
m_d->queueCmd(DCinfolinemain, DebuggerDriver::QMnormal); m_d->queueCmd(DCinfolinemain, DebuggerDriver::TQMnormal);
} }
m_corefile = QString(); /* core file not available any more */ m_corefile = TQString(); /* core file not available any more */
} }
break; break;
case DCinfolinemain: case DCinfolinemain:
@ -1084,7 +1084,7 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
case DCkill: case DCkill:
m_programRunning = m_programActive = false; m_programRunning = m_programActive = false;
// erase PC // erase PC
emit updatePC(QString(), -1, DbgAddr(), 0); emit updatePC(TQString(), -1, DbgAddr(), 0);
break; break;
case DCbreaktext: case DCbreaktext:
case DCbreakline: case DCbreakline:
@ -1098,7 +1098,7 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
case DCenable: case DCenable:
case DCdisable: case DCdisable:
// these commands need immediate response // these commands need immediate response
m_d->queueCmd(DCinfobreak, DebuggerDriver::QMoverrideMoreEqual); m_d->queueCmd(DCinfobreak, DebuggerDriver::TQMoverrideMoreEqual);
break; break;
case DCinfobreak: case DCinfobreak:
// note: this handler must not enqueue a command, since // note: this handler must not enqueue a command, since
@ -1109,7 +1109,7 @@ void KDebugger::parse(CmdQueueItem* cmd, const char* output)
handleFindType(cmd, output); handleFindType(cmd, output);
break; break;
case DCprintStruct: case DCprintStruct:
case DCprintQStringStruct: case DCprintTQStringStruct:
case DCprintWChar: case DCprintWChar:
handlePrintStruct(cmd, output); handlePrintStruct(cmd, output);
break; break;
@ -1160,7 +1160,7 @@ void KDebugger::handleRunCommands(const char* output)
for (BrkptIterator bp = m_brkpts.begin(); bp != m_brkpts.end(); ++bp) for (BrkptIterator bp = m_brkpts.begin(); bp != m_brkpts.end(); ++bp)
{ {
if (bp->isOrphaned()) { if (bp->isOrphaned()) {
TRACE(QString("re-trying brkpt loc: %2 file: %3 line: %1") TRACE(TQString("re-trying brkpt loc: %2 file: %3 line: %1")
.arg(bp->lineNo).arg(bp->location, bp->fileName)); .arg(bp->lineNo).arg(bp->location, bp->fileName));
CmdQueueItem* cmd = executeBreakpoint(&*bp, true); CmdQueueItem* cmd = executeBreakpoint(&*bp, true);
cmd->m_existingBrkpt = bp->id; // used in newBreakpoint() cmd->m_existingBrkpt = bp->id; // used in newBreakpoint()
@ -1176,7 +1176,7 @@ void KDebugger::handleRunCommands(const char* output)
if ((flags & (DebuggerDriver::SFrefreshBreak|DebuggerDriver::SFrefreshSource)) || if ((flags & (DebuggerDriver::SFrefreshBreak|DebuggerDriver::SFrefreshSource)) ||
stopMayChangeBreakList()) stopMayChangeBreakList())
{ {
m_d->queueCmd(DCinfobreak, DebuggerDriver::QMoverride); m_d->queueCmd(DCinfobreak, DebuggerDriver::TQMoverride);
} }
/* /*
@ -1191,17 +1191,17 @@ void KDebugger::handleRunCommands(const char* output)
// get the backtrace if the program is running // get the backtrace if the program is running
if (m_programActive) { if (m_programActive) {
m_d->queueCmd(DCbt, DebuggerDriver::QMoverride); m_d->queueCmd(DCbt, DebuggerDriver::TQMoverride);
} else { } else {
// program finished: erase PC // program finished: erase PC
emit updatePC(QString(), -1, DbgAddr(), 0); emit updatePC(TQString(), -1, DbgAddr(), 0);
// dequeue any commands in the queues // dequeue any commands in the queues
m_d->flushCommands(); m_d->flushCommands();
} }
/* Update threads list */ /* Update threads list */
if (m_programActive && (flags & DebuggerDriver::SFrefreshThreads)) { if (m_programActive && (flags & DebuggerDriver::SFrefreshThreads)) {
m_d->queueCmd(DCinfothreads, DebuggerDriver::QMoverride); m_d->queueCmd(DCinfothreads, DebuggerDriver::TQMoverride);
} }
m_programRunning = false; m_programRunning = false;
@ -1219,10 +1219,10 @@ void KDebugger::updateAllExprs()
return; return;
// retrieve local variables // retrieve local variables
m_d->queueCmd(DCinfolocals, DebuggerDriver::QMoverride); m_d->queueCmd(DCinfolocals, DebuggerDriver::TQMoverride);
// retrieve registers // retrieve registers
m_d->queueCmd(DCinforegisters, DebuggerDriver::QMoverride); m_d->queueCmd(DCinforegisters, DebuggerDriver::TQMoverride);
// get new memory dump // get new memory dump
if (!m_memoryExpression.isEmpty()) { if (!m_memoryExpression.isEmpty()) {
@ -1236,9 +1236,9 @@ void KDebugger::updateAllExprs()
} }
} }
void KDebugger::updateProgEnvironment(const QString& args, const QString& wd, void KDebugger::updateProgEnvironment(const TQString& args, const TQString& wd,
const QDict<EnvVar>& newVars, const TQDict<EnvVar>& newVars,
const QStringList& newOptions) const TQStringList& newOptions)
{ {
m_programArgs = args; m_programArgs = args;
m_d->executeCmd(DCsetargs, m_programArgs); m_d->executeCmd(DCsetargs, m_programArgs);
@ -1251,10 +1251,10 @@ void KDebugger::updateProgEnvironment(const QString& args, const QString& wd,
} }
// update environment variables // update environment variables
QDictIterator<EnvVar> it = newVars; TQDictIterator<EnvVar> it = newVars;
EnvVar* val; EnvVar* val;
for (; (val = it) != 0; ++it) { for (; (val = it) != 0; ++it) {
QString var = it.currentKey(); TQString var = it.currentKey();
switch (val->status) { switch (val->status) {
case EnvVar::EVnew: case EnvVar::EVnew:
m_envVars.insert(var, val); m_envVars.insert(var, val);
@ -1281,7 +1281,7 @@ void KDebugger::updateProgEnvironment(const QString& args, const QString& wd,
} }
// update options // update options
QStringList::ConstIterator oi; TQStringList::ConstIterator oi;
for (oi = newOptions.begin(); oi != newOptions.end(); ++oi) for (oi = newOptions.begin(); oi != newOptions.end(); ++oi)
{ {
if (m_boolOptions.findIndex(*oi) < 0) { if (m_boolOptions.findIndex(*oi) < 0) {
@ -1307,7 +1307,7 @@ void KDebugger::updateProgEnvironment(const QString& args, const QString& wd,
void KDebugger::handleLocals(const char* output) void KDebugger::handleLocals(const char* output)
{ {
// retrieve old list of local variables // retrieve old list of local variables
QStringList oldVars = m_localVariables.exprList(); TQStringList oldVars = m_localVariables.exprList();
/* /*
* Get local variables. * Get local variables.
@ -1324,7 +1324,7 @@ void KDebugger::handleLocals(const char* output)
/* /*
* Match old variables against new ones. * Match old variables against new ones.
*/ */
for (QStringList::ConstIterator n = oldVars.begin(); n != oldVars.end(); ++n) { for (TQStringList::ConstIterator n = oldVars.begin(); n != oldVars.end(); ++n) {
// lookup this variable in the list of new variables // lookup this variable in the list of new variables
std::list<ExprValue*>::iterator v = newVars.begin(); std::list<ExprValue*>::iterator v = newVars.begin();
while (v != newVars.end() && (*v)->m_name != *n) while (v != newVars.end() && (*v)->m_name != *n)
@ -1361,7 +1361,7 @@ void KDebugger::parseLocals(const char* output, std::list<ExprValue*>& newVars)
std::list<ExprValue*> vars; std::list<ExprValue*> vars;
m_d->parseLocals(output, vars); m_d->parseLocals(output, vars);
QString origName; /* used in renaming variables */ TQString origName; /* used in renaming variables */
while (!vars.empty()) while (!vars.empty())
{ {
ExprValue* variable = vars.front(); ExprValue* variable = vars.front();
@ -1381,7 +1381,7 @@ void KDebugger::parseLocals(const char* output, std::list<ExprValue*>& newVars)
if (variable->m_name == (*v)->m_name) { if (variable->m_name == (*v)->m_name) {
// we found a duplicate, change name // we found a duplicate, change name
block++; block++;
QString newName = origName + " (" + QString().setNum(block) + ")"; TQString newName = origName + " (" + TQString().setNum(block) + ")";
variable->m_name = newName; variable->m_name = newName;
} }
} }
@ -1430,7 +1430,7 @@ bool KDebugger::handlePrintDeref(CmdQueueItem* cmd, const char* output)
ExprValue* dummyParent = new ExprValue(variable->m_name, VarTree::NKplain); ExprValue* dummyParent = new ExprValue(variable->m_name, VarTree::NKplain);
dummyParent->m_varKind = VarTree::VKdummy; dummyParent->m_varKind = VarTree::VKdummy;
// the name of the parsed variable is the address of the pointer // the name of the parsed variable is the address of the pointer
QString addr = "*" + cmd->m_expr->value(); TQString addr = "*" + cmd->m_expr->value();
variable->m_name = addr; variable->m_name = addr;
variable->m_nameKind = VarTree::NKaddress; variable->m_nameKind = VarTree::NKaddress;
@ -1465,14 +1465,14 @@ void KDebugger::handleBacktrace(const char* output)
emit updatePC(frm->fileName, frm->lineNo, frm->address, frm->frameNo); emit updatePC(frm->fileName, frm->lineNo, frm->address, frm->frameNo);
for (; frm != stack.end(); ++frm) { for (; frm != stack.end(); ++frm) {
QString func; TQString func;
if (frm->var != 0) if (frm->var != 0)
func = frm->var->m_name; func = frm->var->m_name;
else else
func = frm->fileName + ":" + QString().setNum(frm->lineNo+1); func = frm->fileName + ":" + TQString().setNum(frm->lineNo+1);
m_btWindow.insertItem(func); m_btWindow.insertItem(func);
TRACE("frame " + func + " (" + frm->fileName + ":" + TRACE("frame " + func + " (" + frm->fileName + ":" +
QString().setNum(frm->lineNo+1) + ")"); TQString().setNum(frm->lineNo+1) + ")");
} }
} }
@ -1487,7 +1487,7 @@ void KDebugger::gotoFrame(int frame)
void KDebugger::handleFrameChange(const char* output) void KDebugger::handleFrameChange(const char* output)
{ {
QString fileName; TQString fileName;
int frameNo; int frameNo;
int lineNo; int lineNo;
DbgAddr address; DbgAddr address;
@ -1512,12 +1512,12 @@ void KDebugger::evalExpressions()
VarTree* exprItem = 0; VarTree* exprItem = 0;
if (!m_watchEvalExpr.empty()) if (!m_watchEvalExpr.empty())
{ {
QString expr = m_watchEvalExpr.front(); TQString expr = m_watchEvalExpr.front();
m_watchEvalExpr.pop_front(); m_watchEvalExpr.pop_front();
exprItem = m_watchVariables.topLevelExprByName(expr); exprItem = m_watchVariables.topLevelExprByName(expr);
} }
if (exprItem != 0) { if (exprItem != 0) {
CmdQueueItem* cmd = m_d->queueCmd(DCprint, exprItem->getText(), DebuggerDriver::QMoverride); CmdQueueItem* cmd = m_d->queueCmd(DCprint, exprItem->getText(), DebuggerDriver::TQMoverride);
// remember which expr this was // remember which expr this was
cmd->m_expr = exprItem; cmd->m_expr = exprItem;
cmd->m_exprWnd = &m_watchVariables; cmd->m_exprWnd = &m_watchVariables;
@ -1576,13 +1576,13 @@ void KDebugger::dereferencePointer(ExprWnd* wnd, VarTree* exprItem,
{ {
ASSERT(exprItem->m_varKind == VarTree::VKpointer); ASSERT(exprItem->m_varKind == VarTree::VKpointer);
QString expr = exprItem->computeExpr(); TQString expr = exprItem->computeExpr();
TRACE("dereferencing pointer: " + expr); TRACE("dereferencing pointer: " + expr);
CmdQueueItem* cmd; CmdQueueItem* cmd;
if (immediate) { if (immediate) {
cmd = m_d->queueCmd(DCprintDeref, expr, DebuggerDriver::QMoverrideMoreEqual); cmd = m_d->queueCmd(DCprintDeref, expr, DebuggerDriver::TQMoverrideMoreEqual);
} else { } else {
cmd = m_d->queueCmd(DCprintDeref, expr, DebuggerDriver::QMoverride); cmd = m_d->queueCmd(DCprintDeref, expr, DebuggerDriver::TQMoverride);
} }
// remember which expr this was // remember which expr this was
cmd->m_expr = exprItem; cmd->m_expr = exprItem;
@ -1593,10 +1593,10 @@ void KDebugger::determineType(ExprWnd* wnd, VarTree* exprItem)
{ {
ASSERT(exprItem->m_varKind == VarTree::VKstruct); ASSERT(exprItem->m_varKind == VarTree::VKstruct);
QString expr = exprItem->computeExpr(); TQString expr = exprItem->computeExpr();
TRACE("get type of: " + expr); TRACE("get type of: " + expr);
CmdQueueItem* cmd; CmdQueueItem* cmd;
cmd = m_d->queueCmd(DCfindType, expr, DebuggerDriver::QMoverride); cmd = m_d->queueCmd(DCfindType, expr, DebuggerDriver::TQMoverride);
// remember which expr this was // remember which expr this was
cmd->m_expr = exprItem; cmd->m_expr = exprItem;
@ -1605,7 +1605,7 @@ void KDebugger::determineType(ExprWnd* wnd, VarTree* exprItem)
void KDebugger::handleFindType(CmdQueueItem* cmd, const char* output) void KDebugger::handleFindType(CmdQueueItem* cmd, const char* output)
{ {
QString type; TQString type;
if (m_d->parseFindType(output, type)) if (m_d->parseFindType(output, type))
{ {
ASSERT(cmd != 0 && cmd->m_expr != 0); ASSERT(cmd != 0 && cmd->m_expr != 0);
@ -1649,10 +1649,10 @@ void KDebugger::handlePrintStruct(CmdQueueItem* cmd, const char* output)
ASSERT(var->m_varKind == VarTree::VKstruct); ASSERT(var->m_varKind == VarTree::VKstruct);
ExprValue* partExpr; ExprValue* partExpr;
if (cmd->m_cmd == DCprintQStringStruct) { if (cmd->m_cmd == DCprintTQStringStruct) {
partExpr = m_d->parseQCharArray(output, false, m_typeTable->qCharIsShort()); partExpr = m_d->parseTQCharArray(output, false, m_typeTable->qCharIsShort());
} else if (cmd->m_cmd == DCprintWChar) { } else if (cmd->m_cmd == DCprintWChar) {
partExpr = m_d->parseQCharArray(output, false, true); partExpr = m_d->parseTQCharArray(output, false, true);
} else { } else {
partExpr = m_d->parsePrintExpr(output, false); partExpr = m_d->parsePrintExpr(output, false);
} }
@ -1661,7 +1661,7 @@ void KDebugger::handlePrintStruct(CmdQueueItem* cmd, const char* output)
/* we only allow simple values at the moment */ /* we only allow simple values at the moment */
partExpr->m_child != 0; partExpr->m_child != 0;
QString partValue; TQString partValue;
if (errorValue) if (errorValue)
{ {
partValue = "?""?""?"; // 2 question marks in a row would be a trigraph partValue = "?""?""?"; // 2 question marks in a row would be a trigraph
@ -1684,7 +1684,7 @@ void KDebugger::handlePrintStruct(CmdQueueItem* cmd, const char* output)
* the value). * the value).
* *
* Next, if this was the length expression, we still have not seen the * Next, if this was the length expression, we still have not seen the
* real expression, but the length of a QString. * real expression, but the length of a TQString.
*/ */
ASSERT(var->m_exprIndex >= 0 && var->m_exprIndex <= typeInfoMaxExpr); ASSERT(var->m_exprIndex >= 0 && var->m_exprIndex <= typeInfoMaxExpr);
@ -1728,10 +1728,10 @@ void KDebugger::evalInitialStructExpression(VarTree* var, ExprWnd* wnd, bool imm
else else
{ {
var->m_exprIndexUseGuard = false; var->m_exprIndexUseGuard = false;
QString expr = var->computeExpr(); TQString expr = var->computeExpr();
CmdQueueItem* cmd = m_d->queueCmd(DCprintWChar, expr, CmdQueueItem* cmd = m_d->queueCmd(DCprintWChar, expr,
immediate ? DebuggerDriver::QMoverrideMoreEqual immediate ? DebuggerDriver::TQMoverrideMoreEqual
: DebuggerDriver::QMoverride); : DebuggerDriver::TQMoverride);
// remember which expression this was // remember which expression this was
cmd->m_expr = var; cmd->m_expr = var;
cmd->m_exprWnd = wnd; cmd->m_exprWnd = wnd;
@ -1741,8 +1741,8 @@ void KDebugger::evalInitialStructExpression(VarTree* var, ExprWnd* wnd, bool imm
/** queues a printStruct command; var must have been initialized correctly */ /** queues a printStruct command; var must have been initialized correctly */
void KDebugger::evalStructExpression(VarTree* var, ExprWnd* wnd, bool immediate) void KDebugger::evalStructExpression(VarTree* var, ExprWnd* wnd, bool immediate)
{ {
QString base = var->computeExpr(); TQString base = var->computeExpr();
QString expr; TQString expr;
if (var->m_exprIndexUseGuard) { if (var->m_exprIndexUseGuard) {
expr = var->m_type->m_guardStrings[var->m_exprIndex]; expr = var->m_type->m_guardStrings[var->m_exprIndex];
if (expr.isEmpty()) { if (expr.isEmpty()) {
@ -1757,19 +1757,19 @@ void KDebugger::evalStructExpression(VarTree* var, ExprWnd* wnd, bool immediate)
expr.replace("%s", base); expr.replace("%s", base);
DbgCommand dbgCmd = DCprintStruct; DbgCommand dbgCmd = DCprintStruct;
// check if this is a QString::Data // check if this is a TQString::Data
if (expr.left(15) == "/QString::Data ") if (expr.left(15) == "/TQString::Data ")
{ {
if (m_typeTable->parseQt2QStrings()) if (m_typeTable->parseTQt2TQStrings())
{ {
expr = expr.mid(15, expr.length()); /* strip off /QString::Data */ expr = expr.mid(15, expr.length()); /* strip off /TQString::Data */
dbgCmd = DCprintQStringStruct; dbgCmd = DCprintTQStringStruct;
} else { } else {
/* /*
* This should not happen: the type libraries should be set up * This should not happen: the type libraries should be set up
* in a way that this can't happen. If this happens * in a way that this can't happen. If this happens
* nevertheless it means that, eg., kdecore was loaded but qt2 * nevertheless it means that, eg., kdecore was loaded but qt2
* was not (only qt2 enables the QString feature). * was not (only qt2 enables the TQString feature).
*/ */
// TODO: remove this "print"; queue the next printStruct instead // TODO: remove this "print"; queue the next printStruct instead
expr = "*0"; expr = "*0";
@ -1777,8 +1777,8 @@ void KDebugger::evalStructExpression(VarTree* var, ExprWnd* wnd, bool immediate)
} }
TRACE("evalStruct: " + expr + (var->m_exprIndexUseGuard ? " // guard" : " // real")); TRACE("evalStruct: " + expr + (var->m_exprIndexUseGuard ? " // guard" : " // real"));
CmdQueueItem* cmd = m_d->queueCmd(dbgCmd, expr, CmdQueueItem* cmd = m_d->queueCmd(dbgCmd, expr,
immediate ? DebuggerDriver::QMoverrideMoreEqual immediate ? DebuggerDriver::TQMoverrideMoreEqual
: DebuggerDriver::QMnormal); : DebuggerDriver::TQMnormal);
// remember which expression this was // remember which expression this was
cmd->m_expr = var; cmd->m_expr = var;
@ -1794,16 +1794,16 @@ void KDebugger::handleSharedLibs(const char* output)
// get type libraries // get type libraries
m_typeTable->loadLibTypes(m_sharedLibs); m_typeTable->loadLibTypes(m_sharedLibs);
// hand over the QString data cmd // hand over the TQString data cmd
m_d->setPrintQStringDataCmd(m_typeTable->printQStringDataCmd()); m_d->setPrintTQStringDataCmd(m_typeTable->printTQStringDataCmd());
} }
CmdQueueItem* KDebugger::loadCoreFile() CmdQueueItem* KDebugger::loadCoreFile()
{ {
return m_d->queueCmd(DCcorefile, m_corefile, DebuggerDriver::QMoverride); return m_d->queueCmd(DCcorefile, m_corefile, DebuggerDriver::TQMoverride);
} }
void KDebugger::slotExpanding(QListViewItem* item) void KDebugger::slotExpanding(TQListViewItem* item)
{ {
VarTree* exprItem = static_cast<VarTree*>(item); VarTree* exprItem = static_cast<VarTree*>(item);
if (exprItem->m_varKind != VarTree::VKpointer) { if (exprItem->m_varKind != VarTree::VKpointer) {
@ -1814,9 +1814,9 @@ void KDebugger::slotExpanding(QListViewItem* item)
} }
// add the expression in the edit field to the watch expressions // add the expression in the edit field to the watch expressions
void KDebugger::addWatch(const QString& t) void KDebugger::addWatch(const TQString& t)
{ {
QString expr = t.stripWhiteSpace(); TQString expr = t.stripWhiteSpace();
// don't add a watched expression again // don't add a watched expression again
if (expr.isEmpty() || m_watchVariables.topLevelExprByName(expr) != 0) if (expr.isEmpty() || m_watchVariables.topLevelExprByName(expr) != 0)
return; return;
@ -1845,7 +1845,7 @@ void KDebugger::slotDeleteWatch()
return; return;
// remove the variable from the list to evaluate // remove the variable from the list to evaluate
QStringList::iterator i = m_watchEvalExpr.find(item->getText()); TQStringList::iterator i = m_watchEvalExpr.find(item->getText());
if (i != m_watchEvalExpr.end()) { if (i != m_watchEvalExpr.end()) {
m_watchEvalExpr.erase(i); m_watchEvalExpr.erase(i);
} }
@ -1887,9 +1887,9 @@ void KDebugger::newBreakpoint(CmdQueueItem* cmd, const char* output)
// parse the output to determine success or failure // parse the output to determine success or failure
int id; int id;
QString file; TQString file;
int lineNo; int lineNo;
QString address; TQString address;
if (!m_d->parseBreakpoint(output, id, file, lineNo, address)) if (!m_d->parseBreakpoint(output, id, file, lineNo, address))
{ {
/* /*
@ -1979,7 +1979,7 @@ bool KDebugger::stopMayChangeBreakList() const
return false; return false;
} }
KDebugger::BrkptIterator KDebugger::breakpointByFilePos(QString file, int lineNo, KDebugger::BrkptIterator KDebugger::breakpointByFilePos(TQString file, int lineNo,
const DbgAddr& address) const DbgAddr& address)
{ {
// look for exact file name match // look for exact file name match
@ -2000,7 +2000,7 @@ KDebugger::BrkptIterator KDebugger::breakpointByFilePos(QString file, int lineNo
for (BrkptIterator bp = m_brkpts.begin(); bp != m_brkpts.end(); ++bp) for (BrkptIterator bp = m_brkpts.begin(); bp != m_brkpts.end(); ++bp)
{ {
// get base name of breakpoint's file // get base name of breakpoint's file
QString basename = bp->fileName; TQString basename = bp->fileName;
int offset = basename.findRev("/"); int offset = basename.findRev("/");
if (offset >= 0) { if (offset >= 0) {
basename.remove(0, offset+1); basename.remove(0, offset+1);
@ -2030,7 +2030,7 @@ KDebugger::BrkptIterator KDebugger::breakpointById(int id)
return m_brkpts.end(); return m_brkpts.end();
} }
void KDebugger::slotValuePopup(const QString& expr) void KDebugger::slotValuePopup(const TQString& expr)
{ {
// search the local variables for a match // search the local variables for a match
VarTree* v = m_localVariables.topLevelExprByName(expr); VarTree* v = m_localVariables.topLevelExprByName(expr);
@ -2050,7 +2050,7 @@ void KDebugger::slotValuePopup(const QString& expr)
} }
// construct the tip // construct the tip
QString tip = v->getText() + " = "; TQString tip = v->getText() + " = ";
if (!v->value().isEmpty()) if (!v->value().isEmpty())
{ {
tip += v->value(); tip += v->value();
@ -2073,11 +2073,11 @@ void KDebugger::slotValuePopup(const QString& expr)
emit valuePopup(tip); emit valuePopup(tip);
} }
void KDebugger::slotDisassemble(const QString& fileName, int lineNo) void KDebugger::slotDisassemble(const TQString& fileName, int lineNo)
{ {
if (m_haveExecutable) { if (m_haveExecutable) {
CmdQueueItem* cmd = m_d->queueCmd(DCinfoline, fileName, lineNo, CmdQueueItem* cmd = m_d->queueCmd(DCinfoline, fileName, lineNo,
DebuggerDriver::QMoverrideMoreEqual); DebuggerDriver::TQMoverrideMoreEqual);
cmd->m_fileName = fileName; cmd->m_fileName = fileName;
cmd->m_lineNo = lineNo; cmd->m_lineNo = lineNo;
} }
@ -2085,13 +2085,13 @@ void KDebugger::slotDisassemble(const QString& fileName, int lineNo)
void KDebugger::handleInfoLine(CmdQueueItem* cmd, const char* output) void KDebugger::handleInfoLine(CmdQueueItem* cmd, const char* output)
{ {
QString addrFrom, addrTo; TQString addrFrom, addrTo;
if (cmd->m_lineNo >= 0) { if (cmd->m_lineNo >= 0) {
// disassemble // disassemble
if (m_d->parseInfoLine(output, addrFrom, addrTo)) { if (m_d->parseInfoLine(output, addrFrom, addrTo)) {
// got the address range, now get the real code // got the address range, now get the real code
CmdQueueItem* c = m_d->queueCmd(DCdisassemble, addrFrom, addrTo, CmdQueueItem* c = m_d->queueCmd(DCdisassemble, addrFrom, addrTo,
DebuggerDriver::QMoverrideMoreEqual); DebuggerDriver::TQMoverrideMoreEqual);
c->m_fileName = cmd->m_fileName; c->m_fileName = cmd->m_fileName;
c->m_lineNo = cmd->m_lineNo; c->m_lineNo = cmd->m_lineNo;
} else { } else {
@ -2120,10 +2120,10 @@ void KDebugger::handleThreadList(const char* output)
void KDebugger::setThread(int id) void KDebugger::setThread(int id)
{ {
m_d->queueCmd(DCthread, id, DebuggerDriver::QMoverrideMoreEqual); m_d->queueCmd(DCthread, id, DebuggerDriver::TQMoverrideMoreEqual);
} }
void KDebugger::setMemoryExpression(const QString& memexpr) void KDebugger::setMemoryExpression(const TQString& memexpr)
{ {
m_memoryExpression = memexpr; m_memoryExpression = memexpr;
@ -2139,18 +2139,18 @@ void KDebugger::setMemoryExpression(const QString& memexpr)
void KDebugger::queueMemoryDump(bool immediate) void KDebugger::queueMemoryDump(bool immediate)
{ {
m_d->queueCmd(DCexamine, m_memoryExpression, m_memoryFormat, m_d->queueCmd(DCexamine, m_memoryExpression, m_memoryFormat,
immediate ? DebuggerDriver::QMoverrideMoreEqual : immediate ? DebuggerDriver::TQMoverrideMoreEqual :
DebuggerDriver::QMoverride); DebuggerDriver::TQMoverride);
} }
void KDebugger::handleMemoryDump(const char* output) void KDebugger::handleMemoryDump(const char* output)
{ {
std::list<MemoryDump> memdump; std::list<MemoryDump> memdump;
QString msg = m_d->parseMemoryDump(output, memdump); TQString msg = m_d->parseMemoryDump(output, memdump);
emit memoryDumpChanged(msg, memdump); emit memoryDumpChanged(msg, memdump);
} }
void KDebugger::setProgramCounter(const QString& file, int line, const DbgAddr& addr) void KDebugger::setProgramCounter(const TQString& file, int line, const DbgAddr& addr)
{ {
if (addr.isEmpty()) { if (addr.isEmpty()) {
// find address of the specified line // find address of the specified line
@ -2171,17 +2171,17 @@ void KDebugger::handleSetPC(const char* /*output*/)
gotoFrame(0); gotoFrame(0);
} }
void KDebugger::slotValueEdited(VarTree* expr, const QString& text) void KDebugger::slotValueEdited(VarTree* expr, const TQString& text)
{ {
if (text.simplifyWhiteSpace().isEmpty()) if (text.simplifyWhiteSpace().isEmpty())
return; /* no text entered: ignore request */ return; /* no text entered: ignore request */
ExprWnd* wnd = static_cast<ExprWnd*>(expr->listView()); ExprWnd* wnd = static_cast<ExprWnd*>(expr->listView());
TRACE(QString().sprintf("Changing %s to ", TRACE(TQString().sprintf("Changing %s to ",
wnd->name()) + text); wnd->name()) + text);
// determine the lvalue to edit // determine the lvalue to edit
QString lvalue = expr->computeExpr(); TQString lvalue = expr->computeExpr();
CmdQueueItem* cmd = m_d->executeCmd(DCsetvariable, lvalue, text); CmdQueueItem* cmd = m_d->executeCmd(DCsetvariable, lvalue, text);
cmd->m_expr = expr; cmd->m_expr = expr;
cmd->m_exprWnd = wnd; cmd->m_exprWnd = wnd;
@ -2189,7 +2189,7 @@ void KDebugger::slotValueEdited(VarTree* expr, const QString& text)
void KDebugger::handleSetVariable(CmdQueueItem* cmd, const char* output) void KDebugger::handleSetVariable(CmdQueueItem* cmd, const char* output)
{ {
QString msg = m_d->parseSetVariable(output); TQString msg = m_d->parseSetVariable(output);
if (!msg.isEmpty()) if (!msg.isEmpty())
{ {
// there was an error; display it in the status bar // there was an error; display it in the status bar
@ -2199,9 +2199,9 @@ void KDebugger::handleSetVariable(CmdQueueItem* cmd, const char* output)
} }
// get the new value // get the new value
QString expr = cmd->m_expr->computeExpr(); TQString expr = cmd->m_expr->computeExpr();
CmdQueueItem* printCmd = CmdQueueItem* printCmd =
m_d->queueCmd(DCprint, expr, DebuggerDriver::QMoverrideMoreEqual); m_d->queueCmd(DCprint, expr, DebuggerDriver::TQMoverrideMoreEqual);
printCmd->m_expr = cmd->m_expr; printCmd->m_expr = cmd->m_expr;
printCmd->m_exprWnd = cmd->m_exprWnd; printCmd->m_exprWnd = cmd->m_exprWnd;
} }

@ -7,9 +7,9 @@
#ifndef DEBUGGER_H #ifndef DEBUGGER_H
#define DEBUGGER_H #define DEBUGGER_H
#include <qtimer.h> #include <ntqtimer.h>
#include <qdict.h> #include <ntqdict.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include "envvar.h" #include "envvar.h"
#include "exprwnd.h" /* some compilers require this */ #include "exprwnd.h" /* some compilers require this */
@ -25,7 +25,7 @@ class KTreeViewItem;
class KConfig; class KConfig;
class KConfigBase; class KConfigBase;
class ProgramConfig; class ProgramConfig;
class QListBox; class TQListBox;
class RegisterInfo; class RegisterInfo;
class ThreadInfo; class ThreadInfo;
class DebuggerDriver; class DebuggerDriver;
@ -37,14 +37,14 @@ struct DbgAddr;
class KProcess; class KProcess;
class KDebugger : public QObject class KDebugger : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
KDebugger(QWidget* parent, /* will be used as the parent for dialogs */ KDebugger(TQWidget* parent, /* will be used as the parent for dialogs */
ExprWnd* localVars, ExprWnd* localVars,
ExprWnd* watchVars, ExprWnd* watchVars,
QListBox* backtrace); TQListBox* backtrace);
~KDebugger(); ~KDebugger();
/** /**
@ -55,7 +55,7 @@ public:
* *
* @return false if an error occurs. * @return false if an error occurs.
*/ */
bool debugProgram(const QString& executable, bool debugProgram(const TQString& executable,
DebuggerDriver* driver); DebuggerDriver* driver);
/** /**
@ -63,30 +63,30 @@ public:
* @param batch tells whether the core file was given on the * @param batch tells whether the core file was given on the
* command line. * command line.
*/ */
void useCoreFile(QString corefile, bool batch); void useCoreFile(TQString corefile, bool batch);
/** /**
* Overrides the program argument in the per-program config * Overrides the program argument in the per-program config
* with a new value. * with a new value.
*/ */
void overrideProgramArguments(const QString& args); void overrideProgramArguments(const TQString& args);
/** /**
* Uses the specified pid to attach to the active program. * Uses the specified pid to attach to the active program.
*/ */
void setAttachPid(const QString& pid); void setAttachPid(const TQString& pid);
/** /**
* Attaches to the specified process and debugs it. * Attaches to the specified process and debugs it.
*/ */
void attachProgram(const QString& pid); void attachProgram(const TQString& pid);
/** /**
* Returns the file name of the per-program config file for the * Returns the file name of the per-program config file for the
* specified program. * specified program.
*/ */
static QString getConfigForExe(const QString& exe); static TQString getConfigForExe(const TQString& exe);
/** /**
* The driver name entry in the per-program config file. * The driver name entry in the per-program config file.
@ -147,24 +147,24 @@ public slots:
* Moves the program counter to the specified line. * Moves the program counter to the specified line.
* If an address is given, it is moved to the address. * If an address is given, it is moved to the address.
*/ */
void setProgramCounter(const QString&, int, const DbgAddr&); void setProgramCounter(const TQString&, int, const DbgAddr&);
public: public:
/** /**
* Queries the user for program arguments. * Queries the user for program arguments.
*/ */
void programArgs(QWidget* parent); void programArgs(TQWidget* parent);
/** /**
* Queries the user for program settings: Debugger command, terminal * Queries the user for program settings: Debugger command, terminal
* emulator. * emulator.
*/ */
void programSettings(QWidget* parent); void programSettings(TQWidget* parent);
/** /**
* Setup remote debugging device * Setup remote debugging device
*/ */
void setRemoteDevice(const QString& remoteDevice) { m_remoteDevice = remoteDevice; } void setRemoteDevice(const TQString& remoteDevice) { m_remoteDevice = remoteDevice; }
/** /**
* Run the debuggee until the specified line in the specified file is * Run the debuggee until the specified line in the specified file is
@ -173,7 +173,7 @@ public:
* @return false if the command was not executed, e.g. because the * @return false if the command was not executed, e.g. because the
* debuggee is running at the moment. * debuggee is running at the moment.
*/ */
bool runUntil(const QString& fileName, int lineNo); bool runUntil(const TQString& fileName, int lineNo);
/** /**
* Set a breakpoint. * Set a breakpoint.
@ -185,7 +185,7 @@ public:
* @return false if the command was not executed, e.g. because the * @return false if the command was not executed, e.g. because the
* debuggee is running at the moment. * debuggee is running at the moment.
*/ */
bool setBreakpoint(QString fileName, int lineNo, bool setBreakpoint(TQString fileName, int lineNo,
const DbgAddr& address, bool temporary); const DbgAddr& address, bool temporary);
/** /**
@ -205,7 +205,7 @@ public:
* @return false if the command was not executed, e.g. because the * @return false if the command was not executed, e.g. because the
* debuggee is running at the moment. * debuggee is running at the moment.
*/ */
bool enableDisableBreakpoint(QString fileName, int lineNo, bool enableDisableBreakpoint(TQString fileName, int lineNo,
const DbgAddr& address); const DbgAddr& address);
/** /**
@ -235,7 +235,7 @@ public:
* debuggee is running at the moment. * debuggee is running at the moment.
*/ */
bool conditionalBreakpoint(int id, bool conditionalBreakpoint(int id,
const QString& condition, const TQString& condition,
int ignoreCount) int ignoreCount)
{ return conditionalBreakpoint(breakpointById(id), condition, ignoreCount); } { return conditionalBreakpoint(breakpointById(id), condition, ignoreCount); }
@ -258,12 +258,12 @@ public:
/** /**
* Add a watch expression. * Add a watch expression.
*/ */
void addWatch(const QString& expr); void addWatch(const TQString& expr);
/** /**
* Retrieves the current status message. * Retrieves the current status message.
*/ */
const QString& statusMessage() const { return m_statusMessage; } const TQString& statusMessage() const { return m_statusMessage; }
/** /**
* Is the debugger ready to receive another high-priority command? * Is the debugger ready to receive another high-priority command?
@ -295,7 +295,7 @@ public:
BrkptROIterator breakpointsBegin() const { return m_brkpts.begin(); } BrkptROIterator breakpointsBegin() const { return m_brkpts.begin(); }
BrkptROIterator breakpointsEnd() const { return m_brkpts.end(); } BrkptROIterator breakpointsEnd() const { return m_brkpts.end(); }
const QString& executable() const { return m_executable; } const TQString& executable() const { return m_executable; }
/** /**
* Terminal emulation level. * Terminal emulation level.
@ -312,19 +312,19 @@ public:
TTYLevel ttyLevel() const { return m_ttyLevel; } TTYLevel ttyLevel() const { return m_ttyLevel; }
/** Sets the terminal that is to be used by the debugger. */ /** Sets the terminal that is to be used by the debugger. */
void setTerminal(const QString& term) { m_inferiorTerminal = term; } void setTerminal(const TQString& term) { m_inferiorTerminal = term; }
/** Returns the debugger driver. */ /** Returns the debugger driver. */
DebuggerDriver* driver() { return m_d; } DebuggerDriver* driver() { return m_d; }
/** Returns the pid that the debugger is currently attached to. */ /** Returns the pid that the debugger is currently attached to. */
const QString& attachedPid() const { return m_attachedPid; } const TQString& attachedPid() const { return m_attachedPid; }
/** /**
* The memory at that the expression evaluates to is watched. Can be * The memory at that the expression evaluates to is watched. Can be
* empty. Triggers a redisplay even if the expression did not change. * empty. Triggers a redisplay even if the expression did not change.
*/ */
void setMemoryExpression(const QString& memexpr); void setMemoryExpression(const TQString& memexpr);
/** /**
* Sets how the watched memory location is displayed. * Sets how the watched memory location is displayed.
@ -337,16 +337,16 @@ public:
void restoreSettings(KConfig*); void restoreSettings(KConfig*);
protected: protected:
QString m_inferiorTerminal; TQString m_inferiorTerminal;
QString m_debuggerCmd; /* per-program setting */ TQString m_debuggerCmd; /* per-program setting */
TTYLevel m_ttyLevel; /* level of terminal emulation */ TTYLevel m_ttyLevel; /* level of terminal emulation */
bool startDriver(); bool startDriver();
void stopDriver(); void stopDriver();
void writeCommand(); void writeCommand();
QStringList m_watchEvalExpr; /* exprs to evaluate for watch window */ TQStringList m_watchEvalExpr; /* exprs to evaluate for watch window */
std::list<Breakpoint> m_brkpts; std::list<Breakpoint> m_brkpts;
QString m_memoryExpression; /* memory location to watch */ TQString m_memoryExpression; /* memory location to watch */
unsigned m_memoryFormat; /* how that output should look */ unsigned m_memoryFormat; /* how that output should look */
protected slots: protected slots:
@ -354,9 +354,9 @@ protected slots:
protected: protected:
void handleRunCommands(const char* output); void handleRunCommands(const char* output);
void updateAllExprs(); void updateAllExprs();
void updateProgEnvironment(const QString& args, const QString& wd, void updateProgEnvironment(const TQString& args, const TQString& wd,
const QDict<EnvVar>& newVars, const TQDict<EnvVar>& newVars,
const QStringList& newOptions); const TQStringList& newOptions);
void parseLocals(const char* output, std::list<ExprValue*>& newVars); void parseLocals(const char* output, std::list<ExprValue*>& newVars);
void handleLocals(const char* output); void handleLocals(const char* output);
bool handlePrint(CmdQueueItem* cmd, const char* output); bool handlePrint(CmdQueueItem* cmd, const char* output);
@ -380,10 +380,10 @@ protected:
void determineType(ExprWnd* wnd, VarTree* var); void determineType(ExprWnd* wnd, VarTree* var);
void queueMemoryDump(bool immediate); void queueMemoryDump(bool immediate);
CmdQueueItem* loadCoreFile(); CmdQueueItem* loadCoreFile();
void openProgramConfig(const QString& name); void openProgramConfig(const TQString& name);
typedef std::list<Breakpoint>::iterator BrkptIterator; typedef std::list<Breakpoint>::iterator BrkptIterator;
BrkptIterator breakpointByFilePos(QString file, int lineNo, BrkptIterator breakpointByFilePos(TQString file, int lineNo,
const DbgAddr& address); const DbgAddr& address);
BrkptIterator breakpointById(int id); BrkptIterator breakpointById(int id);
CmdQueueItem* executeBreakpoint(const Breakpoint* bp, bool queueOnly); CmdQueueItem* executeBreakpoint(const Breakpoint* bp, bool queueOnly);
@ -395,44 +395,44 @@ protected:
bool enableDisableBreakpoint(BrkptIterator bp); bool enableDisableBreakpoint(BrkptIterator bp);
bool deleteBreakpoint(BrkptIterator bp); bool deleteBreakpoint(BrkptIterator bp);
bool conditionalBreakpoint(BrkptIterator bp, bool conditionalBreakpoint(BrkptIterator bp,
const QString& condition, const TQString& condition,
int ignoreCount); int ignoreCount);
bool m_haveExecutable; /* has an executable been specified */ bool m_haveExecutable; /* has an executable been specified */
bool m_programActive; /* is the program active (possibly halting in a brkpt)? */ bool m_programActive; /* is the program active (possibly halting in a brkpt)? */
bool m_programRunning; /* is the program executing (not stopped)? */ bool m_programRunning; /* is the program executing (not stopped)? */
bool m_sharedLibsListed; /* do we know the shared libraries loaded by the prog? */ bool m_sharedLibsListed; /* do we know the shared libraries loaded by the prog? */
QString m_executable; TQString m_executable;
QString m_corefile; TQString m_corefile;
QString m_attachedPid; /* user input of attaching to pid */ TQString m_attachedPid; /* user input of attaching to pid */
QString m_programArgs; TQString m_programArgs;
QString m_remoteDevice; TQString m_remoteDevice;
QString m_programWD; /* working directory of gdb */ TQString m_programWD; /* working directory of gdb */
QDict<EnvVar> m_envVars; /* environment variables set by user */ TQDict<EnvVar> m_envVars; /* environment variables set by user */
QStringList m_boolOptions; /* boolean options */ TQStringList m_boolOptions; /* boolean options */
QStringList m_sharedLibs; /* shared libraries used by program */ TQStringList m_sharedLibs; /* shared libraries used by program */
ProgramTypeTable* m_typeTable; /* known types used by the program */ ProgramTypeTable* m_typeTable; /* known types used by the program */
ProgramConfig* m_programConfig; /* program-specific settings (brkpts etc) */ ProgramConfig* m_programConfig; /* program-specific settings (brkpts etc) */
void saveProgramSettings(); void saveProgramSettings();
void restoreProgramSettings(); void restoreProgramSettings();
QString readDebuggerCmd(); TQString readDebuggerCmd();
// debugger process // debugger process
DebuggerDriver* m_d; DebuggerDriver* m_d;
bool m_explicitKill; /* whether we are killing gdb ourselves */ bool m_explicitKill; /* whether we are killing gdb ourselves */
QString m_statusMessage; TQString m_statusMessage;
protected slots: protected slots:
void gdbExited(KProcess*); void gdbExited(KProcess*);
void slotInferiorRunning(); void slotInferiorRunning();
void backgroundUpdate(); void backgroundUpdate();
void gotoFrame(int); void gotoFrame(int);
void slotExpanding(QListViewItem*); void slotExpanding(TQListViewItem*);
void slotDeleteWatch(); void slotDeleteWatch();
void slotValuePopup(const QString&); void slotValuePopup(const TQString&);
void slotDisassemble(const QString&, int); void slotDisassemble(const TQString&, int);
void slotValueEdited(VarTree*, const QString&); void slotValueEdited(VarTree*, const TQString&);
public slots: public slots:
void setThread(int); void setThread(int);
void shutdown(); void shutdown();
@ -457,7 +457,7 @@ signals:
* should NOT be changed). * should NOT be changed).
* @param address specifies the exact address of the PC or is empty. * @param address specifies the exact address of the PC or is empty.
*/ */
void activateFileLine(const QString& file, int lineNo, const DbgAddr& address); void activateFileLine(const TQString& file, int lineNo, const DbgAddr& address);
/** /**
* This signal indicates that the program counter has changed. * This signal indicates that the program counter has changed.
@ -472,7 +472,7 @@ signals:
* where a function was called); the latter cases should be indicated * where a function was called); the latter cases should be indicated
* differently in the source window. * differently in the source window.
*/ */
void updatePC(const QString& filename, int lineNo, void updatePC(const TQString& filename, int lineNo,
const DbgAddr& address, int frameNo); const DbgAddr& address, int frameNo);
/** /**
@ -511,13 +511,13 @@ signals:
/** /**
* Indicates that the value for a value popup is ready. * Indicates that the value for a value popup is ready.
*/ */
void valuePopup(const QString&); void valuePopup(const TQString&);
/** /**
* Provides the disassembled code of the location given by file and * Provides the disassembled code of the location given by file and
* line number (zero-based). * line number (zero-based).
*/ */
void disassembled(const QString& file, int line, const std::list<DisassembledCode>& code); void disassembled(const TQString& file, int line, const std::list<DisassembledCode>& code);
/** /**
* Indicates that the program has stopped for any reason: by a * Indicates that the program has stopped for any reason: by a
@ -531,7 +531,7 @@ signals:
* @param msg is an error message or empty * @param msg is an error message or empty
* @param memdump is the memory dump * @param memdump is the memory dump
*/ */
void memoryDumpChanged(const QString&, const std::list<MemoryDump>&); void memoryDumpChanged(const TQString&, const std::list<MemoryDump>&);
/** /**
* Gives other objects a chance to save program specific settings. * Gives other objects a chance to save program specific settings.
@ -546,11 +546,11 @@ signals:
protected: protected:
ExprWnd& m_localVariables; ExprWnd& m_localVariables;
ExprWnd& m_watchVariables; ExprWnd& m_watchVariables;
QListBox& m_btWindow; TQListBox& m_btWindow;
// implementation helpers // implementation helpers
protected: protected:
QWidget* parentWidget() { return static_cast<QWidget*>(parent()); } TQWidget* parentWidget() { return static_cast<TQWidget*>(parent()); }
}; };
#endif // DEBUGGER_H #endif // DEBUGGER_H

@ -9,11 +9,11 @@
<p><a href="index.html">Contents</a></p> <p><a href="index.html">Contents</a></p>
<h1>Invoking KDbg from the command line</h1> <h1>Invoking KDbg from the command line</h1>
<p><pre> <p><pre>
Usage: kdbg [Qt-options] [KDE-options] [options] [program] [core] Usage: kdbg [TQt-options] [KDE-options] [options] [program] [core]
Generic options: Generic options:
--help Show help about options --help Show help about options
--help-qt Show Qt specific options --help-qt Show TQt specific options
--help-kde Show KDE specific options --help-kde Show KDE specific options
--help-all Show all options --help-all Show all options
--author Show author information --author Show author information

@ -56,7 +56,7 @@ Sometimes the order in which the names are listed is important
<tt>ShlibRE</tt>. KDbg uses this entry to determine if the type table applies <tt>ShlibRE</tt>. KDbg uses this entry to determine if the type table applies
to the program being debugged. For this purpose KDbg determines the shared to the program being debugged. For this purpose KDbg determines the shared
libraries to which the program is linked. If any of the libraries matches libraries to which the program is linked. If any of the libraries matches
this entry, the type table applies. The regular expression is a Qt-regular this entry, the type table applies. The regular expression is a TQt-regular
expression (the metacharacters <tt>.*?[]^$\</tt> are recognized in the expression (the metacharacters <tt>.*?[]^$\</tt> are recognized in the
usual way, but there is no possibility to group characters.)</li> usual way, but there is no possibility to group characters.)</li>
@ -71,9 +71,9 @@ type tables are listed to identify this type table.
library is used. Currently, two builtins are supported: library is used. Currently, two builtins are supported:
<ul> <ul>
<li> <li>
<tt>QString::Data</tt> is used to display unicode strings of Qt's <tt>QString</tt> <tt>TQString::Data</tt> is used to display unicode strings of TQt's <tt>TQString</tt>
class. See below.</li> class. See below.</li>
<li><tt>QCharIsShort</tt> is used only in connection with <tt>QString::Data</tt> <li><tt>TQCharIsShort</tt> is used only in connection with <tt>TQString::Data</tt>
to specify that a unicode character is stored in an object of type <tt>short</tt>. to specify that a unicode character is stored in an object of type <tt>short</tt>.
See <tt>qt3.kdbgtt</tt> for examples.</li></ul></li> See <tt>qt3.kdbgtt</tt> for examples.</li></ul></li>
</ul> </ul>
@ -125,11 +125,11 @@ this type in the <tt>Types</tt><i>x</i> entries in the <tt>Type Table</tt>.</li>
<p><font size=-1>Currently the number of expressions per type is limited to <p><font size=-1>Currently the number of expressions per type is limited to
5. This can easily be changed if it's too restrictive, but I recommend 5. This can easily be changed if it's too restrictive, but I recommend
not to go to that limit at all - it will slow down the debugging process.</font></p> not to go to that limit at all - it will slow down the debugging process.</font></p>
<p>KDbg recognizes a special extension that is used to display Qt 2.x's and Qt 3.x's <p>KDbg recognizes a special extension that is used to display TQt 2.x's and TQt 3.x's
unicode strings: If an <tt>Expr</tt><i>x</i> is prepended with <tt>/QString::Data</tt>, unicode strings: If an <tt>Expr</tt><i>x</i> is prepended with <tt>/TQString::Data</tt>,
it is assumed that the result of the expression is a pointer to a <tt>QString::Data</tt>. it is assumed that the result of the expression is a pointer to a <tt>TQString::Data</tt>.
The value displayed is the unicode string that this instance of <tt>QString::Data</tt> The value displayed is the unicode string that this instance of <tt>TQString::Data</tt>
represents (which can be <tt>QString::null</tt> if it is Qt's well-defined represents (which can be <tt>TQString::null</tt> if it is TQt's well-defined
null string or <tt>(null)</tt> if the <tt>unicode</tt> member is the null null string or <tt>(null)</tt> if the <tt>unicode</tt> member is the null
pointer). See <tt>qt2.kdbgtt</tt> for examples.</p> pointer). See <tt>qt2.kdbgtt</tt> for examples.</p>
<p>Tip: It is not necessary to define derived types if they ought to be <p>Tip: It is not necessary to define derived types if they ought to be
@ -140,29 +140,29 @@ entry to quickly specify that a type should be treated like a non-leftmost
base class for a multiple-inheritance class.</p> base class for a multiple-inheritance class.</p>
<h2> <h2>
An example</h2> An example</h2>
<p>The example shows how <tt>QString</tt> and <tt>QRect</tt> are defined <p>The example shows how <tt>TQString</tt> and <tt>TQRect</tt> are defined
in <tt>qt3.kdbgtt</tt>. Furthermore, the template type <tt>QValueVector</tt> in <tt>qt3.kdbgtt</tt>. Furthermore, the template type <tt>TQValueVector</tt>
is defined. This example applies to Qt 3.x, which is located in shared library is defined. This example applies to TQt 3.x, which is located in shared library
whose name ends in <tt>libqt-mt.so.3</tt>.</p> whose name ends in <tt>libtqt-mt.so.3</tt>.</p>
<pre>[Type Table] <pre>[Type Table]
Types1=QString,QRect Types1=TQString,TQRect
Types2=QValueVector Types2=TQValueVector
LibDisplayName=libqt 3.x LibDisplayName=libqt 3.x
ShlibRE=libqt-mt\.so\.3$ ShlibRE=libtqt-mt\.so\.3$
EnableBuiltin=QString::Data,QCharIsShort EnableBuiltin=TQString::Data,TQCharIsShort
[QString] [TQString]
Display={ % } Display={ % }
Expr1=/QString::Data (%s).d Expr1=/TQString::Data (%s).d
[QValueVector] [TQValueVector]
Template=QValueVector<*> Template=TQValueVector<*>
Display={ size=% shared=% capacity=% } Display={ size=% shared=% capacity=% }
Expr1=($tmp=(%s).sh)->finish-$tmp->start Expr1=($tmp=(%s).sh)->finish-$tmp->start
Expr2=(%s).sh->count Expr2=(%s).sh->count
Expr3=($tmp=(%s).sh)->end-$tmp->start Expr3=($tmp=(%s).sh)->end-$tmp->start
[QRect] [TQRect]
Display={ tl=(%,%) br=(%,%) } Display={ tl=(%,%) br=(%,%) }
Expr1=(%s).x1 Expr1=(%s).x1
Expr2=(%s).y1 Expr2=(%s).y1
@ -170,7 +170,7 @@ Expr3=(%s).x2
Expr4=(%s).y2</pre> Expr4=(%s).y2</pre>
<p>This example shows these features:</p> <p>This example shows these features:</p>
<ul> <ul>
<li>The name of the template type, <tt>QValueVector</tt> is irrelevant. <li>The name of the template type, <tt>TQValueVector</tt> is irrelevant.
The exact type name is specified under the <tt>Template=</tt> entry. The exact type name is specified under the <tt>Template=</tt> entry.
It specifies a single wildcard so that it applies to all specializations. It specifies a single wildcard so that it applies to all specializations.
</li> </li>

@ -53,7 +53,7 @@ KDE.
ли данную таблицу к текущей отлаживаемой программе. Для этого KDbg определяет ли данную таблицу к текущей отлаживаемой программе. Для этого KDbg определяет
разделяемые библиотеки, используемые программой. Если хотя бы одна из них разделяемые библиотеки, используемые программой. Если хотя бы одна из них
совпадает со значением этого элемента, таблица используется. Используемые совпадает со значением этого элемента, таблица используется. Используемые
регулярные выражения совпадают с регулярными выражениями Qt (метасимволы регулярные выражения совпадают с регулярными выражениями TQt (метасимволы
<tt>.*?[]^$\</tt> распознаются обычным образом, однако отсутсвует возможность <tt>.*?[]^$\</tt> распознаются обычным образом, однако отсутсвует возможность
группировать символы.)</li> группировать символы.)</li>
@ -89,11 +89,11 @@ KDE.
пятью. Это может быть с легкостью изменено, но я не рекомендую вообще пятью. Это может быть с легкостью изменено, но я не рекомендую вообще
приближаться к данному рубежу - это только затормозить процесс отладки.</font> приближаться к данному рубежу - это только затормозить процесс отладки.</font>
<p>KDbg распознает специальное расширение, которое используется для вывода <p>KDbg распознает специальное расширение, которое используется для вывода
строк Qt 2.0 в unicode: Если перед <tt>Expr</tt><i>x</i> стоит строк TQt 2.0 в unicode: Если перед <tt>Expr</tt><i>x</i> стоит
<tt>/QString::Data</tt>, подразумевается, что результат операции является <tt>/TQString::Data</tt>, подразумевается, что результат операции является
указателем на <tt>QString::Data</tt>. Выводимое значение является строкой в указателем на <tt>TQString::Data</tt>. Выводимое значение является строкой в
unicode, представленное <tt>QString::Data</tt> (которое может быть unicode, представленное <tt>TQString::Data</tt> (которое может быть
<tt>QString::null</tt>, если это пустая строка Qt, или <tt>(null)</tt>, если <tt>TQString::null</tt>, если это пустая строка TQt, или <tt>(null)</tt>, если
<tt>unicode</tt> член структуры является нулевым указателем). Для примера см. <tt>unicode</tt> член структуры является нулевым указателем). Для примера см.
<tt>qt2.kdbgtt</tt>. <tt>qt2.kdbgtt</tt>.
@ -103,24 +103,24 @@ unicode,
использовать элемент <tt>Alias</tt> для быстрого указания класса при использовать элемент <tt>Alias</tt> для быстрого указания класса при
множественном наследовании, отличного от первого слева. множественном наследовании, отличного от первого слева.
<h2>Пример</h2> <h2>Пример</h2>
Этот пример показывает, как <tt>QString</tt> и <tt>QObject</tt> описаны в Этот пример показывает, как <tt>TQString</tt> и <tt>TQObject</tt> описаны в
<tt>qt.kdbgtt</tt>. Дополнительно определен <tt>QTableView</tt>, ссылающийся <tt>qt.kdbgtt</tt>. Дополнительно определен <tt>TQTableView</tt>, ссылающийся
на <tt>QObject</tt>. Этот пример применим к Qt 1.x, который расположен в на <tt>TQObject</tt>. Этот пример применим к TQt 1.x, который расположен в
разделяемых библиотеках, имена которых оканчиваются как <tt>libqt.so.1</tt>. разделяемых библиотеках, имена которых оканчиваются как <tt>libqt.so.1</tt>.
<pre>[Type Table] <pre>[Type Table]
Types1=QString Types1=TQString
Types2=QObject,QTableView Types2=TQObject,TQTableView
LibDisplayName=libqt 1.x LibDisplayName=libqt 1.x
ShlibRE=libqt\.so\.1$ ShlibRE=libqt\.so\.1$
[QString] [TQString]
Display={ % } Display={ % }
Expr1=(%s).shd->data Expr1=(%s).shd->data
[QObject] [TQObject]
Display={ name=% #chld=% } Display={ name=% #chld=% }
Expr1=(%s).objname Expr1=(%s).objname
Expr2=(%s).childObjects->numNodes Expr2=(%s).childObjects->numNodes
[QTableView] [TQTableView]
Alias=QObject</pre> Alias=TQObject</pre>
Замечание: гораздо безопаснее заключать <tt>%s</tt> в скобки. Замечание: гораздо безопаснее заключать <tt>%s</tt> в скобки.
</body> </body>
</html> </html>

@ -9,16 +9,16 @@
/* /*
* Description of environment variables. Note that the name of the variable * Description of environment variables. Note that the name of the variable
* is given as the key in the QDict, so we don't repeat it here. * is given as the key in the TQDict, so we don't repeat it here.
*/ */
class QListViewItem; class TQListViewItem;
struct EnvVar { struct EnvVar {
QString value; TQString value;
enum EnvVarStatus { EVclean, EVdirty, EVnew, EVdeleted }; enum EnvVarStatus { EVclean, EVdirty, EVnew, EVdeleted };
EnvVarStatus status; EnvVarStatus status;
QListViewItem* item; TQListViewItem* item;
}; };
#endif // ENVVAR_H #endif // ENVVAR_H

@ -7,9 +7,9 @@
#include "exprwnd.h" #include "exprwnd.h"
#include "exprwnd.moc" #include "exprwnd.moc"
#include "typetable.h" #include "typetable.h"
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qpainter.h> #include <ntqpainter.h>
#include <qscrollbar.h> #include <ntqscrollbar.h>
#include <kapplication.h> #include <kapplication.h>
#include <kiconloader.h> /* icons */ #include <kiconloader.h> /* icons */
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
@ -18,8 +18,8 @@
#endif #endif
#include "mydebug.h" #include "mydebug.h"
VarTree::VarTree(VarTree* parent, QListViewItem* after, ExprValue* v) : VarTree::VarTree(VarTree* parent, TQListViewItem* after, ExprValue* v) :
QListViewItem(parent, after), TQListViewItem(parent, after),
m_varKind(v->m_varKind), m_varKind(v->m_varKind),
m_nameKind(v->m_nameKind), m_nameKind(v->m_nameKind),
m_type(0), m_type(0),
@ -29,14 +29,14 @@ VarTree::VarTree(VarTree* parent, QListViewItem* after, ExprValue* v) :
m_baseChanged(false), m_baseChanged(false),
m_structChanged(false) m_structChanged(false)
{ {
QListViewItem::setText(0, v->m_name); TQListViewItem::setText(0, v->m_name);
updateValueText(); updateValueText();
setExpandable(m_varKind == VarTree::VKpointer); setExpandable(m_varKind == VarTree::VKpointer);
setOpen(v->m_initiallyExpanded); setOpen(v->m_initiallyExpanded);
} }
VarTree::VarTree(ExprWnd* parent, QListViewItem* after, const QString& name) : VarTree::VarTree(ExprWnd* parent, TQListViewItem* after, const TQString& name) :
QListViewItem(parent, after), TQListViewItem(parent, after),
m_varKind(VKsimple), m_varKind(VKsimple),
m_nameKind(VarTree::NKplain), m_nameKind(VarTree::NKplain),
m_type(0), m_type(0),
@ -45,25 +45,25 @@ VarTree::VarTree(ExprWnd* parent, QListViewItem* after, const QString& name) :
m_baseChanged(false), m_baseChanged(false),
m_structChanged(false) m_structChanged(false)
{ {
QListViewItem::setText(0, name); TQListViewItem::setText(0, name);
} }
VarTree::~VarTree() VarTree::~VarTree()
{ {
} }
void VarTree::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align) void VarTree::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align)
{ {
if (column == 1 && (m_baseChanged || m_structChanged)) { if (column == 1 && (m_baseChanged || m_structChanged)) {
QColorGroup cgChg = cg; TQColorGroup cgChg = cg;
cgChg.setColor(QColorGroup::Text, Qt::red); cgChg.setColor(TQColorGroup::Text, TQt::red);
QListViewItem::paintCell(p, cgChg, column, width, align); TQListViewItem::paintCell(p, cgChg, column, width, align);
} else { } else {
QListViewItem::paintCell(p, cg, column, width, align); TQListViewItem::paintCell(p, cg, column, width, align);
} }
} }
QString VarTree::computeExpr() const TQString VarTree::computeExpr() const
{ {
// top-level items are special // top-level items are special
if (isToplevelExpr()) if (isToplevelExpr())
@ -71,14 +71,14 @@ QString VarTree::computeExpr() const
// get parent expr // get parent expr
VarTree* par = static_cast<VarTree*>(parent()); VarTree* par = static_cast<VarTree*>(parent());
QString parentExpr = par->computeExpr(); TQString parentExpr = par->computeExpr();
// skip this item's name if it is a base class or anonymous struct or union // skip this item's name if it is a base class or anonymous struct or union
if (m_nameKind == NKtype || m_nameKind == NKanonymous) { if (m_nameKind == NKtype || m_nameKind == NKanonymous) {
return parentExpr; return parentExpr;
} }
/* augment by this item's text */ /* augment by this item's text */
QString result; TQString result;
/* if this is an address, dereference it */ /* if this is an address, dereference it */
if (m_nameKind == NKaddress) { if (m_nameKind == NKaddress) {
ASSERT(par->m_varKind == VKpointer); ASSERT(par->m_varKind == VKpointer);
@ -88,7 +88,7 @@ QString VarTree::computeExpr() const
switch (par->m_varKind) { switch (par->m_varKind) {
case VKarray: case VKarray:
{ {
QString index = getText(); TQString index = getText();
int i = 1; int i = 1;
// skip past the index // skip past the index
while (index[i].isDigit()) while (index[i].isDigit())
@ -124,14 +124,14 @@ bool VarTree::isToplevelExpr() const
bool VarTree::isAncestorEq(const VarTree* child) const bool VarTree::isAncestorEq(const VarTree* child) const
{ {
const QListViewItem* c = child; const TQListViewItem* c = child;
while (c != 0 && c != this) { while (c != 0 && c != this) {
c = c->parent(); c = c->parent();
} }
return c != 0; return c != 0;
} }
bool VarTree::updateValue(const QString& newValue) bool VarTree::updateValue(const TQString& newValue)
{ {
// check whether the value changed // check whether the value changed
bool prevValueChanged = m_baseChanged; bool prevValueChanged = m_baseChanged;
@ -148,7 +148,7 @@ bool VarTree::updateValue(const QString& newValue)
return m_baseChanged || prevValueChanged; return m_baseChanged || prevValueChanged;
} }
bool VarTree::updateStructValue(const QString& newValue) bool VarTree::updateStructValue(const TQString& newValue)
{ {
// check whether the value changed // check whether the value changed
bool prevValueChanged = m_structChanged; bool prevValueChanged = m_structChanged;
@ -168,11 +168,11 @@ bool VarTree::updateStructValue(const QString& newValue)
void VarTree::updateValueText() void VarTree::updateValueText()
{ {
if (m_baseValue.isEmpty()) { if (m_baseValue.isEmpty()) {
QListViewItem::setText(1, m_structValue); TQListViewItem::setText(1, m_structValue);
} else if (m_structValue.isEmpty()) { } else if (m_structValue.isEmpty()) {
QListViewItem::setText(1, m_baseValue); TQListViewItem::setText(1, m_baseValue);
} else { } else {
QListViewItem::setText(1, m_baseValue + " " + m_structValue); TQListViewItem::setText(1, m_baseValue + " " + m_structValue);
} }
} }
@ -197,7 +197,7 @@ void VarTree::inferTypesOfChildren(ProgramTypeTable& typeTable)
{ {
/* /*
* wchart_t pointers must be treated as struct, because the array * wchart_t pointers must be treated as struct, because the array
* of characters is printed similar to how QStrings are decoded. * of characters is printed similar to how TQStrings are decoded.
*/ */
m_varKind = VKstruct; m_varKind = VKstruct;
setExpandable(false); setExpandable(false);
@ -206,7 +206,7 @@ void VarTree::inferTypesOfChildren(ProgramTypeTable& typeTable)
} else if (m_varKind == VKstruct) { } else if (m_varKind == VKstruct) {
// check if this is a base class part // check if this is a base class part
if (m_nameKind == NKtype) { if (m_nameKind == NKtype) {
const QString& typeName = const TQString& typeName =
getText().mid(1, getText().length()-2); // strip < and > getText().mid(1, getText().length()-2); // strip < and >
m_type = typeTable.lookup(typeName); m_type = typeTable.lookup(typeName);
@ -263,7 +263,7 @@ TypeInfo* VarTree::inferTypeFromBaseClass()
return 0; return 0;
} }
ExprValue::ExprValue(const QString& name, VarTree::NameKind aKind) : ExprValue::ExprValue(const TQString& name, VarTree::NameKind aKind) :
m_name(name), m_name(name),
m_varKind(VarTree::VKsimple), m_varKind(VarTree::VKsimple),
m_nameKind(aKind), m_nameKind(aKind),
@ -306,8 +306,8 @@ int ExprValue::childCount() const
ExprWnd::ExprWnd(QWidget* parent, const QString& colHeader, const char* name) : ExprWnd::ExprWnd(TQWidget* parent, const TQString& colHeader, const char* name) :
QListView(parent, name), TQListView(parent, name),
m_edit(0) m_edit(0)
{ {
addColumn(colHeader); addColumn(colHeader);
@ -327,9 +327,9 @@ ExprWnd::~ExprWnd()
{ {
} }
QStringList ExprWnd::exprList() const TQStringList ExprWnd::exprList() const
{ {
QStringList exprs; TQStringList exprs;
VarTree* item; VarTree* item;
for (item = firstChild(); item != 0; item = item->nextSibling()) { for (item = firstChild(); item != 0; item = item->nextSibling()) {
exprs.append(item->getText()); exprs.append(item->getText());
@ -542,7 +542,7 @@ void ExprWnd::replaceChildren(VarTree* display, ExprValue* newValues)
void ExprWnd::collectUnknownTypes(VarTree* var) void ExprWnd::collectUnknownTypes(VarTree* var)
{ {
QListViewItemIterator i(var); TQListViewItemIterator i(var);
for (; i.current(); ++i) for (; i.current(); ++i)
{ {
checkUnknownType(static_cast<VarTree*>(i.current())); checkUnknownType(static_cast<VarTree*>(i.current()));
@ -575,7 +575,7 @@ void ExprWnd::checkUnknownType(VarTree* var)
} }
} }
QString ExprWnd::formatWCharPointer(QString value) TQString ExprWnd::formatWCharPointer(TQString value)
{ {
int pos = value.find(") "); int pos = value.find(") ");
if (pos > 0) if (pos > 0)
@ -584,7 +584,7 @@ QString ExprWnd::formatWCharPointer(QString value)
} }
VarTree* ExprWnd::topLevelExprByName(const QString& name) const VarTree* ExprWnd::topLevelExprByName(const TQString& name) const
{ {
VarTree* item = firstChild(); VarTree* item = firstChild();
while (item != 0 && item->getText() != name) while (item != 0 && item->getText() != name)
@ -593,7 +593,7 @@ VarTree* ExprWnd::topLevelExprByName(const QString& name) const
return item; return item;
} }
VarTree* ExprWnd::ptrMemberByName(VarTree* v, const QString& name) VarTree* ExprWnd::ptrMemberByName(VarTree* v, const TQString& name)
{ {
// v must be a pointer variable, must have children // v must be a pointer variable, must have children
if (v->m_varKind != VarTree::VKpointer || v->childCount() == 0) if (v->m_varKind != VarTree::VKpointer || v->childCount() == 0)
@ -604,7 +604,7 @@ VarTree* ExprWnd::ptrMemberByName(VarTree* v, const QString& name)
return memberByName(item, name); return memberByName(item, name);
} }
VarTree* ExprWnd::memberByName(VarTree* v, const QString& name) VarTree* ExprWnd::memberByName(VarTree* v, const TQString& name)
{ {
// search immediate children for name // search immediate children for name
VarTree* item = v->firstChild(); VarTree* item = v->firstChild();
@ -700,17 +700,17 @@ VarTree* ExprWnd::nextUpdateStruct()
} }
void ExprWnd::editValue(VarTree* item, const QString& text) void ExprWnd::editValue(VarTree* item, const TQString& text)
{ {
if (m_edit == 0) if (m_edit == 0)
m_edit = new ValueEdit(this); m_edit = new ValueEdit(this);
QRect r = itemRect(item); TQRect r = itemRect(item);
int x = r.x()+columnWidth(0); int x = r.x()+columnWidth(0);
int y = r.y(); int y = r.y();
int w = columnWidth(1); int w = columnWidth(1);
int h = r.height(); int h = r.height();
QListView* lv = item->listView(); TQListView* lv = item->listView();
/* /*
* Make the edit widget at least 5 characters wide (but not wider than * Make the edit widget at least 5 characters wide (but not wider than
@ -718,7 +718,7 @@ void ExprWnd::editValue(VarTree* item, const QString& text)
* the text, scroll this widget so that half of it shows the text (or * the text, scroll this widget so that half of it shows the text (or
* less than half of it if the text is shorter). * less than half of it if the text is shorter).
*/ */
QFontMetrics metr = m_edit->font(); TQFontMetrics metr = m_edit->font();
int wMin = metr.width("88888"); int wMin = metr.width("88888");
if (w < wMin) if (w < wMin)
w = wMin; w = wMin;
@ -727,7 +727,7 @@ void ExprWnd::editValue(VarTree* item, const QString& text)
x+w > wThis) // not all text is visible x+w > wThis) // not all text is visible
{ {
// scroll so that more text is visible // scroll so that more text is visible
int wScroll = QMIN(x-wThis/2, x+w-wThis); int wScroll = TQMIN(x-wThis/2, x+w-wThis);
lv->scrollBy(wScroll, 0); lv->scrollBy(wScroll, 0);
x -= wScroll; x -= wScroll;
} }
@ -738,7 +738,7 @@ void ExprWnd::editValue(VarTree* item, const QString& text)
} }
// make the edit box as wide as the visible column // make the edit box as wide as the visible column
QRect rect(x,y, wThis-x,h); TQRect rect(x,y, wThis-x,h);
m_edit->setText(text); m_edit->setText(text);
m_edit->selectAll(); m_edit->selectAll();
@ -756,17 +756,17 @@ bool ExprWnd::isEditing() const
ValueEdit::ValueEdit(ExprWnd* parent) : ValueEdit::ValueEdit(ExprWnd* parent) :
QLineEdit(parent->viewport(), "valueedit") TQLineEdit(parent->viewport(), "valueedit")
{ {
setFrame(false); setFrame(false);
hide(); hide();
lower(); // lower the window below scrollbars lower(); // lower the window below scrollbars
connect(parent, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); connect(parent, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
connect(parent, SIGNAL(currentChanged(QListViewItem*)), SLOT(slotSelectionChanged())); connect(parent, SIGNAL(currentChanged(TQListViewItem*)), SLOT(slotSelectionChanged()));
connect(parent, SIGNAL(expanded(QListViewItem*)), SLOT(slotSelectionChanged())); connect(parent, SIGNAL(expanded(TQListViewItem*)), SLOT(slotSelectionChanged()));
connect(parent, SIGNAL(collapsed(QListViewItem*)), SLOT(slotSelectionChanged())); connect(parent, SIGNAL(collapsed(TQListViewItem*)), SLOT(slotSelectionChanged()));
connect(this, SIGNAL(done(VarTree*, const QString&)), connect(this, SIGNAL(done(VarTree*, const TQString&)),
parent, SIGNAL(editValueCommitted(VarTree*, const QString&))); parent, SIGNAL(editValueCommitted(VarTree*, const TQString&)));
} }
ValueEdit::~ValueEdit() ValueEdit::~ValueEdit()
@ -786,29 +786,29 @@ void ValueEdit::terminate(bool commit)
} }
} }
void ValueEdit::keyPressEvent(QKeyEvent *e) void ValueEdit::keyPressEvent(TQKeyEvent *e)
{ {
if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) if(e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter)
terminate(true); terminate(true);
else if(e->key() == Qt::Key_Escape) else if(e->key() == TQt::Key_Escape)
terminate(false); terminate(false);
else else
QLineEdit::keyPressEvent(e); TQLineEdit::keyPressEvent(e);
} }
void ValueEdit::paintEvent(QPaintEvent* e) void ValueEdit::paintEvent(TQPaintEvent* e)
{ {
QLineEdit::paintEvent(e); TQLineEdit::paintEvent(e);
QPainter p(this); TQPainter p(this);
p.drawRect(rect()); p.drawRect(rect());
} }
void ValueEdit::focusOutEvent(QFocusEvent* ev) void ValueEdit::focusOutEvent(TQFocusEvent* ev)
{ {
TRACE("ValueEdit::focusOutEvent"); TRACE("ValueEdit::focusOutEvent");
QFocusEvent* focusEv = static_cast<QFocusEvent*>(ev); TQFocusEvent* focusEv = static_cast<TQFocusEvent*>(ev);
if (focusEv->reason() == QFocusEvent::ActiveWindow) if (focusEv->reason() == TQFocusEvent::ActiveWindow)
{ {
// Switching to a different window should terminate the edit, // Switching to a different window should terminate the edit,
// because if the window with this variable display is floating // because if the window with this variable display is floating
@ -818,7 +818,7 @@ void ValueEdit::focusOutEvent(QFocusEvent* ev)
terminate(false); terminate(false);
} }
// Don't let a RMB close the editor // Don't let a RMB close the editor
else if (focusEv->reason() != QFocusEvent::Popup) else if (focusEv->reason() != TQFocusEvent::Popup)
{ {
terminate(true); terminate(true);
} }

@ -7,19 +7,19 @@
#ifndef EXPRWND_H #ifndef EXPRWND_H
#define EXPRWND_H #define EXPRWND_H
#include "qlistview.h" #include "ntqlistview.h"
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qpixmap.h> #include <ntqpixmap.h>
#include <list> #include <list>
class ProgramTypeTable; class ProgramTypeTable;
class TypeInfo; class TypeInfo;
struct ExprValue; struct ExprValue;
class ExprWnd; class ExprWnd;
class QStringList; class TQStringList;
/*! \brief a variable's value is the tree of sub-variables */ /*! \brief a variable's value is the tree of sub-variables */
class VarTree : public QListViewItem class VarTree : public TQListViewItem
{ {
public: public:
enum VarKind { VKsimple, VKpointer, VKstruct, VKarray, enum VarKind { VKsimple, VKpointer, VKstruct, VKarray,
@ -34,21 +34,21 @@ public:
TypeInfo* m_type; //!< the type of struct if it could be derived TypeInfo* m_type; //!< the type of struct if it could be derived
int m_exprIndex; //!< used in struct value update int m_exprIndex; //!< used in struct value update
bool m_exprIndexUseGuard; //!< ditto; if guard expr should be used bool m_exprIndexUseGuard; //!< ditto; if guard expr should be used
QString m_partialValue; //!< while struct value update is in progress TQString m_partialValue; //!< while struct value update is in progress
VarTree(VarTree* parent, QListViewItem* after, ExprValue* v); VarTree(VarTree* parent, TQListViewItem* after, ExprValue* v);
VarTree(ExprWnd* parent, QListViewItem* after, const QString& name); VarTree(ExprWnd* parent, TQListViewItem* after, const TQString& name);
virtual ~VarTree(); virtual ~VarTree();
public: public:
virtual void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); virtual void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align);
QString computeExpr() const; TQString computeExpr() const;
bool isToplevelExpr() const; bool isToplevelExpr() const;
/** is this element an ancestor of (or equal to) child? */ /** is this element an ancestor of (or equal to) child? */
bool isAncestorEq(const VarTree* child) const; bool isAncestorEq(const VarTree* child) const;
/** update the regular value; returns whether a repaint is necessary */ /** update the regular value; returns whether a repaint is necessary */
bool updateValue(const QString& newValue); bool updateValue(const TQString& newValue);
/** update the "quick member" value; returns whether repaint is necessary */ /** update the "quick member" value; returns whether repaint is necessary */
bool updateStructValue(const QString& newValue); bool updateStructValue(const TQString& newValue);
/** find out the type of this value using the child values */ /** find out the type of this value using the child values */
void inferTypesOfChildren(ProgramTypeTable& typeTable); void inferTypesOfChildren(ProgramTypeTable& typeTable);
/** get the type from base class part */ /** get the type from base class part */
@ -56,17 +56,17 @@ public:
/** returns whether the pointer is a wchar_t */ /** returns whether the pointer is a wchar_t */
bool isWcharT() const; bool isWcharT() const;
QString getText() const { return text(0); } TQString getText() const { return text(0); }
void setText(const QString& t) { QListViewItem::setText(0, t); } void setText(const TQString& t) { TQListViewItem::setText(0, t); }
void setPixmap(const QPixmap& p) { QListViewItem::setPixmap(0, p); } void setPixmap(const TQPixmap& p) { TQListViewItem::setPixmap(0, p); }
QString value() const { return m_baseValue; } TQString value() const { return m_baseValue; }
VarTree* firstChild() const { return static_cast<VarTree*>(QListViewItem::firstChild()); } VarTree* firstChild() const { return static_cast<VarTree*>(TQListViewItem::firstChild()); }
VarTree* nextSibling() const { return static_cast<VarTree*>(QListViewItem::nextSibling()); } VarTree* nextSibling() const { return static_cast<VarTree*>(TQListViewItem::nextSibling()); }
private: private:
void updateValueText(); void updateValueText();
QString m_baseValue; //!< The "normal value" that the driver reported TQString m_baseValue; //!< The "normal value" that the driver reported
QString m_structValue; //!< The "quick member" value TQString m_structValue; //!< The "quick member" value
bool m_baseChanged : 1; bool m_baseChanged : 1;
bool m_structChanged : 1; bool m_structChanged : 1;
}; };
@ -76,15 +76,15 @@ private:
*/ */
struct ExprValue struct ExprValue
{ {
QString m_name; TQString m_name;
QString m_value; TQString m_value;
VarTree::VarKind m_varKind; VarTree::VarKind m_varKind;
VarTree::NameKind m_nameKind; VarTree::NameKind m_nameKind;
ExprValue* m_child; /* the first child expression */ ExprValue* m_child; /* the first child expression */
ExprValue* m_next; /* the next sibling expression */ ExprValue* m_next; /* the next sibling expression */
bool m_initiallyExpanded; bool m_initiallyExpanded;
ExprValue(const QString& name, VarTree::NameKind kind); ExprValue(const TQString& name, VarTree::NameKind kind);
~ExprValue(); ~ExprValue();
void appendChild(ExprValue* newChild); void appendChild(ExprValue* newChild);
@ -92,7 +92,7 @@ struct ExprValue
}; };
class ValueEdit : public QLineEdit class ValueEdit : public TQLineEdit
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -103,25 +103,25 @@ public:
VarTree* m_item; VarTree* m_item;
bool m_finished; bool m_finished;
protected: protected:
void keyPressEvent(QKeyEvent *e); void keyPressEvent(TQKeyEvent *e);
void focusOutEvent(QFocusEvent* ev); void focusOutEvent(TQFocusEvent* ev);
void paintEvent(QPaintEvent* e); void paintEvent(TQPaintEvent* e);
public slots: public slots:
void slotSelectionChanged(); void slotSelectionChanged();
signals: signals:
void done(VarTree*, const QString&); void done(VarTree*, const TQString&);
}; };
class ExprWnd : public QListView class ExprWnd : public TQListView
{ {
Q_OBJECT Q_OBJECT
public: public:
ExprWnd(QWidget* parent, const QString& colHeader, const char* name); ExprWnd(TQWidget* parent, const TQString& colHeader, const char* name);
~ExprWnd(); ~ExprWnd();
/** returns the list with the expressions at the topmost level */ /** returns the list with the expressions at the topmost level */
QStringList exprList() const; TQStringList exprList() const;
/** appends a copy of expr to the end of the tree at the topmost level; /** appends a copy of expr to the end of the tree at the topmost level;
* returns a pointer to the inserted top-level item */ * returns a pointer to the inserted top-level item */
VarTree* insertExpr(ExprValue* expr, ProgramTypeTable& typeTable); VarTree* insertExpr(ExprValue* expr, ProgramTypeTable& typeTable);
@ -133,11 +133,11 @@ public:
/** updates only the value of the node */ /** updates only the value of the node */
void updateStructValue(VarTree* display); void updateStructValue(VarTree* display);
/** get a top-level expression by name */ /** get a top-level expression by name */
VarTree* topLevelExprByName(const QString& name) const; VarTree* topLevelExprByName(const TQString& name) const;
/** return a member of the struct that pointer \a v refers to */ /** return a member of the struct that pointer \a v refers to */
static VarTree* ptrMemberByName(VarTree* v, const QString& name); static VarTree* ptrMemberByName(VarTree* v, const TQString& name);
/** return a member of the struct \a v */ /** return a member of the struct \a v */
static VarTree* memberByName(VarTree* v, const QString& name); static VarTree* memberByName(VarTree* v, const TQString& name);
/** removes an expression; must be on the topmost level*/ /** removes an expression; must be on the topmost level*/
void removeExpr(VarTree* item); void removeExpr(VarTree* item);
/** clears the list of pointers needing updates */ /** clears the list of pointers needing updates */
@ -146,21 +146,21 @@ public:
VarTree* nextUpdatePtr(); VarTree* nextUpdatePtr();
VarTree* nextUpdateType(); VarTree* nextUpdateType();
VarTree* nextUpdateStruct(); VarTree* nextUpdateStruct();
void editValue(VarTree* item, const QString& text); void editValue(VarTree* item, const TQString& text);
/** tells whether the a value is currently edited */ /** tells whether the a value is currently edited */
bool isEditing() const; bool isEditing() const;
VarTree* firstChild() const { return static_cast<VarTree*>(QListView::firstChild()); } VarTree* firstChild() const { return static_cast<VarTree*>(TQListView::firstChild()); }
VarTree* currentItem() const { return static_cast<VarTree*>(QListView::currentItem()); } VarTree* currentItem() const { return static_cast<VarTree*>(TQListView::currentItem()); }
VarTree* selectedItem() const { return static_cast<VarTree*>(QListView::selectedItem()); } VarTree* selectedItem() const { return static_cast<VarTree*>(TQListView::selectedItem()); }
protected: protected:
void updateExprRec(VarTree* display, ExprValue* newValues, ProgramTypeTable& typeTable); void updateExprRec(VarTree* display, ExprValue* newValues, ProgramTypeTable& typeTable);
void replaceChildren(VarTree* display, ExprValue* newValues); void replaceChildren(VarTree* display, ExprValue* newValues);
void collectUnknownTypes(VarTree* item); void collectUnknownTypes(VarTree* item);
void checkUnknownType(VarTree* item); void checkUnknownType(VarTree* item);
static QString formatWCharPointer(QString value); static TQString formatWCharPointer(TQString value);
QPixmap m_pixPointer; TQPixmap m_pixPointer;
std::list<VarTree*> m_updatePtrs; //!< dereferenced pointers that need update std::list<VarTree*> m_updatePtrs; //!< dereferenced pointers that need update
std::list<VarTree*> m_updateType; //!< structs whose type must be determined std::list<VarTree*> m_updateType; //!< structs whose type must be determined
@ -174,7 +174,7 @@ protected:
signals: signals:
void removingItem(VarTree*); void removingItem(VarTree*);
void editValueCommitted(VarTree*, const QString&); void editValueCommitted(VarTree*, const TQString&);
}; };
#endif // EXPRWND_H #endif // EXPRWND_H

@ -6,8 +6,8 @@
#include "gdbdriver.h" #include "gdbdriver.h"
#include "exprwnd.h" #include "exprwnd.h"
#include <qregexp.h> #include <ntqregexp.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> /* strtol, atoi */ #include <stdlib.h> /* strtol, atoi */
@ -22,7 +22,7 @@
static void skipString(const char*& p); static void skipString(const char*& p);
static void skipNested(const char*& s, char opening, char closing); static void skipNested(const char*& s, char opening, char closing);
static ExprValue* parseVar(const char*& s); static ExprValue* parseVar(const char*& s);
static bool parseName(const char*& s, QString& name, VarTree::NameKind& kind); static bool parseName(const char*& s, TQString& name, VarTree::NameKind& kind);
static bool parseValue(const char*& s, ExprValue* variable); static bool parseValue(const char*& s, ExprValue* variable);
static bool parseNested(const char*& s, ExprValue* variable); static bool parseNested(const char*& s, ExprValue* variable);
static bool parseVarSeq(const char*& s, ExprValue* variable); static bool parseVarSeq(const char*& s, ExprValue* variable);
@ -47,10 +47,10 @@ struct GdbCmdInfo {
}; };
#if 0 #if 0
// This is how the QString data print statement generally looks like. // This is how the TQString data print statement generally looks like.
// It is set by KDebugger via setPrintQStringDataCmd(). // It is set by KDebugger via setPrintTQStringDataCmd().
static const char printQStringStructFmt[] = static const char printTQStringStructFmt[] =
// if the string data is junk, fail early // if the string data is junk, fail early
"print ($qstrunicode=($qstrdata=(%s))->unicode)?" "print ($qstrunicode=($qstrdata=(%s))->unicode)?"
// print an array of shorts // print an array of shorts
@ -60,7 +60,7 @@ static const char printQStringStructFmt[] =
// if unicode data is 0, report a special value // if unicode data is 0, report a special value
":1==0\n"; ":1==0\n";
#endif #endif
static const char printQStringStructFmt[] = "print (0?\"%s\":$kdbgundef)\n"; static const char printTQStringStructFmt[] = "print (0?\"%s\":$kdbgundef)\n";
/* /*
* The following array of commands must be sorted by the DC* values, * The following array of commands must be sorted by the DC* values,
@ -106,7 +106,7 @@ static GdbCmdInfo cmds[] = {
{ DCprint, "print %s\n", GdbCmdInfo::argString }, { DCprint, "print %s\n", GdbCmdInfo::argString },
{ DCprintDeref, "print *(%s)\n", GdbCmdInfo::argString }, { DCprintDeref, "print *(%s)\n", GdbCmdInfo::argString },
{ DCprintStruct, "print %s\n", GdbCmdInfo::argString }, { DCprintStruct, "print %s\n", GdbCmdInfo::argString },
{ DCprintQStringStruct, printQStringStructFmt, GdbCmdInfo::argString}, { DCprintTQStringStruct, printTQStringStructFmt, GdbCmdInfo::argString},
{ DCframe, "frame %d\n", GdbCmdInfo::argNum }, { DCframe, "frame %d\n", GdbCmdInfo::argNum },
{ DCfindType, "whatis %s\n", GdbCmdInfo::argString }, { DCfindType, "whatis %s\n", GdbCmdInfo::argString },
{ DCinfosharedlib, "info sharedlibrary\n", GdbCmdInfo::argNone }, { DCinfosharedlib, "info sharedlibrary\n", GdbCmdInfo::argNone },
@ -185,7 +185,7 @@ GdbDriver::GdbDriver() :
break; break;
} }
} }
assert(strlen(printQStringStructFmt) <= MAX_FMTLEN); assert(strlen(printTQStringStructFmt) <= MAX_FMTLEN);
#endif #endif
} }
@ -194,12 +194,12 @@ GdbDriver::~GdbDriver()
} }
QString GdbDriver::driverName() const TQString GdbDriver::driverName() const
{ {
return "GDB"; return "GDB";
} }
QString GdbDriver::defaultGdb() TQString GdbDriver::defaultGdb()
{ {
return return
"gdb" "gdb"
@ -207,7 +207,7 @@ QString GdbDriver::defaultGdb()
" --nx"; /* do not execute initialization files */ " --nx"; /* do not execute initialization files */
} }
QString GdbDriver::defaultInvocation() const TQString GdbDriver::defaultInvocation() const
{ {
if (m_defaultCmd.isEmpty()) { if (m_defaultCmd.isEmpty()) {
return defaultGdb(); return defaultGdb();
@ -216,13 +216,13 @@ QString GdbDriver::defaultInvocation() const
} }
} }
QStringList GdbDriver::boolOptionList() const TQStringList GdbDriver::boolOptionList() const
{ {
// no options // no options
return QStringList(); return TQStringList();
} }
bool GdbDriver::startup(QString cmdStr) bool GdbDriver::startup(TQString cmdStr)
{ {
if (!DebuggerDriver::startup(cmdStr)) if (!DebuggerDriver::startup(cmdStr))
return false; return false;
@ -263,8 +263,8 @@ bool GdbDriver::startup(QString cmdStr)
executeCmdString(DCinitialize, gdbInitialize, false); executeCmdString(DCinitialize, gdbInitialize, false);
// assume that QString::null is ok // assume that TQString::null is ok
cmds[DCprintQStringStruct].fmt = printQStringStructFmt; cmds[DCprintTQStringStruct].fmt = printTQStringStructFmt;
return true; return true;
} }
@ -284,7 +284,7 @@ void GdbDriver::commandFinished(CmdQueueItem* cmd)
// get version number from preamble // get version number from preamble
{ {
int len; int len;
QRegExp GDBVersion("\\nGDB [0-9]+\\.[0-9]+"); TQRegExp GDBVersion("\\nGDB [0-9]+\\.[0-9]+");
int offset = GDBVersion.match(m_output, 0, &len); int offset = GDBVersion.match(m_output, 0, &len);
if (offset >= 0) { if (offset >= 0) {
char* start = m_output + offset + 5; // skip "\nGDB " char* start = m_output + offset + 5; // skip "\nGDB "
@ -320,7 +320,7 @@ void GdbDriver::commandFinished(CmdQueueItem* cmd)
* because at least OpenSUSE writes its own version number * because at least OpenSUSE writes its own version number
* in the first line (but before GDB's version number). * in the first line (but before GDB's version number).
*/ */
QRegExp re( TQRegExp re(
" " // must be preceded by space " " // must be preceded by space
"[(]?" // SLES 10 embeds in parentheses "[(]?" // SLES 10 embeds in parentheses
"(\\d+)\\.(\\d+)" // major, minor "(\\d+)\\.(\\d+)" // major, minor
@ -376,7 +376,7 @@ void GdbDriver::parseMarker()
// extract the marker // extract the marker
startMarker += 2; startMarker += 2;
TRACE(QString("found marker: ") + startMarker); TRACE(TQString("found marker: ") + startMarker);
char* endMarker = strchr(startMarker, '\n'); char* endMarker = strchr(startMarker, '\n');
if (endMarker == 0) if (endMarker == 0)
return; return;
@ -384,7 +384,7 @@ void GdbDriver::parseMarker()
*endMarker = '\0'; *endMarker = '\0';
// extract filename and line number // extract filename and line number
static QRegExp MarkerRE(":[0-9]+:[0-9]+:[begmidl]+:0x"); static TQRegExp MarkerRE(":[0-9]+:[0-9]+:[begmidl]+:0x");
int len; int len;
int lineNoStart = MarkerRE.match(startMarker, 0, &len); int lineNoStart = MarkerRE.match(startMarker, 0, &len);
@ -393,7 +393,7 @@ void GdbDriver::parseMarker()
// get address // get address
const char* addrStart = startMarker + lineNoStart + len - 2; const char* addrStart = startMarker + lineNoStart + len - 2;
DbgAddr address = QString(addrStart).stripWhiteSpace(); DbgAddr address = TQString(addrStart).stripWhiteSpace();
// now show the window // now show the window
startMarker[lineNoStart] = '\0'; /* split off file name */ startMarker[lineNoStart] = '\0'; /* split off file name */
@ -406,7 +406,7 @@ void GdbDriver::parseMarker()
* Escapes characters that might lead to problems when they appear on gdb's * Escapes characters that might lead to problems when they appear on gdb's
* command line. * command line.
*/ */
static void normalizeStringArg(QString& arg) static void normalizeStringArg(TQString& arg)
{ {
/* /*
* Remove trailing backslashes. This approach is a little simplistic, * Remove trailing backslashes. This approach is a little simplistic,
@ -419,7 +419,7 @@ static void normalizeStringArg(QString& arg)
} }
QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg) TQString GdbDriver::makeCmdString(DbgCommand cmd, TQString strArg)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == GdbCmdInfo::argString); assert(cmds[cmd].argsNeeded == GdbCmdInfo::argString);
@ -437,22 +437,22 @@ QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg)
strArg = m_redirect + " " + strArg; strArg = m_redirect + " " + strArg;
} }
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, strArg.latin1()); cmdString.sprintf(cmds[cmd].fmt, strArg.latin1());
return cmdString; return cmdString;
} }
QString GdbDriver::makeCmdString(DbgCommand cmd, int intArg) TQString GdbDriver::makeCmdString(DbgCommand cmd, int intArg)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == GdbCmdInfo::argNum); assert(cmds[cmd].argsNeeded == GdbCmdInfo::argNum);
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, intArg); cmdString.sprintf(cmds[cmd].fmt, intArg);
return cmdString; return cmdString;
} }
QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg) TQString GdbDriver::makeCmdString(DbgCommand cmd, TQString strArg, int intArg)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == GdbCmdInfo::argStringNum || assert(cmds[cmd].argsNeeded == GdbCmdInfo::argStringNum ||
@ -462,7 +462,7 @@ QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg)
normalizeStringArg(strArg); normalizeStringArg(strArg);
QString cmdString; TQString cmdString;
if (cmd == DCtty) if (cmd == DCtty)
{ {
@ -525,7 +525,7 @@ QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg)
} }
break; break;
} }
QString spec; TQString spec;
spec.sprintf("/%d%c%c", count, sizeSpec, formatSpec); spec.sprintf("/%d%c%c", count, sizeSpec, formatSpec);
return makeCmdString(DCexamine, spec, strArg); return makeCmdString(DCexamine, spec, strArg);
@ -555,7 +555,7 @@ QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg)
return cmdString; return cmdString;
} }
QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg1, QString strArg2) TQString GdbDriver::makeCmdString(DbgCommand cmd, TQString strArg1, TQString strArg2)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == GdbCmdInfo::argString2); assert(cmds[cmd].argsNeeded == GdbCmdInfo::argString2);
@ -563,17 +563,17 @@ QString GdbDriver::makeCmdString(DbgCommand cmd, QString strArg1, QString strArg
normalizeStringArg(strArg1); normalizeStringArg(strArg1);
normalizeStringArg(strArg2); normalizeStringArg(strArg2);
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, strArg1.latin1(), strArg2.latin1()); cmdString.sprintf(cmds[cmd].fmt, strArg1.latin1(), strArg2.latin1());
return cmdString; return cmdString;
} }
QString GdbDriver::makeCmdString(DbgCommand cmd, int intArg1, int intArg2) TQString GdbDriver::makeCmdString(DbgCommand cmd, int intArg1, int intArg2)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == GdbCmdInfo::argNum2); assert(cmds[cmd].argsNeeded == GdbCmdInfo::argNum2);
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, intArg1, intArg2); cmdString.sprintf(cmds[cmd].fmt, intArg1, intArg2);
return cmdString; return cmdString;
} }
@ -590,7 +590,7 @@ CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, bool clearLow)
return executeCmdString(cmd, cmds[cmd].fmt, clearLow); return executeCmdString(cmd, cmds[cmd].fmt, clearLow);
} }
CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, QString strArg, CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, TQString strArg,
bool clearLow) bool clearLow)
{ {
return executeCmdString(cmd, makeCmdString(cmd, strArg), clearLow); return executeCmdString(cmd, makeCmdString(cmd, strArg), clearLow);
@ -603,13 +603,13 @@ CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, int intArg,
return executeCmdString(cmd, makeCmdString(cmd, intArg), clearLow); return executeCmdString(cmd, makeCmdString(cmd, intArg), clearLow);
} }
CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, QString strArg, int intArg, CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, TQString strArg, int intArg,
bool clearLow) bool clearLow)
{ {
return executeCmdString(cmd, makeCmdString(cmd, strArg, intArg), clearLow); return executeCmdString(cmd, makeCmdString(cmd, strArg, intArg), clearLow);
} }
CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, QString strArg1, QString strArg2, CmdQueueItem* GdbDriver::executeCmd(DbgCommand cmd, TQString strArg1, TQString strArg2,
bool clearLow) bool clearLow)
{ {
return executeCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), clearLow); return executeCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), clearLow);
@ -626,7 +626,7 @@ CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, QueueMode mode)
return queueCmdString(cmd, cmds[cmd].fmt, mode); return queueCmdString(cmd, cmds[cmd].fmt, mode);
} }
CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, QString strArg, CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, TQString strArg,
QueueMode mode) QueueMode mode)
{ {
return queueCmdString(cmd, makeCmdString(cmd, strArg), mode); return queueCmdString(cmd, makeCmdString(cmd, strArg), mode);
@ -638,13 +638,13 @@ CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, int intArg,
return queueCmdString(cmd, makeCmdString(cmd, intArg), mode); return queueCmdString(cmd, makeCmdString(cmd, intArg), mode);
} }
CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, QString strArg, int intArg, CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, TQString strArg, int intArg,
QueueMode mode) QueueMode mode)
{ {
return queueCmdString(cmd, makeCmdString(cmd, strArg, intArg), mode); return queueCmdString(cmd, makeCmdString(cmd, strArg, intArg), mode);
} }
CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, QString strArg1, QString strArg2, CmdQueueItem* GdbDriver::queueCmd(DbgCommand cmd, TQString strArg1, TQString strArg2,
QueueMode mode) QueueMode mode)
{ {
return queueCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), mode); return queueCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), mode);
@ -706,11 +706,11 @@ static bool parseErrorMessage(const char*& output,
{ {
if (wantErrorValue) { if (wantErrorValue) {
// put the error message as value in the variable // put the error message as value in the variable
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
const char* endMsg = strchr(output, '\n'); const char* endMsg = strchr(output, '\n');
if (endMsg == 0) if (endMsg == 0)
endMsg = output + strlen(output); endMsg = output + strlen(output);
variable->m_value = QString::fromLatin1(output, endMsg-output); variable->m_value = TQString::fromLatin1(output, endMsg-output);
} else { } else {
variable = 0; variable = 0;
} }
@ -719,8 +719,8 @@ static bool parseErrorMessage(const char*& output,
return false; return false;
} }
#if QT_VERSION >= 300 #if TQT_VERSION >= 300
union Qt2QChar { union TQt2TQChar {
short s; short s;
struct { struct {
uchar row; uchar row;
@ -729,16 +729,16 @@ union Qt2QChar {
}; };
#endif #endif
void GdbDriver::setPrintQStringDataCmd(const char* cmd) void GdbDriver::setPrintTQStringDataCmd(const char* cmd)
{ {
// don't accept the command if it is empty // don't accept the command if it is empty
if (cmd == 0 || *cmd == '\0') if (cmd == 0 || *cmd == '\0')
return; return;
assert(strlen(cmd) <= MAX_FMTLEN); assert(strlen(cmd) <= MAX_FMTLEN);
cmds[DCprintQStringStruct].fmt = cmd; cmds[DCprintTQStringStruct].fmt = cmd;
} }
ExprValue* GdbDriver::parseQCharArray(const char* output, bool wantErrorValue, bool qt3like) ExprValue* GdbDriver::parseTQCharArray(const char* output, bool wantErrorValue, bool qt3like)
{ {
ExprValue* variable = 0; ExprValue* variable = 0;
@ -752,7 +752,7 @@ ExprValue* GdbDriver::parseQCharArray(const char* output, bool wantErrorValue, b
// special case: empty string (0 repetitions) // special case: empty string (0 repetitions)
if (strncmp(output, "Invalid number 0 of repetitions", 31) == 0) if (strncmp(output, "Invalid number 0 of repetitions", 31) == 0)
{ {
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
variable->m_value = "\"\""; variable->m_value = "\"\"";
return variable; return variable;
} }
@ -780,8 +780,8 @@ ExprValue* GdbDriver::parseQCharArray(const char* output, bool wantErrorValue, b
p++; /* skip '{' */ p++; /* skip '{' */
// parse the array // parse the array
QString result; TQString result;
QString repeatCount; TQString repeatCount;
enum { wasNothing, wasChar, wasRepeat } lastThing = wasNothing; enum { wasNothing, wasChar, wasRepeat } lastThing = wasNothing;
/* /*
* A matrix for separators between the individual "things" * A matrix for separators between the individual "things"
@ -810,22 +810,22 @@ ExprValue* GdbDriver::parseQCharArray(const char* output, bool wantErrorValue, b
if (p == 0) if (p == 0)
goto error; goto error;
p++; /* skip '>' */ p++; /* skip '>' */
repeatCount = QString::fromLatin1(start, p-start); repeatCount = TQString::fromLatin1(start, p-start);
while (isspace(*p) || *p == ',') while (isspace(*p) || *p == ',')
p++; p++;
} }
// p is now at the next char (or the end) // p is now at the next char (or the end)
// interpret the value as a QChar // interpret the value as a TQChar
// TODO: make cross-architecture compatible // TODO: make cross-architecture compatible
QChar ch; TQChar ch;
if (qt3like) { if (qt3like) {
ch = QChar(value); ch = TQChar(value);
} else { } else {
#if QT_VERSION < 300 #if TQT_VERSION < 300
(unsigned short&)ch = value; (unsigned short&)ch = value;
#else #else
Qt2QChar c; TQt2TQChar c;
c.s = value; c.s = value;
ch.setRow(c.qch.row); ch.setRow(c.qch.row);
ch.setCell(c.qch.cell); ch.setCell(c.qch.cell);
@ -870,17 +870,17 @@ ExprValue* GdbDriver::parseQCharArray(const char* output, bool wantErrorValue, b
result += "\""; result += "\"";
// assign the value // assign the value
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
variable->m_value = result; variable->m_value = result;
} }
else if (strncmp(p, "true", 4) == 0) else if (strncmp(p, "true", 4) == 0)
{ {
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
variable->m_value = "QString::null"; variable->m_value = "TQString::null";
} }
else if (strncmp(p, "false", 5) == 0) else if (strncmp(p, "false", 5) == 0)
{ {
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
variable->m_value = "(null)"; variable->m_value = "(null)";
} }
else else
@ -889,7 +889,7 @@ ExprValue* GdbDriver::parseQCharArray(const char* output, bool wantErrorValue, b
error: error:
if (wantErrorValue) { if (wantErrorValue) {
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
variable->m_value = "internal parse error"; variable->m_value = "internal parse error";
} }
return variable; return variable;
@ -903,7 +903,7 @@ static ExprValue* parseVar(const char*& s)
while (isspace(*p)) while (isspace(*p))
p++; p++;
QString name; TQString name;
VarTree::NameKind kind; VarTree::NameKind kind;
/* /*
* Detect anonymouse struct values: The 'name =' part is missing: * Detect anonymouse struct values: The 'name =' part is missing:
@ -930,7 +930,7 @@ static ExprValue* parseVar(const char*& s)
while (isspace(*p)) while (isspace(*p))
p++; p++;
if (*p != '=') { if (*p != '=') {
TRACE(QString().sprintf("parse error: = not found after %s", (const char*)name)); TRACE(TQString().sprintf("parse error: = not found after %s", (const char*)name));
return 0; return 0;
} }
// skip the '=' and more whitespace // skip the '=' and more whitespace
@ -969,7 +969,7 @@ static void skipNested(const char*& s, char opening, char closing)
p++; p++;
} }
if (nest != 0) { if (nest != 0) {
TRACE(QString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s)); TRACE(TQString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s));
} }
s = p; s = p;
} }
@ -1012,7 +1012,7 @@ static void skipNestedAngles(const char*& s)
p++; p++;
} }
if (nest != 0) { if (nest != 0) {
TRACE(QString().sprintf("parse error: mismatching <> at %-20.20s", s)); TRACE(TQString().sprintf("parse error: mismatching <> at %-20.20s", s));
} }
s = p; s = p;
} }
@ -1116,7 +1116,7 @@ static void skipNestedWithString(const char*& s, char opening, char closing)
p++; p++;
} }
if (nest > 0) { if (nest > 0) {
TRACE(QString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s)); TRACE(TQString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s));
} }
s = p; s = p;
} }
@ -1128,7 +1128,7 @@ inline void skipName(const char*& p)
p++; p++;
} }
static bool parseName(const char*& s, QString& name, VarTree::NameKind& kind) static bool parseName(const char*& s, TQString& name, VarTree::NameKind& kind)
{ {
kind = VarTree::NKplain; kind = VarTree::NKplain;
@ -1140,7 +1140,7 @@ static bool parseName(const char*& s, QString& name, VarTree::NameKind& kind)
if (*p == '<') { if (*p == '<') {
skipNestedAngles(p); skipNestedAngles(p);
name = QString::fromLatin1(s, p - s); name = TQString::fromLatin1(s, p - s);
kind = VarTree::NKtype; kind = VarTree::NKtype;
} }
else else
@ -1148,7 +1148,7 @@ static bool parseName(const char*& s, QString& name, VarTree::NameKind& kind)
// name, which might be "static"; allow dot for "_vtbl." // name, which might be "static"; allow dot for "_vtbl."
skipName(p); skipName(p);
if (p == s) { if (p == s) {
TRACE(QString().sprintf("parse error: not a name %-20.20s", s)); TRACE(TQString().sprintf("parse error: not a name %-20.20s", s));
return false; return false;
} }
int len = p - s; int len = p - s;
@ -1161,12 +1161,12 @@ static bool parseName(const char*& s, QString& name, VarTree::NameKind& kind)
s = p; s = p;
skipName(p); skipName(p);
if (p == s) { if (p == s) {
TRACE(QString().sprintf("parse error: not a name after static %-20.20s", s)); TRACE(TQString().sprintf("parse error: not a name after static %-20.20s", s));
return false; return false;
} }
len = p - s; len = p - s;
} }
name = QString::fromLatin1(s, len); name = TQString::fromLatin1(s, len);
} }
// return the new position // return the new position
s = p; s = p;
@ -1189,7 +1189,7 @@ repeat:
{ {
const char* start = s; const char* start = s;
skipNested(s, '{', '}'); skipNested(s, '{', '}');
variable->m_value = QString::fromLatin1(start, s-start); variable->m_value = TQString::fromLatin1(start, s-start);
variable->m_value += ' '; // add only a single space variable->m_value += ' '; // add only a single space
while (isspace(*s)) while (isspace(*s))
s++; s++;
@ -1234,13 +1234,13 @@ repeat:
const char*p = s; const char*p = s;
// check for type // check for type
QString type; TQString type;
if (*p == '(') { if (*p == '(') {
skipNested(p, '(', ')'); skipNested(p, '(', ')');
while (isspace(*p)) while (isspace(*p))
p++; p++;
variable->m_value = QString::fromLatin1(s, p - s); variable->m_value = TQString::fromLatin1(s, p - s);
} }
bool reference = false; bool reference = false;
@ -1348,7 +1348,7 @@ repeat:
if (*p == '(') if (*p == '(')
skipNested(p, '(', ')'); skipNested(p, '(', ')');
} }
variable->m_value += QString::fromLatin1(start, p - start); variable->m_value += TQString::fromLatin1(start, p - start);
// remove line breaks from the value; this is ok since // remove line breaks from the value; this is ok since
// string values never contain a literal line break // string values never contain a literal line break
@ -1372,7 +1372,7 @@ repeat:
if (p != start) { if (p != start) {
// there is always a blank before the string, // there is always a blank before the string,
// which we will include in the final string value // which we will include in the final string value
variable->m_value += QString::fromLatin1(start-1, (p - start)+1); variable->m_value += TQString::fromLatin1(start-1, (p - start)+1);
// if this was a pointer, reset that flag since we // if this was a pointer, reset that flag since we
// now got the value // now got the value
variable->m_varKind = VarTree::VKsimple; variable->m_varKind = VarTree::VKsimple;
@ -1475,7 +1475,7 @@ static bool parseValueSeq(const char*& s, ExprValue* variable)
int index = 0; int index = 0;
bool good; bool good;
for (;;) { for (;;) {
QString name; TQString name;
name.sprintf("[%d]", index); name.sprintf("[%d]", index);
ExprValue* var = new ExprValue(name, VarTree::NKplain); ExprValue* var = new ExprValue(name, VarTree::NKplain);
good = parseValue(s, var); good = parseValue(s, var);
@ -1493,7 +1493,7 @@ static bool parseValueSeq(const char*& s, ExprValue* variable)
delete var; delete var;
return false; return false;
} }
TRACE(QString().sprintf("found <repeats %d times> in array", l)); TRACE(TQString().sprintf("found <repeats %d times> in array", l));
// replace name and advance index // replace name and advance index
name.sprintf("[%d .. %d]", index, index+l-1); name.sprintf("[%d .. %d]", index, index+l-1);
var->m_name = name; var->m_name = name;
@ -1532,8 +1532,8 @@ static bool parseValueSeq(const char*& s, ExprValue* variable)
/** /**
* Parses a stack frame. * Parses a stack frame.
*/ */
static void parseFrameInfo(const char*& s, QString& func, static void parseFrameInfo(const char*& s, TQString& func,
QString& file, int& lineNo, DbgAddr& address) TQString& file, int& lineNo, DbgAddr& address)
{ {
const char* p = s; const char* p = s;
@ -1545,7 +1545,7 @@ static void parseFrameInfo(const char*& s, QString& func,
p++; p++;
while (isxdigit(*p)) while (isxdigit(*p))
p++; p++;
address = QString::fromLatin1(start, p-start); address = TQString::fromLatin1(start, p-start);
if (strncmp(p, " in ", 4) == 0) if (strncmp(p, " in ", 4) == 0)
p += 4; p += 4;
} else { } else {
@ -1554,8 +1554,8 @@ static void parseFrameInfo(const char*& s, QString& func,
const char* start = p; const char* start = p;
// check for special signal handler frame // check for special signal handler frame
if (strncmp(p, "<signal handler called>", 23) == 0) { if (strncmp(p, "<signal handler called>", 23) == 0) {
func = QString::fromLatin1(start, 23); func = TQString::fromLatin1(start, 23);
file = QString(); file = TQString();
lineNo = -1; lineNo = -1;
s = p+23; s = p+23;
if (*s == '\n') if (*s == '\n')
@ -1600,7 +1600,7 @@ static void parseFrameInfo(const char*& s, QString& func,
if (*p == '\0') { if (*p == '\0') {
func = start; func = start;
file = QString(); file = TQString();
lineNo = -1; lineNo = -1;
s = p; s = p;
return; return;
@ -1637,7 +1637,7 @@ static void parseFrameInfo(const char*& s, QString& func,
do { do {
--colon; --colon;
} while (*colon != ':'); } while (*colon != ':');
file = QString::fromLatin1(fileStart, colon-fileStart); file = TQString::fromLatin1(fileStart, colon-fileStart);
lineNo = atoi(colon+1)-1; lineNo = atoi(colon+1)-1;
// skip new-line // skip new-line
if (*p != '\0') if (*p != '\0')
@ -1660,13 +1660,13 @@ static void parseFrameInfo(const char*& s, QString& func,
if (*p == '\0') { if (*p == '\0') {
func = start; func = start;
} else { } else {
func = QString::fromLatin1(start, p-start-1); /* don't include \n */ func = TQString::fromLatin1(start, p-start-1); /* don't include \n */
} }
s = p; s = p;
/* /*
* Replace \n (and whitespace around it) in func by a blank. We cannot * Replace \n (and whitespace around it) in func by a blank. We cannot
* use QString::simplifyWhiteSpace() for this because this would also * use TQString::simplifyWhiteSpace() for this because this would also
* simplify space that belongs to a string arguments that gdb sometimes * simplify space that belongs to a string arguments that gdb sometimes
* prints in the argument lists of the function. * prints in the argument lists of the function.
*/ */
@ -1694,8 +1694,8 @@ static void parseFrameInfo(const char*& s, QString& func,
/** /**
* Parses a stack frame including its frame number * Parses a stack frame including its frame number
*/ */
static bool parseFrame(const char*& s, int& frameNo, QString& func, static bool parseFrame(const char*& s, int& frameNo, TQString& func,
QString& file, int& lineNo, DbgAddr& address) TQString& file, int& lineNo, DbgAddr& address)
{ {
// Example: // Example:
// #1 0x8048881 in Dl::Dl (this=0xbffff418, r=3214) at testfile.cpp:72 // #1 0x8048881 in Dl::Dl (this=0xbffff418, r=3214) at testfile.cpp:72
@ -1727,7 +1727,7 @@ static bool parseFrame(const char*& s, int& frameNo, QString& func,
void GdbDriver::parseBackTrace(const char* output, std::list<StackFrame>& stack) void GdbDriver::parseBackTrace(const char* output, std::list<StackFrame>& stack)
{ {
QString func, file; TQString func, file;
int lineNo, frameNo; int lineNo, frameNo;
DbgAddr address; DbgAddr address;
@ -1743,9 +1743,9 @@ void GdbDriver::parseBackTrace(const char* output, std::list<StackFrame>& stack)
} }
bool GdbDriver::parseFrameChange(const char* output, int& frameNo, bool GdbDriver::parseFrameChange(const char* output, int& frameNo,
QString& file, int& lineNo, DbgAddr& address) TQString& file, int& lineNo, DbgAddr& address)
{ {
QString func; TQString func;
return ::parseFrame(output, frameNo, func, file, lineNo, address); return ::parseFrame(output, frameNo, func, file, lineNo, address);
} }
@ -1807,7 +1807,7 @@ bool GdbDriver::parseBreakList(const char* output, std::list<Breakpoint>& brks)
const char* start = p; const char* start = p;
while (*p != '\0' && !isspace(*p)) while (*p != '\0' && !isspace(*p))
p++; p++;
bp.address = QString::fromLatin1(start, p-start); bp.address = TQString::fromLatin1(start, p-start);
while (isspace(*p) && *p != '\n') while (isspace(*p) && *p != '\n')
p++; p++;
if (*p == '\0') if (*p == '\0')
@ -1819,7 +1819,7 @@ bool GdbDriver::parseBreakList(const char* output, std::list<Breakpoint>& brks)
bp.location = p; bp.location = p;
p += bp.location.length(); p += bp.location.length();
} else { } else {
bp.location = QString::fromLatin1(p, end-p).stripWhiteSpace(); bp.location = TQString::fromLatin1(p, end-p).stripWhiteSpace();
p = end+1; /* skip over \n */ p = end+1; /* skip over \n */
} }
@ -1838,20 +1838,20 @@ bool GdbDriver::parseBreakList(const char* output, std::list<Breakpoint>& brks)
// extract the hit count // extract the hit count
p += 22; p += 22;
bp.hitCount = strtol(p, &dummy, 10); bp.hitCount = strtol(p, &dummy, 10);
TRACE(QString("hit count %1").arg(bp.hitCount)); TRACE(TQString("hit count %1").arg(bp.hitCount));
} else if (strncmp(p, "stop only if ", 13) == 0) { } else if (strncmp(p, "stop only if ", 13) == 0) {
// extract condition // extract condition
p += 13; p += 13;
bp.condition = QString::fromLatin1(p, end-p).stripWhiteSpace(); bp.condition = TQString::fromLatin1(p, end-p).stripWhiteSpace();
TRACE("condition: "+bp.condition); TRACE("condition: "+bp.condition);
} else if (strncmp(p, "ignore next ", 12) == 0) { } else if (strncmp(p, "ignore next ", 12) == 0) {
// extract ignore count // extract ignore count
p += 12; p += 12;
bp.ignoreCount = strtol(p, &dummy, 10); bp.ignoreCount = strtol(p, &dummy, 10);
TRACE(QString("ignore count %1").arg(bp.ignoreCount)); TRACE(TQString("ignore count %1").arg(bp.ignoreCount));
} else { } else {
// indeed a continuation // indeed a continuation
bp.location += " " + QString::fromLatin1(p, end-p).stripWhiteSpace(); bp.location += " " + TQString::fromLatin1(p, end-p).stripWhiteSpace();
} }
p = end; p = end;
if (*p != '\0') if (*p != '\0')
@ -1904,7 +1904,7 @@ std::list<ThreadInfo> GdbDriver::parseThreadList(const char* output)
// syntax error; bail out // syntax error; bail out
return threads; return threads;
} }
thr.threadName = QString::fromLatin1(p, end-p); thr.threadName = TQString::fromLatin1(p, end-p);
p = end+2; p = end+2;
/* /*
@ -1925,12 +1925,12 @@ std::list<ThreadInfo> GdbDriver::parseThreadList(const char* output)
} }
static bool parseNewBreakpoint(const char* o, int& id, static bool parseNewBreakpoint(const char* o, int& id,
QString& file, int& lineNo, QString& address); TQString& file, int& lineNo, TQString& address);
static bool parseNewWatchpoint(const char* o, int& id, static bool parseNewWatchpoint(const char* o, int& id,
QString& expr); TQString& expr);
bool GdbDriver::parseBreakpoint(const char* output, int& id, bool GdbDriver::parseBreakpoint(const char* output, int& id,
QString& file, int& lineNo, QString& address) TQString& file, int& lineNo, TQString& address)
{ {
const char* o = output; const char* o = output;
// skip lines of that begin with "(Cannot find" // skip lines of that begin with "(Cannot find"
@ -1955,7 +1955,7 @@ bool GdbDriver::parseBreakpoint(const char* output, int& id,
} }
static bool parseNewBreakpoint(const char* o, int& id, static bool parseNewBreakpoint(const char* o, int& id,
QString& file, int& lineNo, QString& address) TQString& file, int& lineNo, TQString& address)
{ {
// breakpoint id // breakpoint id
char* p; char* p;
@ -1969,7 +1969,7 @@ static bool parseNewBreakpoint(const char* o, int& id,
p += 6; p += 6;
while (isxdigit(*p)) while (isxdigit(*p))
++p; ++p;
address = QString::fromLatin1(start, p-start); address = TQString::fromLatin1(start, p-start);
} }
// file name // file name
@ -1980,7 +1980,7 @@ static bool parseNewBreakpoint(const char* o, int& id,
// line number // line number
char* numStart = strstr(fileStart, ", line "); char* numStart = strstr(fileStart, ", line ");
QString fileName = QString::fromLatin1(fileStart, numStart-fileStart); TQString fileName = TQString::fromLatin1(fileStart, numStart-fileStart);
numStart += 7; numStart += 7;
int line = strtoul(numStart, &p, 10); int line = strtoul(numStart, &p, 10);
if (numStart == p) if (numStart == p)
@ -1992,7 +1992,7 @@ static bool parseNewBreakpoint(const char* o, int& id,
} }
static bool parseNewWatchpoint(const char* o, int& id, static bool parseNewWatchpoint(const char* o, int& id,
QString& expr) TQString& expr)
{ {
// watchpoint id // watchpoint id
char* p; char* p;
@ -2005,7 +2005,7 @@ static bool parseNewWatchpoint(const char* o, int& id,
p += 2; p += 2;
// all the rest on the line is the expression // all the rest on the line is the expression
expr = QString::fromLatin1(p, strlen(p)).stripWhiteSpace(); expr = TQString::fromLatin1(p, strlen(p)).stripWhiteSpace();
return true; return true;
} }
@ -2061,10 +2061,10 @@ ExprValue* GdbDriver::parsePrintExpr(const char* output, bool wantErrorValue)
return var; return var;
} }
bool GdbDriver::parseChangeWD(const char* output, QString& message) bool GdbDriver::parseChangeWD(const char* output, TQString& message)
{ {
bool isGood = false; bool isGood = false;
message = QString(output).simplifyWhiteSpace(); message = TQString(output).simplifyWhiteSpace();
if (message.isEmpty()) { if (message.isEmpty()) {
message = i18n("New working directory: ") + m_programWD; message = i18n("New working directory: ") + m_programWD;
isGood = true; isGood = true;
@ -2072,7 +2072,7 @@ bool GdbDriver::parseChangeWD(const char* output, QString& message)
return isGood; return isGood;
} }
bool GdbDriver::parseChangeExecutable(const char* output, QString& message) bool GdbDriver::parseChangeExecutable(const char* output, TQString& message)
{ {
message = output; message = output;
@ -2107,7 +2107,7 @@ bool GdbDriver::parseCoreFile(const char* output)
return m_haveCoreFile; return m_haveCoreFile;
} }
uint GdbDriver::parseProgramStopped(const char* output, QString& message) uint GdbDriver::parseProgramStopped(const char* output, TQString& message)
{ {
// optionally: "program changed, rereading symbols", // optionally: "program changed, rereading symbols",
// followed by: // followed by:
@ -2119,7 +2119,7 @@ uint GdbDriver::parseProgramStopped(const char* output, QString& message)
// go through the output, line by line, checking what we have // go through the output, line by line, checking what we have
const char* start = output - 1; const char* start = output - 1;
uint flags = SFprogramActive; uint flags = SFprogramActive;
message = QString(); message = TQString();
do { do {
start++; /* skip '\n' */ start++; /* skip '\n' */
@ -2143,7 +2143,7 @@ uint GdbDriver::parseProgramStopped(const char* output, QString& message)
const char* endOfMessage = strchr(start, '\n'); const char* endOfMessage = strchr(start, '\n');
if (endOfMessage == 0) if (endOfMessage == 0)
endOfMessage = start + strlen(start); endOfMessage = start + strlen(start);
message = QString::fromLatin1(start, endOfMessage-start); message = TQString::fromLatin1(start, endOfMessage-start);
} else if (strncmp(start, "Breakpoint ", 11) == 0) { } else if (strncmp(start, "Breakpoint ", 11) == 0) {
/* /*
* We stopped at a (permanent) breakpoint (gdb doesn't tell us * We stopped at a (permanent) breakpoint (gdb doesn't tell us
@ -2168,9 +2168,9 @@ uint GdbDriver::parseProgramStopped(const char* output, QString& message)
return flags; return flags;
} }
QStringList GdbDriver::parseSharedLibs(const char* output) TQStringList GdbDriver::parseSharedLibs(const char* output)
{ {
QStringList shlibs; TQStringList shlibs;
if (strncmp(output, "No shared libraries loaded", 26) == 0) if (strncmp(output, "No shared libraries loaded", 26) == 0)
return shlibs; return shlibs;
@ -2181,7 +2181,7 @@ QStringList GdbDriver::parseSharedLibs(const char* output)
if (output == 0) if (output == 0)
return shlibs; return shlibs;
output++; /* skip '\n' */ output++; /* skip '\n' */
QString shlibName; TQString shlibName;
while (*output != '\0') { while (*output != '\0') {
// format of a line is // format of a line is
// 0x404c5000 0x40580d90 Yes /lib/libc.so.5 // 0x404c5000 0x40580d90 Yes /lib/libc.so.5
@ -2200,7 +2200,7 @@ QStringList GdbDriver::parseSharedLibs(const char* output)
output = strchr(output, '\n'); output = strchr(output, '\n');
if (output == 0) if (output == 0)
output = start + strlen(start); output = start + strlen(start);
shlibName = QString::fromLatin1(start, output-start); shlibName = TQString::fromLatin1(start, output-start);
if (*output != '\0') if (*output != '\0')
output++; output++;
shlibs.append(shlibName); shlibs.append(shlibName);
@ -2209,7 +2209,7 @@ QStringList GdbDriver::parseSharedLibs(const char* output)
return shlibs; return shlibs;
} }
bool GdbDriver::parseFindType(const char* output, QString& type) bool GdbDriver::parseFindType(const char* output, TQString& type)
{ {
if (strncmp(output, "type = ", 7) != 0) if (strncmp(output, "type = ", 7) != 0)
return false; return false;
@ -2223,7 +2223,7 @@ bool GdbDriver::parseFindType(const char* output, QString& type)
if (strncmp(output, "const ", 6) == 0) if (strncmp(output, "const ", 6) == 0)
output += 6; output += 6;
type = output; type = output;
type.replace(QRegExp("\\s+"), ""); type.replace(TQRegExp("\\s+"), "");
if (type.endsWith("&")) if (type.endsWith("&"))
type.truncate(type.length() - 1); type.truncate(type.length() - 1);
return true; return true;
@ -2236,7 +2236,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
return regs; return regs;
} }
QString value; TQString value;
// parse register values // parse register values
while (*output != '\0') while (*output != '\0')
@ -2252,7 +2252,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
output++; output++;
if (*output == '\0') if (*output == '\0')
break; break;
reg.regName = QString::fromLatin1(start, output-start); reg.regName = TQString::fromLatin1(start, output-start);
// skip space // skip space
while (isspace(*output)) while (isspace(*output))
@ -2266,7 +2266,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
{ {
start = output; start = output;
skipNested(output, '{', '}'); skipNested(output, '{', '}');
value = QString::fromLatin1(start, output-start).simplifyWhiteSpace(); value = TQString::fromLatin1(start, output-start).simplifyWhiteSpace();
// skip space, but not the end of line // skip space, but not the end of line
while (isspace(*output) && *output != '\n') while (isspace(*output) && *output != '\n')
output++; output++;
@ -2283,7 +2283,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
start = output; start = output;
skipNested(output, '{', '}'); skipNested(output, '{', '}');
value = QString::fromLatin1(start, output-start).simplifyWhiteSpace(); value = TQString::fromLatin1(start, output-start).simplifyWhiteSpace();
} else { } else {
// for gdb 5.3 // for gdb 5.3
// find first type that does not have an array, this is the RAW value // find first type that does not have an array, this is the RAW value
@ -2300,7 +2300,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
end=cur; end=cur;
while (*end && (*end!='}') && (*end!=',') && (*end!='\n')) while (*end && (*end!='}') && (*end!=',') && (*end!='\n'))
end++; end++;
QString rawValue = QString::fromLatin1(cur, end-cur).simplifyWhiteSpace(); TQString rawValue = TQString::fromLatin1(cur, end-cur).simplifyWhiteSpace();
reg.rawValue = rawValue; reg.rawValue = rawValue;
if (rawValue.left(2)=="0x") { if (rawValue.left(2)=="0x") {
@ -2312,7 +2312,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
while (*cur!='{' && *cur!=' ') while (*cur!='{' && *cur!=' ')
cur--; cur--;
cur++; cur++;
reg.type = QString::fromLatin1(cur, end-cur); reg.type = TQString::fromLatin1(cur, end-cur);
} }
// end while loop // end while loop
@ -2337,7 +2337,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
output = strchr(output,'\n'); output = strchr(output,'\n');
if (output == 0) if (output == 0)
output = start + strlen(start); output = start + strlen(start);
value = QString::fromLatin1(start, output-start).simplifyWhiteSpace(); value = TQString::fromLatin1(start, output-start).simplifyWhiteSpace();
/* /*
* We split the raw from the cooked values. * We split the raw from the cooked values.
@ -2363,7 +2363,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
int pos = value.find(' '); int pos = value.find(' ');
if (pos < 0) { if (pos < 0) {
reg.rawValue = value; reg.rawValue = value;
reg.cookedValue = QString(); reg.cookedValue = TQString();
} else { } else {
reg.rawValue = value.left(pos); reg.rawValue = value.left(pos);
reg.cookedValue = value.mid(pos+1); reg.cookedValue = value.mid(pos+1);
@ -2378,7 +2378,7 @@ std::list<RegisterInfo> GdbDriver::parseRegisters(const char* output)
return regs; return regs;
} }
bool GdbDriver::parseInfoLine(const char* output, QString& addrFrom, QString& addrTo) bool GdbDriver::parseInfoLine(const char* output, TQString& addrFrom, TQString& addrTo)
{ {
// "is at address" or "starts at address" // "is at address" or "starts at address"
const char* start = strstr(output, "s at address "); const char* start = strstr(output, "s at address ");
@ -2389,7 +2389,7 @@ bool GdbDriver::parseInfoLine(const char* output, QString& addrFrom, QString& ad
const char* p = start; const char* p = start;
while (*p != '\0' && !isspace(*p)) while (*p != '\0' && !isspace(*p))
p++; p++;
addrFrom = QString::fromLatin1(start, p-start); addrFrom = TQString::fromLatin1(start, p-start);
start = strstr(p, "and ends at "); start = strstr(p, "and ends at ");
if (start == 0) { if (start == 0) {
@ -2401,7 +2401,7 @@ bool GdbDriver::parseInfoLine(const char* output, QString& addrFrom, QString& ad
p = start; p = start;
while (*p != '\0' && !isspace(*p)) while (*p != '\0' && !isspace(*p))
p++; p++;
addrTo = QString::fromLatin1(start, p-start); addrTo = TQString::fromLatin1(start, p-start);
return true; return true;
} }
@ -2438,7 +2438,7 @@ std::list<DisassembledCode> GdbDriver::parseDisassemble(const char* output)
// address // address
while (p != end && !isspace(*p)) while (p != end && !isspace(*p))
p++; p++;
c.address = QString::fromLatin1(start, p-start); c.address = TQString::fromLatin1(start, p-start);
// function name (enclosed in '<>', followed by ':') // function name (enclosed in '<>', followed by ':')
while (p != end && *p != '<') while (p != end && *p != '<')
@ -2459,17 +2459,17 @@ std::list<DisassembledCode> GdbDriver::parseDisassemble(const char* output)
if (p != end) /* include '\n' */ if (p != end) /* include '\n' */
p++; p++;
c.code = QString::fromLatin1(start, p-start); c.code = TQString::fromLatin1(start, p-start);
code.push_back(c); code.push_back(c);
} }
return code; return code;
} }
QString GdbDriver::parseMemoryDump(const char* output, std::list<MemoryDump>& memdump) TQString GdbDriver::parseMemoryDump(const char* output, std::list<MemoryDump>& memdump)
{ {
if (isErrorExpr(output)) { if (isErrorExpr(output)) {
// error; strip space // error; strip space
QString msg = output; TQString msg = output;
return msg.stripWhiteSpace(); return msg.stripWhiteSpace();
} }
@ -2482,7 +2482,7 @@ QString GdbDriver::parseMemoryDump(const char* output, std::list<MemoryDump>& me
const char* start = p; const char* start = p;
while (*p != '\0' && *p != ':' && !isspace(*p)) while (*p != '\0' && *p != ':' && !isspace(*p))
p++; p++;
md.address = QString::fromLatin1(start, p-start); md.address = TQString::fromLatin1(start, p-start);
if (*p != ':') { if (*p != ':') {
// parse function offset // parse function offset
while (isspace(*p)) while (isspace(*p))
@ -2490,7 +2490,7 @@ QString GdbDriver::parseMemoryDump(const char* output, std::list<MemoryDump>& me
start = p; start = p;
while (*p != '\0' && !(*p == ':' && isspace(p[1]))) while (*p != '\0' && !(*p == ':' && isspace(p[1])))
p++; p++;
md.address.fnoffs = QString::fromLatin1(start, p-start); md.address.fnoffs = TQString::fromLatin1(start, p-start);
} }
if (*p == ':') if (*p == ':')
p++; p++;
@ -2500,19 +2500,19 @@ QString GdbDriver::parseMemoryDump(const char* output, std::list<MemoryDump>& me
// everything to the end of the line is the memory dump // everything to the end of the line is the memory dump
const char* end = strchr(p, '\n'); const char* end = strchr(p, '\n');
if (end != 0) { if (end != 0) {
md.dump = QString::fromLatin1(p, end-p); md.dump = TQString::fromLatin1(p, end-p);
p = end+1; p = end+1;
} else { } else {
md.dump = QString::fromLatin1(p, strlen(p)); md.dump = TQString::fromLatin1(p, strlen(p));
p += strlen(p); p += strlen(p);
} }
memdump.push_back(md); memdump.push_back(md);
} }
return QString(); return TQString();
} }
QString GdbDriver::editableValue(VarTree* value) TQString GdbDriver::editableValue(VarTree* value)
{ {
const char* s = value->value().latin1(); const char* s = value->value().latin1();
@ -2550,10 +2550,10 @@ repeat:
++s; ++s;
if (*s == '"') { if (*s == '"') {
// a string // a string
return QString::fromLatin1(start, end-start); return TQString::fromLatin1(start, end-start);
} else { } else {
// other pointer // other pointer
return QString::fromLatin1(start, strlen(start)); return TQString::fromLatin1(start, strlen(start));
} }
} }
@ -2561,10 +2561,10 @@ repeat:
return s; return s;
} }
QString GdbDriver::parseSetVariable(const char* output) TQString GdbDriver::parseSetVariable(const char* output)
{ {
// if there is any output, it is an error message // if there is any output, it is an error message
QString msg = output; TQString msg = output;
return msg.stripWhiteSpace(); return msg.stripWhiteSpace();
} }

@ -17,75 +17,75 @@ public:
GdbDriver(); GdbDriver();
~GdbDriver(); ~GdbDriver();
virtual QString driverName() const; virtual TQString driverName() const;
virtual QString defaultInvocation() const; virtual TQString defaultInvocation() const;
virtual QStringList boolOptionList() const; virtual TQStringList boolOptionList() const;
void setDefaultInvocation(QString cmd) { m_defaultCmd = cmd; } void setDefaultInvocation(TQString cmd) { m_defaultCmd = cmd; }
static QString defaultGdb(); static TQString defaultGdb();
virtual bool startup(QString cmdStr); virtual bool startup(TQString cmdStr);
virtual void commandFinished(CmdQueueItem* cmd); virtual void commandFinished(CmdQueueItem* cmd);
virtual CmdQueueItem* executeCmd(DbgCommand, virtual CmdQueueItem* executeCmd(DbgCommand,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg, virtual CmdQueueItem* executeCmd(DbgCommand, TQString strArg,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem* executeCmd(DbgCommand, int intArg, virtual CmdQueueItem* executeCmd(DbgCommand, int intArg,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg, int intArg, virtual CmdQueueItem* executeCmd(DbgCommand, TQString strArg, int intArg,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg1, QString strArg2, virtual CmdQueueItem* executeCmd(DbgCommand, TQString strArg1, TQString strArg2,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem* executeCmd(DbgCommand, int intArg1, int intArg2, virtual CmdQueueItem* executeCmd(DbgCommand, int intArg1, int intArg2,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem* queueCmd(DbgCommand, virtual CmdQueueItem* queueCmd(DbgCommand,
QueueMode mode); QueueMode mode);
virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg, virtual CmdQueueItem* queueCmd(DbgCommand, TQString strArg,
QueueMode mode); QueueMode mode);
virtual CmdQueueItem* queueCmd(DbgCommand, int intArg, virtual CmdQueueItem* queueCmd(DbgCommand, int intArg,
QueueMode mode); QueueMode mode);
virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg, int intArg, virtual CmdQueueItem* queueCmd(DbgCommand, TQString strArg, int intArg,
QueueMode mode); QueueMode mode);
virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg1, QString strArg2, virtual CmdQueueItem* queueCmd(DbgCommand, TQString strArg1, TQString strArg2,
QueueMode mode); QueueMode mode);
virtual void terminate(); virtual void terminate();
virtual void detachAndTerminate(); virtual void detachAndTerminate();
virtual void interruptInferior(); virtual void interruptInferior();
virtual void setPrintQStringDataCmd(const char* cmd); virtual void setPrintTQStringDataCmd(const char* cmd);
virtual ExprValue* parseQCharArray(const char* output, bool wantErrorValue, bool qt3like); virtual ExprValue* parseTQCharArray(const char* output, bool wantErrorValue, bool qt3like);
virtual void parseBackTrace(const char* output, std::list<StackFrame>& stack); virtual void parseBackTrace(const char* output, std::list<StackFrame>& stack);
virtual bool parseFrameChange(const char* output, int& frameNo, virtual bool parseFrameChange(const char* output, int& frameNo,
QString& file, int& lineNo, DbgAddr& address); TQString& file, int& lineNo, DbgAddr& address);
virtual bool parseBreakList(const char* output, std::list<Breakpoint>& brks); virtual bool parseBreakList(const char* output, std::list<Breakpoint>& brks);
virtual std::list<ThreadInfo> parseThreadList(const char* output); virtual std::list<ThreadInfo> parseThreadList(const char* output);
virtual bool parseBreakpoint(const char* output, int& id, virtual bool parseBreakpoint(const char* output, int& id,
QString& file, int& lineNo, QString& address); TQString& file, int& lineNo, TQString& address);
virtual void parseLocals(const char* output, std::list<ExprValue*>& newVars); virtual void parseLocals(const char* output, std::list<ExprValue*>& newVars);
virtual ExprValue* parsePrintExpr(const char* output, bool wantErrorValue); virtual ExprValue* parsePrintExpr(const char* output, bool wantErrorValue);
virtual bool parseChangeWD(const char* output, QString& message); virtual bool parseChangeWD(const char* output, TQString& message);
virtual bool parseChangeExecutable(const char* output, QString& message); virtual bool parseChangeExecutable(const char* output, TQString& message);
virtual bool parseCoreFile(const char* output); virtual bool parseCoreFile(const char* output);
virtual uint parseProgramStopped(const char* output, QString& message); virtual uint parseProgramStopped(const char* output, TQString& message);
virtual QStringList parseSharedLibs(const char* output); virtual TQStringList parseSharedLibs(const char* output);
virtual bool parseFindType(const char* output, QString& type); virtual bool parseFindType(const char* output, TQString& type);
virtual std::list<RegisterInfo> parseRegisters(const char* output); virtual std::list<RegisterInfo> parseRegisters(const char* output);
virtual bool parseInfoLine(const char* output, virtual bool parseInfoLine(const char* output,
QString& addrFrom, QString& addrTo); TQString& addrFrom, TQString& addrTo);
virtual std::list<DisassembledCode> parseDisassemble(const char* output); virtual std::list<DisassembledCode> parseDisassemble(const char* output);
virtual QString parseMemoryDump(const char* output, std::list<MemoryDump>& memdump); virtual TQString parseMemoryDump(const char* output, std::list<MemoryDump>& memdump);
virtual QString parseSetVariable(const char* output); virtual TQString parseSetVariable(const char* output);
virtual QString editableValue(VarTree* value); virtual TQString editableValue(VarTree* value);
protected: protected:
int m_gdbMajor, m_gdbMinor; int m_gdbMajor, m_gdbMinor;
QString m_programWD; /* just an intermediate storage */ TQString m_programWD; /* just an intermediate storage */
QString m_redirect; /* redirection to /dev/null */ TQString m_redirect; /* redirection to /dev/null */
bool m_haveCoreFile; bool m_haveCoreFile;
QString m_defaultCmd; /* how to invoke gdb */ TQString m_defaultCmd; /* how to invoke gdb */
QString makeCmdString(DbgCommand cmd, QString strArg); TQString makeCmdString(DbgCommand cmd, TQString strArg);
QString makeCmdString(DbgCommand cmd, int intArg); TQString makeCmdString(DbgCommand cmd, int intArg);
QString makeCmdString(DbgCommand cmd, QString strArg, int intArg); TQString makeCmdString(DbgCommand cmd, TQString strArg, int intArg);
QString makeCmdString(DbgCommand cmd, QString strArg1, QString strArg2); TQString makeCmdString(DbgCommand cmd, TQString strArg1, TQString strArg2);
QString makeCmdString(DbgCommand cmd, int intArg1, int intArg2); TQString makeCmdString(DbgCommand cmd, int intArg1, int intArg2);
void parseMarker(); void parseMarker();
}; };

@ -88,12 +88,12 @@ int main(int argc, char** argv)
// handle options // handle options
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QString transcript = args->getOption("t"); TQString transcript = args->getOption("t");
QString remote = args->getOption("r"); TQString remote = args->getOption("r");
if (!remote.isEmpty()) if (!remote.isEmpty())
debugger->setRemoteDevice(remote); debugger->setRemoteDevice(remote);
QString lang = args->getOption("l"); TQString lang = args->getOption("l");
// deprecated option; overrides -l // deprecated option; overrides -l
if (args->isSet("x")){ if (args->isSet("x")){
@ -107,8 +107,8 @@ int main(int argc, char** argv)
} }
debugger->setTranscript(transcript); debugger->setTranscript(transcript);
QString pid = args->getOption("p"); TQString pid = args->getOption("p");
QString programArgs = args->getOption("a"); TQString programArgs = args->getOption("a");
if (!restored && args->count() > 0) { if (!restored && args->count() > 0) {
// attach to process? // attach to process?
@ -125,8 +125,8 @@ int main(int argc, char** argv)
TRACE("cannot start debugger"); TRACE("cannot start debugger");
KMessageBox::error(debugger, i18n("Cannot start debugger.")); KMessageBox::error(debugger, i18n("Cannot start debugger."));
debugger->setCoreFile(QString()); debugger->setCoreFile(TQString());
debugger->setAttachPid(QString()); debugger->setAttachPid(TQString());
} else { } else {
if (!programArgs.isEmpty()) { if (!programArgs.isEmpty()) {
debugger->overrideProgramArguments(programArgs); debugger->overrideProgramArguments(programArgs);

@ -10,9 +10,9 @@
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kstatusbar.h> #include <kstatusbar.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <qtabdialog.h> #include <ntqtabdialog.h>
#include <qfile.h> #include <ntqfile.h>
#include <qdragobject.h> #include <ntqdragobject.h>
#include "mainwndbase.h" #include "mainwndbase.h"
#include "debugger.h" #include "debugger.h"
#include "gdbdriver.h" #include "gdbdriver.h"
@ -37,8 +37,8 @@
#define MAX_RECENT_FILES 4 #define MAX_RECENT_FILES 4
WatchWindow::WatchWindow(QWidget* parent, const char* name, WFlags f) : WatchWindow::WatchWindow(TQWidget* parent, const char* name, WFlags f) :
QWidget(parent, name, f), TQWidget(parent, name, f),
m_watchEdit(this, "watch_edit"), m_watchEdit(this, "watch_edit"),
m_watchAdd(i18n(" Add "), this, "watch_add"), m_watchAdd(i18n(" Add "), this, "watch_add"),
m_watchDelete(i18n(" Del "), this, "watch_delete"), m_watchDelete(i18n(" Del "), this, "watch_delete"),
@ -58,7 +58,7 @@ WatchWindow::WatchWindow(QWidget* parent, const char* name, WFlags f) :
connect(&m_watchEdit, SIGNAL(returnPressed()), SIGNAL(addWatch())); connect(&m_watchEdit, SIGNAL(returnPressed()), SIGNAL(addWatch()));
connect(&m_watchAdd, SIGNAL(clicked()), SIGNAL(addWatch())); connect(&m_watchAdd, SIGNAL(clicked()), SIGNAL(addWatch()));
connect(&m_watchDelete, SIGNAL(clicked()), SIGNAL(deleteWatch())); connect(&m_watchDelete, SIGNAL(clicked()), SIGNAL(deleteWatch()));
connect(&m_watchVariables, SIGNAL(currentChanged(QListViewItem*)), connect(&m_watchVariables, SIGNAL(currentChanged(TQListViewItem*)),
SLOT(slotWatchHighlighted())); SLOT(slotWatchHighlighted()));
m_watchVariables.installEventFilter(this); m_watchVariables.installEventFilter(this);
@ -69,11 +69,11 @@ WatchWindow::~WatchWindow()
{ {
} }
bool WatchWindow::eventFilter(QObject*, QEvent* ev) bool WatchWindow::eventFilter(TQObject*, TQEvent* ev)
{ {
if (ev->type() == QEvent::KeyPress) if (ev->type() == TQEvent::KeyPress)
{ {
QKeyEvent* kev = static_cast<QKeyEvent*>(ev); TQKeyEvent* kev = static_cast<TQKeyEvent*>(ev);
if (kev->key() == Key_Delete) { if (kev->key() == Key_Delete) {
emit deleteWatch(); emit deleteWatch();
return true; return true;
@ -82,15 +82,15 @@ bool WatchWindow::eventFilter(QObject*, QEvent* ev)
return false; return false;
} }
void WatchWindow::dragEnterEvent(QDragEnterEvent* event) void WatchWindow::dragEnterEvent(TQDragEnterEvent* event)
{ {
event->accept(QTextDrag::canDecode(event)); event->accept(TQTextDrag::canDecode(event));
} }
void WatchWindow::dropEvent(QDropEvent* event) void WatchWindow::dropEvent(TQDropEvent* event)
{ {
QString text; TQString text;
if (QTextDrag::decode(event, text)) if (TQTextDrag::decode(event, text))
{ {
// pick only the first line // pick only the first line
text = text.stripWhiteSpace(); text = text.stripWhiteSpace();
@ -108,7 +108,7 @@ void WatchWindow::dropEvent(QDropEvent* event)
void WatchWindow::slotWatchHighlighted() void WatchWindow::slotWatchHighlighted()
{ {
VarTree* expr = m_watchVariables.selectedItem(); VarTree* expr = m_watchVariables.selectedItem();
QString text = expr ? expr->computeExpr() : QString(); TQString text = expr ? expr->computeExpr() : TQString();
m_watchEdit.setText(text); m_watchEdit.setText(text);
} }
@ -147,46 +147,46 @@ DebuggerMainWndBase::~DebuggerMainWndBase()
} }
} }
void DebuggerMainWndBase::setupDebugger(QWidget* parent, void DebuggerMainWndBase::setupDebugger(TQWidget* parent,
ExprWnd* localVars, ExprWnd* localVars,
ExprWnd* watchVars, ExprWnd* watchVars,
QListBox* backtrace) TQListBox* backtrace)
{ {
m_debugger = new KDebugger(parent, localVars, watchVars, backtrace); m_debugger = new KDebugger(parent, localVars, watchVars, backtrace);
QObject::connect(m_debugger, SIGNAL(updateStatusMessage()), TQObject::connect(m_debugger, SIGNAL(updateStatusMessage()),
parent, SLOT(slotNewStatusMsg())); parent, SLOT(slotNewStatusMsg()));
QObject::connect(m_debugger, SIGNAL(updateUI()), TQObject::connect(m_debugger, SIGNAL(updateUI()),
parent, SLOT(updateUI())); parent, SLOT(updateUI()));
QObject::connect(m_debugger, SIGNAL(breakpointsChanged()), TQObject::connect(m_debugger, SIGNAL(breakpointsChanged()),
parent, SLOT(updateLineItems())); parent, SLOT(updateLineItems()));
QObject::connect(m_debugger, SIGNAL(debuggerStarting()), TQObject::connect(m_debugger, SIGNAL(debuggerStarting()),
parent, SLOT(slotDebuggerStarting())); parent, SLOT(slotDebuggerStarting()));
} }
void DebuggerMainWndBase::setCoreFile(const QString& corefile) void DebuggerMainWndBase::setCoreFile(const TQString& corefile)
{ {
assert(m_debugger != 0); assert(m_debugger != 0);
m_debugger->useCoreFile(corefile, true); m_debugger->useCoreFile(corefile, true);
} }
void DebuggerMainWndBase::setRemoteDevice(const QString& remoteDevice) void DebuggerMainWndBase::setRemoteDevice(const TQString& remoteDevice)
{ {
if (m_debugger != 0) { if (m_debugger != 0) {
m_debugger->setRemoteDevice(remoteDevice); m_debugger->setRemoteDevice(remoteDevice);
} }
} }
void DebuggerMainWndBase::overrideProgramArguments(const QString& args) void DebuggerMainWndBase::overrideProgramArguments(const TQString& args)
{ {
assert(m_debugger != 0); assert(m_debugger != 0);
m_debugger->overrideProgramArguments(args); m_debugger->overrideProgramArguments(args);
} }
void DebuggerMainWndBase::setTranscript(const QString& name) void DebuggerMainWndBase::setTranscript(const TQString& name)
{ {
m_transcriptFile = name; m_transcriptFile = name;
if (m_debugger != 0 && m_debugger->driver() != 0) if (m_debugger != 0 && m_debugger->driver() != 0)
@ -253,25 +253,25 @@ void DebuggerMainWndBase::restoreSettings(KConfig* config)
m_headerFilter = config->readEntry(HeaderFileFilter, m_headerFilter); m_headerFilter = config->readEntry(HeaderFileFilter, m_headerFilter);
} }
void DebuggerMainWndBase::setAttachPid(const QString& pid) void DebuggerMainWndBase::setAttachPid(const TQString& pid)
{ {
assert(m_debugger != 0); assert(m_debugger != 0);
m_debugger->setAttachPid(pid); m_debugger->setAttachPid(pid);
} }
bool DebuggerMainWndBase::debugProgram(const QString& executable, bool DebuggerMainWndBase::debugProgram(const TQString& executable,
QString lang, QWidget* parent) TQString lang, TQWidget* parent)
{ {
assert(m_debugger != 0); assert(m_debugger != 0);
TRACE(QString("trying language '%1'...").arg(lang)); TRACE(TQString("trying language '%1'...").arg(lang));
DebuggerDriver* driver = driverFromLang(lang); DebuggerDriver* driver = driverFromLang(lang);
if (driver == 0) if (driver == 0)
{ {
// see if there is a language in the per-program config file // see if there is a language in the per-program config file
QString configName = m_debugger->getConfigForExe(executable); TQString configName = m_debugger->getConfigForExe(executable);
if (QFile::exists(configName)) if (TQFile::exists(configName))
{ {
KSimpleConfig c(configName, true); // read-only KSimpleConfig c(configName, true); // read-only
c.setGroup(GeneralGroup); c.setGroup(GeneralGroup);
@ -282,23 +282,23 @@ bool DebuggerMainWndBase::debugProgram(const QString& executable,
// that had only the GDB driver. // that had only the GDB driver.
lang = c.readEntry(KDebugger::DriverNameEntry, "GDB"); lang = c.readEntry(KDebugger::DriverNameEntry, "GDB");
TRACE(QString("...bad, trying config driver %1...").arg(lang)); TRACE(TQString("...bad, trying config driver %1...").arg(lang));
driver = driverFromLang(lang); driver = driverFromLang(lang);
} }
} }
if (driver == 0) if (driver == 0)
{ {
QString name = driverNameFromFile(executable); TQString name = driverNameFromFile(executable);
TRACE(QString("...no luck, trying %1 derived" TRACE(TQString("...no luck, trying %1 derived"
" from file contents").arg(name)); " from file contents").arg(name));
driver = driverFromLang(name); driver = driverFromLang(name);
} }
if (driver == 0) if (driver == 0)
{ {
// oops // oops
QString msg = i18n("Don't know how to debug language `%1'"); TQString msg = i18n("Don't know how to debug language `%1'");
KMessageBox::sorry(parent, msg.arg(lang)); KMessageBox::sorry(parent, msg.arg(lang));
return false; return false;
} }
@ -311,7 +311,7 @@ bool DebuggerMainWndBase::debugProgram(const QString& executable,
{ {
delete driver; delete driver;
QString msg = i18n("Could not start the debugger process.\n" TQString msg = i18n("Could not start the debugger process.\n"
"Please shut down KDbg and resolve the problem."); "Please shut down KDbg and resolve the problem.");
KMessageBox::sorry(parent, msg); KMessageBox::sorry(parent, msg);
} }
@ -320,7 +320,7 @@ bool DebuggerMainWndBase::debugProgram(const QString& executable,
} }
// derive driver from language // derive driver from language
DebuggerDriver* DebuggerMainWndBase::driverFromLang(QString lang) DebuggerDriver* DebuggerMainWndBase::driverFromLang(TQString lang)
{ {
// lang is needed in all lowercase // lang is needed in all lowercase
lang = lang.lower(); lang = lang.lower();
@ -352,7 +352,7 @@ DebuggerDriver* DebuggerMainWndBase::driverFromLang(QString lang)
continue; continue;
// lang must not be longer than the full name, and it must match // lang must not be longer than the full name, and it must match
if (QString(l.full).startsWith(lang)) if (TQString(l.full).startsWith(lang))
{ {
driverID = l.driver; driverID = l.driver;
break; break;
@ -380,7 +380,7 @@ DebuggerDriver* DebuggerMainWndBase::driverFromLang(QString lang)
/** /**
* Try to guess the language to use from the contents of the file. * Try to guess the language to use from the contents of the file.
*/ */
QString DebuggerMainWndBase::driverNameFromFile(const QString& exe) TQString DebuggerMainWndBase::driverNameFromFile(const TQString& exe)
{ {
/* Inprecise but simple test to see if file is in XSLT language */ /* Inprecise but simple test to see if file is in XSLT language */
if (exe.right(4).lower() == ".xsl") if (exe.right(4).lower() == ".xsl")
@ -390,16 +390,16 @@ QString DebuggerMainWndBase::driverNameFromFile(const QString& exe)
} }
// helper that gets a file name (it only differs in the caption of the dialog) // helper that gets a file name (it only differs in the caption of the dialog)
QString DebuggerMainWndBase::myGetFileName(QString caption, TQString DebuggerMainWndBase::myGetFileName(TQString caption,
QString dir, QString filter, TQString dir, TQString filter,
QWidget* parent) TQWidget* parent)
{ {
QString filename; TQString filename;
KFileDialog dlg(dir, filter, parent, "filedialog", true); KFileDialog dlg(dir, filter, parent, "filedialog", true);
dlg.setCaption(caption); dlg.setCaption(caption);
if (dlg.exec() == QDialog::Accepted) if (dlg.exec() == TQDialog::Accepted)
filename = dlg.selectedFile(); filename = dlg.selectedFile();
return filename; return filename;
@ -407,14 +407,14 @@ QString DebuggerMainWndBase::myGetFileName(QString caption,
void DebuggerMainWndBase::newStatusMsg(KStatusBar* statusbar) void DebuggerMainWndBase::newStatusMsg(KStatusBar* statusbar)
{ {
QString msg = m_debugger->statusMessage(); TQString msg = m_debugger->statusMessage();
statusbar->changeItem(msg, ID_STATUS_MSG); statusbar->changeItem(msg, ID_STATUS_MSG);
} }
void DebuggerMainWndBase::doGlobalOptions(QWidget* parent) void DebuggerMainWndBase::doGlobalOptions(TQWidget* parent)
{ {
QTabDialog dlg(parent, "global_options", true); TQTabDialog dlg(parent, "global_options", true);
QString title = kapp->caption(); TQString title = kapp->caption();
title += i18n(": Global options"); title += i18n(": Global options");
dlg.setCaption(title); dlg.setCaption(title);
dlg.setCancelButton(i18n("Cancel")); dlg.setCancelButton(i18n("Cancel"));
@ -434,7 +434,7 @@ void DebuggerMainWndBase::doGlobalOptions(QWidget* parent)
dlg.addTab(&prefDebugger, i18n("&Debugger")); dlg.addTab(&prefDebugger, i18n("&Debugger"));
dlg.addTab(&prefMisc, i18n("&Miscellaneous")); dlg.addTab(&prefMisc, i18n("&Miscellaneous"));
if (dlg.exec() == QDialog::Accepted) if (dlg.exec() == TQDialog::Accepted)
{ {
setDebuggerCmdStr(prefDebugger.debuggerCmd()); setDebuggerCmdStr(prefDebugger.debuggerCmd());
setTerminalCmd(prefDebugger.terminal()); setTerminalCmd(prefDebugger.terminal());
@ -457,25 +457,25 @@ const char fifoNameBase[] = "/tmp/kdbgttywin%05d";
* accidentally use the wrong close() function (I've been bitten ;-), * accidentally use the wrong close() function (I've been bitten ;-),
* outch!) (We use it for all the libc functions, to be consistent...) * outch!) (We use it for all the libc functions, to be consistent...)
*/ */
QString DebuggerMainWndBase::createOutputWindow() TQString DebuggerMainWndBase::createOutputWindow()
{ {
// create a name for a fifo // create a name for a fifo
QString fifoName; TQString fifoName;
fifoName.sprintf(fifoNameBase, ::getpid()); fifoName.sprintf(fifoNameBase, ::getpid());
// create a fifo that will pass in the tty name // create a fifo that will pass in the tty name
QFile::remove(fifoName); // remove remnants TQFile::remove(fifoName); // remove remnants
#ifdef HAVE_MKFIFO #ifdef HAVE_MKFIFO
if (::mkfifo(fifoName.local8Bit(), S_IRUSR|S_IWUSR) < 0) { if (::mkfifo(fifoName.local8Bit(), S_IRUSR|S_IWUSR) < 0) {
// failed // failed
TRACE("mkfifo " + fifoName + " failed"); TRACE("mkfifo " + fifoName + " failed");
return QString(); return TQString();
} }
#else #else
if (::mknod(fifoName.local8Bit(), S_IFIFO | S_IRUSR|S_IWUSR, 0) < 0) { if (::mknod(fifoName.local8Bit(), S_IFIFO | S_IRUSR|S_IWUSR, 0) < 0) {
// failed // failed
TRACE("mknod " + fifoName + " failed"); TRACE("mknod " + fifoName + " failed");
return QString(); return TQString();
} }
#endif #endif
@ -492,7 +492,7 @@ QString DebuggerMainWndBase::createOutputWindow()
"exec<&-;exec>&-;" /* close stdin and stdout */ "exec<&-;exec>&-;" /* close stdin and stdout */
"while :;do sleep 3600;done"; "while :;do sleep 3600;done";
// let config file override this script // let config file override this script
QString shellScript; TQString shellScript;
if (!m_outputTermKeepScript.isEmpty()) { if (!m_outputTermKeepScript.isEmpty()) {
shellScript = m_outputTermKeepScript; shellScript = m_outputTermKeepScript;
} else { } else {
@ -502,26 +502,26 @@ QString DebuggerMainWndBase::createOutputWindow()
shellScript.replace("%s", fifoName); shellScript.replace("%s", fifoName);
TRACE("output window script is " + shellScript); TRACE("output window script is " + shellScript);
QString title = kapp->caption(); TQString title = kapp->caption();
title += i18n(": Program output"); title += i18n(": Program output");
// parse the command line specified in the preferences // parse the command line specified in the preferences
QStringList cmdParts = QStringList::split(' ', m_outputTermCmdStr); TQStringList cmdParts = TQStringList::split(' ', m_outputTermCmdStr);
/* /*
* Build the argv array. Thereby substitute special sequences: * Build the argv array. Thereby substitute special sequences:
*/ */
struct { struct {
char seq[4]; char seq[4];
QString replace; TQString replace;
} substitute[] = { } substitute[] = {
{ "%T", title }, { "%T", title },
{ "%C", shellScript } { "%C", shellScript }
}; };
for (QStringList::iterator i = cmdParts.begin(); i != cmdParts.end(); ++i) for (TQStringList::iterator i = cmdParts.begin(); i != cmdParts.end(); ++i)
{ {
QString& str = *i; TQString& str = *i;
for (int j = sizeof(substitute)/sizeof(substitute[0])-1; j >= 0; j--) { for (int j = sizeof(substitute)/sizeof(substitute[0])-1; j >= 0; j--) {
int pos = str.find(substitute[j].seq); int pos = str.find(substitute[j].seq);
if (pos >= 0) { if (pos >= 0) {
@ -536,14 +536,14 @@ QString DebuggerMainWndBase::createOutputWindow()
if (m_outputTermProc->start()) if (m_outputTermProc->start())
{ {
QString tty; TQString tty;
// read the ttyname from the fifo // read the ttyname from the fifo
QFile f(fifoName); TQFile f(fifoName);
if (f.open(IO_ReadOnly)) if (f.open(IO_ReadOnly))
{ {
QByteArray t = f.readAll(); TQByteArray t = f.readAll();
tty = QString::fromLocal8Bit(t, t.size()); tty = TQString::fromLocal8Bit(t, t.size());
f.close(); f.close();
} }
f.remove(); f.remove();
@ -557,9 +557,9 @@ QString DebuggerMainWndBase::createOutputWindow()
{ {
// error, could not start xterm // error, could not start xterm
TRACE("fork failed for fifo " + fifoName); TRACE("fork failed for fifo " + fifoName);
QFile::remove(fifoName); TQFile::remove(fifoName);
shutdownTermWindow(); shutdownTermWindow();
return QString(); return TQString();
} }
} }
@ -569,7 +569,7 @@ void DebuggerMainWndBase::shutdownTermWindow()
m_outputTermProc = 0; m_outputTermProc = 0;
} }
void DebuggerMainWndBase::setTerminalCmd(const QString& cmd) void DebuggerMainWndBase::setTerminalCmd(const TQString& cmd)
{ {
m_outputTermCmdStr = cmd; m_outputTermCmdStr = cmd;
// revert to default if empty // revert to default if empty
@ -604,7 +604,7 @@ void DebuggerMainWndBase::slotDebuggerStarting()
m_ttyLevel = m_debugger->ttyLevel(); m_ttyLevel = m_debugger->ttyLevel();
QString ttyName; TQString ttyName;
switch (m_ttyLevel) { switch (m_ttyLevel) {
case KDebugger::ttySimpleOutputOnly: case KDebugger::ttySimpleOutputOnly:
ttyName = ttyWindow()->activate(); ttyName = ttyWindow()->activate();
@ -624,12 +624,12 @@ void DebuggerMainWndBase::slotDebuggerStarting()
} }
} }
void DebuggerMainWndBase::setDebuggerCmdStr(const QString& cmd) void DebuggerMainWndBase::setDebuggerCmdStr(const TQString& cmd)
{ {
m_debuggerCmdStr = cmd; m_debuggerCmdStr = cmd;
// make empty if it is the default // make empty if it is the default
if (m_debuggerCmdStr == GdbDriver::defaultGdb()) { if (m_debuggerCmdStr == GdbDriver::defaultGdb()) {
m_debuggerCmdStr = QString(); m_debuggerCmdStr = TQString();
} }
} }

@ -7,10 +7,10 @@
#ifndef MAINWNDBASE_H #ifndef MAINWNDBASE_H
#define MAINWNDBASE_H #define MAINWNDBASE_H
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qcstring.h> #include <ntqcstring.h>
#include "exprwnd.h" #include "exprwnd.h"
#include "sys/types.h" /* pid_t */ #include "sys/types.h" /* pid_t */
@ -23,33 +23,33 @@ class KStatusBar;
class KProcess; class KProcess;
class DebuggerDriver; class DebuggerDriver;
class WatchWindow : public QWidget class WatchWindow : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
WatchWindow(QWidget* parent, const char* name, WFlags f = 0); WatchWindow(TQWidget* parent, const char* name, WFlags f = 0);
~WatchWindow(); ~WatchWindow();
ExprWnd* watchVariables() { return &m_watchVariables; } ExprWnd* watchVariables() { return &m_watchVariables; }
QString watchText() const { return m_watchEdit.text(); } TQString watchText() const { return m_watchEdit.text(); }
int columnWidth(int i) const { return m_watchVariables.columnWidth(i); } int columnWidth(int i) const { return m_watchVariables.columnWidth(i); }
void setColumnWidth(int i, int w) { m_watchVariables.setColumnWidth(i, w); } void setColumnWidth(int i, int w) { m_watchVariables.setColumnWidth(i, w); }
protected: protected:
QLineEdit m_watchEdit; TQLineEdit m_watchEdit;
QPushButton m_watchAdd; TQPushButton m_watchAdd;
QPushButton m_watchDelete; TQPushButton m_watchDelete;
ExprWnd m_watchVariables; ExprWnd m_watchVariables;
QVBoxLayout m_watchV; TQVBoxLayout m_watchV;
QHBoxLayout m_watchH; TQHBoxLayout m_watchH;
virtual bool eventFilter(QObject* ob, QEvent* ev); virtual bool eventFilter(TQObject* ob, TQEvent* ev);
virtual void dragEnterEvent(QDragEnterEvent* event); virtual void dragEnterEvent(TQDragEnterEvent* event);
virtual void dropEvent(QDropEvent* event); virtual void dropEvent(TQDropEvent* event);
signals: signals:
void addWatch(); void addWatch();
void deleteWatch(); void deleteWatch();
void textDropped(const QString& text); void textDropped(const TQString& text);
protected slots: protected slots:
void slotWatchHighlighted(); void slotWatchHighlighted();
@ -66,35 +66,35 @@ public:
* Sets the command to invoke the terminal that displays the program * Sets the command to invoke the terminal that displays the program
* output. If cmd is the empty string, the default is substituted. * output. If cmd is the empty string, the default is substituted.
*/ */
void setTerminalCmd(const QString& cmd); void setTerminalCmd(const TQString& cmd);
/** /**
* Sets the command to invoke the debugger. * Sets the command to invoke the debugger.
*/ */
void setDebuggerCmdStr(const QString& cmd); void setDebuggerCmdStr(const TQString& cmd);
/** /**
* Specifies the file where to write the transcript. * Specifies the file where to write the transcript.
*/ */
void setTranscript(const QString& name); void setTranscript(const TQString& name);
/** /**
* Starts to debug the specified program using the specified language * Starts to debug the specified program using the specified language
* driver. * driver.
*/ */
bool debugProgram(const QString& executable, QString lang, QWidget* parent); bool debugProgram(const TQString& executable, TQString lang, TQWidget* parent);
/** /**
* Specifies the process to attach to after the program is loaded. * Specifies the process to attach to after the program is loaded.
*/ */
void setAttachPid(const QString& pid); void setAttachPid(const TQString& pid);
// the following are needed to handle program arguments // the following are needed to handle program arguments
void setCoreFile(const QString& corefile); void setCoreFile(const TQString& corefile);
void setRemoteDevice(const QString &remoteDevice); void setRemoteDevice(const TQString &remoteDevice);
void overrideProgramArguments(const QString& args); void overrideProgramArguments(const TQString& args);
/** helper around KFileDialog */ /** helper around KFileDialog */
static QString myGetFileName(QString caption, static TQString myGetFileName(TQString caption,
QString dir, QString filter, TQString dir, TQString filter,
QWidget* parent); TQWidget* parent);
/** invokes the global options dialog */ /** invokes the global options dialog */
virtual void doGlobalOptions(QWidget* parent); virtual void doGlobalOptions(TQWidget* parent);
protected: protected:
// settings // settings
@ -105,45 +105,45 @@ protected:
virtual TTYWindow* ttyWindow() = 0; virtual TTYWindow* ttyWindow() = 0;
// statusbar texts // statusbar texts
QString m_statusActive; TQString m_statusActive;
// output window // output window
QString m_outputTermCmdStr; TQString m_outputTermCmdStr;
QString m_outputTermKeepScript; TQString m_outputTermKeepScript;
KProcess* m_outputTermProc; KProcess* m_outputTermProc;
int m_ttyLevel; int m_ttyLevel;
virtual QString createOutputWindow(); /* returns terminal name */ virtual TQString createOutputWindow(); /* returns terminal name */
void shutdownTermWindow(); void shutdownTermWindow();
QString m_lastDirectory; /* the dir of the most recently opened file */ TQString m_lastDirectory; /* the dir of the most recently opened file */
QString m_transcriptFile; /* where gdb dialog is logged */ TQString m_transcriptFile; /* where gdb dialog is logged */
bool m_popForeground; /* whether main wnd raises when prog stops */ bool m_popForeground; /* whether main wnd raises when prog stops */
int m_backTimeout; /* when wnd goes back */ int m_backTimeout; /* when wnd goes back */
int m_tabWidth; /* tab width in characters (can be 0) */ int m_tabWidth; /* tab width in characters (can be 0) */
QString m_sourceFilter; TQString m_sourceFilter;
QString m_headerFilter; TQString m_headerFilter;
// the debugger proper // the debugger proper
QString m_debuggerCmdStr; TQString m_debuggerCmdStr;
KDebugger* m_debugger; KDebugger* m_debugger;
void setupDebugger(QWidget* parent, void setupDebugger(TQWidget* parent,
ExprWnd* localVars, ExprWnd* localVars,
ExprWnd* watchVars, ExprWnd* watchVars,
QListBox* backtrace); TQListBox* backtrace);
DebuggerDriver* driverFromLang(QString lang); DebuggerDriver* driverFromLang(TQString lang);
/** /**
* This function derives a driver name from the contents of the named * This function derives a driver name from the contents of the named
* file. * file.
*/ */
QString driverNameFromFile(const QString& exe); TQString driverNameFromFile(const TQString& exe);
public: public:
/* /*
* Important! The following functions must be overridden in derived * Important! The following functions must be overridden in derived
* classes and be declared as slots! Note: These must not be declared * classes and be declared as slots! Note: These must not be declared
* virtual here since Qt signal mechanism fails miserably (because this * virtual here since TQt signal mechanism fails miserably (because this
* class will not be the left-most base class!). * class will not be the left-most base class!).
*/ */
void newStatusMsg(KStatusBar* statusbar); void newStatusMsg(KStatusBar* statusbar);

@ -5,51 +5,51 @@
*/ */
#include "memwindow.h" #include "memwindow.h"
#include <qheader.h> #include <ntqheader.h>
#include <klocale.h> #include <klocale.h>
#include <kconfigbase.h> #include <kconfigbase.h>
#include "debugger.h" #include "debugger.h"
class MemoryViewItem : public QListViewItem class MemoryViewItem : public TQListViewItem
{ {
public: public:
MemoryViewItem(QListView* parent, QListViewItem* insertAfter, QString raw, QString cooked) MemoryViewItem(TQListView* parent, TQListViewItem* insertAfter, TQString raw, TQString cooked)
: QListViewItem(parent, insertAfter, raw, cooked) {} : TQListViewItem(parent, insertAfter, raw, cooked) {}
void setChanged(uint pos, bool b) { m_changed[pos] = b; } void setChanged(uint pos, bool b) { m_changed[pos] = b; }
protected: protected:
virtual void paintCell(QPainter* p, const QColorGroup& cg, virtual void paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int alignment); int column, int width, int alignment);
bool m_changed[8]; bool m_changed[8];
}; };
void MemoryViewItem::paintCell(QPainter* p, const QColorGroup& cg, void MemoryViewItem::paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int alignment) int column, int width, int alignment)
{ {
if( column > 0 && m_changed[column - 1] ) { if( column > 0 && m_changed[column - 1] ) {
QColorGroup newcg = cg; TQColorGroup newcg = cg;
newcg.setColor(QColorGroup::Text, red); newcg.setColor(TQColorGroup::Text, red);
QListViewItem::paintCell(p, newcg, column, width, alignment); TQListViewItem::paintCell(p, newcg, column, width, alignment);
} else { } else {
QListViewItem::paintCell(p, cg, column, width, alignment); TQListViewItem::paintCell(p, cg, column, width, alignment);
} }
} }
MemoryWindow::MemoryWindow(QWidget* parent, const char* name) : MemoryWindow::MemoryWindow(TQWidget* parent, const char* name) :
QWidget(parent, name), TQWidget(parent, name),
m_debugger(0), m_debugger(0),
m_expression(true, this, "expression"), m_expression(true, this, "expression"),
m_memory(this, "memory"), m_memory(this, "memory"),
m_layout(this, 0, 2), m_layout(this, 0, 2),
m_format(MDTword | MDThex) m_format(MDTword | MDThex)
{ {
QSize minSize = m_expression.sizeHint(); TQSize minSize = m_expression.sizeHint();
m_expression.setMinimumSize(minSize); m_expression.setMinimumSize(minSize);
m_expression.setInsertionPolicy(QComboBox::NoInsertion); m_expression.setInsertionPolicy(TQComboBox::NoInsertion);
m_expression.setMaxCount(15); m_expression.setMaxCount(15);
m_memory.addColumn(i18n("Address"), 80); m_memory.addColumn(i18n("Address"), 80);
@ -63,8 +63,8 @@ MemoryWindow::MemoryWindow(QWidget* parent, const char* name) :
m_layout.addWidget(&m_memory, 10); m_layout.addWidget(&m_memory, 10);
m_layout.activate(); m_layout.activate();
connect(&m_expression, SIGNAL(activated(const QString&)), connect(&m_expression, SIGNAL(activated(const TQString&)),
this, SLOT(slotNewExpression(const QString&))); this, SLOT(slotNewExpression(const TQString&)));
// the popup menu // the popup menu
m_popup.insertItem(i18n("B&ytes"), MDTbyte); m_popup.insertItem(i18n("B&ytes"), MDTbyte);
@ -95,16 +95,16 @@ MemoryWindow::~MemoryWindow()
{ {
} }
bool MemoryWindow::eventFilter(QObject*, QEvent* ev) bool MemoryWindow::eventFilter(TQObject*, TQEvent* ev)
{ {
if (ev->type() == QEvent::MouseButtonRelease) { if (ev->type() == TQEvent::MouseButtonRelease) {
handlePopup(static_cast<QMouseEvent*>(ev)); handlePopup(static_cast<TQMouseEvent*>(ev));
return true; return true;
} }
return false; return false;
} }
void MemoryWindow::handlePopup(QMouseEvent* ev) void MemoryWindow::handlePopup(TQMouseEvent* ev)
{ {
if (ev->button() == RightButton) if (ev->button() == RightButton)
{ {
@ -121,9 +121,9 @@ void MemoryWindow::handlePopup(QMouseEvent* ev)
} }
} }
void MemoryWindow::slotNewExpression(const QString& newText) void MemoryWindow::slotNewExpression(const TQString& newText)
{ {
QString text = newText.simplifyWhiteSpace(); TQString text = newText.simplifyWhiteSpace();
// see if the string is in the list // see if the string is in the list
// (note: must count downwards because of removeItem!) // (note: must count downwards because of removeItem!)
@ -132,7 +132,7 @@ void MemoryWindow::slotNewExpression(const QString& newText)
if (m_expression.text(i) == text) { if (m_expression.text(i) == text) {
// yes it is! // yes it is!
// look up the format that was used last time for this expr // look up the format that was used last time for this expr
QMap<QString,unsigned>::iterator pFormat = m_formatCache.find(text); TQMap<TQString,unsigned>::iterator pFormat = m_formatCache.find(text);
if (pFormat != m_formatCache.end()) { if (pFormat != m_formatCache.end()) {
m_format = *pFormat; m_format = *pFormat;
m_debugger->setMemoryFormat(m_format); m_debugger->setMemoryFormat(m_format);
@ -150,7 +150,7 @@ void MemoryWindow::slotNewExpression(const QString& newText)
displayNewExpression(text); displayNewExpression(text);
} }
void MemoryWindow::displayNewExpression(const QString& expr) void MemoryWindow::displayNewExpression(const TQString& expr)
{ {
m_debugger->setMemoryExpression(expr); m_debugger->setMemoryExpression(expr);
m_expression.setEditText(expr); m_expression.setEditText(expr);
@ -174,18 +174,18 @@ void MemoryWindow::slotTypeChange(int id)
m_debugger->setMemoryFormat(m_format); m_debugger->setMemoryFormat(m_format);
// change the format in the cache // change the format in the cache
QString expr = m_expression.currentText(); TQString expr = m_expression.currentText();
m_formatCache[expr.simplifyWhiteSpace()] = m_format; m_formatCache[expr.simplifyWhiteSpace()] = m_format;
// force redisplay // force redisplay
displayNewExpression(expr); displayNewExpression(expr);
} }
void MemoryWindow::slotNewMemoryDump(const QString& msg, const std::list<MemoryDump>& memdump) void MemoryWindow::slotNewMemoryDump(const TQString& msg, const std::list<MemoryDump>& memdump)
{ {
m_memory.clear(); m_memory.clear();
if (!msg.isEmpty()) { if (!msg.isEmpty()) {
new QListViewItem(&m_memory, QString(), msg); new TQListViewItem(&m_memory, TQString(), msg);
return; return;
} }
@ -197,27 +197,27 @@ void MemoryWindow::slotNewMemoryDump(const QString& msg, const std::list<MemoryD
m_memory.removeColumn(k); m_memory.removeColumn(k);
//add the needed columns //add the needed columns
QStringList sl = QStringList::split( "\t", md->dump ); TQStringList sl = TQStringList::split( "\t", md->dump );
for (uint i = 0; i < sl.count(); i++) for (uint i = 0; i < sl.count(); i++)
m_memory.addColumn("", -1); m_memory.addColumn("", -1);
QMap<QString,QString> tmpMap; TQMap<TQString,TQString> tmpMap;
for (; md != memdump.end(); ++md) for (; md != memdump.end(); ++md)
{ {
QString addr = md->address.asString() + " " + md->address.fnoffs; TQString addr = md->address.asString() + " " + md->address.fnoffs;
QStringList sl = QStringList::split( "\t", md->dump ); TQStringList sl = TQStringList::split( "\t", md->dump );
// save memory // save memory
tmpMap[addr] = md->dump; tmpMap[addr] = md->dump;
after = new MemoryViewItem(&m_memory, after, addr, ""); after = new MemoryViewItem(&m_memory, after, addr, "");
QStringList tmplist; TQStringList tmplist;
QMap<QString,QString>::Iterator pos = m_old_memory.find( addr ); TQMap<TQString,TQString>::Iterator pos = m_old_memory.find( addr );
if( pos != m_old_memory.end() ) if( pos != m_old_memory.end() )
tmplist = QStringList::split( "\t", pos.data() ); tmplist = TQStringList::split( "\t", pos.data() );
for (uint i = 0; i < sl.count(); i++) for (uint i = 0; i < sl.count(); i++)
{ {
@ -246,22 +246,22 @@ void MemoryWindow::saveProgramSpecific(KConfigBase* config)
int numEntries = m_expression.count(); int numEntries = m_expression.count();
config->writeEntry(NumExprs, numEntries); config->writeEntry(NumExprs, numEntries);
QString exprEntry; TQString exprEntry;
QString fmtEntry; TQString fmtEntry;
for (int i = 0; i < numEntries;) { for (int i = 0; i < numEntries;) {
QString text = m_expression.text(i); TQString text = m_expression.text(i);
i++; /* entries are counted 1-based */ i++; /* entries are counted 1-based */
exprEntry.sprintf(ExpressionFmt, i); exprEntry.sprintf(ExpressionFmt, i);
fmtEntry.sprintf(FormatFmt, i); fmtEntry.sprintf(FormatFmt, i);
config->writeEntry(exprEntry, text); config->writeEntry(exprEntry, text);
QMap<QString,unsigned>::iterator pFormat = m_formatCache.find(text); TQMap<TQString,unsigned>::iterator pFormat = m_formatCache.find(text);
unsigned fmt = pFormat != m_formatCache.end() ? *pFormat : MDTword | MDThex; unsigned fmt = pFormat != m_formatCache.end() ? *pFormat : MDTword | MDThex;
config->writeEntry(fmtEntry, fmt); config->writeEntry(fmtEntry, fmt);
} }
// column widths // column widths
QStrList widths; TQStrList widths;
QString wStr; TQString wStr;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
int w = m_memory.columnWidth(i); int w = m_memory.columnWidth(i);
wStr.setNum(w); wStr.setNum(w);
@ -277,13 +277,13 @@ void MemoryWindow::restoreProgramSpecific(KConfigBase* config)
int numEntries = config->readNumEntry(NumExprs, 0); int numEntries = config->readNumEntry(NumExprs, 0);
m_expression.clear(); m_expression.clear();
QString exprEntry; TQString exprEntry;
QString fmtEntry; TQString fmtEntry;
// entries are counted 1-based // entries are counted 1-based
for (int i = 1; i <= numEntries; i++) { for (int i = 1; i <= numEntries; i++) {
exprEntry.sprintf(ExpressionFmt, i); exprEntry.sprintf(ExpressionFmt, i);
fmtEntry.sprintf(FormatFmt, i); fmtEntry.sprintf(FormatFmt, i);
QString expr = config->readEntry(exprEntry); TQString expr = config->readEntry(exprEntry);
unsigned fmt = config->readNumEntry(fmtEntry, MDTword | MDThex); unsigned fmt = config->readNumEntry(fmtEntry, MDTword | MDThex);
m_expression.insertItem(expr); m_expression.insertItem(expr);
m_formatCache[expr] = fmt & (MDTsizemask | MDTformatmask); m_formatCache[expr] = fmt & (MDTsizemask | MDTformatmask);
@ -292,19 +292,19 @@ void MemoryWindow::restoreProgramSpecific(KConfigBase* config)
// initialize with top expression // initialize with top expression
if (numEntries > 0) { if (numEntries > 0) {
m_expression.setCurrentItem(0); m_expression.setCurrentItem(0);
QString expr = m_expression.text(0); TQString expr = m_expression.text(0);
m_format = m_formatCache[expr]; m_format = m_formatCache[expr];
m_debugger->setMemoryFormat(m_format); m_debugger->setMemoryFormat(m_format);
displayNewExpression(expr); displayNewExpression(expr);
} }
// column widths // column widths
QStrList widths; TQStrList widths;
int n = config->readListEntry(ColumnWidths, widths); int n = config->readListEntry(ColumnWidths, widths);
if (n > 2) if (n > 2)
n = 2; n = 2;
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
QString wStr = widths.at(i); TQString wStr = widths.at(i);
bool ok; bool ok;
int w = wStr.toInt(&ok); int w = wStr.toInt(&ok);
if (ok) if (ok)

@ -7,47 +7,47 @@
#ifndef MEMWINDOW_H #ifndef MEMWINDOW_H
#define MEMWINDOW_H #define MEMWINDOW_H
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qcombobox.h> #include <ntqcombobox.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qmap.h> #include <ntqmap.h>
#include "dbgdriver.h" #include "dbgdriver.h"
class KDebugger; class KDebugger;
class KConfigBase; class KConfigBase;
class MemoryWindow : public QWidget class MemoryWindow : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
MemoryWindow(QWidget* parent, const char* name); MemoryWindow(TQWidget* parent, const char* name);
~MemoryWindow(); ~MemoryWindow();
void setDebugger(KDebugger* deb) { m_debugger = deb; } void setDebugger(KDebugger* deb) { m_debugger = deb; }
protected: protected:
KDebugger* m_debugger; KDebugger* m_debugger;
QComboBox m_expression; TQComboBox m_expression;
QListView m_memory; TQListView m_memory;
QMap<QString,QString> m_old_memory; TQMap<TQString,TQString> m_old_memory;
QVBoxLayout m_layout; TQVBoxLayout m_layout;
unsigned m_format; unsigned m_format;
QMap<QString,unsigned> m_formatCache; TQMap<TQString,unsigned> m_formatCache;
QPopupMenu m_popup; TQPopupMenu m_popup;
virtual bool eventFilter(QObject* o, QEvent* ev); virtual bool eventFilter(TQObject* o, TQEvent* ev);
void handlePopup(QMouseEvent* ev); void handlePopup(TQMouseEvent* ev);
void displayNewExpression(const QString& expr); void displayNewExpression(const TQString& expr);
public slots: public slots:
void slotNewExpression(const QString&); void slotNewExpression(const TQString&);
void slotTypeChange(int id); void slotTypeChange(int id);
void slotNewMemoryDump(const QString&, const std::list<MemoryDump>&); void slotNewMemoryDump(const TQString&, const std::list<MemoryDump>&);
void saveProgramSpecific(KConfigBase* config); void saveProgramSpecific(KConfigBase* config);
void restoreProgramSpecific(KConfigBase* config); void restoreProgramSpecific(KConfigBase* config);
}; };

@ -15,7 +15,7 @@
# define ASSERT(x) ((void)0) # define ASSERT(x) ((void)0)
#else #else
# define ASSERT(x) ((x) ? void(0) : void(kdDebug() << \ # define ASSERT(x) ((x) ? void(0) : void(kdDebug() << \
(QString("assertion failed: ") + #x).ascii() << "\n")) (TQString("assertion failed: ") + #x).ascii() << "\n"))
#endif #endif
#ifdef WANT_TRACE_OUTPUT #ifdef WANT_TRACE_OUTPUT

@ -5,27 +5,27 @@
*/ */
#include "pgmargs.h" #include "pgmargs.h"
#include <qlabel.h> #include <ntqlabel.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qlistbox.h> #include <ntqlistbox.h>
#include <qtabwidget.h> #include <ntqtabwidget.h>
#include <kapplication.h> #include <kapplication.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include "config.h" #include "config.h"
#include "mydebug.h" #include "mydebug.h"
PgmArgs::PgmArgs(QWidget* parent, const QString& pgm, QDict<EnvVar>& envVars, PgmArgs::PgmArgs(TQWidget* parent, const TQString& pgm, TQDict<EnvVar>& envVars,
const QStringList& allOptions) : const TQStringList& allOptions) :
PgmArgsBase(parent, "pgmargs", true), PgmArgsBase(parent, "pgmargs", true),
m_envVars(envVars) m_envVars(envVars)
{ {
m_envVars.setAutoDelete(false); m_envVars.setAutoDelete(false);
{ {
QFileInfo fi = pgm; TQFileInfo fi = pgm;
QString newText = labelArgs->text().arg(fi.fileName()); TQString newText = labelArgs->text().arg(fi.fileName());
labelArgs->setText(newText); labelArgs->setText(newText);
} }
@ -48,9 +48,9 @@ PgmArgs::~PgmArgs()
} }
// initializes the selected options // initializes the selected options
void PgmArgs::setOptions(const QStringList& selectedOptions) void PgmArgs::setOptions(const TQStringList& selectedOptions)
{ {
QStringList::ConstIterator it; TQStringList::ConstIterator it;
for (it = selectedOptions.begin(); it != selectedOptions.end(); ++it) { for (it = selectedOptions.begin(); it != selectedOptions.end(); ++it) {
for (uint i = 0; i < xsldbgOptions->count(); i++) { for (uint i = 0; i < xsldbgOptions->count(); i++) {
if (xsldbgOptions->text(i) == *it) { if (xsldbgOptions->text(i) == *it) {
@ -62,9 +62,9 @@ void PgmArgs::setOptions(const QStringList& selectedOptions)
} }
// returns the selected options // returns the selected options
QStringList PgmArgs::options() const TQStringList PgmArgs::options() const
{ {
QStringList sel; TQStringList sel;
if (xsldbgOptionsPage != 0) if (xsldbgOptionsPage != 0)
{ {
for (uint i = 0; i < xsldbgOptions->count(); i++) { for (uint i = 0; i < xsldbgOptions->count(); i++) {
@ -83,7 +83,7 @@ void PgmArgs::modifyVar()
void PgmArgs::modifyVar(bool resurrect) void PgmArgs::modifyVar(bool resurrect)
{ {
QString name, value; TQString name, value;
parseEnvInput(name, value); parseEnvInput(name, value);
if (name.isEmpty() || name.find(' ') >= 0) /* disallow spaces in names */ if (name.isEmpty() || name.find(' ') >= 0) /* disallow spaces in names */
return; return;
@ -98,7 +98,7 @@ void PgmArgs::modifyVar(bool resurrect)
{ {
val->value = value; val->value = value;
val->status = EnvVar::EVdirty; val->status = EnvVar::EVdirty;
val->item = new QListViewItem(envList, name, value); // inserts itself val->item = new TQListViewItem(envList, name, value); // inserts itself
m_envVars.insert(name, val); m_envVars.insert(name, val);
} }
} else if (value != val->value) { } else if (value != val->value) {
@ -112,7 +112,7 @@ void PgmArgs::modifyVar(bool resurrect)
val = new EnvVar; val = new EnvVar;
val->value = value; val->value = value;
val->status = EnvVar::EVnew; val->status = EnvVar::EVnew;
val->item = new QListViewItem(envList, name, value); // inserts itself val->item = new TQListViewItem(envList, name, value); // inserts itself
m_envVars.insert(name, val); m_envVars.insert(name, val);
} }
envList->setSelected(val->item, true); envList->setSelected(val->item, true);
@ -122,10 +122,10 @@ void PgmArgs::modifyVar(bool resurrect)
// delete the selected item // delete the selected item
void PgmArgs::deleteVar() void PgmArgs::deleteVar()
{ {
QListViewItem* item = envList->selectedItem(); TQListViewItem* item = envList->selectedItem();
if (item == 0) if (item == 0)
return; return;
QString name = item->text(0); TQString name = item->text(0);
// lookup the value in the dictionary // lookup the value in the dictionary
EnvVar* val = m_envVars[name]; EnvVar* val = m_envVars[name];
@ -147,29 +147,29 @@ void PgmArgs::deleteVar()
buttonDelete->setEnabled(false); buttonDelete->setEnabled(false);
} }
void PgmArgs::parseEnvInput(QString& name, QString& value) void PgmArgs::parseEnvInput(TQString& name, TQString& value)
{ {
// parse input from edit field // parse input from edit field
QString input = envVar->text(); TQString input = envVar->text();
int equalSign = input.find('='); int equalSign = input.find('=');
if (equalSign >= 0) { if (equalSign >= 0) {
name = input.left(equalSign).stripWhiteSpace(); name = input.left(equalSign).stripWhiteSpace();
value = input.mid(equalSign+1); value = input.mid(equalSign+1);
} else { } else {
name = input.stripWhiteSpace(); name = input.stripWhiteSpace();
value = QString(); /* value is empty */ value = TQString(); /* value is empty */
} }
} }
void PgmArgs::initEnvList() void PgmArgs::initEnvList()
{ {
QDictIterator<EnvVar> it = m_envVars; TQDictIterator<EnvVar> it = m_envVars;
EnvVar* val; EnvVar* val;
QString name; TQString name;
for (; (val = it) != 0; ++it) { for (; (val = it) != 0; ++it) {
val->status = EnvVar::EVclean; val->status = EnvVar::EVclean;
name = it.currentKey(); name = it.currentKey();
val->item = new QListViewItem(envList, name, val->value); // inserts itself val->item = new TQListViewItem(envList, name, val->value); // inserts itself
} }
envList->setAllColumnsShowFocus(true); envList->setAllColumnsShowFocus(true);
@ -178,13 +178,13 @@ void PgmArgs::initEnvList()
void PgmArgs::envListCurrentChanged() void PgmArgs::envListCurrentChanged()
{ {
QListViewItem* item = envList->selectedItem(); TQListViewItem* item = envList->selectedItem();
buttonDelete->setEnabled(item != 0); buttonDelete->setEnabled(item != 0);
if (item == 0) if (item == 0)
return; return;
// must get name from list box // must get name from list box
QString name = item->text(0); TQString name = item->text(0);
EnvVar* val = m_envVars[name]; EnvVar* val = m_envVars[name];
ASSERT(val != 0); ASSERT(val != 0);
if (val != 0) { if (val != 0) {
@ -199,13 +199,13 @@ void PgmArgs::accept()
// simulate that the Modify button was pressed, but don't revive // simulate that the Modify button was pressed, but don't revive
// dead entries even if the user changed the edit box // dead entries even if the user changed the edit box
modifyVar(false); modifyVar(false);
QDialog::accept(); TQDialog::accept();
} }
void PgmArgs::browseWd() void PgmArgs::browseWd()
{ {
// browse for the working directory // browse for the working directory
QString newDir = KFileDialog::getExistingDirectory(wd(), this); TQString newDir = KFileDialog::getExistingDirectory(wd(), this);
if (!newDir.isEmpty()) { if (!newDir.isEmpty()) {
setWd(newDir); setWd(newDir);
} }
@ -213,11 +213,11 @@ void PgmArgs::browseWd()
void PgmArgs::browseArgFile() void PgmArgs::browseArgFile()
{ {
QString caption = i18n("Select a file name to insert as program argument"); TQString caption = i18n("Select a file name to insert as program argument");
// use the selection as default // use the selection as default
QString f = programArgs->markedText(); TQString f = programArgs->markedText();
f = KFileDialog::getSaveFileName(f, QString::null, f = KFileDialog::getSaveFileName(f, TQString::null,
this, caption); this, caption);
// don't clear the selection if no file was selected // don't clear the selection if no file was selected
if (!f.isEmpty()) { if (!f.isEmpty()) {
@ -227,10 +227,10 @@ void PgmArgs::browseArgFile()
void PgmArgs::browseArgDir() void PgmArgs::browseArgDir()
{ {
QString caption = i18n("Select a directory to insert as program argument"); TQString caption = i18n("Select a directory to insert as program argument");
// use the selection as default // use the selection as default
QString f = programArgs->markedText(); TQString f = programArgs->markedText();
f = KFileDialog::getExistingDirectory(f, this, caption); f = KFileDialog::getExistingDirectory(f, this, caption);
// don't clear the selection if no file was selected // don't clear the selection if no file was selected
if (!f.isEmpty()) { if (!f.isEmpty()) {

@ -8,33 +8,33 @@
#define PgmArgs_included #define PgmArgs_included
#include "pgmargsbase.h" #include "pgmargsbase.h"
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qdict.h> #include <ntqdict.h>
#include "envvar.h" #include "envvar.h"
class QStringList; class TQStringList;
class PgmArgs : public PgmArgsBase class PgmArgs : public PgmArgsBase
{ {
Q_OBJECT Q_OBJECT
public: public:
PgmArgs(QWidget* parent, const QString& pgm, QDict<EnvVar>& envVars, PgmArgs(TQWidget* parent, const TQString& pgm, TQDict<EnvVar>& envVars,
const QStringList& allOptions); const TQStringList& allOptions);
virtual ~PgmArgs(); virtual ~PgmArgs();
void setArgs(const QString& text) { programArgs->setText(text); } void setArgs(const TQString& text) { programArgs->setText(text); }
QString args() const { return programArgs->text(); } TQString args() const { return programArgs->text(); }
void setOptions(const QStringList& selectedOptions); void setOptions(const TQStringList& selectedOptions);
QStringList options() const; TQStringList options() const;
void setWd(const QString& wd) { wdEdit->setText(wd); } void setWd(const TQString& wd) { wdEdit->setText(wd); }
QString wd() const { return wdEdit->text(); } TQString wd() const { return wdEdit->text(); }
QDict<EnvVar>& envVars() { return m_envVars; } TQDict<EnvVar>& envVars() { return m_envVars; }
protected: protected:
QDict<EnvVar> m_envVars; TQDict<EnvVar> m_envVars;
void initEnvList(); void initEnvList();
void parseEnvInput(QString& name, QString& value); void parseEnvInput(TQString& name, TQString& value);
void modifyVar(bool resurrect); void modifyVar(bool resurrect);
protected slots: protected slots:

@ -10,18 +10,18 @@
#include "pgmargsbase.h" #include "pgmargsbase.h"
#include <qvariant.h> #include <ntqvariant.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qtabwidget.h> #include <ntqtabwidget.h>
#include <qwidget.h> #include <ntqwidget.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qheader.h> #include <ntqheader.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qlistbox.h> #include <ntqlistbox.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <qwhatsthis.h> #include <ntqwhatsthis.h>
/* /*
* Constructs a PgmArgsBase as a child of 'parent', with the * Constructs a PgmArgsBase as a child of 'parent', with the
@ -30,128 +30,128 @@
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * TRUE to construct a modal dialog.
*/ */
PgmArgsBase::PgmArgsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) PgmArgsBase::PgmArgsBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : TQDialog( parent, name, modal, fl )
{ {
if ( !name ) if ( !name )
setName( "PgmArgsBase" ); setName( "PgmArgsBase" );
setSizeGripEnabled( TRUE ); setSizeGripEnabled( TRUE );
PgmArgsBaseLayout = new QHBoxLayout( this, 11, 6, "PgmArgsBaseLayout"); PgmArgsBaseLayout = new TQHBoxLayout( this, 11, 6, "PgmArgsBaseLayout");
layout1 = new QVBoxLayout( 0, 0, 6, "layout1"); layout1 = new TQVBoxLayout( 0, 0, 6, "layout1");
tabWidget = new QTabWidget( this, "tabWidget" ); tabWidget = new TQTabWidget( this, "tabWidget" );
argsPage = new QWidget( tabWidget, "argsPage" ); argsPage = new TQWidget( tabWidget, "argsPage" );
argsPageLayout = new QHBoxLayout( argsPage, 11, 6, "argsPageLayout"); argsPageLayout = new TQHBoxLayout( argsPage, 11, 6, "argsPageLayout");
layout2 = new QVBoxLayout( 0, 0, 6, "layout2"); layout2 = new TQVBoxLayout( 0, 0, 6, "layout2");
labelArgs = new QLabel( argsPage, "labelArgs" ); labelArgs = new TQLabel( argsPage, "labelArgs" );
layout2->addWidget( labelArgs ); layout2->addWidget( labelArgs );
programArgs = new QLineEdit( argsPage, "programArgs" ); programArgs = new TQLineEdit( argsPage, "programArgs" );
layout2->addWidget( programArgs ); layout2->addWidget( programArgs );
layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); layout3 = new TQHBoxLayout( 0, 0, 6, "layout3");
insertFile = new QPushButton( argsPage, "insertFile" ); insertFile = new TQPushButton( argsPage, "insertFile" );
layout3->addWidget( insertFile ); layout3->addWidget( insertFile );
insertDir = new QPushButton( argsPage, "insertDir" ); insertDir = new TQPushButton( argsPage, "insertDir" );
layout3->addWidget( insertDir ); layout3->addWidget( insertDir );
spacer1 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); spacer1 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
layout3->addItem( spacer1 ); layout3->addItem( spacer1 );
layout2->addLayout( layout3 ); layout2->addLayout( layout3 );
spacer2 = new QSpacerItem( 81, 180, QSizePolicy::Minimum, QSizePolicy::Expanding ); spacer2 = new TQSpacerItem( 81, 180, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
layout2->addItem( spacer2 ); layout2->addItem( spacer2 );
argsPageLayout->addLayout( layout2 ); argsPageLayout->addLayout( layout2 );
tabWidget->insertTab( argsPage, QString::fromLatin1("") ); tabWidget->insertTab( argsPage, TQString::fromLatin1("") );
wdPage = new QWidget( tabWidget, "wdPage" ); wdPage = new TQWidget( tabWidget, "wdPage" );
wdPageLayout = new QHBoxLayout( wdPage, 11, 6, "wdPageLayout"); wdPageLayout = new TQHBoxLayout( wdPage, 11, 6, "wdPageLayout");
layout6 = new QVBoxLayout( 0, 0, 6, "layout6"); layout6 = new TQVBoxLayout( 0, 0, 6, "layout6");
wdEdit = new QLineEdit( wdPage, "wdEdit" ); wdEdit = new TQLineEdit( wdPage, "wdEdit" );
layout6->addWidget( wdEdit ); layout6->addWidget( wdEdit );
layout5 = new QHBoxLayout( 0, 0, 6, "layout5"); layout5 = new TQHBoxLayout( 0, 0, 6, "layout5");
wdBrowse = new QPushButton( wdPage, "wdBrowse" ); wdBrowse = new TQPushButton( wdPage, "wdBrowse" );
layout5->addWidget( wdBrowse ); layout5->addWidget( wdBrowse );
spacer4 = new QSpacerItem( 321, 31, QSizePolicy::Expanding, QSizePolicy::Minimum ); spacer4 = new TQSpacerItem( 321, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
layout5->addItem( spacer4 ); layout5->addItem( spacer4 );
layout6->addLayout( layout5 ); layout6->addLayout( layout5 );
spacer5 = new QSpacerItem( 111, 161, QSizePolicy::Minimum, QSizePolicy::Expanding ); spacer5 = new TQSpacerItem( 111, 161, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
layout6->addItem( spacer5 ); layout6->addItem( spacer5 );
wdPageLayout->addLayout( layout6 ); wdPageLayout->addLayout( layout6 );
tabWidget->insertTab( wdPage, QString::fromLatin1("") ); tabWidget->insertTab( wdPage, TQString::fromLatin1("") );
envPage = new QWidget( tabWidget, "envPage" ); envPage = new TQWidget( tabWidget, "envPage" );
envPageLayout = new QHBoxLayout( envPage, 11, 6, "envPageLayout"); envPageLayout = new TQHBoxLayout( envPage, 11, 6, "envPageLayout");
layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); layout9 = new TQHBoxLayout( 0, 0, 6, "layout9");
layout7 = new QVBoxLayout( 0, 0, 6, "layout7"); layout7 = new TQVBoxLayout( 0, 0, 6, "layout7");
envLabel = new QLabel( envPage, "envLabel" ); envLabel = new TQLabel( envPage, "envLabel" );
layout7->addWidget( envLabel ); layout7->addWidget( envLabel );
envVar = new QLineEdit( envPage, "envVar" ); envVar = new TQLineEdit( envPage, "envVar" );
layout7->addWidget( envVar ); layout7->addWidget( envVar );
envList = new QListView( envPage, "envList" ); envList = new TQListView( envPage, "envList" );
envList->addColumn( tr2i18n( "Name" ) ); envList->addColumn( tr2i18n( "Name" ) );
envList->header()->setClickEnabled( FALSE, envList->header()->count() - 1 ); envList->header()->setClickEnabled( FALSE, envList->header()->count() - 1 );
envList->addColumn( tr2i18n( "Value" ) ); envList->addColumn( tr2i18n( "Value" ) );
envList->header()->setClickEnabled( FALSE, envList->header()->count() - 1 ); envList->header()->setClickEnabled( FALSE, envList->header()->count() - 1 );
envList->setSelectionMode( QListView::Single ); envList->setSelectionMode( TQListView::Single );
layout7->addWidget( envList ); layout7->addWidget( envList );
layout9->addLayout( layout7 ); layout9->addLayout( layout7 );
layout8 = new QVBoxLayout( 0, 0, 6, "layout8"); layout8 = new TQVBoxLayout( 0, 0, 6, "layout8");
buttonModify = new QPushButton( envPage, "buttonModify" ); buttonModify = new TQPushButton( envPage, "buttonModify" );
layout8->addWidget( buttonModify ); layout8->addWidget( buttonModify );
buttonDelete = new QPushButton( envPage, "buttonDelete" ); buttonDelete = new TQPushButton( envPage, "buttonDelete" );
layout8->addWidget( buttonDelete ); layout8->addWidget( buttonDelete );
spacer6 = new QSpacerItem( 51, 141, QSizePolicy::Minimum, QSizePolicy::Expanding ); spacer6 = new TQSpacerItem( 51, 141, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
layout8->addItem( spacer6 ); layout8->addItem( spacer6 );
layout9->addLayout( layout8 ); layout9->addLayout( layout8 );
envPageLayout->addLayout( layout9 ); envPageLayout->addLayout( layout9 );
tabWidget->insertTab( envPage, QString::fromLatin1("") ); tabWidget->insertTab( envPage, TQString::fromLatin1("") );
xsldbgOptionsPage = new QWidget( tabWidget, "xsldbgOptionsPage" ); xsldbgOptionsPage = new TQWidget( tabWidget, "xsldbgOptionsPage" );
xsldbgOptionsPageLayout = new QHBoxLayout( xsldbgOptionsPage, 11, 6, "xsldbgOptionsPageLayout"); xsldbgOptionsPageLayout = new TQHBoxLayout( xsldbgOptionsPage, 11, 6, "xsldbgOptionsPageLayout");
xsldbgOptions = new QListBox( xsldbgOptionsPage, "xsldbgOptions" ); xsldbgOptions = new TQListBox( xsldbgOptionsPage, "xsldbgOptions" );
xsldbgOptions->setSelectionMode( QListBox::Multi ); xsldbgOptions->setSelectionMode( TQListBox::Multi );
xsldbgOptionsPageLayout->addWidget( xsldbgOptions ); xsldbgOptionsPageLayout->addWidget( xsldbgOptions );
tabWidget->insertTab( xsldbgOptionsPage, QString::fromLatin1("") ); tabWidget->insertTab( xsldbgOptionsPage, TQString::fromLatin1("") );
layout1->addWidget( tabWidget ); layout1->addWidget( tabWidget );
layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); layout4 = new TQHBoxLayout( 0, 0, 6, "layout4");
buttonHelp = new QPushButton( this, "buttonHelp" ); buttonHelp = new TQPushButton( this, "buttonHelp" );
buttonHelp->setAutoDefault( TRUE ); buttonHelp->setAutoDefault( TRUE );
layout4->addWidget( buttonHelp ); layout4->addWidget( buttonHelp );
spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
layout4->addItem( spacer3 ); layout4->addItem( spacer3 );
buttonOk = new QPushButton( this, "buttonOk" ); buttonOk = new TQPushButton( this, "buttonOk" );
buttonOk->setAutoDefault( TRUE ); buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE ); buttonOk->setDefault( TRUE );
layout4->addWidget( buttonOk ); layout4->addWidget( buttonOk );
buttonCancel = new QPushButton( this, "buttonCancel" ); buttonCancel = new TQPushButton( this, "buttonCancel" );
buttonCancel->setAutoDefault( TRUE ); buttonCancel->setAutoDefault( TRUE );
layout4->addWidget( buttonCancel ); layout4->addWidget( buttonCancel );
layout1->addLayout( layout4 ); layout1->addLayout( layout4 );
PgmArgsBaseLayout->addLayout( layout1 ); PgmArgsBaseLayout->addLayout( layout1 );
languageChange(); languageChange();
resize( QSize(528, 410).expandedTo(minimumSizeHint()) ); resize( TQSize(528, 410).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
// signals and slots connections // signals and slots connections
@ -189,7 +189,7 @@ PgmArgsBase::PgmArgsBase( QWidget* parent, const char* name, bool modal, WFlags
*/ */
PgmArgsBase::~PgmArgsBase() PgmArgsBase::~PgmArgsBase()
{ {
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, TQt does it all for us
} }
/* /*
@ -200,38 +200,38 @@ void PgmArgsBase::languageChange()
{ {
setCaption( tr2i18n( "Program Arguments" ) ); setCaption( tr2i18n( "Program Arguments" ) );
labelArgs->setText( tr2i18n( "Run <i>%1</i> with these arguments:" ) ); labelArgs->setText( tr2i18n( "Run <i>%1</i> with these arguments:" ) );
QWhatsThis::add( programArgs, tr2i18n( "Specify the arguments with which the program shall be invoked for this debugging session. You specify the arguments just as you would on the command line, that is, you can even use quotes and environment variables, for example:<p><tt>--message 'start in: ' $HOME</tt>" ) ); TQWhatsThis::add( programArgs, tr2i18n( "Specify the arguments with which the program shall be invoked for this debugging session. You specify the arguments just as you would on the command line, that is, you can even use quotes and environment variables, for example:<p><tt>--message 'start in: ' $HOME</tt>" ) );
insertFile->setText( tr2i18n( "Insert &file name..." ) ); insertFile->setText( tr2i18n( "Insert &file name..." ) );
insertFile->setAccel( QKeySequence( tr2i18n( "Alt+F" ) ) ); insertFile->setAccel( TQKeySequence( tr2i18n( "Alt+F" ) ) );
QWhatsThis::add( insertFile, tr2i18n( "Browse for a file; the full path name will be inserted at the current cursor location in the edit box above." ) ); TQWhatsThis::add( insertFile, tr2i18n( "Browse for a file; the full path name will be inserted at the current cursor location in the edit box above." ) );
insertDir->setText( tr2i18n( "Insert &directory name..." ) ); insertDir->setText( tr2i18n( "Insert &directory name..." ) );
insertDir->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) ); insertDir->setAccel( TQKeySequence( tr2i18n( "Alt+D" ) ) );
QWhatsThis::add( insertDir, tr2i18n( "Browse for a directory; the full path name will be inserted at the current cursor location in the edit box above." ) ); TQWhatsThis::add( insertDir, tr2i18n( "Browse for a directory; the full path name will be inserted at the current cursor location in the edit box above." ) );
tabWidget->changeTab( argsPage, tr2i18n( "&Arguments" ) ); tabWidget->changeTab( argsPage, tr2i18n( "&Arguments" ) );
QWhatsThis::add( wdEdit, tr2i18n( "Specify here the initial working directory where the program is run." ) ); TQWhatsThis::add( wdEdit, tr2i18n( "Specify here the initial working directory where the program is run." ) );
wdBrowse->setText( tr2i18n( "&Browse..." ) ); wdBrowse->setText( tr2i18n( "&Browse..." ) );
wdBrowse->setAccel( QKeySequence( tr2i18n( "Alt+B" ) ) ); wdBrowse->setAccel( TQKeySequence( tr2i18n( "Alt+B" ) ) );
QWhatsThis::add( wdBrowse, tr2i18n( "Browse for the initial working directory where the program is run." ) ); TQWhatsThis::add( wdBrowse, tr2i18n( "Browse for the initial working directory where the program is run." ) );
tabWidget->changeTab( wdPage, tr2i18n( "&Working Directory" ) ); tabWidget->changeTab( wdPage, tr2i18n( "&Working Directory" ) );
envLabel->setText( tr2i18n( "Environment variables (<tt>NAME=value</tt>):" ) ); envLabel->setText( tr2i18n( "Environment variables (<tt>NAME=value</tt>):" ) );
QWhatsThis::add( envVar, tr2i18n( "To add a new environment variable or to modify one, specify it here in the form <tt>NAME=value</tt> and click <b>Modify</b>." ) ); TQWhatsThis::add( envVar, tr2i18n( "To add a new environment variable or to modify one, specify it here in the form <tt>NAME=value</tt> and click <b>Modify</b>." ) );
envList->header()->setLabel( 0, tr2i18n( "Name" ) ); envList->header()->setLabel( 0, tr2i18n( "Name" ) );
envList->header()->setLabel( 1, tr2i18n( "Value" ) ); envList->header()->setLabel( 1, tr2i18n( "Value" ) );
QWhatsThis::add( envList, tr2i18n( "Environment variables that are set <i>in addition</i> to those that are inherited are listed in this table. To add new environment variables, specify them as <tt>NAME=value</tt> in the edit box above and click <b>Modify</b>. To modify a value, select it in this list and click <b>Modify</b>. To delete an environment variable, select it in this list and click <b>Delete</b>." ) ); TQWhatsThis::add( envList, tr2i18n( "Environment variables that are set <i>in addition</i> to those that are inherited are listed in this table. To add new environment variables, specify them as <tt>NAME=value</tt> in the edit box above and click <b>Modify</b>. To modify a value, select it in this list and click <b>Modify</b>. To delete an environment variable, select it in this list and click <b>Delete</b>." ) );
buttonModify->setText( tr2i18n( "&Modify" ) ); buttonModify->setText( tr2i18n( "&Modify" ) );
buttonModify->setAccel( QKeySequence( tr2i18n( "Alt+M" ) ) ); buttonModify->setAccel( TQKeySequence( tr2i18n( "Alt+M" ) ) );
QWhatsThis::add( buttonModify, tr2i18n( "Enters the environment variable that is currently specified in the edit box into the list. If the named variable is already in the list, it receives a new value; otherwise, a new entry is created." ) ); TQWhatsThis::add( buttonModify, tr2i18n( "Enters the environment variable that is currently specified in the edit box into the list. If the named variable is already in the list, it receives a new value; otherwise, a new entry is created." ) );
buttonDelete->setText( tr2i18n( "&Delete" ) ); buttonDelete->setText( tr2i18n( "&Delete" ) );
buttonDelete->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) ); buttonDelete->setAccel( TQKeySequence( tr2i18n( "Alt+D" ) ) );
QWhatsThis::add( buttonDelete, tr2i18n( "Deletes the selected environment variable from the list. This cannot be used to delete environment variables that are inherited." ) ); TQWhatsThis::add( buttonDelete, tr2i18n( "Deletes the selected environment variable from the list. This cannot be used to delete environment variables that are inherited." ) );
tabWidget->changeTab( envPage, tr2i18n( "&Environment" ) ); tabWidget->changeTab( envPage, tr2i18n( "&Environment" ) );
tabWidget->changeTab( xsldbgOptionsPage, tr2i18n( "&xsldbg Options" ) ); tabWidget->changeTab( xsldbgOptionsPage, tr2i18n( "&xsldbg Options" ) );
buttonHelp->setText( tr2i18n( "&Help" ) ); buttonHelp->setText( tr2i18n( "&Help" ) );
buttonHelp->setAccel( QKeySequence( tr2i18n( "F1" ) ) ); buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
buttonOk->setText( tr2i18n( "&OK" ) ); buttonOk->setText( tr2i18n( "&OK" ) );
buttonOk->setAccel( QKeySequence( QString::null ) ); buttonOk->setAccel( TQKeySequence( TQString::null ) );
buttonCancel->setText( tr2i18n( "&Cancel" ) ); buttonCancel->setText( tr2i18n( "&Cancel" ) );
buttonCancel->setAccel( QKeySequence( QString::null ) ); buttonCancel->setAccel( TQKeySequence( TQString::null ) );
} }
#include "pgmargsbase.moc" #include "pgmargsbase.moc"

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PgmArgsBase</class> <class>PgmArgsBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>PgmArgsBase</cstring> <cstring>PgmArgsBase</cstring>
</property> </property>
@ -28,7 +28,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </property>
@ -36,11 +36,11 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget</cstring> <cstring>tabWidget</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>argsPage</cstring> <cstring>argsPage</cstring>
</property> </property>
@ -51,7 +51,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -59,7 +59,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>labelArgs</cstring> <cstring>labelArgs</cstring>
</property> </property>
@ -70,7 +70,7 @@
<cstring>programArgs</cstring> <cstring>programArgs</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>programArgs</cstring> <cstring>programArgs</cstring>
</property> </property>
@ -78,7 +78,7 @@
<string>Specify the arguments with which the program shall be invoked for this debugging session. You specify the arguments just as you would on the command line, that is, you can even use quotes and environment variables, for example:&lt;p&gt;&lt;tt&gt;--message 'start in: ' $HOME&lt;/tt&gt;</string> <string>Specify the arguments with which the program shall be invoked for this debugging session. You specify the arguments just as you would on the command line, that is, you can even use quotes and environment variables, for example:&lt;p&gt;&lt;tt&gt;--message 'start in: ' $HOME&lt;/tt&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -86,7 +86,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>insertFile</cstring> <cstring>insertFile</cstring>
</property> </property>
@ -100,7 +100,7 @@
<string>Browse for a file; the full path name will be inserted at the current cursor location in the edit box above.</string> <string>Browse for a file; the full path name will be inserted at the current cursor location in the edit box above.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>insertDir</cstring> <cstring>insertDir</cstring>
</property> </property>
@ -154,7 +154,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>wdPage</cstring> <cstring>wdPage</cstring>
</property> </property>
@ -165,7 +165,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -173,7 +173,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>wdEdit</cstring> <cstring>wdEdit</cstring>
</property> </property>
@ -181,7 +181,7 @@
<string>Specify here the initial working directory where the program is run.</string> <string>Specify here the initial working directory where the program is run.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -189,7 +189,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>wdBrowse</cstring> <cstring>wdBrowse</cstring>
</property> </property>
@ -243,7 +243,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>envPage</cstring> <cstring>envPage</cstring>
</property> </property>
@ -254,7 +254,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -262,7 +262,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -270,7 +270,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>envLabel</cstring> <cstring>envLabel</cstring>
</property> </property>
@ -281,7 +281,7 @@
<cstring>envVar</cstring> <cstring>envVar</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>envVar</cstring> <cstring>envVar</cstring>
</property> </property>
@ -289,7 +289,7 @@
<string>To add a new environment variable or to modify one, specify it here in the form &lt;tt&gt;NAME=value&lt;/tt&gt; and click &lt;b&gt;Modify&lt;/b&gt;.</string> <string>To add a new environment variable or to modify one, specify it here in the form &lt;tt&gt;NAME=value&lt;/tt&gt; and click &lt;b&gt;Modify&lt;/b&gt;.</string>
</property> </property>
</widget> </widget>
<widget class="QListView"> <widget class="TQListView">
<column> <column>
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
@ -324,7 +324,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout8</cstring> <cstring>layout8</cstring>
</property> </property>
@ -332,7 +332,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonModify</cstring> <cstring>buttonModify</cstring>
</property> </property>
@ -346,7 +346,7 @@
<string>Enters the environment variable that is currently specified in the edit box into the list. If the named variable is already in the list, it receives a new value; otherwise, a new entry is created.</string> <string>Enters the environment variable that is currently specified in the edit box into the list. If the named variable is already in the list, it receives a new value; otherwise, a new entry is created.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonDelete</cstring> <cstring>buttonDelete</cstring>
</property> </property>
@ -383,7 +383,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>xsldbgOptionsPage</cstring> <cstring>xsldbgOptionsPage</cstring>
</property> </property>
@ -394,7 +394,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QListBox"> <widget class="TQListBox">
<property name="name"> <property name="name">
<cstring>xsldbgOptions</cstring> <cstring>xsldbgOptions</cstring>
</property> </property>
@ -405,7 +405,7 @@
</hbox> </hbox>
</widget> </widget>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -419,7 +419,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonHelp</cstring> <cstring>buttonHelp</cstring>
</property> </property>
@ -450,7 +450,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -467,7 +467,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>

@ -7,28 +7,28 @@
#include "pgmsettings.h" #include "pgmsettings.h"
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include <kapplication.h> #include <kapplication.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qradiobutton.h> #include <ntqradiobutton.h>
#include <qbuttongroup.h> #include <ntqbuttongroup.h>
#include "config.h" #include "config.h"
#include "mydebug.h" #include "mydebug.h"
ChooseDriver::ChooseDriver(QWidget* parent) : ChooseDriver::ChooseDriver(TQWidget* parent) :
QWidget(parent, "driver") TQWidget(parent, "driver")
{ {
QVBoxLayout* layout = new QVBoxLayout(this, 10); TQVBoxLayout* layout = new TQVBoxLayout(this, 10);
QLabel* label = new QLabel(this); TQLabel* label = new TQLabel(this);
label->setText(i18n("How to invoke &GDB - leave empty to use\n" label->setText(i18n("How to invoke &GDB - leave empty to use\n"
"the default from the global options:")); "the default from the global options:"));
label->setMinimumSize(label->sizeHint()); label->setMinimumSize(label->sizeHint());
layout->addWidget(label); layout->addWidget(label);
m_debuggerCmd = new QLineEdit(this); m_debuggerCmd = new TQLineEdit(this);
m_debuggerCmd->setMinimumSize(m_debuggerCmd->sizeHint()); m_debuggerCmd->setMinimumSize(m_debuggerCmd->sizeHint());
layout->addWidget(m_debuggerCmd); layout->addWidget(m_debuggerCmd);
label->setBuddy(m_debuggerCmd); label->setBuddy(m_debuggerCmd);
@ -36,39 +36,39 @@ ChooseDriver::ChooseDriver(QWidget* parent) :
layout->addStretch(10); layout->addStretch(10);
} }
void ChooseDriver::setDebuggerCmd(const QString& cmd) void ChooseDriver::setDebuggerCmd(const TQString& cmd)
{ {
m_debuggerCmd->setText(cmd); m_debuggerCmd->setText(cmd);
} }
QString ChooseDriver::debuggerCmd() const TQString ChooseDriver::debuggerCmd() const
{ {
return m_debuggerCmd->text(); return m_debuggerCmd->text();
} }
OutputSettings::OutputSettings(QWidget* parent) : OutputSettings::OutputSettings(TQWidget* parent) :
QWidget(parent, "output") TQWidget(parent, "output")
{ {
// the group is invisible // the group is invisible
m_group = new QButtonGroup(this); m_group = new TQButtonGroup(this);
m_group->hide(); m_group->hide();
QVBoxLayout* layout = new QVBoxLayout(this, 10); TQVBoxLayout* layout = new TQVBoxLayout(this, 10);
QRadioButton* btn; TQRadioButton* btn;
btn = new QRadioButton(i18n("&No input and output"), this); btn = new TQRadioButton(i18n("&No input and output"), this);
m_group->insert(btn, 0); m_group->insert(btn, 0);
btn->setMinimumSize(btn->sizeHint()); btn->setMinimumSize(btn->sizeHint());
layout->addWidget(btn); layout->addWidget(btn);
btn = new QRadioButton(i18n("&Only output, simple terminal emulation"), this); btn = new TQRadioButton(i18n("&Only output, simple terminal emulation"), this);
m_group->insert(btn, 1); m_group->insert(btn, 1);
btn->setMinimumSize(btn->sizeHint()); btn->setMinimumSize(btn->sizeHint());
layout->addWidget(btn); layout->addWidget(btn);
btn = new QRadioButton(i18n("&Full terminal emulation"), this); btn = new TQRadioButton(i18n("&Full terminal emulation"), this);
m_group->insert(btn, 7); m_group->insert(btn, 7);
btn->setMinimumSize(btn->sizeHint()); btn->setMinimumSize(btn->sizeHint());
layout->addWidget(btn); layout->addWidget(btn);
@ -89,20 +89,20 @@ void OutputSettings::setTTYLevel(int l)
void OutputSettings::slotLevelChanged(int id) void OutputSettings::slotLevelChanged(int id)
{ {
m_ttyLevel = id; m_ttyLevel = id;
TRACE("new ttyLevel: " + QString().setNum(id)); TRACE("new ttyLevel: " + TQString().setNum(id));
} }
ProgramSettings::ProgramSettings(QWidget* parent, QString exeName, bool modal) : ProgramSettings::ProgramSettings(TQWidget* parent, TQString exeName, bool modal) :
QTabDialog(parent, "program_settings", modal), TQTabDialog(parent, "program_settings", modal),
m_chooseDriver(this), m_chooseDriver(this),
m_output(this) m_output(this)
{ {
// construct title // construct title
QFileInfo fi(exeName); TQFileInfo fi(exeName);
QString cap = kapp->caption(); TQString cap = kapp->caption();
QString title = i18n("%1: Settings for %2"); TQString title = i18n("%1: Settings for %2");
setCaption(title.arg(cap, fi.fileName())); setCaption(title.arg(cap, fi.fileName()));
setCancelButton(i18n("Cancel")); setCancelButton(i18n("Cancel"));

@ -7,43 +7,43 @@
#ifndef PGMSETTINGS_H #ifndef PGMSETTINGS_H
#define PGMSETTINGS_H #define PGMSETTINGS_H
#include <qtabdialog.h> #include <ntqtabdialog.h>
class QButtonGroup; class TQButtonGroup;
class QLineEdit; class TQLineEdit;
class ChooseDriver : public QWidget class ChooseDriver : public TQWidget
{ {
public: public:
ChooseDriver(QWidget* parent); ChooseDriver(TQWidget* parent);
void setDebuggerCmd(const QString& cmd); void setDebuggerCmd(const TQString& cmd);
QString debuggerCmd() const; TQString debuggerCmd() const;
protected: protected:
QLineEdit* m_debuggerCmd; TQLineEdit* m_debuggerCmd;
}; };
class OutputSettings : public QWidget class OutputSettings : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
OutputSettings(QWidget* parent); OutputSettings(TQWidget* parent);
void setTTYLevel(int l); void setTTYLevel(int l);
int ttyLevel() const { return m_ttyLevel; } int ttyLevel() const { return m_ttyLevel; }
protected: protected:
int m_ttyLevel; int m_ttyLevel;
QButtonGroup* m_group; TQButtonGroup* m_group;
protected slots: protected slots:
void slotLevelChanged(int); void slotLevelChanged(int);
}; };
class ProgramSettings : public QTabDialog class ProgramSettings : public TQTabDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
ProgramSettings(QWidget* parent, QString exeName, bool modal = true); ProgramSettings(TQWidget* parent, TQString exeName, bool modal = true);
public: public:
ChooseDriver m_chooseDriver; ChooseDriver m_chooseDriver;

@ -5,11 +5,11 @@
*/ */
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include <qlayout.h> #include <ntqlayout.h>
#include "prefdebugger.h" #include "prefdebugger.h"
PrefDebugger::PrefDebugger(QWidget* parent) : PrefDebugger::PrefDebugger(TQWidget* parent) :
QWidget(parent, "debugger"), TQWidget(parent, "debugger"),
m_grid(this, 5, 2, 10), m_grid(this, 5, 2, 10),
m_defaultHint(this, "default_hint"), m_defaultHint(this, "default_hint"),
m_debuggerCCppLabel(this, "debugger_label"), m_debuggerCCppLabel(this, "debugger_label"),

@ -7,37 +7,37 @@
#ifndef PREFDEBUGGER_H #ifndef PREFDEBUGGER_H
#define PREFDEBUGGER_H #define PREFDEBUGGER_H
#include <qlayout.h> #include <ntqlayout.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlabel.h> #include <ntqlabel.h>
class PrefDebugger : public QWidget class PrefDebugger : public TQWidget
{ {
public: public:
PrefDebugger(QWidget* parent); PrefDebugger(TQWidget* parent);
QGridLayout m_grid; TQGridLayout m_grid;
// --- the hint about defaults // --- the hint about defaults
protected: protected:
QLabel m_defaultHint; TQLabel m_defaultHint;
// --- the debugger command // --- the debugger command
protected: protected:
QLabel m_debuggerCCppLabel; TQLabel m_debuggerCCppLabel;
QLineEdit m_debuggerCCpp; TQLineEdit m_debuggerCCpp;
public: public:
QString debuggerCmd() const { return m_debuggerCCpp.text(); } TQString debuggerCmd() const { return m_debuggerCCpp.text(); }
void setDebuggerCmd(const QString& cmd) { m_debuggerCCpp.setText(cmd); } void setDebuggerCmd(const TQString& cmd) { m_debuggerCCpp.setText(cmd); }
// --- the output terminal // --- the output terminal
protected: protected:
QLabel m_terminalHint; TQLabel m_terminalHint;
QLabel m_terminalLabel; TQLabel m_terminalLabel;
QLineEdit m_terminal; TQLineEdit m_terminal;
public: public:
QString terminal() const { return m_terminal.text(); } TQString terminal() const { return m_terminal.text(); }
void setTerminal(const QString& t) { m_terminal.setText(t); } void setTerminal(const TQString& t) { m_terminal.setText(t); }
}; };
#endif // PREFDEBUGGER_H #endif // PREFDEBUGGER_H

@ -7,8 +7,8 @@
#include "prefmisc.h" #include "prefmisc.h"
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
PrefMisc::PrefMisc(QWidget* parent) : PrefMisc::PrefMisc(TQWidget* parent) :
QWidget(parent, "debugger"), TQWidget(parent, "debugger"),
m_grid(this, 6, 2, 10), m_grid(this, 6, 2, 10),
m_popForeground(this, "pop_fore"), m_popForeground(this, "pop_fore"),
m_backTimeoutLabel(this, "back_to_lab"), m_backTimeoutLabel(this, "back_to_lab"),
@ -44,7 +44,7 @@ PrefMisc::PrefMisc(QWidget* parent) :
m_grid.setRowStretch(5, 10); m_grid.setRowStretch(5, 10);
} }
void PrefMisc::setupEditGroup(const QString& label, QLabel& labWidget, QLineEdit& edit, int row) void PrefMisc::setupEditGroup(const TQString& label, TQLabel& labWidget, TQLineEdit& edit, int row)
{ {
labWidget.setText(label); labWidget.setText(label);
labWidget.setMinimumSize(labWidget.sizeHint()); labWidget.setMinimumSize(labWidget.sizeHint());
@ -54,9 +54,9 @@ void PrefMisc::setupEditGroup(const QString& label, QLabel& labWidget, QLineEdit
m_grid.addWidget(&edit, row, 1); m_grid.addWidget(&edit, row, 1);
} }
static int readNumeric(const QLineEdit& edit) static int readNumeric(const TQLineEdit& edit)
{ {
QString str = edit.text(); TQString str = edit.text();
return str.toInt(); return str.toInt();
} }
@ -67,7 +67,7 @@ int PrefMisc::backTimeout() const
void PrefMisc::setBackTimeout(int to) void PrefMisc::setBackTimeout(int to)
{ {
QString str; TQString str;
str.setNum(to); str.setNum(to);
m_backTimeout.setText(str); m_backTimeout.setText(str);
} }
@ -79,7 +79,7 @@ int PrefMisc::tabWidth() const
void PrefMisc::setTabWidth(int tw) void PrefMisc::setTabWidth(int tw)
{ {
QString str; TQString str;
str.setNum(tw); str.setNum(tw);
m_tabWidth.setText(str); m_tabWidth.setText(str);
} }

@ -7,33 +7,33 @@
#ifndef PREFMISC_H #ifndef PREFMISC_H
#define PREFMISC_H #define PREFMISC_H
#include <qlayout.h> #include <ntqlayout.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qlineedit.h> #include <ntqlineedit.h>
class PrefMisc : public QWidget class PrefMisc : public TQWidget
{ {
public: public:
PrefMisc(QWidget* parent); PrefMisc(TQWidget* parent);
QGridLayout m_grid; TQGridLayout m_grid;
protected: protected:
QCheckBox m_popForeground; TQCheckBox m_popForeground;
QLabel m_backTimeoutLabel; TQLabel m_backTimeoutLabel;
QLineEdit m_backTimeout; TQLineEdit m_backTimeout;
QLabel m_tabWidthLabel; TQLabel m_tabWidthLabel;
QLineEdit m_tabWidth; TQLineEdit m_tabWidth;
QLabel m_sourceFilterLabel; TQLabel m_sourceFilterLabel;
QLineEdit m_sourceFilter; TQLineEdit m_sourceFilter;
QLabel m_headerFilterLabel; TQLabel m_headerFilterLabel;
QLineEdit m_headerFilter; TQLineEdit m_headerFilter;
void setupEditGroup(const QString& label, QLabel& labWidget, QLineEdit& edit, int row); void setupEditGroup(const TQString& label, TQLabel& labWidget, TQLineEdit& edit, int row);
public: public:
bool popIntoForeground() const { return m_popForeground.isChecked(); } bool popIntoForeground() const { return m_popForeground.isChecked(); }
@ -42,10 +42,10 @@ public:
void setBackTimeout(int to); void setBackTimeout(int to);
int tabWidth() const; int tabWidth() const;
void setTabWidth(int tw); void setTabWidth(int tw);
QString sourceFilter() const { return m_sourceFilter.text(); } TQString sourceFilter() const { return m_sourceFilter.text(); }
void setSourceFilter(const QString& f) { m_sourceFilter.setText(f); } void setSourceFilter(const TQString& f) { m_sourceFilter.setText(f); }
QString headerFilter() const { return m_headerFilter.text(); } TQString headerFilter() const { return m_headerFilter.text(); }
void setHeaderFilter(const QString& f) { m_headerFilter.setText(f); } void setHeaderFilter(const TQString& f) { m_headerFilter.setText(f); }
}; };
#endif // PREFMISC_H #endif // PREFMISC_H

@ -5,9 +5,9 @@
*/ */
#include "procattach.h" #include "procattach.h"
#include <qlistview.h> #include <ntqlistview.h>
#include <qtoolbutton.h> #include <ntqtoolbutton.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <kprocess.h> #include <kprocess.h>
#include <ctype.h> #include <ctype.h>
#include <kapplication.h> #include <kapplication.h>
@ -18,7 +18,7 @@
#endif #endif
ProcAttachPS::ProcAttachPS(QWidget* parent) : ProcAttachPS::ProcAttachPS(TQWidget* parent) :
ProcAttachBase(parent), ProcAttachBase(parent),
m_pidCol(-1), m_pidCol(-1),
m_ppidCol(-1) m_ppidCol(-1)
@ -29,13 +29,13 @@ ProcAttachPS::ProcAttachPS(QWidget* parent) :
connect(m_ps, SIGNAL(processExited(KProcess*)), connect(m_ps, SIGNAL(processExited(KProcess*)),
this, SLOT(slotPSDone())); this, SLOT(slotPSDone()));
QIconSet icon = SmallIconSet("clear_left"); TQIconSet icon = SmallIconSet("clear_left");
filterClear->setIconSet(icon); filterClear->setIconSet(icon);
processList->setColumnWidth(0, 300); processList->setColumnWidth(0, 300);
processList->setColumnWidthMode(0, QListView::Manual); processList->setColumnWidthMode(0, TQListView::Manual);
processList->setColumnAlignment(1, Qt::AlignRight); processList->setColumnAlignment(1, TQt::AlignRight);
processList->setColumnAlignment(2, Qt::AlignRight); processList->setColumnAlignment(2, TQt::AlignRight);
// set the command line // set the command line
static const char* const psCommand[] = { static const char* const psCommand[] = {
@ -79,7 +79,7 @@ void ProcAttachPS::slotTextReceived(KProcess*, char* buffer, int buflen)
{ {
// push a tokens onto the line // push a tokens onto the line
if (!m_token.isEmpty()) { if (!m_token.isEmpty()) {
m_line.push_back(QString::fromLatin1(m_token)); m_line.push_back(TQString::fromLatin1(m_token));
m_token = ""; m_token = "";
} }
// and insert the line in the list // and insert the line in the list
@ -93,7 +93,7 @@ void ProcAttachPS::slotTextReceived(KProcess*, char* buffer, int buflen)
{ {
// push a token onto the line // push a token onto the line
if (!m_token.isEmpty()) { if (!m_token.isEmpty()) {
m_line.push_back(QString::fromLatin1(m_token)); m_line.push_back(TQString::fromLatin1(m_token));
m_token = ""; m_token = "";
} }
do { do {
@ -108,7 +108,7 @@ void ProcAttachPS::slotTextReceived(KProcess*, char* buffer, int buflen)
++buffer; ++buffer;
} while (buffer < end && !isspace(*buffer)); } while (buffer < end && !isspace(*buffer));
// append to the current token // append to the current token
m_token += QCString(start, buffer-start+1); // must count the '\0' m_token += TQCString(start, buffer-start+1); // must count the '\0'
} }
} }
} }
@ -137,7 +137,7 @@ void ProcAttachPS::pushLine()
processList->addColumn(m_line[i]); processList->addColumn(m_line[i]);
// these columns are normally numbers // these columns are normally numbers
processList->setColumnAlignment(processList->columns()-1, processList->setColumnAlignment(processList->columns()-1,
Qt::AlignRight); TQt::AlignRight);
} }
} }
} }
@ -145,17 +145,17 @@ void ProcAttachPS::pushLine()
{ {
// insert a line // insert a line
// find the parent process // find the parent process
QListViewItem* parent = 0; TQListViewItem* parent = 0;
if (m_ppidCol >= 0 && m_ppidCol < int(m_line.size())) { if (m_ppidCol >= 0 && m_ppidCol < int(m_line.size())) {
parent = processList->findItem(m_line[m_ppidCol], 1); parent = processList->findItem(m_line[m_ppidCol], 1);
} }
// we assume that the last column is the command // we assume that the last column is the command
QListViewItem* item; TQListViewItem* item;
if (parent == 0) { if (parent == 0) {
item = new QListViewItem(processList, m_line.back()); item = new TQListViewItem(processList, m_line.back());
} else { } else {
item = new QListViewItem(parent, m_line.back()); item = new TQListViewItem(parent, m_line.back());
} }
item->setOpen(true); item->setOpen(true);
m_line.pop_back(); m_line.pop_back();
@ -178,11 +178,11 @@ void ProcAttachPS::pushLine()
* were placed at the root. Here we go through all root items * were placed at the root. Here we go through all root items
* and check whether we must reparent them. * and check whether we must reparent them.
*/ */
QListViewItem* i = processList->firstChild(); TQListViewItem* i = processList->firstChild();
while (i != 0) while (i != 0)
{ {
// advance before we reparent the item // advance before we reparent the item
QListViewItem* it = i; TQListViewItem* it = i;
i = i->nextSibling(); i = i->nextSibling();
if (it->text(2) == m_line[m_pidCol]) { if (it->text(2) == m_line[m_pidCol]) {
processList->takeItem(it); processList->takeItem(it);
@ -198,12 +198,12 @@ void ProcAttachPS::slotPSDone()
filterEdited(filterEdit->text()); filterEdited(filterEdit->text());
} }
QString ProcAttachPS::text() const TQString ProcAttachPS::text() const
{ {
QListViewItem* item = processList->selectedItem(); TQListViewItem* item = processList->selectedItem();
if (item == 0) if (item == 0)
return QString(); return TQString();
return item->text(1); return item->text(1);
} }
@ -218,9 +218,9 @@ void ProcAttachPS::refresh()
} }
} }
void ProcAttachPS::filterEdited(const QString& text) void ProcAttachPS::filterEdited(const TQString& text)
{ {
QListViewItem* i = processList->firstChild(); TQListViewItem* i = processList->firstChild();
if (i) { if (i) {
setVisibility(i, text); setVisibility(i, text);
} }
@ -230,10 +230,10 @@ void ProcAttachPS::filterEdited(const QString& text)
* Sets the visibility of \a i and * Sets the visibility of \a i and
* returns whether it was made visible. * returns whether it was made visible.
*/ */
bool ProcAttachPS::setVisibility(QListViewItem* i, const QString& text) bool ProcAttachPS::setVisibility(TQListViewItem* i, const TQString& text)
{ {
bool visible = false; bool visible = false;
for (QListViewItem* j = i->firstChild(); j; j = j->nextSibling()) for (TQListViewItem* j = i->firstChild(); j; j = j->nextSibling())
{ {
if (setVisibility(j, text)) if (setVisibility(j, text))
visible = true; visible = true;
@ -258,8 +258,8 @@ void ProcAttachPS::selectedChanged()
} }
ProcAttach::ProcAttach(QWidget* parent) : ProcAttach::ProcAttach(TQWidget* parent) :
QDialog(parent, "procattach", true), TQDialog(parent, "procattach", true),
m_label(this, "label"), m_label(this, "label"),
m_processId(this, "procid"), m_processId(this, "procid"),
m_buttonOK(this, "ok"), m_buttonOK(this, "ok"),
@ -267,7 +267,7 @@ ProcAttach::ProcAttach(QWidget* parent) :
m_layout(this, 8), m_layout(this, 8),
m_buttons(4) m_buttons(4)
{ {
QString title = kapp->caption(); TQString title = kapp->caption();
title += i18n(": Attach to process"); title += i18n(": Attach to process");
setCaption(title); setCaption(title);

@ -8,12 +8,12 @@
#define ProcAttach_included #define ProcAttach_included
#include "procattachbase.h" #include "procattachbase.h"
#include <qvaluevector.h> #include <ntqvaluevector.h>
#include <qdialog.h> #include <ntqdialog.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlayout.h> #include <ntqlayout.h>
class KProcess; class KProcess;
@ -27,15 +27,15 @@ class ProcAttachPS : public ProcAttachBase
{ {
Q_OBJECT Q_OBJECT
public: public:
ProcAttachPS(QWidget* parent); ProcAttachPS(TQWidget* parent);
~ProcAttachPS(); ~ProcAttachPS();
QString text() const; TQString text() const;
protected: protected:
void runPS(); void runPS();
virtual void refresh(); virtual void refresh();
virtual void filterEdited(const QString& text); virtual void filterEdited(const TQString& text);
virtual void selectedChanged(); virtual void selectedChanged();
protected slots: protected slots:
@ -44,14 +44,14 @@ protected slots:
protected: protected:
void pushLine(); void pushLine();
bool setVisibility(QListViewItem* i, const QString& text); bool setVisibility(TQListViewItem* i, const TQString& text);
KProcess* m_ps; KProcess* m_ps;
// parse state // parse state
int m_pidCol; //!< The PID column in the ps output int m_pidCol; //!< The PID column in the ps output
int m_ppidCol; //!< The parent-PID column in the ps output int m_ppidCol; //!< The parent-PID column in the ps output
QCString m_token; TQCString m_token;
QValueVector<QString> m_line; TQValueVector<TQString> m_line;
}; };
@ -60,22 +60,22 @@ protected:
* when there is no suitable ps command. * when there is no suitable ps command.
*/ */
class ProcAttach : public QDialog class ProcAttach : public TQDialog
{ {
public: public:
ProcAttach(QWidget* parent); ProcAttach(TQWidget* parent);
virtual ~ProcAttach(); virtual ~ProcAttach();
void setText(const QString& text) { m_processId.setText(text); } void setText(const TQString& text) { m_processId.setText(text); }
QString text() const { return m_processId.text(); } TQString text() const { return m_processId.text(); }
protected: protected:
QLabel m_label; TQLabel m_label;
QLineEdit m_processId; TQLineEdit m_processId;
QPushButton m_buttonOK; TQPushButton m_buttonOK;
QPushButton m_buttonCancel; TQPushButton m_buttonCancel;
QVBoxLayout m_layout; TQVBoxLayout m_layout;
QHBoxLayout m_buttons; TQHBoxLayout m_buttons;
}; };
#endif // ProcAttach_included #endif // ProcAttach_included

@ -10,16 +10,16 @@
#include "procattachbase.h" #include "procattachbase.h"
#include <qvariant.h> #include <ntqvariant.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qtoolbutton.h> #include <ntqtoolbutton.h>
#include <qheader.h> #include <ntqheader.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <qwhatsthis.h> #include <ntqwhatsthis.h>
/* /*
* Constructs a ProcAttachBase as a child of 'parent', with the * Constructs a ProcAttachBase as a child of 'parent', with the
@ -28,66 +28,66 @@
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * TRUE to construct a modal dialog.
*/ */
ProcAttachBase::ProcAttachBase( QWidget* parent, const char* name, bool modal, WFlags fl ) ProcAttachBase::ProcAttachBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : TQDialog( parent, name, modal, fl )
{ {
if ( !name ) if ( !name )
setName( "ProcAttachBase" ); setName( "ProcAttachBase" );
setSizeGripEnabled( TRUE ); setSizeGripEnabled( TRUE );
ProcAttachBaseLayout = new QHBoxLayout( this, 10, 6, "ProcAttachBaseLayout"); ProcAttachBaseLayout = new TQHBoxLayout( this, 10, 6, "ProcAttachBaseLayout");
layout7 = new QVBoxLayout( 0, 0, 6, "layout7"); layout7 = new TQVBoxLayout( 0, 0, 6, "layout7");
layout6 = new QHBoxLayout( 0, 0, 6, "layout6"); layout6 = new TQHBoxLayout( 0, 0, 6, "layout6");
filterLabel = new QLabel( this, "filterLabel" ); filterLabel = new TQLabel( this, "filterLabel" );
layout6->addWidget( filterLabel ); layout6->addWidget( filterLabel );
filterEdit = new QLineEdit( this, "filterEdit" ); filterEdit = new TQLineEdit( this, "filterEdit" );
filterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, filterEdit->sizePolicy().hasHeightForWidth() ) ); filterEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, filterEdit->sizePolicy().hasHeightForWidth() ) );
filterEdit->setMaxLength( 20 ); filterEdit->setMaxLength( 20 );
layout6->addWidget( filterEdit ); layout6->addWidget( filterEdit );
filterClear = new QToolButton( this, "filterClear" ); filterClear = new TQToolButton( this, "filterClear" );
layout6->addWidget( filterClear ); layout6->addWidget( filterClear );
layout7->addLayout( layout6 ); layout7->addLayout( layout6 );
processList = new QListView( this, "processList" ); processList = new TQListView( this, "processList" );
processList->addColumn( tr2i18n( "Command" ) ); processList->addColumn( tr2i18n( "Command" ) );
processList->addColumn( tr2i18n( "PID" ) ); processList->addColumn( tr2i18n( "PID" ) );
processList->addColumn( tr2i18n( "PPID" ) ); processList->addColumn( tr2i18n( "PPID" ) );
processList->setMinimumSize( QSize( 300, 200 ) ); processList->setMinimumSize( TQSize( 300, 200 ) );
processList->setAllColumnsShowFocus( TRUE ); processList->setAllColumnsShowFocus( TRUE );
layout7->addWidget( processList ); layout7->addWidget( processList );
layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); layout3 = new TQHBoxLayout( 0, 0, 6, "layout3");
buttonRefresh = new QPushButton( this, "buttonRefresh" ); buttonRefresh = new TQPushButton( this, "buttonRefresh" );
buttonRefresh->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, buttonRefresh->sizePolicy().hasHeightForWidth() ) ); buttonRefresh->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, buttonRefresh->sizePolicy().hasHeightForWidth() ) );
layout3->addWidget( buttonRefresh ); layout3->addWidget( buttonRefresh );
spacingBtns = new QSpacerItem( 242, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); spacingBtns = new TQSpacerItem( 242, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
layout3->addItem( spacingBtns ); layout3->addItem( spacingBtns );
buttonOk = new QPushButton( this, "buttonOk" ); buttonOk = new TQPushButton( this, "buttonOk" );
buttonOk->setEnabled( FALSE ); buttonOk->setEnabled( FALSE );
buttonOk->setAutoDefault( TRUE ); buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE ); buttonOk->setDefault( TRUE );
layout3->addWidget( buttonOk ); layout3->addWidget( buttonOk );
buttonCancel = new QPushButton( this, "buttonCancel" ); buttonCancel = new TQPushButton( this, "buttonCancel" );
buttonCancel->setAutoDefault( TRUE ); buttonCancel->setAutoDefault( TRUE );
layout3->addWidget( buttonCancel ); layout3->addWidget( buttonCancel );
layout7->addLayout( layout3 ); layout7->addLayout( layout3 );
ProcAttachBaseLayout->addLayout( layout7 ); ProcAttachBaseLayout->addLayout( layout7 );
languageChange(); languageChange();
resize( QSize(560, 416).expandedTo(minimumSizeHint()) ); resize( TQSize(560, 416).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
// signals and slots connections // signals and slots connections
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( buttonRefresh, SIGNAL( clicked() ), this, SLOT( refresh() ) ); connect( buttonRefresh, SIGNAL( clicked() ), this, SLOT( refresh() ) );
connect( filterEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( filterEdited(const QString&) ) ); connect( filterEdit, SIGNAL( textChanged(const TQString&) ), this, SLOT( filterEdited(const TQString&) ) );
connect( filterClear, SIGNAL( clicked() ), filterEdit, SLOT( clear() ) ); connect( filterClear, SIGNAL( clicked() ), filterEdit, SLOT( clear() ) );
connect( processList, SIGNAL( selectionChanged() ), this, SLOT( selectedChanged() ) ); connect( processList, SIGNAL( selectionChanged() ), this, SLOT( selectedChanged() ) );
@ -106,7 +106,7 @@ ProcAttachBase::ProcAttachBase( QWidget* parent, const char* name, bool modal, W
*/ */
ProcAttachBase::~ProcAttachBase() ProcAttachBase::~ProcAttachBase()
{ {
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, TQt does it all for us
} }
/* /*
@ -117,21 +117,21 @@ void ProcAttachBase::languageChange()
{ {
setCaption( tr2i18n( "Attach to Process" ) ); setCaption( tr2i18n( "Attach to Process" ) );
filterLabel->setText( tr2i18n( "&Filter or PID:" ) ); filterLabel->setText( tr2i18n( "&Filter or PID:" ) );
QWhatsThis::add( filterEdit, tr2i18n( "Type the name of the process or its process ID (PID) here to reduce the number of entries in the list." ) ); TQWhatsThis::add( filterEdit, tr2i18n( "Type the name of the process or its process ID (PID) here to reduce the number of entries in the list." ) );
filterClear->setText( tr2i18n( "..." ) ); filterClear->setText( tr2i18n( "..." ) );
QToolTip::add( filterClear, tr2i18n( "Clear filter" ) ); TQToolTip::add( filterClear, tr2i18n( "Clear filter" ) );
QWhatsThis::add( filterClear, tr2i18n( "Use this button to clear the filter text so that all processes are displayed." ) ); TQWhatsThis::add( filterClear, tr2i18n( "Use this button to clear the filter text so that all processes are displayed." ) );
processList->header()->setLabel( 0, tr2i18n( "Command" ) ); processList->header()->setLabel( 0, tr2i18n( "Command" ) );
processList->header()->setLabel( 1, tr2i18n( "PID" ) ); processList->header()->setLabel( 1, tr2i18n( "PID" ) );
processList->header()->setLabel( 2, tr2i18n( "PPID" ) ); processList->header()->setLabel( 2, tr2i18n( "PPID" ) );
QWhatsThis::add( processList, tr2i18n( "<p>This list displays all processes that are currently running. You must select the process that you want KDbg to attach to. Use the <b>Filter or PID</b> edit box to reduce the number of entries in this list.<p>The text in the <i>Command</i> column is usually, but not always, the command that was used to start the process. The <i>PID</i> column shows the process ID. The <i>PPID</i> column shows the process ID of the parent process. Additional columns show more information about the processes that is also available via the system's <i>ps</i> command.</p><p>The list is not updated automatically. Use the <b>Refresh</b> button to update it.</p>" ) ); TQWhatsThis::add( processList, tr2i18n( "<p>This list displays all processes that are currently running. You must select the process that you want KDbg to attach to. Use the <b>Filter or PID</b> edit box to reduce the number of entries in this list.<p>The text in the <i>Command</i> column is usually, but not always, the command that was used to start the process. The <i>PID</i> column shows the process ID. The <i>PPID</i> column shows the process ID of the parent process. Additional columns show more information about the processes that is also available via the system's <i>ps</i> command.</p><p>The list is not updated automatically. Use the <b>Refresh</b> button to update it.</p>" ) );
buttonRefresh->setText( tr2i18n( "&Refresh" ) ); buttonRefresh->setText( tr2i18n( "&Refresh" ) );
QWhatsThis::add( buttonRefresh, tr2i18n( "This button updates the list of processes." ) ); TQWhatsThis::add( buttonRefresh, tr2i18n( "This button updates the list of processes." ) );
buttonOk->setText( tr2i18n( "&OK" ) ); buttonOk->setText( tr2i18n( "&OK" ) );
buttonOk->setAccel( QKeySequence( QString::null ) ); buttonOk->setAccel( TQKeySequence( TQString::null ) );
QWhatsThis::add( buttonOk, tr2i18n( "You must select a process from the list. Then click the <b>OK</b> button to attach to that process." ) ); TQWhatsThis::add( buttonOk, tr2i18n( "You must select a process from the list. Then click the <b>OK</b> button to attach to that process." ) );
buttonCancel->setText( tr2i18n( "&Cancel" ) ); buttonCancel->setText( tr2i18n( "&Cancel" ) );
buttonCancel->setAccel( QKeySequence( QString::null ) ); buttonCancel->setAccel( TQKeySequence( TQString::null ) );
} }
#include "procattachbase.moc" #include "procattachbase.moc"

@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProcAttachBase</class> <class>ProcAttachBase</class>
<author>Johannes Sixt</author> <author>Johannes Sixt</author>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>ProcAttachBase</cstring> <cstring>ProcAttachBase</cstring>
</property> </property>
@ -23,7 +23,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -31,7 +31,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -39,7 +39,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>filterLabel</cstring> <cstring>filterLabel</cstring>
</property> </property>
@ -50,7 +50,7 @@
<cstring>filterEdit</cstring> <cstring>filterEdit</cstring>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>filterEdit</cstring> <cstring>filterEdit</cstring>
</property> </property>
@ -69,7 +69,7 @@
<string>Type the name of the process or its process ID (PID) here to reduce the number of entries in the list.</string> <string>Type the name of the process or its process ID (PID) here to reduce the number of entries in the list.</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton"> <widget class="TQToolButton">
<property name="name"> <property name="name">
<cstring>filterClear</cstring> <cstring>filterClear</cstring>
</property> </property>
@ -85,7 +85,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QListView"> <widget class="TQListView">
<column> <column>
<property name="text"> <property name="text">
<string>Command</string> <string>Command</string>
@ -135,7 +135,7 @@
<string>&lt;p&gt;This list displays all processes that are currently running. You must select the process that you want KDbg to attach to. Use the &lt;b&gt;Filter or PID&lt;/b&gt; edit box to reduce the number of entries in this list.&lt;p&gt;The text in the &lt;i&gt;Command&lt;/i&gt; column is usually, but not always, the command that was used to start the process. The &lt;i&gt;PID&lt;/i&gt; column shows the process ID. The &lt;i&gt;PPID&lt;/i&gt; column shows the process ID of the parent process. Additional columns show more information about the processes that is also available via the system's &lt;i&gt;ps&lt;/i&gt; command.&lt;/p&gt;&lt;p&gt;The list is not updated automatically. Use the &lt;b&gt;Refresh&lt;/b&gt; button to update it.&lt;/p&gt;</string> <string>&lt;p&gt;This list displays all processes that are currently running. You must select the process that you want KDbg to attach to. Use the &lt;b&gt;Filter or PID&lt;/b&gt; edit box to reduce the number of entries in this list.&lt;p&gt;The text in the &lt;i&gt;Command&lt;/i&gt; column is usually, but not always, the command that was used to start the process. The &lt;i&gt;PID&lt;/i&gt; column shows the process ID. The &lt;i&gt;PPID&lt;/i&gt; column shows the process ID of the parent process. Additional columns show more information about the processes that is also available via the system's &lt;i&gt;ps&lt;/i&gt; command.&lt;/p&gt;&lt;p&gt;The list is not updated automatically. Use the &lt;b&gt;Refresh&lt;/b&gt; button to update it.&lt;/p&gt;</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -143,7 +143,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonRefresh</cstring> <cstring>buttonRefresh</cstring>
</property> </property>
@ -179,7 +179,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -202,7 +202,7 @@
<string>You must select a process from the list. Then click the &lt;b&gt;OK&lt;/b&gt; button to attach to that process.</string> <string>You must select a process from the list. Then click the &lt;b&gt;OK&lt;/b&gt; button to attach to that process.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -243,9 +243,9 @@
</connection> </connection>
<connection> <connection>
<sender>filterEdit</sender> <sender>filterEdit</sender>
<signal>textChanged(const QString&amp;)</signal> <signal>textChanged(const TQString&amp;)</signal>
<receiver>ProcAttachBase</receiver> <receiver>ProcAttachBase</receiver>
<slot>filterEdited(const QString&amp;)</slot> <slot>filterEdited(const TQString&amp;)</slot>
</connection> </connection>
<connection> <connection>
<sender>filterClear</sender> <sender>filterClear</sender>
@ -269,7 +269,7 @@
</tabstops> </tabstops>
<slots> <slots>
<slot specifier="pure virtual">refresh()</slot> <slot specifier="pure virtual">refresh()</slot>
<slot specifier="pure virtual">filterEdited(const QString&amp;)</slot> <slot specifier="pure virtual">filterEdited(const TQString&amp;)</slot>
<slot specifier="pure virtual">selectedChanged()</slot> <slot specifier="pure virtual">selectedChanged()</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="10"/> <layoutdefaults spacing="6" margin="10"/>

@ -6,21 +6,21 @@
#include "programconfig.h" #include "programconfig.h"
#include <kconfigbackend.h> #include <kconfigbackend.h>
#include <qfile.h> #include <ntqfile.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
struct ProgramConfig::MyBackend : KConfigINIBackEnd struct ProgramConfig::MyBackend : KConfigINIBackEnd
{ {
MyBackend(KConfigBase* cfg, const QString& fn) : MyBackend(KConfigBase* cfg, const TQString& fn) :
KConfigINIBackEnd(cfg, fn, "", false) KConfigINIBackEnd(cfg, fn, "", false)
{ } { }
// need the following public // need the following public
using KConfigINIBackEnd::parseSingleConfigFile; using KConfigINIBackEnd::parseSingleConfigFile;
}; };
ProgramConfig::ProgramConfig(const QString& fileName) : ProgramConfig::ProgramConfig(const TQString& fileName) :
m_fileName(fileName) m_fileName(fileName)
{ {
m_iniBackend = new MyBackend(this, fileName); m_iniBackend = new MyBackend(this, fileName);
@ -28,16 +28,16 @@ ProgramConfig::ProgramConfig(const QString& fileName) :
reparseConfiguration(); reparseConfiguration();
} }
QStringList ProgramConfig::groupList() const TQStringList ProgramConfig::groupList() const
{ {
// unused // unused
return QStringList(); return TQStringList();
} }
QMap<QString, QString> ProgramConfig::entryMap(const QString&) const TQMap<TQString, TQString> ProgramConfig::entryMap(const TQString&) const
{ {
// unused // unused
return QMap<QString, QString>(); return TQMap<TQString, TQString>();
} }
void ProgramConfig::reparseConfiguration() void ProgramConfig::reparseConfiguration()
@ -48,7 +48,7 @@ void ProgramConfig::reparseConfiguration()
KEntryKey groupKey("<default>", 0); KEntryKey groupKey("<default>", 0);
m_entryMap.insert(groupKey, KEntry()); m_entryMap.insert(groupKey, KEntry());
QFile file(m_fileName); TQFile file(m_fileName);
bool readonly = true; bool readonly = true;
bool useit = true; bool useit = true;
if (file.open(IO_ReadWrite)) { /* don't truncate! */ if (file.open(IO_ReadWrite)) { /* don't truncate! */
@ -91,9 +91,9 @@ void ProgramConfig::reparseConfiguration()
setReadOnly(readonly || !useit); setReadOnly(readonly || !useit);
} }
KEntryMap ProgramConfig::internalEntryMap(const QString& group) const KEntryMap ProgramConfig::internalEntryMap(const TQString& group) const
{ {
QCString group_utf = group.utf8(); TQCString group_utf = group.utf8();
KEntryMap tmpEntryMap; KEntryMap tmpEntryMap;
// copy the whole group starting at the special group marker // copy the whole group starting at the special group marker
@ -140,7 +140,7 @@ KEntry ProgramConfig::lookupData(const KEntryKey& key) const
} }
} }
bool ProgramConfig::internalHasGroup(const QCString&) const bool ProgramConfig::internalHasGroup(const TQCString&) const
{ {
// unused // unused
return false; return false;

@ -11,15 +11,15 @@ class KConfigINIBackEnd;
class ProgramConfig : public KConfigBase class ProgramConfig : public KConfigBase
{ {
public: public:
ProgramConfig(const QString &fileName); ProgramConfig(const TQString &fileName);
virtual QStringList groupList() const; virtual TQStringList groupList() const;
virtual QMap<QString, QString> entryMap(const QString &group) const; virtual TQMap<TQString, TQString> entryMap(const TQString &group) const;
virtual void reparseConfiguration(); virtual void reparseConfiguration();
virtual KEntryMap internalEntryMap( const QString& pGroup ) const; virtual KEntryMap internalEntryMap( const TQString& pGroup ) const;
virtual KEntryMap internalEntryMap() const; virtual KEntryMap internalEntryMap() const;
virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup = true); virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup = true);
virtual KEntry lookupData(const KEntryKey &_key) const; virtual KEntry lookupData(const KEntryKey &_key) const;
virtual bool internalHasGroup(const QCString &group) const; virtual bool internalHasGroup(const TQCString &group) const;
protected: protected:
/** /**
@ -27,10 +27,10 @@ protected:
* keys which indicate the start of a group of entries. * keys which indicate the start of a group of entries.
* *
* These special keys will have the .key portion of their @ref KEntryKey * These special keys will have the .key portion of their @ref KEntryKey
* set to QString::null. * set to TQString::null.
*/ */
KEntryMap m_entryMap; KEntryMap m_entryMap;
QString m_fileName; TQString m_fileName;
// this is defined out-of-line // this is defined out-of-line
struct MyBackend; struct MyBackend;
MyBackend* m_iniBackend; MyBackend* m_iniBackend;

@ -4,15 +4,15 @@
* See the file COPYING in the toplevel directory of the source directory. * See the file COPYING in the toplevel directory of the source directory.
*/ */
#include <qheader.h> #include <ntqheader.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include <kiconloader.h> #include <kiconloader.h>
#include <qfontdialog.h> #include <ntqfontdialog.h>
#include <qmessagebox.h> #include <ntqmessagebox.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <qregexp.h> #include <ntqregexp.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <stdlib.h> /* strtoul */ #include <stdlib.h> /* strtoul */
#include "regwnd.h" #include "regwnd.h"
#include "dbgdriver.h" #include "dbgdriver.h"
@ -94,11 +94,11 @@ uint RegisterDisplay::bitMap[] = {
64, 80, 128, /*default*/32, 64, 80, 128, /*default*/32,
}; };
class ModeItem : public QListViewItem class ModeItem : public TQListViewItem
{ {
public: public:
ModeItem(QListView* parent, const QString& name) : QListViewItem(parent, name) {} ModeItem(TQListView* parent, const TQString& name) : TQListViewItem(parent, name) {}
ModeItem(QListViewItem* parent) : QListViewItem(parent) {} ModeItem(TQListViewItem* parent) : TQListViewItem(parent) {}
virtual void setMode(RegisterDisplay mode) = 0; virtual void setMode(RegisterDisplay mode) = 0;
virtual RegisterDisplay mode() = 0; virtual RegisterDisplay mode() = 0;
@ -108,21 +108,21 @@ class GroupingViewItem : public ModeItem
{ {
public: public:
GroupingViewItem(RegisterView* parent, GroupingViewItem(RegisterView* parent,
const QString& name, const QString& pattern, const TQString& name, const TQString& pattern,
RegisterDisplay mode) : RegisterDisplay mode) :
ModeItem(parent, name), matcher(pattern), gmode(mode) ModeItem(parent, name), matcher(pattern), gmode(mode)
{ {
setExpandable(true); setExpandable(true);
setOpen(true); setOpen(true);
} }
bool matchName(const QString& str) const bool matchName(const TQString& str) const
{ {
return matcher.exactMatch(str); return matcher.exactMatch(str);
} }
virtual void setMode(RegisterDisplay mode) virtual void setMode(RegisterDisplay mode)
{ {
gmode=mode; gmode=mode;
QListViewItem *it=firstChild(); TQListViewItem *it=firstChild();
for (; 0!=it; it=it->nextSibling()) { for (; 0!=it; it=it->nextSibling()) {
(static_cast<ModeItem*>(it))->setMode(gmode); (static_cast<ModeItem*>(it))->setMode(gmode);
} }
@ -130,7 +130,7 @@ public:
virtual RegisterDisplay mode() { return gmode; } virtual RegisterDisplay mode() { return gmode; }
private: private:
QRegExp matcher; TQRegExp matcher;
RegisterDisplay gmode; RegisterDisplay gmode;
}; };
@ -150,7 +150,7 @@ public:
bool m_found; bool m_found;
protected: protected:
virtual void paintCell(QPainter*, const QColorGroup& cg, virtual void paintCell(TQPainter*, const TQColorGroup& cg,
int column, int width, int alignment); int column, int width, int alignment);
}; };
@ -193,13 +193,13 @@ inline int hexCharToDigit(char h)
return -1; return -1;
} }
static QString toBinary(QString hex) static TQString toBinary(TQString hex)
{ {
static const char digits[16][8] = { static const char digits[16][8] = {
"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"
}; };
QString result; TQString result;
for (unsigned i = 2; i < hex.length(); i++) { for (unsigned i = 2; i < hex.length(); i++) {
int idx = hexCharToDigit(hex[i].latin1()); int idx = hexCharToDigit(hex[i].latin1());
@ -220,9 +220,9 @@ static QString toBinary(QString hex)
return result; return result;
} }
static QString toOctal(QString hex) static TQString toOctal(TQString hex)
{ {
QString result; TQString result;
int shift = 0; int shift = 0;
unsigned v = 0; unsigned v = 0;
for (int i = hex.length()-1; i >= 2; i--) { for (int i = hex.length()-1; i >= 2; i--) {
@ -245,7 +245,7 @@ static QString toOctal(QString hex)
return "0" + result; return "0" + result;
} }
static QString toDecimal(QString hex) static TQString toDecimal(TQString hex)
{ {
/* /*
* We convert only numbers that are small enough for this computer's * We convert only numbers that are small enough for this computer's
@ -260,15 +260,15 @@ static QString toDecimal(QString hex)
if (start == end) if (start == end)
return hex; return hex;
else else
return QString().setNum(val); return TQString().setNum(val);
} }
static QString toBCD(const QString& hex) static TQString toBCD(const TQString& hex)
{ {
return hex.right(2); return hex.right(2);
} }
static char* toRaw(const QString& hex, uint& length) static char* toRaw(const TQString& hex, uint& length)
{ {
static uint testNum=1; static uint testNum=1;
static void* testVoid=(void*)&testNum; static void* testVoid=(void*)&testNum;
@ -298,7 +298,7 @@ static char* toRaw(const QString& hex, uint& length)
return data; return data;
} }
static long double extractNumber(const QString& hex) static long double extractNumber(const TQString& hex)
{ {
uint length; uint length;
char* data=toRaw(hex, length); char* data=toRaw(hex, length);
@ -317,7 +317,7 @@ static long double extractNumber(const QString& hex)
return val; return val;
} }
static QString toFloat(const QString& hex, char p) static TQString toFloat(const TQString& hex, char p)
{ {
uint bits; uint bits;
uint prec=6; uint prec=6;
@ -325,7 +325,7 @@ static QString toFloat(const QString& hex, char p)
else if (hex.length()<=18) { bits=64; prec=17; } else if (hex.length()<=18) { bits=64; prec=17; }
else { bits=80; prec=20; } else { bits=80; prec=20; }
QString cooked=QString::number(extractNumber(hex), p, prec); TQString cooked=TQString::number(extractNumber(hex), p, prec);
if (p=='e') { if (p=='e') {
prec+=7; prec+=7;
while (cooked.length()<prec) cooked=cooked.prepend(" "); while (cooked.length()<prec) cooked=cooked.prepend(" ");
@ -333,7 +333,7 @@ static QString toFloat(const QString& hex, char p)
return cooked; return cooked;
} }
static QString convertSingle(const QString& raw, const RegisterDisplay mode) static TQString convertSingle(const TQString& raw, const RegisterDisplay mode)
{ {
switch (mode.presentationFlag()) { switch (mode.presentationFlag()) {
case RegisterDisplay::binary: return toBinary(raw); case RegisterDisplay::binary: return toBinary(raw);
@ -348,9 +348,9 @@ static QString convertSingle(const QString& raw, const RegisterDisplay mode)
} }
} }
QString convertRaw(const RegisterInfo reg, RegisterDisplay mode) TQString convertRaw(const RegisterInfo reg, RegisterDisplay mode)
{ {
QString cooked; TQString cooked;
uint totalNibles=0, nibles=mode.bits()>>2; uint totalNibles=0, nibles=mode.bits()>>2;
if (RegisterDisplay::nada!=mode.presentationFlag() && if (RegisterDisplay::nada!=mode.presentationFlag() &&
reg.rawValue.length() > 2 && reg.rawValue[0] == '0' && reg.rawValue[1] == 'x') reg.rawValue.length() > 2 && reg.rawValue[0] == '0' && reg.rawValue[1] == 'x')
@ -364,12 +364,12 @@ QString convertRaw(const RegisterInfo reg, RegisterDisplay mode)
if (0==nibles) nibles=8; // default to 4 byte, 32 bits values if (0==nibles) nibles=8; // default to 4 byte, 32 bits values
if (nibles>totalNibles) totalNibles=nibles; // minimum one value if (nibles>totalNibles) totalNibles=nibles; // minimum one value
QString raw=reg.rawValue.right(reg.rawValue.length()-2); // clip off "0x" TQString raw=reg.rawValue.right(reg.rawValue.length()-2); // clip off "0x"
while (raw.length()<totalNibles) raw.prepend("0"); // pad out to totalNibles while (raw.length()<totalNibles) raw.prepend("0"); // pad out to totalNibles
QString separator=","; // locale-specific? TQString separator=","; // locale-specific?
for (int nib=totalNibles-nibles; nib>=0; nib-=nibles) { for (int nib=totalNibles-nibles; nib>=0; nib-=nibles) {
QString qstr=convertSingle(raw.mid(nib, nibles).prepend("0x"), mode); TQString qstr=convertSingle(raw.mid(nib, nibles).prepend("0x"), mode);
if (nib==int(totalNibles-nibles)) cooked=qstr+cooked; if (nib==int(totalNibles-nibles)) cooked=qstr+cooked;
else cooked=qstr+separator+cooked; else cooked=qstr+separator+cooked;
@ -389,7 +389,7 @@ void RegisterViewItem::setValue(const RegisterInfo& reg)
m_reg = reg; m_reg = reg;
setText(1, reg.rawValue); setText(1, reg.rawValue);
QString cookedValue = convertRaw(reg, m_mode); TQString cookedValue = convertRaw(reg, m_mode);
setText(2, cookedValue); setText(2, cookedValue);
} }
@ -397,36 +397,36 @@ void RegisterViewItem::setMode(RegisterDisplay mode)
{ {
m_mode = mode; m_mode = mode;
QString cookedValue = convertRaw(m_reg, mode); TQString cookedValue = convertRaw(m_reg, mode);
setText(2, cookedValue); setText(2, cookedValue);
} }
void RegisterViewItem::paintCell(QPainter* p, const QColorGroup& cg, void RegisterViewItem::paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int alignment) int column, int width, int alignment)
{ {
if (m_changes) { if (m_changes) {
QColorGroup newcg = cg; TQColorGroup newcg = cg;
newcg.setColor(QColorGroup::Text, red); newcg.setColor(TQColorGroup::Text, red);
QListViewItem::paintCell(p, newcg, column, width, alignment); TQListViewItem::paintCell(p, newcg, column, width, alignment);
} else { } else {
QListViewItem::paintCell(p, cg, column, width, alignment); TQListViewItem::paintCell(p, cg, column, width, alignment);
} }
} }
RegisterView::RegisterView(QWidget* parent, const char* name) : RegisterView::RegisterView(TQWidget* parent, const char* name) :
QListView(parent, name) TQListView(parent, name)
{ {
setSorting(-1); setSorting(-1);
setFont(KGlobalSettings::fixedFont()); setFont(KGlobalSettings::fixedFont());
QPixmap iconRegs = UserIcon("regs.xpm"); TQPixmap iconRegs = UserIcon("regs.xpm");
QPixmap iconWatchcoded = UserIcon("watchcoded.xpm"); TQPixmap iconWatchcoded = UserIcon("watchcoded.xpm");
QPixmap iconWatch = UserIcon("watch.xpm"); TQPixmap iconWatch = UserIcon("watch.xpm");
addColumn(QIconSet(iconRegs), i18n("Register")); addColumn(TQIconSet(iconRegs), i18n("Register"));
addColumn(QIconSet(iconWatchcoded), i18n("Value")); addColumn(TQIconSet(iconWatchcoded), i18n("Value"));
addColumn(QIconSet(iconWatch), i18n("Decoded value")); addColumn(TQIconSet(iconWatch), i18n("Decoded value"));
setColumnAlignment(0,AlignLeft); setColumnAlignment(0,AlignLeft);
setColumnAlignment(1,AlignLeft); setColumnAlignment(1,AlignLeft);
@ -435,10 +435,10 @@ RegisterView::RegisterView(QWidget* parent, const char* name) :
setAllColumnsShowFocus( true ); setAllColumnsShowFocus( true );
header()->setClickEnabled(false); header()->setClickEnabled(false);
connect(this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), connect(this, SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
SLOT(rightButtonClicked(QListViewItem*,const QPoint&,int))); SLOT(rightButtonClicked(TQListViewItem*,const TQPoint&,int)));
m_modemenu = new QPopupMenu(this, "ERROR"); m_modemenu = new TQPopupMenu(this, "ERROR");
for (uint i=0; i<sizeof(menuitems)/sizeof(MenuPair); i++) { for (uint i=0; i<sizeof(menuitems)/sizeof(MenuPair); i++) {
if (menuitems[i].isSeparator()) if (menuitems[i].isSeparator())
m_modemenu->insertSeparator(); m_modemenu->insertSeparator();
@ -478,9 +478,9 @@ RegisterView::~RegisterView()
{ {
} }
GroupingViewItem* RegisterView::findMatchingGroup(const QString& regName) GroupingViewItem* RegisterView::findMatchingGroup(const TQString& regName)
{ {
for (QListViewItem* it = firstChild(); it != 0; it = it->nextSibling()) for (TQListViewItem* it = firstChild(); it != 0; it = it->nextSibling())
{ {
GroupingViewItem* i = static_cast<GroupingViewItem*>(it); GroupingViewItem* i = static_cast<GroupingViewItem*>(it);
if (i->matchName(regName)) if (i->matchName(regName))
@ -490,9 +490,9 @@ GroupingViewItem* RegisterView::findMatchingGroup(const QString& regName)
return static_cast<GroupingViewItem*>(firstChild()); return static_cast<GroupingViewItem*>(firstChild());
} }
GroupingViewItem* RegisterView::findGroup(const QString& groupName) GroupingViewItem* RegisterView::findGroup(const TQString& groupName)
{ {
for (QListViewItem* it = firstChild(); it != 0; it = it->nextSibling()) for (TQListViewItem* it = firstChild(); it != 0; it = it->nextSibling())
{ {
if (it->text(0) == groupName) if (it->text(0) == groupName)
return static_cast<GroupingViewItem*>(it); return static_cast<GroupingViewItem*>(it);
@ -502,7 +502,7 @@ GroupingViewItem* RegisterView::findGroup(const QString& groupName)
void RegisterView::updateGroupVisibility() void RegisterView::updateGroupVisibility()
{ {
for (QListViewItem* it = firstChild(); it != 0; it = it->nextSibling()) for (TQListViewItem* it = firstChild(); it != 0; it = it->nextSibling())
{ {
it->setVisible(it->childCount() > 0); it->setVisible(it->childCount() > 0);
} }
@ -519,7 +519,7 @@ void RegisterView::updateRegisters(const std::list<RegisterInfo>& regs)
} }
// parse register values // parse register values
// must iterate last to first, since QListView inserts at the top // must iterate last to first, since TQListView inserts at the top
for (std::list<RegisterInfo>::const_reverse_iterator reg = regs.rbegin(); reg != regs.rend(); ++reg) for (std::list<RegisterInfo>::const_reverse_iterator reg = regs.rbegin(); reg != regs.rend(); ++reg)
{ {
// check if this is a new register // check if this is a new register
@ -555,14 +555,14 @@ void RegisterView::updateRegisters(const std::list<RegisterInfo>& regs)
} }
// remove all 'not found' items; // remove all 'not found' items;
QStringList del; TQStringList del;
for (RegMap::iterator i = m_registers.begin(); i != m_registers.end(); ++i) for (RegMap::iterator i = m_registers.begin(); i != m_registers.end(); ++i)
{ {
if (!i->second->m_found) { if (!i->second->m_found) {
del.push_back(i->first); del.push_back(i->first);
} }
} }
for (QStringList::Iterator i = del.begin(); i != del.end(); ++i) for (TQStringList::Iterator i = del.begin(); i != del.end(); ++i)
{ {
RegMap::iterator it = m_registers.find(*i); RegMap::iterator it = m_registers.find(*i);
delete it->second; delete it->second;
@ -575,7 +575,7 @@ void RegisterView::updateRegisters(const std::list<RegisterInfo>& regs)
} }
void RegisterView::rightButtonClicked(QListViewItem* item, const QPoint& p, int) void RegisterView::rightButtonClicked(TQListViewItem* item, const TQPoint& p, int)
{ {
if (item) { if (item) {
RegisterDisplay mode=static_cast<ModeItem*>(item)->mode(); RegisterDisplay mode=static_cast<ModeItem*>(item)->mode();
@ -604,10 +604,10 @@ void RegisterView::slotModeChange(int pcode)
} }
} }
void RegisterView::paletteChange(const QPalette& oldPal) void RegisterView::paletteChange(const TQPalette& oldPal)
{ {
setFont(KGlobalSettings::fixedFont()); setFont(KGlobalSettings::fixedFont());
QListView::paletteChange(oldPal); TQListView::paletteChange(oldPal);
} }
#include "regwnd.moc" #include "regwnd.moc"

@ -7,35 +7,35 @@
#ifndef REGWND_H #ifndef REGWND_H
#define REGWND_H #define REGWND_H
#include <qlistview.h> #include <ntqlistview.h>
#include <list> #include <list>
#include <map> #include <map>
class QPopupMenu; class TQPopupMenu;
class RegisterViewItem; class RegisterViewItem;
class GroupingViewItem; class GroupingViewItem;
struct RegisterInfo; struct RegisterInfo;
class RegisterView : public QListView class RegisterView : public TQListView
{ {
Q_OBJECT Q_OBJECT
public: public:
RegisterView(QWidget* parent, const char *name = 0L); RegisterView(TQWidget* parent, const char *name = 0L);
~RegisterView(); ~RegisterView();
protected slots: protected slots:
void rightButtonClicked(QListViewItem*, const QPoint&, int); void rightButtonClicked(TQListViewItem*, const TQPoint&, int);
void slotModeChange(int); void slotModeChange(int);
void updateRegisters(const std::list<RegisterInfo>&); void updateRegisters(const std::list<RegisterInfo>&);
private: private:
void paletteChange(const QPalette& oldPal); void paletteChange(const TQPalette& oldPal);
void updateGroupVisibility(); void updateGroupVisibility();
GroupingViewItem* findMatchingGroup(const QString& regName); GroupingViewItem* findMatchingGroup(const TQString& regName);
GroupingViewItem* findGroup(const QString& groupName); GroupingViewItem* findGroup(const TQString& groupName);
QPopupMenu* m_modemenu; TQPopupMenu* m_modemenu;
typedef std::map<QString,RegisterViewItem*> RegMap; typedef std::map<TQString,RegisterViewItem*> RegMap;
RegMap m_registers; RegMap m_registers;
friend class RegisterViewItem; friend class RegisterViewItem;

@ -6,13 +6,13 @@
#include "debugger.h" #include "debugger.h"
#include "sourcewnd.h" #include "sourcewnd.h"
#include <qtextstream.h> #include <ntqtextstream.h>
#include <qpainter.h> #include <ntqpainter.h>
#include <qbrush.h> #include <ntqbrush.h>
#include <qfile.h> #include <ntqfile.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qkeycode.h> #include <ntqkeycode.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <kapplication.h> #include <kapplication.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
@ -24,8 +24,8 @@
#include "mydebug.h" #include "mydebug.h"
SourceWindow::SourceWindow(const QString& fileName, QWidget* parent, const char* name) : SourceWindow::SourceWindow(const TQString& fileName, TQWidget* parent, const char* name) :
QTextEdit(parent, name), TQTextEdit(parent, name),
m_fileName(fileName), m_fileName(fileName),
m_curRow(-1), m_curRow(-1),
m_widthItems(16), m_widthItems(16),
@ -52,7 +52,7 @@ SourceWindow::SourceWindow(const QString& fileName, QWidget* parent, const char*
viewport()->installEventFilter(this); viewport()->installEventFilter(this);
// add a syntax highlighter // add a syntax highlighter
if (QRegExp("\\.(c(pp|c|\\+\\+)?|CC?|h(\\+\\+|h)?|HH?)$").search(m_fileName) >= 0) if (TQRegExp("\\.(c(pp|c|\\+\\+)?|CC?|h(\\+\\+|h)?|HH?)$").search(m_fileName) >= 0)
{ {
new HighlightCpp(this); new HighlightCpp(this);
} }
@ -65,13 +65,13 @@ SourceWindow::~SourceWindow()
bool SourceWindow::loadFile() bool SourceWindow::loadFile()
{ {
// first we load the code into QTextEdit // first we load the code into TQTextEdit
QFile f(m_fileName); TQFile f(m_fileName);
if (!f.open(IO_ReadOnly)) { if (!f.open(IO_ReadOnly)) {
return false; return false;
} }
QTextStream t(&f); TQTextStream t(&f);
setText(t.read()); setText(t.read());
f.close(); f.close();
@ -94,7 +94,7 @@ bool SourceWindow::loadFile()
void SourceWindow::reloadFile() void SourceWindow::reloadFile()
{ {
QFile f(m_fileName); TQFile f(m_fileName);
if (!f.open(IO_ReadOnly)) { if (!f.open(IO_ReadOnly)) {
// open failed; leave alone // open failed; leave alone
return; return;
@ -103,7 +103,7 @@ void SourceWindow::reloadFile()
// read text into m_sourceCode // read text into m_sourceCode
m_sourceCode.clear(); /* clear old text */ m_sourceCode.clear(); /* clear old text */
QTextStream t(&f); TQTextStream t(&f);
setText(t.read()); setText(t.read());
f.close(); f.close();
@ -148,13 +148,13 @@ void SourceWindow::scrollToRow(int row)
ensureCursorVisible(); ensureCursorVisible();
} }
void SourceWindow::drawFrame(QPainter* p) void SourceWindow::drawFrame(TQPainter* p)
{ {
QTextEdit::drawFrame(p); TQTextEdit::drawFrame(p);
// and paragraph at the top is... // and paragraph at the top is...
int top = paragraphAt(QPoint(0,contentsY())); int top = paragraphAt(TQPoint(0,contentsY()));
int bot = paragraphAt(QPoint(0,contentsY()+visibleHeight()-1)); int bot = paragraphAt(TQPoint(0,contentsY()+visibleHeight()-1));
if (bot < 0) if (bot < 0)
bot = paragraphs()-1; bot = paragraphs()-1;
@ -162,10 +162,10 @@ void SourceWindow::drawFrame(QPainter* p)
// set a clip rectangle // set a clip rectangle
int fw = frameWidth(); int fw = frameWidth();
QRect inside = rect(); TQRect inside = rect();
inside.addCoords(fw,fw,-fw,-fw); inside.addCoords(fw,fw,-fw,-fw);
QRegion clip = p->clipRegion(); TQRegion clip = p->clipRegion();
clip &= QRegion(inside); clip &= TQRegion(inside);
p->setClipRegion(clip); p->setClipRegion(clip);
p->setFont(m_lineNoFont); p->setFont(m_lineNoFont);
@ -177,8 +177,8 @@ void SourceWindow::drawFrame(QPainter* p)
uchar item = m_lineItems[row]; uchar item = m_lineItems[row];
p->save(); p->save();
QRect r = paragraphRect(row); TQRect r = paragraphRect(row);
QPoint pt = contentsToViewport(r.topLeft()); TQPoint pt = contentsToViewport(r.topLeft());
int h = r.height(); int h = r.height();
p->translate(fw, pt.y()+viewport()->y()); p->translate(fw, pt.y()+viewport()->y());
@ -237,7 +237,7 @@ void SourceWindow::drawFrame(QPainter* p)
p->translate(m_widthPlus, 0); p->translate(m_widthPlus, 0);
if (!isRowDisassCode(row)) { if (!isRowDisassCode(row)) {
p->drawText(0, 0, m_widthLineNo, h, AlignRight|AlignVCenter, p->drawText(0, 0, m_widthLineNo, h, AlignRight|AlignVCenter,
QString().setNum(rowToLine(row)+1)); TQString().setNum(rowToLine(row)+1));
} }
p->restore(); p->restore();
} }
@ -251,7 +251,7 @@ void SourceWindow::updateLineItems(const KDebugger* dbg)
if (m_lineItems[i] & liBPany) { if (m_lineItems[i] & liBPany) {
// check if this breakpoint still exists // check if this breakpoint still exists
int line = rowToLine(i); int line = rowToLine(i);
TRACE(QString().sprintf("checking for bp at %d", line)); TRACE(TQString().sprintf("checking for bp at %d", line));
KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); KDebugger::BrkptROIterator bp = dbg->breakpointsBegin();
for (; bp != dbg->breakpointsEnd(); ++bp) for (; bp != dbg->breakpointsEnd(); ++bp)
{ {
@ -275,7 +275,7 @@ void SourceWindow::updateLineItems(const KDebugger* dbg)
for (KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); bp != dbg->breakpointsEnd(); ++bp) for (KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); bp != dbg->breakpointsEnd(); ++bp)
{ {
if (fileNameMatches(bp->fileName)) { if (fileNameMatches(bp->fileName)) {
TRACE(QString().sprintf("updating %s:%d", bp->fileName.data(), bp->lineNo)); TRACE(TQString().sprintf("updating %s:%d", bp->fileName.data(), bp->lineNo));
int i = bp->lineNo; int i = bp->lineNo;
if (i < 0 || i >= int(m_sourceCode.size())) if (i < 0 || i >= int(m_sourceCode.size()))
continue; continue;
@ -322,27 +322,27 @@ void SourceWindow::setPC(bool set, int lineNo, const DbgAddr& address, int frame
} }
} }
void SourceWindow::find(const QString& text, bool caseSensitive, FindDirection dir) void SourceWindow::find(const TQString& text, bool caseSensitive, FindDirection dir)
{ {
ASSERT(dir == 1 || dir == -1); ASSERT(dir == 1 || dir == -1);
if (QTextEdit::find(text, caseSensitive, false, dir > 0)) if (TQTextEdit::find(text, caseSensitive, false, dir > 0))
return; return;
// not found; wrap around // not found; wrap around
int para = dir > 0 ? 0 : paragraphs(), index = 0; int para = dir > 0 ? 0 : paragraphs(), index = 0;
QTextEdit::find(text, caseSensitive, false, dir > 0, &para, &index); TQTextEdit::find(text, caseSensitive, false, dir > 0, &para, &index);
} }
void SourceWindow::mousePressEvent(QMouseEvent* ev) void SourceWindow::mousePressEvent(TQMouseEvent* ev)
{ {
// we handle left and middle button // we handle left and middle button
if (ev->button() != LeftButton && ev->button() != MidButton) if (ev->button() != LeftButton && ev->button() != MidButton)
{ {
QTextEdit::mousePressEvent(ev); TQTextEdit::mousePressEvent(ev);
return; return;
} }
// get row // get row
QPoint p = viewportToContents(QPoint(0, ev->y() - viewport()->y())); TQPoint p = viewportToContents(TQPoint(0, ev->y() - viewport()->y()));
int row = paragraphAt(p); int row = paragraphAt(p);
if (row < 0) if (row < 0)
return; return;
@ -370,22 +370,22 @@ void SourceWindow::mousePressEvent(QMouseEvent* ev)
switch (ev->button()) { switch (ev->button()) {
case LeftButton: case LeftButton:
TRACE(QString().sprintf("left-clicked line %d", line)); TRACE(TQString().sprintf("left-clicked line %d", line));
emit clickedLeft(m_fileName, line, address, emit clickedLeft(m_fileName, line, address,
(ev->state() & ShiftButton) != 0); (ev->state() & ShiftButton) != 0);
break; break;
case MidButton: case MidButton:
TRACE(QString().sprintf("mid-clicked row %d", line)); TRACE(TQString().sprintf("mid-clicked row %d", line));
emit clickedMid(m_fileName, line, address); emit clickedMid(m_fileName, line, address);
break; break;
default:; default:;
} }
} }
void SourceWindow::keyPressEvent(QKeyEvent* ev) void SourceWindow::keyPressEvent(TQKeyEvent* ev)
{ {
int top1, top2; int top1, top2;
QPoint top; TQPoint top;
switch (ev->key()) { switch (ev->key()) {
case Key_Plus: case Key_Plus:
actionExpandRow(m_curRow); actionExpandRow(m_curRow);
@ -411,35 +411,35 @@ void SourceWindow::keyPressEvent(QKeyEvent* ev)
return; return;
case Key_Next: case Key_Next:
case Key_Prior: case Key_Prior:
top = viewportToContents(QPoint(0,0)); top = viewportToContents(TQPoint(0,0));
top1 = paragraphAt(top); top1 = paragraphAt(top);
} }
QTextEdit::keyPressEvent(ev); TQTextEdit::keyPressEvent(ev);
switch (ev->key()) { switch (ev->key()) {
case Key_Next: case Key_Next:
case Key_Prior: case Key_Prior:
top = viewportToContents(QPoint(0,0)); top = viewportToContents(TQPoint(0,0));
top2 = paragraphAt(top); top2 = paragraphAt(top);
setCursorPosition(m_curRow+(top2-top1), 0); setCursorPosition(m_curRow+(top2-top1), 0);
} }
} }
static inline bool isident(QChar c) static inline bool isident(TQChar c)
{ {
return c.isLetterOrNumber() || c.latin1() == '_'; return c.isLetterOrNumber() || c.latin1() == '_';
} }
bool SourceWindow::wordAtPoint(const QPoint& p, QString& word, QRect& r) bool SourceWindow::wordAtPoint(const TQPoint& p, TQString& word, TQRect& r)
{ {
QPoint pv = viewportToContents(p - viewport()->pos()); TQPoint pv = viewportToContents(p - viewport()->pos());
int row, col = charAt(pv, &row); int row, col = charAt(pv, &row);
if (row < 0 || col < 0) if (row < 0 || col < 0)
return false; return false;
// isolate the word at row, col // isolate the word at row, col
QString line = text(row); TQString line = text(row);
if (!isident(line[col])) if (!isident(line[col]))
return false; return false;
@ -450,30 +450,30 @@ bool SourceWindow::wordAtPoint(const QPoint& p, QString& word, QRect& r)
++col; ++col;
while (col < int(line.length()) && isident(line[col])); while (col < int(line.length()) && isident(line[col]));
r = QRect(p, p); r = TQRect(p, p);
r.addCoords(-5,-5,5,5); r.addCoords(-5,-5,5,5);
word = line.mid(begin, col-begin); word = line.mid(begin, col-begin);
return true; return true;
} }
void SourceWindow::paletteChange(const QPalette& oldPal) void SourceWindow::paletteChange(const TQPalette& oldPal)
{ {
setFont(KGlobalSettings::fixedFont()); setFont(KGlobalSettings::fixedFont());
QTextEdit::paletteChange(oldPal); TQTextEdit::paletteChange(oldPal);
} }
/* /*
* Two file names (possibly full paths) match if the last parts - the file * Two file names (possibly full paths) match if the last parts - the file
* names - match. * names - match.
*/ */
bool SourceWindow::fileNameMatches(const QString& other) bool SourceWindow::fileNameMatches(const TQString& other)
{ {
return QFileInfo(other).fileName() == QFileInfo(m_fileName).fileName(); return TQFileInfo(other).fileName() == TQFileInfo(m_fileName).fileName();
} }
void SourceWindow::disassembled(int lineNo, const std::list<DisassembledCode>& disass) void SourceWindow::disassembled(int lineNo, const std::list<DisassembledCode>& disass)
{ {
TRACE("disassembled line " + QString().setNum(lineNo)); TRACE("disassembled line " + TQString().setNum(lineNo));
if (lineNo < 0 || lineNo >= int(m_sourceCode.size())) if (lineNo < 0 || lineNo >= int(m_sourceCode.size()))
return; return;
@ -486,7 +486,7 @@ void SourceWindow::disassembled(int lineNo, const std::list<DisassembledCode>& d
int i = 0; int i = 0;
for (std::list<DisassembledCode>::const_iterator c = disass.begin(); c != disass.end(); ++c, ++i) for (std::list<DisassembledCode>::const_iterator c = disass.begin(); c != disass.end(); ++c, ++i)
{ {
QString code = c->code; TQString code = c->code;
while (code.endsWith("\n")) while (code.endsWith("\n"))
code.truncate(code.length()-1); code.truncate(code.length()-1);
sl.disass[i] = c->address.asString() + ' ' + code; sl.disass[i] = c->address.asString() + ' ' + code;
@ -594,10 +594,10 @@ bool SourceWindow::isRowDisassCode(int row)
void SourceWindow::expandRow(int row) void SourceWindow::expandRow(int row)
{ {
TRACE("expanding row " + QString().setNum(row)); TRACE("expanding row " + TQString().setNum(row));
// get disassembled code // get disassembled code
int line = rowToLine(row); int line = rowToLine(row);
const std::vector<QString>& disass = m_sourceCode[line].disass; const std::vector<TQString>& disass = m_sourceCode[line].disass;
// remove PC (must be set again in slot of signal expanded()) // remove PC (must be set again in slot of signal expanded())
m_lineItems[row] &= ~(liPC|liPCup); m_lineItems[row] &= ~(liPC|liPCup);
@ -625,7 +625,7 @@ void SourceWindow::expandRow(int row)
void SourceWindow::collapseRow(int row) void SourceWindow::collapseRow(int row)
{ {
TRACE("collapsing row " + QString().setNum(row)); TRACE("collapsing row " + TQString().setNum(row));
int line = rowToLine(row); int line = rowToLine(row);
// find end of this block // find end of this block
@ -723,8 +723,8 @@ void SourceWindow::setTabWidth(int numChars)
{ {
if (numChars <= 0) if (numChars <= 0)
numChars = 8; numChars = 8;
QFontMetrics fm(currentFont()); TQFontMetrics fm(currentFont());
QString s; TQString s;
int w = fm.width(s.fill('x', numChars)); int w = fm.width(s.fill('x', numChars));
setTabStopWidth(w); setTabStopWidth(w);
} }
@ -741,36 +741,36 @@ void SourceWindow::cursorChanged(int row)
} }
/* /*
* We must override the context menu handling because QTextEdit's handling * We must override the context menu handling because TQTextEdit's handling
* requires that it receives ownership of the popup menu; but the popup menu * requires that it receives ownership of the popup menu; but the popup menu
* returned from the GUI factory is owned by the factory. * returned from the GUI factory is owned by the factory.
*/ */
void SourceWindow::contextMenuEvent(QContextMenuEvent* e) void SourceWindow::contextMenuEvent(TQContextMenuEvent* e)
{ {
// get the context menu from the GUI factory // get the context menu from the GUI factory
QWidget* top = this; TQWidget* top = this;
do do
top = top->parentWidget(); top = top->parentWidget();
while (!top->isTopLevel()); while (!top->isTopLevel());
KMainWindow* mw = static_cast<KMainWindow*>(top); KMainWindow* mw = static_cast<KMainWindow*>(top);
QPopupMenu* m = TQPopupMenu* m =
static_cast<QPopupMenu*>(mw->factory()->container("popup_files", mw)); static_cast<TQPopupMenu*>(mw->factory()->container("popup_files", mw));
m->exec(e->globalPos()); m->exec(e->globalPos());
} }
bool SourceWindow::eventFilter(QObject* watched, QEvent* e) bool SourceWindow::eventFilter(TQObject* watched, TQEvent* e)
{ {
if (e->type() == QEvent::ContextMenu && watched == viewport()) if (e->type() == TQEvent::ContextMenu && watched == viewport())
{ {
contextMenuEvent(static_cast<QContextMenuEvent*>(e)); contextMenuEvent(static_cast<TQContextMenuEvent*>(e));
return true; return true;
} }
return QTextEdit::eventFilter(watched, e); return TQTextEdit::eventFilter(watched, e);
} }
HighlightCpp::HighlightCpp(SourceWindow* srcWnd) : HighlightCpp::HighlightCpp(SourceWindow* srcWnd) :
QSyntaxHighlighter(srcWnd), TQSyntaxHighlighter(srcWnd),
m_srcWnd(srcWnd) m_srcWnd(srcWnd)
{ {
} }
@ -782,7 +782,7 @@ enum HLState {
hlString hlString
}; };
static const QString ckw[] = static const TQString ckw[] =
{ {
"and", "and",
"and_eq", "and_eq",
@ -860,7 +860,7 @@ static const QString ckw[] =
"xor_eq" "xor_eq"
}; };
int HighlightCpp::highlightParagraph(const QString& text, int state) int HighlightCpp::highlightParagraph(const TQString& text, int state)
{ {
int row = currentParagraph(); int row = currentParagraph();
// highlight assembly lines // highlight assembly lines
@ -876,12 +876,12 @@ int HighlightCpp::highlightParagraph(const QString& text, int state)
// check for preprocessor line // check for preprocessor line
if (state == 0 && text.stripWhiteSpace().startsWith("#")) if (state == 0 && text.stripWhiteSpace().startsWith("#"))
{ {
setFormat(0, text.length(), QColor("dark green")); setFormat(0, text.length(), TQColor("dark green"));
return 0; return 0;
} }
// a font for keywords // a font for keywords
QFont identFont = textEdit()->currentFont(); TQFont identFont = textEdit()->currentFont();
identFont.setBold(!identFont.bold()); identFont.setBold(!identFont.bold());
unsigned start = 0; unsigned start = 0;
@ -892,7 +892,7 @@ int HighlightCpp::highlightParagraph(const QString& text, int state)
case hlCommentLine: case hlCommentLine:
end = text.length(); end = text.length();
state = 0; state = 0;
setFormat(start, end-start, QColor("gray50")); setFormat(start, end-start, TQColor("gray50"));
break; break;
case hlCommentBlock: case hlCommentBlock:
end = text.find("*/", start); end = text.find("*/", start);
@ -900,7 +900,7 @@ int HighlightCpp::highlightParagraph(const QString& text, int state)
end += 2, state = 0; end += 2, state = 0;
else else
end = text.length(); end = text.length();
setFormat(start, end-start, QColor("gray50")); setFormat(start, end-start, TQColor("gray50"));
break; break;
case hlString: case hlString:
for (end = start+1; end < int(text.length()); end++) { for (end = start+1; end < int(text.length()); end++) {
@ -913,7 +913,7 @@ int HighlightCpp::highlightParagraph(const QString& text, int state)
} }
} }
state = 0; state = 0;
setFormat(start, end-start, QColor("dark red")); setFormat(start, end-start, TQColor("dark red"));
break; break;
case hlIdent: case hlIdent:
for (end = start+1; end < int(text.length()); end++) { for (end = start+1; end < int(text.length()); end++) {

@ -7,9 +7,9 @@
#ifndef SOURCEWND_H #ifndef SOURCEWND_H
#define SOURCEWND_H #define SOURCEWND_H
#include <qpixmap.h> #include <ntqpixmap.h>
#include <qtextedit.h> #include <ntqtextedit.h>
#include <qsyntaxhighlighter.h> #include <ntqsyntaxhighlighter.h>
#include <vector> #include <vector>
#include "dbgdriver.h" #include "dbgdriver.h"
@ -17,23 +17,23 @@
class KDebugger; class KDebugger;
struct DbgAddr; struct DbgAddr;
class SourceWindow : public QTextEdit class SourceWindow : public TQTextEdit
{ {
Q_OBJECT Q_OBJECT
public: public:
SourceWindow(const QString& fileName, QWidget* parent, const char* name); SourceWindow(const TQString& fileName, TQWidget* parent, const char* name);
~SourceWindow(); ~SourceWindow();
bool loadFile(); bool loadFile();
void reloadFile(); void reloadFile();
bool fileNameMatches(const QString& other); bool fileNameMatches(const TQString& other);
void scrollTo(int lineNo, const DbgAddr& address); void scrollTo(int lineNo, const DbgAddr& address);
const QString& fileName() const { return m_fileName; } const TQString& fileName() const { return m_fileName; }
void updateLineItems(const KDebugger* dbg); void updateLineItems(const KDebugger* dbg);
void setPC(bool set, int lineNo, const DbgAddr& address, int frameNo); void setPC(bool set, int lineNo, const DbgAddr& address, int frameNo);
enum FindDirection { findForward = 1, findBackward = -1 }; enum FindDirection { findForward = 1, findBackward = -1 };
void find(const QString& text, bool caseSensitive, FindDirection dir); void find(const TQString& text, bool caseSensitive, FindDirection dir);
bool wordAtPoint(const QPoint& p, QString& word, QRect& r); bool wordAtPoint(const TQPoint& p, TQString& word, TQRect& r);
/** /**
* Translates row number (zero-based) to zero-based source line number. * Translates row number (zero-based) to zero-based source line number.
* If sourceRow is non-zero, it is filled with the source code row * If sourceRow is non-zero, it is filled with the source code row
@ -53,12 +53,12 @@ public:
void activeLine(int& lineNo, DbgAddr& address); void activeLine(int& lineNo, DbgAddr& address);
protected: protected:
virtual void drawFrame(QPainter* p); virtual void drawFrame(TQPainter* p);
virtual bool eventFilter(QObject* watched, QEvent* e); virtual bool eventFilter(TQObject* watched, TQEvent* e);
virtual void contextMenuEvent(QContextMenuEvent* e); virtual void contextMenuEvent(TQContextMenuEvent* e);
virtual void mousePressEvent(QMouseEvent* ev); virtual void mousePressEvent(TQMouseEvent* ev);
virtual void keyPressEvent(QKeyEvent* ev); virtual void keyPressEvent(TQKeyEvent* ev);
virtual void paletteChange(const QPalette&); virtual void paletteChange(const TQPalette&);
void expandRow(int row); void expandRow(int row);
void collapseRow(int row); void collapseRow(int row);
void scrollToRow(int row); void scrollToRow(int row);
@ -69,9 +69,9 @@ protected:
void actionCollapseRow(int row); void actionCollapseRow(int row);
signals: signals:
void clickedLeft(const QString&, int, const DbgAddr& address, bool); void clickedLeft(const TQString&, int, const DbgAddr& address, bool);
void clickedMid(const QString&, int, const DbgAddr& address); void clickedMid(const TQString&, int, const DbgAddr& address);
void disassemble(const QString&, int); void disassemble(const TQString&, int);
void expanded(int lineNo); /* source lineNo has been expanded */ void expanded(int lineNo); /* source lineNo has been expanded */
void collapsed(int lineNo); /* source lineNo has been collapsed */ void collapsed(int lineNo); /* source lineNo has been collapsed */
public slots: public slots:
@ -79,7 +79,7 @@ public slots:
void cursorChanged(int row); void cursorChanged(int row);
protected: protected:
QString m_fileName; TQString m_fileName;
enum LineItem { liPC = 1, liPCup = 2, enum LineItem { liPC = 1, liPCup = 2,
liBP = 4, liBPdisabled = 8, liBPtemporary = 16, liBP = 4, liBPdisabled = 8, liBPtemporary = 16,
liBPconditional = 32, liBPorphan = 64, liBPconditional = 32, liBPorphan = 64,
@ -87,8 +87,8 @@ protected:
}; };
struct SourceLine { struct SourceLine {
QString code; /* a line of text */ TQString code; /* a line of text */
std::vector<QString> disass; /* its disassembled code */ std::vector<TQString> disass; /* its disassembled code */
std::vector<DbgAddr> disassAddr; /* the addresses thereof */ std::vector<DbgAddr> disassAddr; /* the addresses thereof */
bool canDisass; /* if line can be disassembled */ bool canDisass; /* if line can be disassembled */
SourceLine() : canDisass(true) { } SourceLine() : canDisass(true) { }
@ -98,27 +98,27 @@ protected:
std::vector<int> m_rowToLine; //!< The source line number for each row std::vector<int> m_rowToLine; //!< The source line number for each row
std::vector<uchar> m_lineItems; //!< Icons displayed on the line std::vector<uchar> m_lineItems; //!< Icons displayed on the line
QPixmap m_pcinner; /* PC at innermost frame */ TQPixmap m_pcinner; /* PC at innermost frame */
QPixmap m_pcup; /* PC at frame up the stack */ TQPixmap m_pcup; /* PC at frame up the stack */
QPixmap m_brkena; /* enabled breakpoint */ TQPixmap m_brkena; /* enabled breakpoint */
QPixmap m_brkdis; /* disabled breakpoint */ TQPixmap m_brkdis; /* disabled breakpoint */
QPixmap m_brktmp; /* temporary breakpoint marker */ TQPixmap m_brktmp; /* temporary breakpoint marker */
QPixmap m_brkcond; /* conditional breakpoint marker */ TQPixmap m_brkcond; /* conditional breakpoint marker */
QPixmap m_brkorph; /* orphaned breakpoint marker */ TQPixmap m_brkorph; /* orphaned breakpoint marker */
QFont m_lineNoFont; //!< The font used to draw line numbers TQFont m_lineNoFont; //!< The font used to draw line numbers
int m_curRow; //!< The highlighted row int m_curRow; //!< The highlighted row
int m_widthItems; //!< The width of the item column int m_widthItems; //!< The width of the item column
int m_widthPlus; //!< The width of the expander column int m_widthPlus; //!< The width of the expander column
int m_widthLineNo; //!< The width of the line number columns int m_widthLineNo; //!< The width of the line number columns
}; };
class HighlightCpp : public QSyntaxHighlighter class HighlightCpp : public TQSyntaxHighlighter
{ {
SourceWindow* m_srcWnd; SourceWindow* m_srcWnd;
public: public:
HighlightCpp(SourceWindow* srcWnd); HighlightCpp(SourceWindow* srcWnd);
virtual int highlightParagraph(const QString& text, int state); virtual int highlightParagraph(const TQString& text, int state);
}; };
#endif // SOURCEWND_H #endif // SOURCEWND_H

@ -1,8 +1,8 @@
#include <qmap.h> #include <ntqmap.h>
#include <qvaluelist.h> #include <ntqvaluelist.h>
#include <qvaluevector.h> #include <ntqvaluevector.h>
#include <qstring.h> #include <ntqstring.h>
#include <qrect.h> #include <ntqrect.h>
#include <iostream> #include <iostream>
template<typename T> template<typename T>
@ -22,20 +22,20 @@ void test_sharing(const T& input)
int main() int main()
{ {
QMap<QString,int> str2int; TQMap<TQString,int> str2int;
str2int["foo"] = 42; str2int["foo"] = 42;
test_sharing(str2int); test_sharing(str2int);
QValueList<int> ints; TQValueList<int> ints;
ints.push_back(42); ints.push_back(42);
test_sharing(ints); test_sharing(ints);
QValueVector<double> vals(6, 47.11); TQValueVector<double> vals(6, 47.11);
vals.push_back(42); vals.push_back(42);
test_sharing(vals); test_sharing(vals);
QRect r(10,20, 130, 240); TQRect r(10,20, 130, 240);
QPoint p = r.topLeft(); TQPoint p = r.topLeft();
QPoint q = r.bottomRight(); TQPoint q = r.bottomRight();
std::cout << r.width() << r.height() << p.x() << q.y() << std::endl; std::cout << r.width() << r.height() << p.x() << q.y() << std::endl;
} }

@ -1,6 +1,6 @@
// test <repeats 30 times> in arrays // test <repeats 30 times> in arrays
#include <qstring.h> #include <ntqstring.h>
struct Big { struct Big {
struct bog { struct bog {
@ -26,7 +26,7 @@ int main()
for (int i = 1; i < 29; i++) for (int i = 1; i < 29; i++)
apf[i] = f; apf[i] = f;
QString s[300]; TQString s[300];
for (int i = 0; i < 300; i++) for (int i = 0; i < 300; i++)
s[i].sprintf("String %d", i); s[i].sprintf("String %d", i);

@ -1,8 +1,8 @@
#include <iostream> #include <iostream>
#include <qstring.h> #include <ntqstring.h>
#include <qfile.h> #include <ntqfile.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qdir.h> #include <ntqdir.h>
#include <math.h> #include <math.h>
enum E { red, green, blue, yellow }; enum E { red, green, blue, yellow };
@ -34,7 +34,7 @@ class Dl : public Cl
public: public:
Dl(int r); Dl(int r);
virtual int f(int x); virtual int f(int x);
int operator()(const QString& x, int& y) const; int operator()(const TQString& x, int& y) const;
operator const char*() { return 0; } operator const char*() { return 0; }
operator PtrFunc*(); operator PtrFunc*();
}; };
@ -76,9 +76,9 @@ void f(E e[3], char c)
char buffer[300]; char buffer[300];
memset(buffer, 1, 300); memset(buffer, 1, 300);
for (int i = 0; i < sizeof(buffer); i +=15) buffer[i] = '\02'; for (int i = 0; i < sizeof(buffer); i +=15) buffer[i] = '\02';
QDir dir; TQDir dir;
QFile file; TQFile file;
QFileInfo fi; TQFileInfo fi;
x = red; x = red;
emptyBase eb; emptyBase eb;
emptyDerived ed; emptyDerived ed;
@ -135,11 +135,11 @@ int main(int argc, char* argv[])
} }
(*pf[0])(e, '\n'); (*pf[0])(e, '\n');
QString s; TQString s;
s = "Hi, there!\r\n\t\"\'\\"; s = "Hi, there!\r\n\t\"\'\\";
const QString& strref = s; const TQString& strref = s;
templated_strtest(strtest, s); templated_strtest(strtest, s);
s = "asbcxxxxxxxxxxxxxxxxxxxxxxxxxxx"; s = "asbcxxxxxxxxxxxxxxxxxxxxxxxxxxx";
@ -190,7 +190,7 @@ int Dl::f(int x)
return y+3; return y+3;
} }
int Dl::operator()(const QString& x, int& y) const int Dl::operator()(const TQString& x, int& y) const
{ {
std::cerr << "ha! I know!" << std::endl; std::cerr << "ha! I know!" << std::endl;
return 1; return 1;

@ -8,35 +8,35 @@
#include "dbgdriver.h" #include "dbgdriver.h"
#include <klocale.h> #include <klocale.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <qbitmap.h> #include <ntqbitmap.h>
#include <qpainter.h> #include <ntqpainter.h>
class ThreadEntry : public QListViewItem, public ThreadInfo class ThreadEntry : public TQListViewItem, public ThreadInfo
{ {
public: public:
ThreadEntry(QListView* parent, const ThreadInfo& thread); ThreadEntry(TQListView* parent, const ThreadInfo& thread);
void setFunction(const QString& func); void setFunction(const TQString& func);
bool m_delete; /* used for updating the list */ bool m_delete; /* used for updating the list */
}; };
ThreadEntry::ThreadEntry(QListView* parent, const ThreadInfo& thread) : ThreadEntry::ThreadEntry(TQListView* parent, const ThreadInfo& thread) :
QListViewItem(parent, thread.threadName, thread.function), TQListViewItem(parent, thread.threadName, thread.function),
ThreadInfo(thread), ThreadInfo(thread),
m_delete(false) m_delete(false)
{ {
} }
void ThreadEntry::setFunction(const QString& func) void ThreadEntry::setFunction(const TQString& func)
{ {
function = func; function = func;
setText(1, function); setText(1, function);
} }
ThreadList::ThreadList(QWidget* parent, const char* name) : ThreadList::ThreadList(TQWidget* parent, const char* name) :
QListView(parent, name) TQListView(parent, name)
{ {
addColumn(i18n("Thread ID"), 150); addColumn(i18n("Thread ID"), 150);
addColumn(i18n("Location")); addColumn(i18n("Location"));
@ -45,8 +45,8 @@ ThreadList::ThreadList(QWidget* parent, const char* name) :
m_focusIcon = UserIcon("pcinner"); m_focusIcon = UserIcon("pcinner");
makeNoFocusIcon(); makeNoFocusIcon();
connect(this, SIGNAL(currentChanged(QListViewItem*)), connect(this, SIGNAL(currentChanged(TQListViewItem*)),
this, SLOT(slotCurrentChanged(QListViewItem*))); this, SLOT(slotCurrentChanged(TQListViewItem*)));
} }
ThreadList::~ThreadList() ThreadList::~ThreadList()
@ -56,7 +56,7 @@ ThreadList::~ThreadList()
void ThreadList::updateThreads(const std::list<ThreadInfo>& threads) void ThreadList::updateThreads(const std::list<ThreadInfo>& threads)
{ {
// reset flag in all items // reset flag in all items
for (QListViewItem* e = firstChild(); e != 0; e = e->nextSibling()) { for (TQListViewItem* e = firstChild(); e != 0; e = e->nextSibling()) {
static_cast<ThreadEntry*>(e)->m_delete = true; static_cast<ThreadEntry*>(e)->m_delete = true;
} }
@ -76,7 +76,7 @@ void ThreadList::updateThreads(const std::list<ThreadInfo>& threads)
} }
// delete all entries that have not been seen // delete all entries that have not been seen
for (QListViewItem* e = firstChild(); e != 0;) { for (TQListViewItem* e = firstChild(); e != 0;) {
ThreadEntry* te = static_cast<ThreadEntry*>(e); ThreadEntry* te = static_cast<ThreadEntry*>(e);
e = e->nextSibling(); /* step ahead before deleting it ;-) */ e = e->nextSibling(); /* step ahead before deleting it ;-) */
if (te->m_delete) { if (te->m_delete) {
@ -87,7 +87,7 @@ void ThreadList::updateThreads(const std::list<ThreadInfo>& threads)
ThreadEntry* ThreadList::threadById(int id) ThreadEntry* ThreadList::threadById(int id)
{ {
for (QListViewItem* e = firstChild(); e != 0; e = e->nextSibling()) { for (TQListViewItem* e = firstChild(); e != 0; e = e->nextSibling()) {
ThreadEntry* te = static_cast<ThreadEntry*>(e); ThreadEntry* te = static_cast<ThreadEntry*>(e);
if (te->id == id) { if (te->id == id) {
return te; return te;
@ -104,13 +104,13 @@ void ThreadList::makeNoFocusIcon()
{ {
m_noFocusIcon = m_focusIcon; m_noFocusIcon = m_focusIcon;
{ {
QPainter p(&m_noFocusIcon); TQPainter p(&m_noFocusIcon);
p.fillRect(0,0, m_noFocusIcon.width(),m_noFocusIcon.height(), QColor(white)); p.fillRect(0,0, m_noFocusIcon.width(),m_noFocusIcon.height(), TQColor(white));
} }
m_noFocusIcon.setMask(m_noFocusIcon.createHeuristicMask()); m_noFocusIcon.setMask(m_noFocusIcon.createHeuristicMask());
} }
void ThreadList::slotCurrentChanged(QListViewItem* newItem) void ThreadList::slotCurrentChanged(TQListViewItem* newItem)
{ {
if (newItem == 0) if (newItem == 0)
return; return;

@ -7,23 +7,23 @@
#ifndef THREADLIST_H #ifndef THREADLIST_H
#define THREADLIST_H #define THREADLIST_H
#include <qlistview.h> #include <ntqlistview.h>
#include <qpixmap.h> #include <ntqpixmap.h>
#include <list> #include <list>
class ThreadInfo; class ThreadInfo;
class ThreadEntry; class ThreadEntry;
class ThreadList : public QListView class ThreadList : public TQListView
{ {
Q_OBJECT Q_OBJECT
public: public:
ThreadList(QWidget* parent, const char* name); ThreadList(TQWidget* parent, const char* name);
~ThreadList(); ~ThreadList();
public slots: public slots:
void updateThreads(const std::list<ThreadInfo>&); void updateThreads(const std::list<ThreadInfo>&);
void slotCurrentChanged(QListViewItem*); void slotCurrentChanged(TQListViewItem*);
signals: signals:
void setThread(int); void setThread(int);
@ -32,8 +32,8 @@ protected:
ThreadEntry* threadById(int id); ThreadEntry* threadById(int id);
void makeNoFocusIcon(); void makeNoFocusIcon();
QPixmap m_focusIcon; TQPixmap m_focusIcon;
QPixmap m_noFocusIcon; TQPixmap m_noFocusIcon;
}; };
#endif // THREADLIST_H #endif // THREADLIST_H

@ -4,8 +4,8 @@
* See the file COPYING in the toplevel directory of the source directory. * See the file COPYING in the toplevel directory of the source directory.
*/ */
#include <qsocketnotifier.h> #include <ntqsocketnotifier.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include "ttywnd.h" #include "ttywnd.h"
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <klocale.h> #include <klocale.h>
@ -38,7 +38,7 @@
STTY::STTY() : STTY::STTY() :
QObject(), TQObject(),
m_masterfd(-1), m_masterfd(-1),
m_slavefd(-1), m_slavefd(-1),
m_outNotifier(0) m_outNotifier(0)
@ -46,10 +46,10 @@ STTY::STTY() :
if (findTTY()) if (findTTY())
{ {
::fcntl(m_masterfd, F_SETFL, O_NDELAY); ::fcntl(m_masterfd, F_SETFL, O_NDELAY);
m_outNotifier = new QSocketNotifier(m_masterfd, QSocketNotifier::Read); m_outNotifier = new TQSocketNotifier(m_masterfd, TQSocketNotifier::Read);
connect(m_outNotifier, SIGNAL(activated(int)), SLOT(outReceived(int))); connect(m_outNotifier, SIGNAL(activated(int)), SLOT(outReceived(int)));
} else { } else {
m_slavetty = QString(); m_slavetty = TQString();
} }
} }
@ -138,8 +138,8 @@ void STTY::outReceived(int f)
TTYWindow::TTYWindow(QWidget* parent, const char* name) : TTYWindow::TTYWindow(TQWidget* parent, const char* name) :
QTextEdit(parent, name), TQTextEdit(parent, name),
m_tty(0), m_tty(0),
m_hPos(0) m_hPos(0)
{ {
@ -157,17 +157,17 @@ TTYWindow::~TTYWindow()
} }
QString TTYWindow::activate() TQString TTYWindow::activate()
{ {
// allocate a pseudo terminal // allocate a pseudo terminal
m_tty = new STTY; m_tty = new STTY;
QString ttyName = m_tty->slaveTTY(); TQString ttyName = m_tty->slaveTTY();
if (ttyName.isEmpty()) { if (ttyName.isEmpty()) {
// failed to allocate terminal // failed to allocate terminal
delete m_tty; delete m_tty;
m_tty = 0; m_tty = 0;
return QString(); return TQString();
} else { } else {
connect(m_tty, SIGNAL(output(char*,int)), SLOT(slotAppend(char*,int))); connect(m_tty, SIGNAL(output(char*,int)), SLOT(slotAppend(char*,int)));
return ttyName; return ttyName;
@ -196,7 +196,7 @@ void TTYWindow::slotAppend(char* buffer, int count)
++len; ++len;
} }
if (len > 0) { if (len > 0) {
QString str = QString::fromLatin1(start, len); TQString str = TQString::fromLatin1(start, len);
// replace text in the last line // replace text in the last line
int para = paragraphs()-1; int para = paragraphs()-1;
// this selection is non-empty only after a '\r' that was not // this selection is non-empty only after a '\r' that was not
@ -216,15 +216,15 @@ void TTYWindow::slotAppend(char* buffer, int count)
if (count > 0 && *start == '\n') { if (count > 0 && *start == '\n') {
++start; ++start;
--count; --count;
append(QString()); append(TQString());
m_hPos = 0; m_hPos = 0;
} }
} }
} }
QPopupMenu* TTYWindow::createPopupMenu(const QPoint& pos) TQPopupMenu* TTYWindow::createPopupMenu(const TQPoint& pos)
{ {
QPopupMenu* menu = QTextEdit::createPopupMenu(pos); TQPopupMenu* menu = TQTextEdit::createPopupMenu(pos);
menu->insertSeparator(); menu->insertSeparator();
menu->insertItem(i18n("&Clear"), this, SLOT(slotClear())); menu->insertItem(i18n("&Clear"), this, SLOT(slotClear()));
return menu; return menu;

@ -7,10 +7,10 @@
#ifndef TTYWND_H #ifndef TTYWND_H
#define TTYWND_H #define TTYWND_H
#include <qtextedit.h> #include <ntqtextedit.h>
class QSocketNotifier; class TQSocketNotifier;
class QPopupMenu; class TQPopupMenu;
/** /**
* This class is cortesy Judin Max <novaprint@mtu-net.ru>. * This class is cortesy Judin Max <novaprint@mtu-net.ru>.
@ -23,14 +23,14 @@ class QPopupMenu;
* establish the stdin, stdout, and stderr channels the file descriptor * establish the stdin, stdout, and stderr channels the file descriptor
* obtained by this must be dup'd to file descriptors 0, 1, and 2, resp. * obtained by this must be dup'd to file descriptors 0, 1, and 2, resp.
*/ */
class STTY : public QObject class STTY : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
STTY(); STTY();
~STTY(); ~STTY();
QString slaveTTY(){ return m_slavetty; }; TQString slaveTTY(){ return m_slavetty; };
protected slots: protected slots:
void outReceived(int); void outReceived(int);
@ -41,24 +41,24 @@ signals:
protected: protected:
int m_masterfd; int m_masterfd;
int m_slavefd; int m_slavefd;
QSocketNotifier* m_outNotifier; TQSocketNotifier* m_outNotifier;
QString m_slavetty; TQString m_slavetty;
bool findTTY(); bool findTTY();
}; };
class TTYWindow : public QTextEdit class TTYWindow : public TQTextEdit
{ {
Q_OBJECT Q_OBJECT
public: public:
TTYWindow(QWidget* parent, const char* name); TTYWindow(TQWidget* parent, const char* name);
~TTYWindow(); ~TTYWindow();
QString activate(); TQString activate();
void deactivate(); void deactivate();
protected: protected:
STTY* m_tty; STTY* m_tty;
virtual QPopupMenu* createPopupMenu(const QPoint& pos); virtual TQPopupMenu* createPopupMenu(const TQPoint& pos);
int m_hPos; //!< tracks horizontal cursor position int m_hPos; //!< tracks horizontal cursor position
protected slots: protected slots:

@ -4,8 +4,8 @@
* See the file COPYING in the toplevel directory of the source directory. * See the file COPYING in the toplevel directory of the source directory.
*/ */
#include <qdir.h> #include <ntqdir.h>
#include <qptrlist.h> #include <ntqptrlist.h>
#include <kglobal.h> #include <kglobal.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
@ -40,7 +40,7 @@ void TypeTable::loadTypeTables()
{ {
typeTablesInited = true; typeTablesInited = true;
const QStringList files = KGlobal::dirs()->findAllResources("types", "*.kdbgtt", const TQStringList files = KGlobal::dirs()->findAllResources("types", "*.kdbgtt",
false, true); false, true);
if (files.isEmpty()) { if (files.isEmpty()) {
@ -48,7 +48,7 @@ void TypeTable::loadTypeTables()
return; return;
} }
for (QValueListConstIterator<QString> p = files.begin(); p != files.end(); ++p) { for (TQValueListConstIterator<TQString> p = files.begin(); p != files.end(); ++p) {
typeTables.push_back(TypeTable()); typeTables.push_back(TypeTable());
typeTables.back().loadFromFile(*p); typeTables.back().loadFromFile(*p);
} }
@ -56,7 +56,7 @@ void TypeTable::loadTypeTables()
TypeTable::TypeTable() : TypeTable::TypeTable() :
m_printQStringDataCmd(0) m_printTQStringDataCmd(0)
{ {
m_typeDict.setAutoDelete(true); m_typeDict.setAutoDelete(true);
// aliasDict keeps only pointers to items into typeDict // aliasDict keeps only pointers to items into typeDict
@ -65,7 +65,7 @@ TypeTable::TypeTable() :
TypeTable::~TypeTable() TypeTable::~TypeTable()
{ {
delete[] m_printQStringDataCmd; delete[] m_printTQStringDataCmd;
while (!m_templates.empty()) { while (!m_templates.empty()) {
delete m_templates.begin()->second; delete m_templates.begin()->second;
m_templates.erase(m_templates.begin()); m_templates.erase(m_templates.begin());
@ -77,7 +77,7 @@ static const char TypeTableGroup[] = "Type Table";
static const char LibDisplayName[] = "LibDisplayName"; static const char LibDisplayName[] = "LibDisplayName";
static const char ShlibRE[] = "ShlibRE"; static const char ShlibRE[] = "ShlibRE";
static const char EnableBuiltin[] = "EnableBuiltin"; static const char EnableBuiltin[] = "EnableBuiltin";
static const char PrintQStringCmd[] = "PrintQStringCmd"; static const char PrintTQStringCmd[] = "PrintTQStringCmd";
static const char TypesEntryFmt[] = "Types%d"; static const char TypesEntryFmt[] = "Types%d";
static const char DisplayEntry[] = "Display"; static const char DisplayEntry[] = "Display";
static const char AliasEntry[] = "Alias"; static const char AliasEntry[] = "Alias";
@ -86,7 +86,7 @@ static const char ExprEntryFmt[] = "Expr%d";
static const char FunctionGuardEntryFmt[] = "FunctionGuard%d"; static const char FunctionGuardEntryFmt[] = "FunctionGuard%d";
void TypeTable::loadFromFile(const QString& fileName) void TypeTable::loadFromFile(const TQString& fileName)
{ {
TRACE("reading file " + fileName); TRACE("reading file " + fileName);
KSimpleConfig cf(fileName, true); /* read-only */ KSimpleConfig cf(fileName, true); /* read-only */
@ -98,26 +98,26 @@ void TypeTable::loadFromFile(const QString& fileName)
m_displayName = cf.readEntry(LibDisplayName); m_displayName = cf.readEntry(LibDisplayName);
if (m_displayName.isEmpty()) { if (m_displayName.isEmpty()) {
// use file name instead // use file name instead
QFileInfo fi(fileName); TQFileInfo fi(fileName);
m_displayName = fi.baseName(true); m_displayName = fi.baseName(true);
} }
m_shlibNameRE = QRegExp(cf.readEntry(ShlibRE)); m_shlibNameRE = TQRegExp(cf.readEntry(ShlibRE));
m_enabledBuiltins = cf.readListEntry(EnableBuiltin); m_enabledBuiltins = cf.readListEntry(EnableBuiltin);
QString printQString = cf.readEntry(PrintQStringCmd); TQString printTQString = cf.readEntry(PrintTQStringCmd);
const char* ascii = printQString.ascii(); const char* ascii = printTQString.ascii();
if (ascii == 0) if (ascii == 0)
ascii = ""; ascii = "";
m_printQStringDataCmd = new char[strlen(ascii)+1]; m_printTQStringDataCmd = new char[strlen(ascii)+1];
strcpy(m_printQStringDataCmd, ascii); strcpy(m_printTQStringDataCmd, ascii);
/* /*
* Get the types. We search for entries of kind Types1, Types2, etc. * Get the types. We search for entries of kind Types1, Types2, etc.
* because a single entry Types could get rather long for large * because a single entry Types could get rather long for large
* libraries. * libraries.
*/ */
QString typesEntry; TQString typesEntry;
for (int i = 1; ; i++) { for (int i = 1; ; i++) {
// next bunch of types // next bunch of types
cf.setGroup(TypeTableGroup); cf.setGroup(TypeTableGroup);
@ -125,11 +125,11 @@ void TypeTable::loadFromFile(const QString& fileName)
if (!cf.hasKey(typesEntry)) if (!cf.hasKey(typesEntry))
break; break;
QStringList typeNames = cf.readListEntry(typesEntry, ','); TQStringList typeNames = cf.readListEntry(typesEntry, ',');
// now read them // now read them
QString alias; TQString alias;
for (QStringList::iterator it = typeNames.begin(); it != typeNames.end(); ++it) for (TQStringList::iterator it = typeNames.begin(); it != typeNames.end(); ++it)
{ {
cf.setGroup(*it); cf.setGroup(*it);
// check if this is an alias // check if this is an alias
@ -150,10 +150,10 @@ void TypeTable::loadFromFile(const QString& fileName)
} // for all Types%d } // for all Types%d
} }
void TypeTable::readType(KConfigBase& cf, const QString& type) void TypeTable::readType(KConfigBase& cf, const TQString& type)
{ {
// the display string // the display string
QString expr = cf.readEntry(DisplayEntry); TQString expr = cf.readEntry(DisplayEntry);
TypeInfo* info = new TypeInfo(expr); TypeInfo* info = new TypeInfo(expr);
if (info->m_numExprs == 0) { if (info->m_numExprs == 0) {
@ -165,8 +165,8 @@ void TypeTable::readType(KConfigBase& cf, const QString& type)
info->m_templatePattern = cf.readEntry(TemplateEntry); info->m_templatePattern = cf.readEntry(TemplateEntry);
// Expr1, Expr2, etc... // Expr1, Expr2, etc...
QString exprEntry; TQString exprEntry;
QString funcGuardEntry; TQString funcGuardEntry;
for (int j = 0; j < info->m_numExprs; j++) { for (int j = 0; j < info->m_numExprs; j++) {
exprEntry.sprintf(ExprEntryFmt, j+1); exprEntry.sprintf(ExprEntryFmt, j+1);
expr = cf.readEntry(exprEntry); expr = cf.readEntry(exprEntry);
@ -182,25 +182,25 @@ void TypeTable::readType(KConfigBase& cf, const QString& type)
m_typeDict.insert(type, info); m_typeDict.insert(type, info);
else else
m_templates[type] = info; m_templates[type] = info;
TRACE(type + QString().sprintf(": %d exprs", info->m_numExprs)); TRACE(type + TQString().sprintf(": %d exprs", info->m_numExprs));
} }
void TypeTable::copyTypes(QDict<TypeInfo>& dict) void TypeTable::copyTypes(TQDict<TypeInfo>& dict)
{ {
for (QDictIterator<TypeInfo> it = m_typeDict; it != 0; ++it) { for (TQDictIterator<TypeInfo> it = m_typeDict; it != 0; ++it) {
dict.insert(it.currentKey(), it); dict.insert(it.currentKey(), it);
} }
for (QDictIterator<TypeInfo> it = m_aliasDict; it != 0; ++it) { for (TQDictIterator<TypeInfo> it = m_aliasDict; it != 0; ++it) {
dict.insert(it.currentKey(), it); dict.insert(it.currentKey(), it);
} }
} }
bool TypeTable::isEnabledBuiltin(const QString& feature) const bool TypeTable::isEnabledBuiltin(const TQString& feature) const
{ {
return m_enabledBuiltins.find(feature) != m_enabledBuiltins.end(); return m_enabledBuiltins.find(feature) != m_enabledBuiltins.end();
} }
TypeInfo::TypeInfo(const QString& displayString) TypeInfo::TypeInfo(const TQString& displayString)
{ {
// decompose the input into the parts // decompose the input into the parts
int i = 0; int i = 0;
@ -227,9 +227,9 @@ TypeInfo::~TypeInfo()
ProgramTypeTable::ProgramTypeTable() : ProgramTypeTable::ProgramTypeTable() :
m_parseQt2QStrings(false), m_parseTQt2TQStrings(false),
m_QCharIsShort(false), m_QCharIsShort(false),
m_printQStringDataCmd(0) m_printTQStringDataCmd(0)
{ {
m_types.setAutoDelete(false); /* paranoia */ m_types.setAutoDelete(false); /* paranoia */
m_aliasDict.setAutoDelete(false); /* paranoia */ m_aliasDict.setAutoDelete(false); /* paranoia */
@ -249,22 +249,22 @@ void ProgramTypeTable::loadTypeTable(TypeTable* table)
std::inserter(m_templates, m_templates.begin()), std::inserter(m_templates, m_templates.begin()),
std::ptr_fun(template2Info)); std::ptr_fun(template2Info));
// check whether to enable builtin QString support // check whether to enable builtin TQString support
if (!m_parseQt2QStrings) { if (!m_parseTQt2TQStrings) {
m_parseQt2QStrings = table->isEnabledBuiltin("QString::Data"); m_parseTQt2TQStrings = table->isEnabledBuiltin("TQString::Data");
} }
if (!m_QCharIsShort) { if (!m_QCharIsShort) {
m_QCharIsShort = table->isEnabledBuiltin("QCharIsShort"); m_QCharIsShort = table->isEnabledBuiltin("TQCharIsShort");
} }
if (!m_printQStringDataCmd && *table->printQStringDataCmd()) { if (!m_printTQStringDataCmd && *table->printTQStringDataCmd()) {
m_printQStringDataCmd = table->printQStringDataCmd(); m_printTQStringDataCmd = table->printTQStringDataCmd();
} }
} }
ProgramTypeTable::TemplateMap::value_type ProgramTypeTable::TemplateMap::value_type
ProgramTypeTable::template2Info(const TypeTable::TypeMap::value_type& tt) ProgramTypeTable::template2Info(const TypeTable::TypeMap::value_type& tt)
{ {
QStringList args = splitTemplateArgs(tt.second->m_templatePattern); TQStringList args = splitTemplateArgs(tt.second->m_templatePattern);
TemplateMap::value_type result(args.front(), TemplateInfo()); TemplateMap::value_type result(args.front(), TemplateInfo());
result.second.type = tt.second; result.second.type = tt.second;
@ -278,9 +278,9 @@ ProgramTypeTable::TemplateMap::value_type
* The first entry of the returned list is the template name, the remaining * The first entry of the returned list is the template name, the remaining
* entries are the arguments. * entries are the arguments.
*/ */
QStringList ProgramTypeTable::splitTemplateArgs(const QString& t) TQStringList ProgramTypeTable::splitTemplateArgs(const TQString& t)
{ {
QStringList result; TQStringList result;
result.push_back(t); result.push_back(t);
int i = t.find('<'); int i = t.find('<');
@ -302,14 +302,14 @@ QStringList ProgramTypeTable::splitTemplateArgs(const QString& t)
nest--; nest--;
else if (nest == 0 && t[i] == ',') { else if (nest == 0 && t[i] == ',') {
// found end of argument // found end of argument
QString arg = t.mid(start, i-start); TQString arg = t.mid(start, i-start);
result.push_back(arg); result.push_back(arg);
start = i+1; // skip ',' start = i+1; // skip ','
} }
} }
// accept the template only if the closing '>' is the last character // accept the template only if the closing '>' is the last character
if (nest < 0 && unsigned(i) == t.length()) { if (nest < 0 && unsigned(i) == t.length()) {
QString arg = t.mid(start, i-start-1); TQString arg = t.mid(start, i-start-1);
result.push_back(arg); result.push_back(arg);
} else { } else {
result.clear(); result.clear();
@ -318,7 +318,7 @@ QStringList ProgramTypeTable::splitTemplateArgs(const QString& t)
return result; return result;
} }
TypeInfo* ProgramTypeTable::lookup(QString type) TypeInfo* ProgramTypeTable::lookup(TQString type)
{ {
/* /*
* Registered aliases contain the complete template parameter list. * Registered aliases contain the complete template parameter list.
@ -337,7 +337,7 @@ TypeInfo* ProgramTypeTable::lookup(QString type)
/* /*
* The hard part: Look up a template. * The hard part: Look up a template.
*/ */
QStringList parts = splitTemplateArgs(type); TQStringList parts = splitTemplateArgs(type);
if (parts.size() == 1) if (parts.size() == 1)
return 0; // not a template return 0; // not a template
@ -351,7 +351,7 @@ TypeInfo* ProgramTypeTable::lookup(QString type)
for (TemplateMap::const_iterator i = range.first; i != range.second; ++i) for (TemplateMap::const_iterator i = range.first; i != range.second; ++i)
{ {
const QStringList& pat = i->second.templateArgs; const TQStringList& pat = i->second.templateArgs;
if (parts.size() < pat.size()) if (parts.size() < pat.size())
continue; // too few arguments continue; // too few arguments
@ -360,8 +360,8 @@ TypeInfo* ProgramTypeTable::lookup(QString type)
if (parts.size() > pat.size() && pat.back() != "*") if (parts.size() > pat.size() && pat.back() != "*")
continue; // too many arguments and no wildcard continue; // too many arguments and no wildcard
QStringList::const_iterator t = parts.begin(); TQStringList::const_iterator t = parts.begin();
QStringList::const_iterator p = pat.begin(); TQStringList::const_iterator p = pat.begin();
unsigned accumPenalty = 0; unsigned accumPenalty = 0;
bool equal = true; bool equal = true;
unsigned penalty = ~(~0U>>1); // 1 in the leading bit unsigned penalty = ~(~0U>>1); // 1 in the leading bit
@ -386,15 +386,15 @@ TypeInfo* ProgramTypeTable::lookup(QString type)
return result; return result;
} }
void ProgramTypeTable::registerAlias(const QString& name, TypeInfo* type) void ProgramTypeTable::registerAlias(const TQString& name, TypeInfo* type)
{ {
ASSERT(lookup(name) == 0 || lookup(name) == type); ASSERT(lookup(name) == 0 || lookup(name) == type);
m_aliasDict.insert(name, type); m_aliasDict.insert(name, type);
} }
void ProgramTypeTable::loadLibTypes(const QStringList& libs) void ProgramTypeTable::loadLibTypes(const TQStringList& libs)
{ {
for (QStringList::const_iterator it = libs.begin(); it != libs.end(); ++it) for (TQStringList::const_iterator it = libs.begin(); it != libs.end(); ++it)
{ {
// look up the library // look up the library
for (std::list<TypeTable>::iterator t = typeTables.begin(); t != typeTables.end(); ++t) for (std::list<TypeTable>::iterator t = typeTables.begin(); t != typeTables.end(); ++t)

@ -4,10 +4,10 @@
* See the file COPYING in the toplevel directory of the source directory. * See the file COPYING in the toplevel directory of the source directory.
*/ */
#include <qdict.h> #include <ntqdict.h>
#include <qstring.h> #include <ntqstring.h>
#include <qregexp.h> #include <ntqregexp.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <map> #include <map>
class KConfigBase; class KConfigBase;
@ -21,7 +21,7 @@ const int typeInfoMaxExpr = 5;
struct TypeInfo struct TypeInfo
{ {
TypeInfo(const QString& displayString); TypeInfo(const TQString& displayString);
~TypeInfo(); ~TypeInfo();
/** /**
@ -35,13 +35,13 @@ struct TypeInfo
* between the percent signs '%' of the display expression; hence, * between the percent signs '%' of the display expression; hence,
* there is one part more than there are sub-expressions. * there is one part more than there are sub-expressions.
*/ */
QString m_displayString[typeInfoMaxExpr+1]; TQString m_displayString[typeInfoMaxExpr+1];
/** /**
* This is a list of partial expressions. Each contains one or more \%s, * This is a list of partial expressions. Each contains one or more \%s,
* which will be replaced by the parent expression. The results are * which will be replaced by the parent expression. The results are
* substituted for the percent signs in m_displayString. * substituted for the percent signs in m_displayString.
*/ */
QString m_exprStrings[typeInfoMaxExpr]; TQString m_exprStrings[typeInfoMaxExpr];
/** /**
* This is a list of guard expressions. Each contains one or more \%s, * This is a list of guard expressions. Each contains one or more \%s,
* which will be replaced by the parent expression, or is empty. If the * which will be replaced by the parent expression, or is empty. If the
@ -49,14 +49,14 @@ struct TypeInfo
* corresponding expression from m_exprStrings is not evaluated. (This * corresponding expression from m_exprStrings is not evaluated. (This
* is used to guard function calls.) * is used to guard function calls.)
*/ */
QString m_guardStrings[typeInfoMaxExpr]; TQString m_guardStrings[typeInfoMaxExpr];
/** /**
* This is the type name including template arguments that contain a * This is the type name including template arguments that contain a
* pattern: A single '*' as template parameter matches one template * pattern: A single '*' as template parameter matches one template
* argument, except that a '*' as the last template parameter matches * argument, except that a '*' as the last template parameter matches
* all remaining template argument. * all remaining template argument.
*/ */
QString m_templatePattern; TQString m_templatePattern;
/** /**
* Returns a pointer to a TypeInfo that identifies wchar_t * Returns a pointer to a TypeInfo that identifies wchar_t
*/ */
@ -77,7 +77,7 @@ public:
TypeTable(); TypeTable();
~TypeTable(); ~TypeTable();
typedef std::map<QString,TypeInfo*> TypeMap; typedef std::map<TQString,TypeInfo*> TypeMap;
/** /**
* Load all known type libraries. * Load all known type libraries.
@ -87,7 +87,7 @@ public:
/** /**
* Copy type infos to the specified dictionary. * Copy type infos to the specified dictionary.
*/ */
void copyTypes(QDict<TypeInfo>& dict); void copyTypes(TQDict<TypeInfo>& dict);
/** /**
* Returns the template types * Returns the template types
@ -97,34 +97,34 @@ public:
/** /**
* Does the file name match this library? * Does the file name match this library?
*/ */
bool matchFileName(const QString& fileName) const { bool matchFileName(const TQString& fileName) const {
return m_shlibNameRE.match(fileName) >= 0; return m_shlibNameRE.match(fileName) >= 0;
} }
/** /**
* Is the specified builtin feature enabled in this type library? * Is the specified builtin feature enabled in this type library?
*/ */
bool isEnabledBuiltin(const QString& feature) const; bool isEnabledBuiltin(const TQString& feature) const;
/** /**
* Returns the command to print the QString data. * Returns the command to print the TQString data.
*/ */
const char* printQStringDataCmd() const { return m_printQStringDataCmd; } const char* printTQStringDataCmd() const { return m_printTQStringDataCmd; }
protected: protected:
/** /**
* Loads the structure type information from the configuration files. * Loads the structure type information from the configuration files.
*/ */
static void loadTypeTables(); static void loadTypeTables();
void loadFromFile(const QString& fileName); void loadFromFile(const TQString& fileName);
void readType(KConfigBase& cf, const QString& type); void readType(KConfigBase& cf, const TQString& type);
QDict<TypeInfo> m_typeDict; TQDict<TypeInfo> m_typeDict;
QDict<TypeInfo> m_aliasDict; TQDict<TypeInfo> m_aliasDict;
TypeMap m_templates; TypeMap m_templates;
QString m_displayName; TQString m_displayName;
QRegExp m_shlibNameRE; TQRegExp m_shlibNameRE;
QStringList m_enabledBuiltins; TQStringList m_enabledBuiltins;
char* m_printQStringDataCmd; char* m_printTQStringDataCmd;
}; };
@ -141,7 +141,7 @@ public:
/** /**
* Load types belonging to the specified libraries. * Load types belonging to the specified libraries.
*/ */
void loadLibTypes(const QStringList& libs); void loadLibTypes(const TQStringList& libs);
/** /**
* Load types belonging to the specified type table * Load types belonging to the specified type table
@ -153,41 +153,41 @@ public:
* *
* If the type is unknown, 0 is returned. * If the type is unknown, 0 is returned.
*/ */
TypeInfo* lookup(QString type); TypeInfo* lookup(TQString type);
/** /**
* Adds a new alias for a type name. * Adds a new alias for a type name.
*/ */
void registerAlias(const QString& name, TypeInfo* type); void registerAlias(const TQString& name, TypeInfo* type);
/** /**
* Tells whether we use built-in support to understand QStrings. * Tells whether we use built-in support to understand TQStrings.
*/ */
bool parseQt2QStrings() const { return m_parseQt2QStrings; } bool parseTQt2TQStrings() const { return m_parseTQt2TQStrings; }
/** /**
* Tells whether QChar are defined like in Qt3. * Tells whether TQChar are defined like in TQt3.
*/ */
bool qCharIsShort() const { return m_QCharIsShort; } bool qCharIsShort() const { return m_QCharIsShort; }
/** /**
* Returns the command to print the QString data. * Returns the command to print the TQString data.
*/ */
const char* printQStringDataCmd() const { return m_printQStringDataCmd; } const char* printTQStringDataCmd() const { return m_printTQStringDataCmd; }
protected: protected:
QDict<TypeInfo> m_types; TQDict<TypeInfo> m_types;
QDict<TypeInfo> m_aliasDict; TQDict<TypeInfo> m_aliasDict;
struct TemplateInfo { struct TemplateInfo {
QStringList templateArgs; TQStringList templateArgs;
TypeInfo* type; TypeInfo* type;
}; };
typedef std::multimap<QString, TemplateInfo> TemplateMap; typedef std::multimap<TQString, TemplateInfo> TemplateMap;
TemplateMap m_templates; //!< one or more template patterns per template name TemplateMap m_templates; //!< one or more template patterns per template name
static TemplateMap::value_type static TemplateMap::value_type
template2Info(const TypeTable::TypeMap::value_type& tt); template2Info(const TypeTable::TypeMap::value_type& tt);
static QStringList splitTemplateArgs(const QString& t); static TQStringList splitTemplateArgs(const TQString& t);
bool m_parseQt2QStrings; bool m_parseTQt2TQStrings;
bool m_QCharIsShort; bool m_QCharIsShort;
const char* m_printQStringDataCmd; const char* m_printTQStringDataCmd;
}; };

@ -4,7 +4,7 @@ Types2=QObject
Types3=QMap,QValueList,QValueVector Types3=QMap,QValueList,QValueVector
Types4=QPoint,QRect Types4=QPoint,QRect
LibDisplayName=libqt 3.x LibDisplayName=libqt 3.x
ShlibRE=libqt-mt\.so\.3$ ShlibRE=libtqt-mt\.so\.3$
EnableBuiltin=QString::Data,QCharIsShort EnableBuiltin=QString::Data,QCharIsShort
PrintQStringCmd=print ($qstrunicode=($qstrdata=(%s))->unicode)?(*(unsigned short*)$qstrunicode)@(($qstrlen=(unsigned int)($qstrdata->len))>100?100:$qstrlen):1==0\n PrintQStringCmd=print ($qstrunicode=($qstrdata=(%s))->unicode)?(*(unsigned short*)$qstrunicode)@(($qstrlen=(unsigned int)($qstrdata->len))>100?100:$qstrlen):1==0\n

@ -6,9 +6,9 @@
#include "winstack.h" #include "winstack.h"
#include "sourcewnd.h" #include "sourcewnd.h"
#include <qbrush.h> #include <ntqbrush.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#include <qpopupmenu.h> #include <ntqpopupmenu.h>
#include <kapplication.h> #include <kapplication.h>
#include <kmainwindow.h> #include <kmainwindow.h>
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
@ -19,7 +19,7 @@
WinStack::WinStack(QWidget* parent, const char* name) : WinStack::WinStack(TQWidget* parent, const char* name) :
KTabWidget(parent, name), KTabWidget(parent, name),
m_pcLine(-1), m_pcLine(-1),
m_valueTip(this), m_valueTip(this),
@ -38,16 +38,16 @@ WinStack::~WinStack()
{ {
} }
void WinStack::contextMenuEvent(QContextMenuEvent* e) void WinStack::contextMenuEvent(TQContextMenuEvent* e)
{ {
// get the context menu from the GUI factory // get the context menu from the GUI factory
QWidget* top = this; TQWidget* top = this;
do do
top = top->parentWidget(); top = top->parentWidget();
while (!top->isTopLevel()); while (!top->isTopLevel());
KMainWindow* mw = static_cast<KMainWindow*>(top); KMainWindow* mw = static_cast<KMainWindow*>(top);
QPopupMenu* m = TQPopupMenu* m =
static_cast<QPopupMenu*>(mw->factory()->container("popup_files_empty", mw)); static_cast<TQPopupMenu*>(mw->factory()->container("popup_files_empty", mw));
m->exec(e->globalPos()); m->exec(e->globalPos());
} }
@ -59,14 +59,14 @@ void WinStack::reloadAllFiles()
} }
} }
QSize WinStack::sizeHint() const TQSize WinStack::sizeHint() const
{ {
return QSize(640, 480); return TQSize(640, 480);
} }
void WinStack::activate(const QString& fileName, int lineNo, const DbgAddr& address) void WinStack::activate(const TQString& fileName, int lineNo, const DbgAddr& address)
{ {
QFileInfo fi(fileName); TQFileInfo fi(fileName);
if (!fi.isFile()) { if (!fi.isFile()) {
/* /*
@ -86,12 +86,12 @@ void WinStack::activate(const QString& fileName, int lineNo, const DbgAddr& addr
activatePath(fi.absFilePath(), lineNo, address); activatePath(fi.absFilePath(), lineNo, address);
} }
void WinStack::activateFile(const QString& fileName) void WinStack::activateFile(const TQString& fileName)
{ {
activatePath(fileName, 0, DbgAddr()); activatePath(fileName, 0, DbgAddr());
} }
bool WinStack::activatePath(QString pathName, int lineNo, const DbgAddr& address) bool WinStack::activatePath(TQString pathName, int lineNo, const DbgAddr& address)
{ {
// check whether the file is already open // check whether the file is already open
SourceWindow* fw = 0; SourceWindow* fw = 0;
@ -112,24 +112,24 @@ bool WinStack::activatePath(QString pathName, int lineNo, const DbgAddr& address
return false; return false;
} }
addTab(fw, QFileInfo(pathName).fileName()); addTab(fw, TQFileInfo(pathName).fileName());
setTabToolTip(fw, pathName); setTabToolTip(fw, pathName);
connect(fw, SIGNAL(clickedLeft(const QString&,int,const DbgAddr&,bool)), connect(fw, SIGNAL(clickedLeft(const TQString&,int,const DbgAddr&,bool)),
SIGNAL(toggleBreak(const QString&,int,const DbgAddr&,bool))); SIGNAL(toggleBreak(const TQString&,int,const DbgAddr&,bool)));
connect(fw, SIGNAL(clickedMid(const QString&,int,const DbgAddr&)), connect(fw, SIGNAL(clickedMid(const TQString&,int,const DbgAddr&)),
SIGNAL(enadisBreak(const QString&,int,const DbgAddr&))); SIGNAL(enadisBreak(const TQString&,int,const DbgAddr&)));
// disassemble code // disassemble code
connect(fw, SIGNAL(disassemble(const QString&, int)), connect(fw, SIGNAL(disassemble(const TQString&, int)),
SIGNAL(disassemble(const QString&, int))); SIGNAL(disassemble(const TQString&, int)));
connect(fw, SIGNAL(expanded(int)), SLOT(slotExpandCollapse(int))); connect(fw, SIGNAL(expanded(int)), SLOT(slotExpandCollapse(int)));
connect(fw, SIGNAL(collapsed(int)), SLOT(slotExpandCollapse(int))); connect(fw, SIGNAL(collapsed(int)), SLOT(slotExpandCollapse(int)));
// tab width // tab width
connect(this, SIGNAL(setTabWidth(int)), fw, SLOT(setTabWidth(int))); connect(this, SIGNAL(setTabWidth(int)), fw, SLOT(setTabWidth(int)));
fw->setTabWidth(m_tabWidth); fw->setTabWidth(m_tabWidth);
fw->setFocusPolicy(QWidget::WheelFocus); fw->setFocusPolicy(TQWidget::WheelFocus);
// set PC if there is one // set PC if there is one
emit newFileLoaded(); emit newFileLoaded();
@ -153,13 +153,13 @@ bool WinStack::activateWindow(SourceWindow* fw, int lineNo, const DbgAddr& addre
return true; return true;
} }
bool WinStack::activeLine(QString& fileName, int& lineNo) bool WinStack::activeLine(TQString& fileName, int& lineNo)
{ {
DbgAddr dummy; DbgAddr dummy;
return activeLine(fileName, lineNo, dummy); return activeLine(fileName, lineNo, dummy);
} }
bool WinStack::activeLine(QString& fileName, int& lineNo, DbgAddr& address) bool WinStack::activeLine(TQString& fileName, int& lineNo, DbgAddr& address)
{ {
if (activeWindow() == 0) { if (activeWindow() == 0) {
return false; return false;
@ -177,7 +177,7 @@ void WinStack::updateLineItems(const KDebugger* dbg)
} }
} }
void WinStack::updatePC(const QString& fileName, int lineNo, const DbgAddr& address, int frameNo) void WinStack::updatePC(const TQString& fileName, int lineNo, const DbgAddr& address, int frameNo)
{ {
if (m_pcLine >= 0) { if (m_pcLine >= 0) {
setPC(false, m_pcFile, m_pcLine, DbgAddr(m_pcAddress), m_pcFrame); setPC(false, m_pcFile, m_pcLine, DbgAddr(m_pcAddress), m_pcFrame);
@ -191,7 +191,7 @@ void WinStack::updatePC(const QString& fileName, int lineNo, const DbgAddr& addr
} }
} }
SourceWindow* WinStack::findByFileName(const QString& fileName) const SourceWindow* WinStack::findByFileName(const TQString& fileName) const
{ {
for (int i = count()-1; i >= 0; i--) { for (int i = count()-1; i >= 0; i--) {
if (windowAt(i)->fileNameMatches(fileName)) { if (windowAt(i)->fileNameMatches(fileName)) {
@ -201,11 +201,11 @@ SourceWindow* WinStack::findByFileName(const QString& fileName) const
return 0; return 0;
} }
void WinStack::setPC(bool set, const QString& fileName, int lineNo, void WinStack::setPC(bool set, const TQString& fileName, int lineNo,
const DbgAddr& address, int frameNo) const DbgAddr& address, int frameNo)
{ {
TRACE((set ? "set PC: " : "clear PC: ") + fileName + TRACE((set ? "set PC: " : "clear PC: ") + fileName +
QString().sprintf(":%d#%d ", lineNo, frameNo) + address.asString()); TQString().sprintf(":%d#%d ", lineNo, frameNo) + address.asString());
SourceWindow* fw = findByFileName(fileName); SourceWindow* fw = findByFileName(fileName);
if (fw) if (fw)
fw->setPC(set, lineNo, address, frameNo); fw->setPC(set, lineNo, address, frameNo);
@ -221,9 +221,9 @@ SourceWindow* WinStack::activeWindow() const
return static_cast<SourceWindow*>(currentPage()); return static_cast<SourceWindow*>(currentPage());
} }
QString WinStack::activeFileName() const TQString WinStack::activeFileName() const
{ {
QString f; TQString f;
if (activeWindow() != 0) if (activeWindow() != 0)
f = activeWindow()->fileName(); f = activeWindow()->fileName();
return f; return f;
@ -243,15 +243,15 @@ void WinStack::slotFindBackward()
SourceWindow::findBackward); SourceWindow::findBackward);
} }
void WinStack::maybeTip(const QPoint& p) void WinStack::maybeTip(const TQPoint& p)
{ {
SourceWindow* w = activeWindow(); SourceWindow* w = activeWindow();
if (w == 0) if (w == 0)
return; return;
// get the word at the point // get the word at the point
QString word; TQString word;
QRect r; TQRect r;
if (!w->wordAtPoint(w->mapFrom(this, p), word, r)) if (!w->wordAtPoint(w->mapFrom(this, p), word, r))
return; return;
@ -260,17 +260,17 @@ void WinStack::maybeTip(const QPoint& p)
assert(r.isValid()); assert(r.isValid());
// remember the location // remember the location
m_tipLocation = QRect(w->mapTo(this, r.topLeft()), r.size()); m_tipLocation = TQRect(w->mapTo(this, r.topLeft()), r.size());
emit initiateValuePopup(word); emit initiateValuePopup(word);
} }
void WinStack::slotShowValueTip(const QString& tipText) void WinStack::slotShowValueTip(const TQString& tipText)
{ {
m_valueTip.tip(m_tipLocation, tipText); m_valueTip.tip(m_tipLocation, tipText);
} }
void WinStack::slotDisassembled(const QString& fileName, int lineNo, void WinStack::slotDisassembled(const TQString& fileName, int lineNo,
const std::list<DisassembledCode>& disass) const std::list<DisassembledCode>& disass)
{ {
SourceWindow* fw = findByFileName(fileName); SourceWindow* fw = findByFileName(fileName);
@ -320,7 +320,7 @@ void WinStack::slotViewFind()
void WinStack::slotBrkptSet() void WinStack::slotBrkptSet()
{ {
QString file; TQString file;
int lineNo; int lineNo;
DbgAddr address; DbgAddr address;
if (activeLine(file, lineNo, address)) if (activeLine(file, lineNo, address))
@ -329,7 +329,7 @@ void WinStack::slotBrkptSet()
void WinStack::slotBrkptSetTemp() void WinStack::slotBrkptSetTemp()
{ {
QString file; TQString file;
int lineNo; int lineNo;
DbgAddr address; DbgAddr address;
if (activeLine(file, lineNo, address)) if (activeLine(file, lineNo, address))
@ -338,7 +338,7 @@ void WinStack::slotBrkptSetTemp()
void WinStack::slotBrkptEnable() void WinStack::slotBrkptEnable()
{ {
QString file; TQString file;
int lineNo; int lineNo;
DbgAddr address; DbgAddr address;
if (activeLine(file, lineNo, address)) if (activeLine(file, lineNo, address))
@ -347,7 +347,7 @@ void WinStack::slotBrkptEnable()
void WinStack::slotMoveProgramCounter() void WinStack::slotMoveProgramCounter()
{ {
QString file; TQString file;
int lineNo; int lineNo;
DbgAddr address; DbgAddr address;
if (activeLine(file, lineNo, address)) if (activeLine(file, lineNo, address))
@ -356,7 +356,7 @@ void WinStack::slotMoveProgramCounter()
void WinStack::slotClose() void WinStack::slotClose()
{ {
QWidget* w = activeWindow(); TQWidget* w = activeWindow();
if (!w) if (!w)
return; return;
@ -366,11 +366,11 @@ void WinStack::slotClose()
ValueTip::ValueTip(WinStack* parent) : ValueTip::ValueTip(WinStack* parent) :
QToolTip(parent) TQToolTip(parent)
{ {
} }
void ValueTip::maybeTip(const QPoint& p) void ValueTip::maybeTip(const TQPoint& p)
{ {
WinStack* w = static_cast<WinStack*>(parentWidget()); WinStack* w = static_cast<WinStack*>(parentWidget());
w->maybeTip(p); w->maybeTip(p);
@ -378,7 +378,7 @@ void ValueTip::maybeTip(const QPoint& p)
FindDialog::FindDialog() : FindDialog::FindDialog() :
QDialog(0, "find", false), TQDialog(0, "find", false),
m_searchText(this, "text"), m_searchText(this, "text"),
m_caseCheck(this, "case"), m_caseCheck(this, "case"),
m_buttonForward(this, "forward"), m_buttonForward(this, "forward"),
@ -387,7 +387,7 @@ FindDialog::FindDialog() :
m_layout(this, 8), m_layout(this, 8),
m_buttons(4) m_buttons(4)
{ {
setCaption(QString(kapp->caption()) + i18n(": Search")); setCaption(TQString(kapp->caption()) + i18n(": Search"));
m_searchText.setMinimumSize(330, 24); m_searchText.setMinimumSize(330, 24);
m_searchText.setMaxLength(10000); m_searchText.setMaxLength(10000);
@ -403,7 +403,7 @@ FindDialog::FindDialog() :
m_caseCheck.setMinimumSize(330, 24); m_caseCheck.setMinimumSize(330, 24);
// get maximum size of buttons // get maximum size of buttons
QSize maxSize(80,30); TQSize maxSize(80,30);
maxSize.expandedTo(m_buttonForward.sizeHint()); maxSize.expandedTo(m_buttonForward.sizeHint());
maxSize.expandedTo(m_buttonBackward.sizeHint()); maxSize.expandedTo(m_buttonBackward.sizeHint());
maxSize.expandedTo(m_buttonClose.sizeHint()); maxSize.expandedTo(m_buttonClose.sizeHint());
@ -434,15 +434,15 @@ FindDialog::~FindDialog()
{ {
} }
void FindDialog::closeEvent(QCloseEvent* ev) void FindDialog::closeEvent(TQCloseEvent* ev)
{ {
QDialog::closeEvent(ev); TQDialog::closeEvent(ev);
emit closed(); emit closed();
} }
void FindDialog::done(int result) void FindDialog::done(int result)
{ {
QDialog::done(result); TQDialog::done(result);
emit closed(); emit closed();
} }

@ -7,12 +7,12 @@
#ifndef WINSTACK_H #ifndef WINSTACK_H
#define WINSTACK_H #define WINSTACK_H
#include <qdialog.h> #include <ntqdialog.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <ktabwidget.h> #include <ktabwidget.h>
#include <list> #include <list>
@ -23,7 +23,7 @@ class SourceWindow;
class DisassembledCode; class DisassembledCode;
struct DbgAddr; struct DbgAddr;
class FindDialog : public QDialog class FindDialog : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -31,32 +31,32 @@ public:
~FindDialog(); ~FindDialog();
bool caseSensitive() const { return m_caseCheck.isChecked(); } bool caseSensitive() const { return m_caseCheck.isChecked(); }
QString searchText() const { return m_searchText.text(); } TQString searchText() const { return m_searchText.text(); }
virtual void done(int result); virtual void done(int result);
QLineEdit m_searchText; TQLineEdit m_searchText;
QCheckBox m_caseCheck; TQCheckBox m_caseCheck;
QPushButton m_buttonForward; TQPushButton m_buttonForward;
QPushButton m_buttonBackward; TQPushButton m_buttonBackward;
QPushButton m_buttonClose; TQPushButton m_buttonClose;
signals: signals:
void closed(); void closed();
protected: protected:
virtual void closeEvent(QCloseEvent* ev); virtual void closeEvent(TQCloseEvent* ev);
QVBoxLayout m_layout; TQVBoxLayout m_layout;
QHBoxLayout m_buttons; TQHBoxLayout m_buttons;
}; };
class ValueTip : public QToolTip class ValueTip : public TQToolTip
{ {
public: public:
ValueTip(WinStack* parent); ValueTip(WinStack* parent);
virtual ~ValueTip() {} // Qt3's QToolTip lacks virtual dtor! virtual ~ValueTip() {} // TQt3's TQToolTip lacks virtual dtor!
virtual void maybeTip(const QPoint& p); virtual void maybeTip(const TQPoint& p);
void tip(const QRect& r, const QString& s) { QToolTip::tip(r, s); } void tip(const TQRect& r, const TQString& s) { TQToolTip::tip(r, s); }
}; };
@ -64,39 +64,39 @@ class WinStack : public KTabWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
WinStack(QWidget* parent, const char* name); WinStack(TQWidget* parent, const char* name);
virtual ~WinStack(); virtual ~WinStack();
/** /**
* Slot activate also looks in this directory when the specified file is * Slot activate also looks in this directory when the specified file is
* a relative path. * a relative path.
*/ */
void setExtraDirectory(const QString& dir) { m_lastOpenDir = dir; } void setExtraDirectory(const TQString& dir) { m_lastOpenDir = dir; }
void activateFile(const QString& fileName); void activateFile(const TQString& fileName);
bool activeLine(QString& filename, int& lineNo); bool activeLine(TQString& filename, int& lineNo);
bool activeLine(QString& filename, int& lineNo, DbgAddr& address); bool activeLine(TQString& filename, int& lineNo, DbgAddr& address);
void maybeTip(const QPoint& p); void maybeTip(const TQPoint& p);
bool hasWindows() const { return count() > 0; } bool hasWindows() const { return count() > 0; }
QString activeFileName() const; TQString activeFileName() const;
SourceWindow* activeWindow() const; SourceWindow* activeWindow() const;
SourceWindow* windowAt(int i) const; SourceWindow* windowAt(int i) const;
virtual QSize sizeHint() const; virtual TQSize sizeHint() const;
signals: signals:
void toggleBreak(const QString&, int, const DbgAddr&, bool); void toggleBreak(const TQString&, int, const DbgAddr&, bool);
void enadisBreak(const QString&, int, const DbgAddr&); void enadisBreak(const TQString&, int, const DbgAddr&);
void newFileLoaded(); void newFileLoaded();
void initiateValuePopup(const QString&); void initiateValuePopup(const TQString&);
void disassemble(const QString&, int); void disassemble(const TQString&, int);
void setTabWidth(int numChars); void setTabWidth(int numChars);
void moveProgramCounter(const QString&, int, const DbgAddr&); void moveProgramCounter(const TQString&, int, const DbgAddr&);
public slots: public slots:
virtual void slotFindForward(); virtual void slotFindForward();
virtual void slotFindBackward(); virtual void slotFindBackward();
virtual void activate(const QString& filename, int lineNo, const DbgAddr& address); virtual void activate(const TQString& filename, int lineNo, const DbgAddr& address);
void updatePC(const QString& filename, int lineNo, const DbgAddr& address, int frameNo); void updatePC(const TQString& filename, int lineNo, const DbgAddr& address, int frameNo);
void reloadAllFiles(); void reloadAllFiles();
void updateLineItems(const KDebugger* deb); void updateLineItems(const KDebugger* deb);
void slotSetTabWidth(int numChars); void slotSetTabWidth(int numChars);
@ -110,32 +110,32 @@ public slots:
void slotClose(); void slotClose();
// Displays the value tip at m_tipLocation // Displays the value tip at m_tipLocation
void slotShowValueTip(const QString& tipText); void slotShowValueTip(const TQString& tipText);
// Shows the disassembled code at the location given by file and lineNo // Shows the disassembled code at the location given by file and lineNo
void slotDisassembled(const QString& fileName, int lineNo, void slotDisassembled(const TQString& fileName, int lineNo,
const std::list<DisassembledCode>& disass); const std::list<DisassembledCode>& disass);
// Updates line items after expanding/collapsing disassembled code // Updates line items after expanding/collapsing disassembled code
void slotExpandCollapse(int lineNo); void slotExpandCollapse(int lineNo);
protected: protected:
bool activatePath(QString pathname, int lineNo, const DbgAddr& address); bool activatePath(TQString pathname, int lineNo, const DbgAddr& address);
virtual bool activateWindow(SourceWindow* fw, int lineNo, const DbgAddr& address); /* -1 doesnt change line */ virtual bool activateWindow(SourceWindow* fw, int lineNo, const DbgAddr& address); /* -1 doesnt change line */
virtual void contextMenuEvent(QContextMenuEvent* e); virtual void contextMenuEvent(TQContextMenuEvent* e);
void setPC(bool set, const QString& fileName, int lineNo, void setPC(bool set, const TQString& fileName, int lineNo,
const DbgAddr& address, int frameNo); const DbgAddr& address, int frameNo);
SourceWindow* findByFileName(const QString& fileName) const; SourceWindow* findByFileName(const TQString& fileName) const;
QString m_lastOpenDir; /* where user opened last file */ TQString m_lastOpenDir; /* where user opened last file */
// program counter // program counter
QString m_pcFile; TQString m_pcFile;
int m_pcLine; /* -1 if no PC */ int m_pcLine; /* -1 if no PC */
QString m_pcAddress; /* exact address of PC */ TQString m_pcAddress; /* exact address of PC */
int m_pcFrame; int m_pcFrame;
ValueTip m_valueTip; ValueTip m_valueTip;
QRect m_tipLocation; /* where tip should appear */ TQRect m_tipLocation; /* where tip should appear */
int m_tabWidth; /* number of chars */ int m_tabWidth; /* number of chars */

@ -6,7 +6,7 @@
#include "xsldbgdriver.h" #include "xsldbgdriver.h"
#include "exprwnd.h" #include "exprwnd.h"
#include <qstringlist.h> #include <ntqstringlist.h>
#include <klocale.h> /* i18n */ #include <klocale.h> /* i18n */
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> /* strtol, atoi */ #include <stdlib.h> /* strtol, atoi */
@ -21,7 +21,7 @@
static ExprValue *parseVar(const char *&s); static ExprValue *parseVar(const char *&s);
static bool parseName(const char *&s, QString & name, static bool parseName(const char *&s, TQString & name,
VarTree::NameKind & kind); VarTree::NameKind & kind);
static bool parseValue(const char *&s, ExprValue * variable); static bool parseValue(const char *&s, ExprValue * variable);
static bool isErrorExpr(const char *output); static bool isErrorExpr(const char *output);
@ -86,7 +86,7 @@ static XsldbgCmdInfo cmds[] = {
{DCprint, "print %s\n", XsldbgCmdInfo::argString}, {DCprint, "print %s\n", XsldbgCmdInfo::argString},
{DCprintDeref, "print 'print (*%s)'\n", XsldbgCmdInfo::argString}, {DCprintDeref, "print 'print (*%s)'\n", XsldbgCmdInfo::argString},
{DCprintStruct, "print 'print %s'\n", XsldbgCmdInfo::argString}, {DCprintStruct, "print 'print %s'\n", XsldbgCmdInfo::argString},
{DCprintQStringStruct, "print 'print %s'\n", XsldbgCmdInfo::argString}, {DCprintTQStringStruct, "print 'print %s'\n", XsldbgCmdInfo::argString},
{DCframe, "frame %d\n", XsldbgCmdInfo::argNum}, {DCframe, "frame %d\n", XsldbgCmdInfo::argNum},
{DCfindType, "print 'whatis %s'\n", XsldbgCmdInfo::argString}, {DCfindType, "print 'whatis %s'\n", XsldbgCmdInfo::argString},
{DCinfosharedlib, "stylesheets\n", XsldbgCmdInfo::argNone}, {DCinfosharedlib, "stylesheets\n", XsldbgCmdInfo::argNone},
@ -176,27 +176,27 @@ XsldbgDriver::~XsldbgDriver()
} }
QString TQString
XsldbgDriver::driverName() const XsldbgDriver::driverName() const
{ {
return "XSLDBG"; return "XSLDBG";
} }
QString TQString
XsldbgDriver::defaultXsldbg() XsldbgDriver::defaultXsldbg()
{ {
return "xsldbg --lang en --shell --gdb"; return "xsldbg --lang en --shell --gdb";
} }
QString TQString
XsldbgDriver::defaultInvocation() const XsldbgDriver::defaultInvocation() const
{ {
return defaultXsldbg(); return defaultXsldbg();
} }
QStringList XsldbgDriver::boolOptionList() const TQStringList XsldbgDriver::boolOptionList() const
{ {
QStringList allOptions; TQStringList allOptions;
allOptions.append("verbose"); allOptions.append("verbose");
allOptions.append("repeat"); allOptions.append("repeat");
allOptions.append("debug"); allOptions.append("debug");
@ -232,7 +232,7 @@ XsldbgDriver::slotReceiveOutput(KProcess * process, char *buffer,
} }
bool bool
XsldbgDriver::startup(QString cmdStr) XsldbgDriver::startup(TQString cmdStr)
{ {
if (!DebuggerDriver::startup(cmdStr)) if (!DebuggerDriver::startup(cmdStr))
return false; return false;
@ -263,7 +263,7 @@ XsldbgDriver::commandFinished(CmdQueueItem * cmd)
// get version number from preamble // get version number from preamble
{ {
int len; int len;
QRegExp xsldbgVersion("^XSLDBG [0-9]+\\.[0-9]+\\.[0-9]+"); TQRegExp xsldbgVersion("^XSLDBG [0-9]+\\.[0-9]+\\.[0-9]+");
int offset = xsldbgVersion.match(m_output, 0, &len); int offset = xsldbgVersion.match(m_output, 0, &len);
if (offset >= 0) { if (offset >= 0) {
@ -284,9 +284,9 @@ XsldbgDriver::commandFinished(CmdQueueItem * cmd)
m_gdbMajor = 0; m_gdbMajor = 0;
m_gdbMinor = 7; m_gdbMinor = 7;
} }
TRACE(QString("Got version ") + TRACE(TQString("Got version ") +
QString::number(m_gdbMajor) + "." + TQString::number(m_gdbMajor) + "." +
QString::number(m_gdbMinor)); TQString::number(m_gdbMinor));
break; break;
} }
default:; default:;
@ -335,7 +335,7 @@ XsldbgDriver::parseMarker()
m_output[0] = '\0'; m_output[0] = '\0';
return; return;
} }
//TRACE(QString("parseMarker is looking at :") + p); //TRACE(TQString("parseMarker is looking at :") + p);
markerStart = m_markerRE.match(p, 0, &len); markerStart = m_markerRE.match(p, 0, &len);
if (markerStart == -1) { if (markerStart == -1) {
// try to marker on next line ! // try to marker on next line !
@ -349,7 +349,7 @@ XsldbgDriver::parseMarker()
// extract the marker // extract the marker
char *startMarker = p + markerStart + len; char *startMarker = p + markerStart + len;
//TRACE(QString("found marker:") + startMarker); //TRACE(TQString("found marker:") + startMarker);
char *endMarker = strchr(startMarker, '\n'); char *endMarker = strchr(startMarker, '\n');
if (endMarker == 0) if (endMarker == 0)
@ -358,7 +358,7 @@ XsldbgDriver::parseMarker()
*endMarker = '\0'; *endMarker = '\0';
// extract filename and line number // extract filename and line number
static QRegExp MarkerRE(" at line [0-9]+"); static TQRegExp MarkerRE(" at line [0-9]+");
int lineNoStart = MarkerRE.match(startMarker, 0, &len); int lineNoStart = MarkerRE.match(startMarker, 0, &len);
@ -371,7 +371,7 @@ XsldbgDriver::parseMarker()
startMarker[lineNoStart-1] = '\0'; /* split off file name */ startMarker[lineNoStart-1] = '\0'; /* split off file name */
TRACE("Got file and line number"); TRACE("Got file and line number");
startMarker++; startMarker++;
TRACE(QString(startMarker) + ": " + QString::number(lineNo)); TRACE(TQString(startMarker) + ": " + TQString::number(lineNo));
emit activateFileLine(startMarker, lineNo - 1, address); emit activateFileLine(startMarker, lineNo - 1, address);
} }
} }
@ -382,7 +382,7 @@ XsldbgDriver::parseMarker()
* command line. * command line.
*/ */
static void static void
normalizeStringArg(QString & arg) normalizeStringArg(TQString & arg)
{ {
/* /*
* Remove trailing backslashes. This approach is a little simplistic, * Remove trailing backslashes. This approach is a little simplistic,
@ -395,8 +395,8 @@ normalizeStringArg(QString & arg)
} }
QString TQString
XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg) XsldbgDriver::makeCmdString(DbgCommand cmd, TQString strArg)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argString); assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argString);
@ -411,24 +411,24 @@ XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg)
m_xslFile = strArg; m_xslFile = strArg;
} }
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, strArg.latin1()); cmdString.sprintf(cmds[cmd].fmt, strArg.latin1());
return cmdString; return cmdString;
} }
QString TQString
XsldbgDriver::makeCmdString(DbgCommand cmd, int intArg) XsldbgDriver::makeCmdString(DbgCommand cmd, int intArg)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argNum); assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argNum);
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, intArg); cmdString.sprintf(cmds[cmd].fmt, intArg);
return cmdString; return cmdString;
} }
QString TQString
XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg) XsldbgDriver::makeCmdString(DbgCommand cmd, TQString strArg, int intArg)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argStringNum || assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argStringNum ||
@ -437,7 +437,7 @@ XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg)
normalizeStringArg(strArg); normalizeStringArg(strArg);
QString cmdString; TQString cmdString;
if (cmd == DCtty) { if (cmd == DCtty) {
/* /*
@ -499,7 +499,7 @@ XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg)
} }
break; break;
} }
QString spec; TQString spec;
spec.sprintf("/%d%c%c", count, sizeSpec, formatSpec); spec.sprintf("/%d%c%c", count, sizeSpec, formatSpec);
@ -526,9 +526,9 @@ XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg, int intArg)
return cmdString; return cmdString;
} }
QString TQString
XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg1, XsldbgDriver::makeCmdString(DbgCommand cmd, TQString strArg1,
QString strArg2) TQString strArg2)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argString2); assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argString2);
@ -536,18 +536,18 @@ XsldbgDriver::makeCmdString(DbgCommand cmd, QString strArg1,
normalizeStringArg(strArg1); normalizeStringArg(strArg1);
normalizeStringArg(strArg2); normalizeStringArg(strArg2);
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, strArg1.latin1(), strArg2.latin1()); cmdString.sprintf(cmds[cmd].fmt, strArg1.latin1(), strArg2.latin1());
return cmdString; return cmdString;
} }
QString TQString
XsldbgDriver::makeCmdString(DbgCommand cmd, int intArg1, int intArg2) XsldbgDriver::makeCmdString(DbgCommand cmd, int intArg1, int intArg2)
{ {
assert(cmd >= 0 && cmd < NUM_CMDS); assert(cmd >= 0 && cmd < NUM_CMDS);
assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argNum2); assert(cmds[cmd].argsNeeded == XsldbgCmdInfo::argNum2);
QString cmdString; TQString cmdString;
cmdString.sprintf(cmds[cmd].fmt, intArg1, intArg2); cmdString.sprintf(cmds[cmd].fmt, intArg1, intArg2);
return cmdString; return cmdString;
} }
@ -566,7 +566,7 @@ XsldbgDriver::executeCmd(DbgCommand cmd, bool clearLow)
} }
CmdQueueItem * CmdQueueItem *
XsldbgDriver::executeCmd(DbgCommand cmd, QString strArg, bool clearLow) XsldbgDriver::executeCmd(DbgCommand cmd, TQString strArg, bool clearLow)
{ {
return executeCmdString(cmd, makeCmdString(cmd, strArg), clearLow); return executeCmdString(cmd, makeCmdString(cmd, strArg), clearLow);
} }
@ -579,7 +579,7 @@ XsldbgDriver::executeCmd(DbgCommand cmd, int intArg, bool clearLow)
} }
CmdQueueItem * CmdQueueItem *
XsldbgDriver::executeCmd(DbgCommand cmd, QString strArg, int intArg, XsldbgDriver::executeCmd(DbgCommand cmd, TQString strArg, int intArg,
bool clearLow) bool clearLow)
{ {
return executeCmdString(cmd, makeCmdString(cmd, strArg, intArg), return executeCmdString(cmd, makeCmdString(cmd, strArg, intArg),
@ -587,7 +587,7 @@ XsldbgDriver::executeCmd(DbgCommand cmd, QString strArg, int intArg,
} }
CmdQueueItem * CmdQueueItem *
XsldbgDriver::executeCmd(DbgCommand cmd, QString strArg1, QString strArg2, XsldbgDriver::executeCmd(DbgCommand cmd, TQString strArg1, TQString strArg2,
bool clearLow) bool clearLow)
{ {
return executeCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), return executeCmdString(cmd, makeCmdString(cmd, strArg1, strArg2),
@ -609,7 +609,7 @@ XsldbgDriver::queueCmd(DbgCommand cmd, QueueMode mode)
} }
CmdQueueItem * CmdQueueItem *
XsldbgDriver::queueCmd(DbgCommand cmd, QString strArg, QueueMode mode) XsldbgDriver::queueCmd(DbgCommand cmd, TQString strArg, QueueMode mode)
{ {
return queueCmdString(cmd, makeCmdString(cmd, strArg), mode); return queueCmdString(cmd, makeCmdString(cmd, strArg), mode);
} }
@ -621,14 +621,14 @@ XsldbgDriver::queueCmd(DbgCommand cmd, int intArg, QueueMode mode)
} }
CmdQueueItem * CmdQueueItem *
XsldbgDriver::queueCmd(DbgCommand cmd, QString strArg, int intArg, XsldbgDriver::queueCmd(DbgCommand cmd, TQString strArg, int intArg,
QueueMode mode) QueueMode mode)
{ {
return queueCmdString(cmd, makeCmdString(cmd, strArg, intArg), mode); return queueCmdString(cmd, makeCmdString(cmd, strArg, intArg), mode);
} }
CmdQueueItem * CmdQueueItem *
XsldbgDriver::queueCmd(DbgCommand cmd, QString strArg1, QString strArg2, XsldbgDriver::queueCmd(DbgCommand cmd, TQString strArg1, TQString strArg2,
QueueMode mode) QueueMode mode)
{ {
return queueCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), mode); return queueCmdString(cmd, makeCmdString(cmd, strArg1, strArg2), mode);
@ -637,7 +637,7 @@ XsldbgDriver::queueCmd(DbgCommand cmd, QString strArg1, QString strArg2,
void void
XsldbgDriver::terminate() XsldbgDriver::terminate()
{ {
qDebug("XsldbgDriver::Terminate"); tqDebug("XsldbgDriver::Terminate");
flushCommands(); flushCommands();
executeCmdString(DCinitialize, "quit\n", true); executeCmdString(DCinitialize, "quit\n", true);
kill(SIGTERM); kill(SIGTERM);
@ -647,7 +647,7 @@ XsldbgDriver::terminate()
void void
XsldbgDriver::detachAndTerminate() XsldbgDriver::detachAndTerminate()
{ {
qDebug("XsldbgDriver::detachAndTerminate"); tqDebug("XsldbgDriver::detachAndTerminate");
flushCommands(); flushCommands();
executeCmdString(DCinitialize, "quit\n", true); executeCmdString(DCinitialize, "quit\n", true);
kill(SIGINT); kill(SIGINT);
@ -657,7 +657,7 @@ void
XsldbgDriver::interruptInferior() XsldbgDriver::interruptInferior()
{ {
// remove accidentally queued commands // remove accidentally queued commands
qDebug("interruptInferior"); tqDebug("interruptInferior");
flushHiPriQueue(); flushHiPriQueue();
kill(SIGINT); kill(SIGINT);
} }
@ -692,7 +692,7 @@ isErrorExpr(const char *output)
errorWordLength[wordIndex]) == 0 && errorWordLength[wordIndex]) == 0 &&
(wordIndex == 0 && strstr(output, "try stepping past the xsl:param") == 0) ) { (wordIndex == 0 && strstr(output, "try stepping past the xsl:param") == 0) ) {
result = true; result = true;
TRACE(QString("Error/Warning/Information from xsldbg ") + output); TRACE(TQString("Error/Warning/Information from xsldbg ") + output);
break; break;
} }
} }
@ -711,12 +711,12 @@ parseErrorMessage(const char *output,
if (isErrorExpr(output)) { if (isErrorExpr(output)) {
if (wantErrorValue) { if (wantErrorValue) {
// put the error message as value in the variable // put the error message as value in the variable
variable = new ExprValue(QString(), VarTree::NKplain); variable = new ExprValue(TQString(), VarTree::NKplain);
const char *endMsg = strchr(output, '\n'); const char *endMsg = strchr(output, '\n');
if (endMsg == 0) if (endMsg == 0)
endMsg = output + strlen(output); endMsg = output + strlen(output);
variable->m_value = QString::fromLatin1(output, endMsg - output); variable->m_value = TQString::fromLatin1(output, endMsg - output);
} else { } else {
variable = 0; variable = 0;
} }
@ -727,17 +727,17 @@ parseErrorMessage(const char *output,
void void
XsldbgDriver::setPrintQStringDataCmd(const char* /*cmd*/) XsldbgDriver::setPrintTQStringDataCmd(const char* /*cmd*/)
{ {
} }
ExprValue * ExprValue *
XsldbgDriver::parseQCharArray(const char */*output*/, bool /*wantErrorValue*/, XsldbgDriver::parseTQCharArray(const char */*output*/, bool /*wantErrorValue*/,
bool /*qt3like*/) bool /*qt3like*/)
{ {
ExprValue *variable = 0; ExprValue *variable = 0;
TRACE("XsldbgDriver::parseQCharArray not implmented"); TRACE("XsldbgDriver::parseTQCharArray not implmented");
return variable; return variable;
} }
@ -747,7 +747,7 @@ parseVar(const char *&s)
const char *p = s; const char *p = s;
bool foundLocalVar = false; bool foundLocalVar = false;
ExprValue *variable = 0L; ExprValue *variable = 0L;
QString name; TQString name;
VarTree::NameKind kind; VarTree::NameKind kind;
@ -776,7 +776,7 @@ parseVar(const char *&s)
TRACE("Found print expr"); TRACE("Found print expr");
if (nextLine) { if (nextLine) {
p = p + 2; /* skip the "= " */ p = p + 2; /* skip the "= " */
name = QString::fromLatin1(p, nextLine - p); name = TQString::fromLatin1(p, nextLine - p);
kind = VarTree::NKplain; kind = VarTree::NKplain;
p = nextLine + 1; p = nextLine + 1;
variable = new ExprValue(name, kind); variable = new ExprValue(name, kind);
@ -793,7 +793,7 @@ parseVar(const char *&s)
if (*p != '='){ if (*p != '='){
// No value provided just a name // No value provided just a name
TRACE(QString("Parse var: name") + p); TRACE(TQString("Parse var: name") + p);
if (!parseName(p, name, kind)) { if (!parseName(p, name, kind)) {
return 0; return 0;
} }
@ -806,7 +806,7 @@ parseVar(const char *&s)
// skip whitespace // skip whitespace
while (isspace(*p)) while (isspace(*p))
p++; p++;
TRACE(QString("Parse var: name") + p); TRACE(TQString("Parse var: name") + p);
if (!parseName(p, name, kind)) { if (!parseName(p, name, kind)) {
return 0; return 0;
} }
@ -839,9 +839,9 @@ skipName(const char *&p)
} }
static bool static bool
parseName(const char *&s, QString & name, VarTree::NameKind & kind) parseName(const char *&s, TQString & name, VarTree::NameKind & kind)
{ {
/* qDebug(__PRETTY_FUNCTION__); */ /* tqDebug(__PRETTY_FUNCTION__); */
kind = VarTree::NKplain; kind = VarTree::NKplain;
const char *p = s; const char *p = s;
@ -856,10 +856,10 @@ parseName(const char *&s, QString & name, VarTree::NameKind & kind)
} }
name = QString::fromLatin1(s, len); name = TQString::fromLatin1(s, len);
/* XSL variables will have a $ prefix to be evaluated /* XSL variables will have a $ prefix to be evaluated
* properly */ * properly */
//TRACE(QString("parseName got name" ) + name); //TRACE(TQString("parseName got name" ) + name);
// return the new position // return the new position
s = p; s = p;
@ -945,7 +945,7 @@ parseValue(const char *&s, ExprValue * variable)
} }
if (foundEnd == 0) if (foundEnd == 0)
TRACE(QString("Unable to find end on value near :") + start); TRACE(TQString("Unable to find end on value near :") + start);
// If we've got something otherthan a end of value marker then // If we've got something otherthan a end of value marker then
// advance to the end of this buffer // advance to the end of this buffer
@ -966,11 +966,11 @@ parseValue(const char *&s, ExprValue * variable)
* Parses a stack frame. * Parses a stack frame.
*/ */
static void static void
parseFrameInfo(const char *&s, QString & func, parseFrameInfo(const char *&s, TQString & func,
QString & file, int &lineNo, DbgAddr & /*address*/) TQString & file, int &lineNo, DbgAddr & /*address*/)
{ {
const char *p = s, *endPos = s + strlen(s); const char *p = s, *endPos = s + strlen(s);
QString lineNoString; TQString lineNoString;
TRACE("parseFrameInfo"); TRACE("parseFrameInfo");
@ -1033,7 +1033,7 @@ parseFrameInfo(const char *&s, QString & func,
if (isdigit(*p)) { if (isdigit(*p)) {
/* KDbg uses an offset of +1 for its line numbers */ /* KDbg uses an offset of +1 for its line numbers */
lineNo = atoi(p) - 1; lineNo = atoi(p) - 1;
lineNoString = QString::number(lineNo); lineNoString = TQString::number(lineNo);
} }
/* convert func into format needed */ /* convert func into format needed */
func.append(" at "); func.append(" at ");
@ -1055,8 +1055,8 @@ parseFrameInfo(const char *&s, QString & func,
* Parses a stack frame including its frame number * Parses a stack frame including its frame number
*/ */
static bool static bool
parseFrame(const char *&s, int &frameNo, QString & func, parseFrame(const char *&s, int &frameNo, TQString & func,
QString & file, int &lineNo, DbgAddr & address) TQString & file, int &lineNo, DbgAddr & address)
{ {
// TRACE("XsldbgDriver ::parseFrame"); // TRACE("XsldbgDriver ::parseFrame");
@ -1081,7 +1081,7 @@ parseFrame(const char *&s, int &frameNo, QString & func,
while (isdigit(*s)) while (isdigit(*s))
s++; s++;
//TRACE(QString("Got frame ").append(QString::number(frameNo))); //TRACE(TQString("Got frame ").append(TQString::number(frameNo)));
// space // space
while (isspace(*s)) while (isspace(*s))
s++; s++;
@ -1095,7 +1095,7 @@ void
XsldbgDriver::parseBackTrace(const char *output, XsldbgDriver::parseBackTrace(const char *output,
std::list < StackFrame > &stack) std::list < StackFrame > &stack)
{ {
QString func, file; TQString func, file;
int lineNo, frameNo; int lineNo, frameNo;
DbgAddr address; DbgAddr address;
@ -1113,10 +1113,10 @@ XsldbgDriver::parseBackTrace(const char *output,
bool bool
XsldbgDriver::parseFrameChange(const char *output, int &frameNo, XsldbgDriver::parseFrameChange(const char *output, int &frameNo,
QString & file, int &lineNo, TQString & file, int &lineNo,
DbgAddr & address) DbgAddr & address)
{ {
QString func; TQString func;
return::parseFrame(output, frameNo, func, file, lineNo, address); return::parseFrame(output, frameNo, func, file, lineNo, address);
} }
@ -1138,8 +1138,8 @@ XsldbgDriver::parseBreakList(const char *output,
while ((p != 0) && (*p != '\0')) { while ((p != 0) && (*p != '\0')) {
if (*p == '\n') if (*p == '\n')
p++; p++;
QString templateName; TQString templateName;
//qDebug("Looking at :%s", p); //tqDebug("Looking at :%s", p);
if (strncmp(p, " Breakpoint", 11) != 0) if (strncmp(p, " Breakpoint", 11) != 0)
break; break;
p = p + 11; p = p + 11;
@ -1214,7 +1214,7 @@ XsldbgDriver::parseBreakList(const char *output,
if (*p == '\"') if (*p == '\"')
p++; p++;
/* grab file name */ /* grab file name */
QString file; TQString file;
while ((*p != '\"') && !isspace(*p)) { while ((*p != '\"') && !isspace(*p)) {
file.append(*p); file.append(*p);
p++; p++;
@ -1230,7 +1230,7 @@ XsldbgDriver::parseBreakList(const char *output,
p++; p++;
} }
//TRACE(p); //TRACE(p);
QString lineNo; TQString lineNo;
while (isdigit(*p)) { while (isdigit(*p)) {
lineNo.append(*p); lineNo.append(*p);
p++; p++;
@ -1238,7 +1238,7 @@ XsldbgDriver::parseBreakList(const char *output,
// bp.lineNo is zero-based // bp.lineNo is zero-based
bp.lineNo = lineNo.toInt() - 1; bp.lineNo = lineNo.toInt() - 1;
bp.location = QString("in %1 at %2:%3").arg(templateName, file, lineNo); bp.location = TQString("in %1 at %2:%3").arg(templateName, file, lineNo);
bp.fileName = file; bp.fileName = file;
brks.push_back(bp); brks.push_back(bp);
@ -1259,7 +1259,7 @@ XsldbgDriver::parseThreadList(const char */*output*/)
bool bool
XsldbgDriver::parseBreakpoint(const char *output, int &id, XsldbgDriver::parseBreakpoint(const char *output, int &id,
QString &file, int &lineNo, QString &address) TQString &file, int &lineNo, TQString &address)
{ {
// check for errors // check for errors
if ( strncmp(output, "Error:", 6) == 0) { if ( strncmp(output, "Error:", 6) == 0) {
@ -1280,7 +1280,7 @@ XsldbgDriver::parseBreakpoint(const char *output, int &id,
return false; return false;
// the file name + lineNo will be filled in later from the breakpoint list // the file name + lineNo will be filled in later from the breakpoint list
file = address = QString(); file = address = TQString();
lineNo = 0; lineNo = 0;
return true; return true;
} }
@ -1323,13 +1323,13 @@ XsldbgDriver::parsePrintExpr(const char *output, bool wantErrorValue)
} }
bool bool
XsldbgDriver::parseChangeWD(const char *output, QString & message) XsldbgDriver::parseChangeWD(const char *output, TQString & message)
{ {
bool isGood = false; bool isGood = false;
if (strncmp(output, "Change to directory", 20) == 0) { if (strncmp(output, "Change to directory", 20) == 0) {
output = output + 20; /* skip 'Change to directory' */ output = output + 20; /* skip 'Change to directory' */
message = QString(output).simplifyWhiteSpace(); message = TQString(output).simplifyWhiteSpace();
if (message.isEmpty()) { if (message.isEmpty()) {
message = i18n("New working directory: ") + m_programWD; message = i18n("New working directory: ") + m_programWD;
isGood = true; isGood = true;
@ -1339,17 +1339,17 @@ XsldbgDriver::parseChangeWD(const char *output, QString & message)
} }
bool bool
XsldbgDriver::parseChangeExecutable(const char *output, QString & message) XsldbgDriver::parseChangeExecutable(const char *output, TQString & message)
{ {
message = output; message = output;
TRACE(QString("XsldbgDriver::parseChangeExecutable :") + output); TRACE(TQString("XsldbgDriver::parseChangeExecutable :") + output);
m_haveCoreFile = false; m_haveCoreFile = false;
/* /*
* The command is successful if there is no output or the single * The command is successful if there is no output or the single
* message (no debugging symbols found)... * message (no debugging symbols found)...
*/ */
QRegExp exp(".*Load of source deferred. Use the run command.*"); TQRegExp exp(".*Load of source deferred. Use the run command.*");
int len, index = exp.match(output, 0, &len); int len, index = exp.match(output, 0, &len);
if (index != -1) { if (index != -1) {
@ -1364,7 +1364,7 @@ XsldbgDriver::parseCoreFile(const char *output)
{ {
TRACE("XsldbgDriver::parseCoreFile"); TRACE("XsldbgDriver::parseCoreFile");
TRACE(output); TRACE(output);
QRegExp exp(".*Load of data file deferred. Use the run command.*"); TQRegExp exp(".*Load of data file deferred. Use the run command.*");
int len, index = exp.match(output, 0, &len); int len, index = exp.match(output, 0, &len);
if (index != -1) { if (index != -1) {
@ -1376,7 +1376,7 @@ XsldbgDriver::parseCoreFile(const char *output)
} }
uint uint
XsldbgDriver::parseProgramStopped(const char *output, QString & message) XsldbgDriver::parseProgramStopped(const char *output, TQString & message)
{ {
/* Not sure about this function leave it here for the moment */ /* Not sure about this function leave it here for the moment */
/* /*
@ -1387,7 +1387,7 @@ XsldbgDriver::parseProgramStopped(const char *output, QString & message)
const char *start = output - 1; const char *start = output - 1;
uint flags = SFprogramActive; uint flags = SFprogramActive;
message = QString(); message = TQString();
do { do {
start++; /* skip '\n' */ start++; /* skip '\n' */
@ -1403,14 +1403,14 @@ XsldbgDriver::parseProgramStopped(const char *output, QString & message)
return flags; return flags;
} }
QStringList TQStringList
XsldbgDriver::parseSharedLibs(const char */*output*/) XsldbgDriver::parseSharedLibs(const char */*output*/)
{ {
return QStringList(); return TQStringList();
} }
bool bool
XsldbgDriver::parseFindType(const char */*output*/, QString & /*type*/) XsldbgDriver::parseFindType(const char */*output*/, TQString & /*type*/)
{ {
return true; return true;
} }
@ -1422,8 +1422,8 @@ XsldbgDriver::parseRegisters(const char */*output*/)
} }
bool bool
XsldbgDriver::parseInfoLine(const char */*output*/, QString & /*addrFrom*/, XsldbgDriver::parseInfoLine(const char */*output*/, TQString & /*addrFrom*/,
QString & /*addrTo*/) TQString & /*addrTo*/)
{ {
return false; return false;
} }
@ -1434,17 +1434,17 @@ XsldbgDriver::parseDisassemble(const char */*output*/)
return std::list<DisassembledCode>(); return std::list<DisassembledCode>();
} }
QString TQString
XsldbgDriver::parseMemoryDump(const char */*output*/, XsldbgDriver::parseMemoryDump(const char */*output*/,
std::list < MemoryDump > &/*memdump*/) std::list < MemoryDump > &/*memdump*/)
{ {
return i18n("No memory dump available"); return i18n("No memory dump available");
} }
QString TQString
XsldbgDriver::parseSetVariable(const char */*output*/) XsldbgDriver::parseSetVariable(const char */*output*/)
{ {
QString msg; TQString msg;
return msg; return msg;
} }

@ -8,7 +8,7 @@
#define XSLDBGDRIVER_H #define XSLDBGDRIVER_H
#include "dbgdriver.h" #include "dbgdriver.h"
#include "qregexp.h" #include "ntqregexp.h"
class XsldbgDriver:public DebuggerDriver { class XsldbgDriver:public DebuggerDriver {
@ -16,90 +16,90 @@ class XsldbgDriver:public DebuggerDriver {
XsldbgDriver(); XsldbgDriver();
~XsldbgDriver(); ~XsldbgDriver();
virtual QString driverName() const; virtual TQString driverName() const;
virtual QString defaultInvocation() const; virtual TQString defaultInvocation() const;
virtual QStringList boolOptionList() const; virtual TQStringList boolOptionList() const;
static QString defaultXsldbg(); static TQString defaultXsldbg();
virtual bool startup(QString cmdStr); virtual bool startup(TQString cmdStr);
virtual void commandFinished(CmdQueueItem * cmd); virtual void commandFinished(CmdQueueItem * cmd);
void slotReceiveOutput(KProcess * process, char *buffer, int buflen); void slotReceiveOutput(KProcess * process, char *buffer, int buflen);
virtual CmdQueueItem *executeCmd(DbgCommand, bool clearLow = false); virtual CmdQueueItem *executeCmd(DbgCommand, bool clearLow = false);
virtual CmdQueueItem *executeCmd(DbgCommand, QString strArg, virtual CmdQueueItem *executeCmd(DbgCommand, TQString strArg,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem *executeCmd(DbgCommand, int intArg, virtual CmdQueueItem *executeCmd(DbgCommand, int intArg,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem *executeCmd(DbgCommand, QString strArg, virtual CmdQueueItem *executeCmd(DbgCommand, TQString strArg,
int intArg, bool clearLow = false); int intArg, bool clearLow = false);
virtual CmdQueueItem *executeCmd(DbgCommand, QString strArg1, virtual CmdQueueItem *executeCmd(DbgCommand, TQString strArg1,
QString strArg2, bool clearLow = TQString strArg2, bool clearLow =
false); false);
virtual CmdQueueItem *executeCmd(DbgCommand, int intArg1, int intArg2, virtual CmdQueueItem *executeCmd(DbgCommand, int intArg1, int intArg2,
bool clearLow = false); bool clearLow = false);
virtual CmdQueueItem *queueCmd(DbgCommand, QueueMode mode); virtual CmdQueueItem *queueCmd(DbgCommand, QueueMode mode);
virtual CmdQueueItem *queueCmd(DbgCommand, QString strArg, virtual CmdQueueItem *queueCmd(DbgCommand, TQString strArg,
QueueMode mode); QueueMode mode);
virtual CmdQueueItem *queueCmd(DbgCommand, int intArg, QueueMode mode); virtual CmdQueueItem *queueCmd(DbgCommand, int intArg, QueueMode mode);
virtual CmdQueueItem *queueCmd(DbgCommand, QString strArg, int intArg, virtual CmdQueueItem *queueCmd(DbgCommand, TQString strArg, int intArg,
QueueMode mode); QueueMode mode);
virtual CmdQueueItem *queueCmd(DbgCommand, QString strArg1, virtual CmdQueueItem *queueCmd(DbgCommand, TQString strArg1,
QString strArg2, QueueMode mode); TQString strArg2, QueueMode mode);
virtual void terminate(); virtual void terminate();
virtual void detachAndTerminate(); virtual void detachAndTerminate();
virtual void interruptInferior(); virtual void interruptInferior();
virtual void setPrintQStringDataCmd(const char* cmd); virtual void setPrintTQStringDataCmd(const char* cmd);
/** /**
* Parses the output as an array of QChars. * Parses the output as an array of TQChars.
*/ */
virtual ExprValue *parseQCharArray(const char *output, virtual ExprValue *parseTQCharArray(const char *output,
bool wantErrorValue, bool qt3like); bool wantErrorValue, bool qt3like);
virtual void parseBackTrace(const char *output, virtual void parseBackTrace(const char *output,
std::list < StackFrame > &stack); std::list < StackFrame > &stack);
virtual bool parseFrameChange(const char *output, int &frameNo, virtual bool parseFrameChange(const char *output, int &frameNo,
QString & file, int &lineNo, TQString & file, int &lineNo,
DbgAddr & address); DbgAddr & address);
virtual bool parseBreakList(const char *output, virtual bool parseBreakList(const char *output,
std::list < Breakpoint > &brks); std::list < Breakpoint > &brks);
virtual std::list<ThreadInfo> parseThreadList(const char *output); virtual std::list<ThreadInfo> parseThreadList(const char *output);
virtual bool parseBreakpoint(const char *output, int &id, virtual bool parseBreakpoint(const char *output, int &id,
QString & file, int &lineNo, QString& address); TQString & file, int &lineNo, TQString& address);
virtual void parseLocals(const char *output, virtual void parseLocals(const char *output,
std::list < ExprValue* > &newVars); std::list < ExprValue* > &newVars);
virtual ExprValue * parsePrintExpr(const char *output, bool wantErrorValue); virtual ExprValue * parsePrintExpr(const char *output, bool wantErrorValue);
virtual bool parseChangeWD(const char *output, QString & message); virtual bool parseChangeWD(const char *output, TQString & message);
virtual bool parseChangeExecutable(const char *output, virtual bool parseChangeExecutable(const char *output,
QString & message); TQString & message);
virtual bool parseCoreFile(const char *output); virtual bool parseCoreFile(const char *output);
virtual uint parseProgramStopped(const char *output, virtual uint parseProgramStopped(const char *output,
QString & message); TQString & message);
virtual QStringList parseSharedLibs(const char *output); virtual TQStringList parseSharedLibs(const char *output);
virtual bool parseFindType(const char *output, QString & type); virtual bool parseFindType(const char *output, TQString & type);
virtual std::list<RegisterInfo> parseRegisters(const char *output); virtual std::list<RegisterInfo> parseRegisters(const char *output);
virtual bool parseInfoLine(const char *output, QString & addrFrom, virtual bool parseInfoLine(const char *output, TQString & addrFrom,
QString & addrTo); TQString & addrTo);
virtual std::list<DisassembledCode> parseDisassemble(const char *output); virtual std::list<DisassembledCode> parseDisassemble(const char *output);
virtual QString parseMemoryDump(const char *output, virtual TQString parseMemoryDump(const char *output,
std::list < MemoryDump > &memdump); std::list < MemoryDump > &memdump);
virtual QString parseSetVariable(const char* output); virtual TQString parseSetVariable(const char* output);
protected: protected:
int m_gdbMajor, m_gdbMinor; int m_gdbMajor, m_gdbMinor;
QString m_programWD; /* just an intermediate storage */ TQString m_programWD; /* just an intermediate storage */
QString m_xslFile; /* needed to display it initially */ TQString m_xslFile; /* needed to display it initially */
bool m_haveDataFile; /* have we set the XML data file to use? */ bool m_haveDataFile; /* have we set the XML data file to use? */
QString m_redirect; /* redirection to /dev/null */ TQString m_redirect; /* redirection to /dev/null */
bool m_haveCoreFile; bool m_haveCoreFile;
QRegExp m_markerRE; TQRegExp m_markerRE;
QString makeCmdString(DbgCommand cmd, QString strArg); TQString makeCmdString(DbgCommand cmd, TQString strArg);
QString makeCmdString(DbgCommand cmd, int intArg); TQString makeCmdString(DbgCommand cmd, int intArg);
QString makeCmdString(DbgCommand cmd, QString strArg, int intArg); TQString makeCmdString(DbgCommand cmd, TQString strArg, int intArg);
QString makeCmdString(DbgCommand cmd, QString strArg1, TQString makeCmdString(DbgCommand cmd, TQString strArg1,
QString strArg2); TQString strArg2);
QString makeCmdString(DbgCommand cmd, int intArg1, int intArg2); TQString makeCmdString(DbgCommand cmd, int intArg1, int intArg2);
void parseMarker(); void parseMarker();
}; };

Loading…
Cancel
Save