diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/debugger | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/debugger')
43 files changed, 483 insertions, 464 deletions
diff --git a/languages/cpp/debugger/TODO.txt b/languages/cpp/debugger/TODO.txt index 38aca109..563cf85c 100644 --- a/languages/cpp/debugger/TODO.txt +++ b/languages/cpp/debugger/TODO.txt @@ -69,7 +69,7 @@ TODO: - Add icons - - Status display column is just ugly + - tqStatus display column is just ugly - Handle "out of breakpoints" message. diff --git a/languages/cpp/debugger/breakpoint.cpp b/languages/cpp/debugger/breakpoint.cpp index c9ed193e..9d1860e4 100644 --- a/languages/cpp/debugger/breakpoint.cpp +++ b/languages/cpp/debugger/breakpoint.cpp @@ -213,7 +213,7 @@ bool Breakpoint::match(const Breakpoint* breakpoint) const TQString Breakpoint::dbgRemoveCommand() const { if (dbgId_>0) - return TQString("-break-delete %1").arg(dbgId_); // gdb command - not translatable + return TQString("-break-delete %1").tqarg(dbgId_); // gdb command - not translatable return TQString(); } @@ -386,7 +386,7 @@ FilePosBreakpoint::FilePosBreakpoint(const TQString &fileName, int lineNum, : Breakpoint(temporary, enabled) { // Sets 'subtype' - setLocation(TQString("%1:%2").arg(fileName).arg(lineNum)); + setLocation(TQString("%1:%2").tqarg(fileName).tqarg(lineNum)); } FilePosBreakpoint::~FilePosBreakpoint() @@ -482,7 +482,7 @@ void FilePosBreakpoint::setLocation(const TQString& location) line_ = regExp1.cap(2).toInt(); - location_ = TQString("%1:%2").arg(fileName_).arg(regExp1.cap(2)); + location_ = TQString("%1:%2").tqarg(fileName_).tqarg(regExp1.cap(2)); } else { @@ -536,7 +536,7 @@ void Watchpoint::setBreakpoint(GDBController* controller) controller->addCommandBeforeRun( new GDBCommand( - TQString("-data-evaluate-expression &%1").arg(varName_), + TQString("-data-evaluate-expression &%1").tqarg(varName_), this, &Watchpoint::handleAddressComputed)); } @@ -547,7 +547,7 @@ void Watchpoint::handleAddressComputed(const GDBMI::ResultRecord& r) address_ = r["value"].literal().toULongLong(0, 16); controller()->addCommandBeforeRun( new GDBCommand( - TQString("-break-watch *%1").arg(r["value"].literal()), + TQString("-break-watch *%1").tqarg(r["value"].literal()), static_cast<Breakpoint*>(this), &Watchpoint::handleSet)); } diff --git a/languages/cpp/debugger/breakpoint.h b/languages/cpp/debugger/breakpoint.h index 8470617c..64db16d5 100644 --- a/languages/cpp/debugger/breakpoint.h +++ b/languages/cpp/debugger/breakpoint.h @@ -44,9 +44,10 @@ enum BP_TYPES BP_TYPE_ReadWatchpoint }; -class Breakpoint : public QObject +class Breakpoint : public TQObject { Q_OBJECT + TQ_OBJECT public: Breakpoint(bool temporary=false, bool enabled=true); virtual ~Breakpoint(); diff --git a/languages/cpp/debugger/dbgcontroller.h b/languages/cpp/debugger/dbgcontroller.h index 7b161313..9c555e51 100644 --- a/languages/cpp/debugger/dbgcontroller.h +++ b/languages/cpp/debugger/dbgcontroller.h @@ -65,9 +65,10 @@ enum DBGStateFlags /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ -class DbgController : public QObject +class DbgController : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -117,7 +118,7 @@ signals: void gdbUserCommandStdout (const char *output); void gdbStderr (const char *output); void showStepInSource (const TQString &fileName, int lineNum, const TQString &address); - void dbgStatus (const TQString &status, int statusFlag); + void dbgtqStatus (const TQString &status, int statusFlag); protected: KProcess *dbgProcess_; diff --git a/languages/cpp/debugger/dbgpsdlg.cpp b/languages/cpp/debugger/dbgpsdlg.cpp index e96d7395..e08a1cec 100644 --- a/languages/cpp/debugger/dbgpsdlg.cpp +++ b/languages/cpp/debugger/dbgpsdlg.cpp @@ -50,8 +50,8 @@ namespace GDBDebugger // For use with the internal debugger, but this dialog doesn't know anything // about why it's doing it. -Dbg_PS_Dialog::Dbg_PS_Dialog(TQWidget *parent, const char *name) - : KDialog(parent, name, true), // modal +Dbg_PS_Dialog::Dbg_PS_Dialog(TQWidget *tqparent, const char *name) + : KDialog(tqparent, name, true), // modal psProc_(0), pids_(new KListView(this)), pidLines_(TQString()) @@ -77,7 +77,7 @@ Dbg_PS_Dialog::Dbg_PS_Dialog(TQWidget *parent, const char *name) buttonbox->addStretch(); TQPushButton *ok = buttonbox->addButton(KStdGuiItem::ok()); TQPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel()); - buttonbox->layout(); + buttonbox->tqlayout(); topLayout->addWidget(buttonbox); connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); @@ -155,14 +155,14 @@ void Dbg_PS_Dialog::slotProcessExited() pidLines_ += '\n'; - int start = pidLines_.find('\n', 0); // Skip the first line (header line) + int start = pidLines_.tqfind('\n', 0); // Skip the first line (header line) int pos; static TQRegExp ps_output_line("^\\s*(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(.+)"); - while ( (pos = pidLines_.find('\n', start)) != -1) { + while ( (pos = pidLines_.tqfind('\n', start)) != -1) { TQString item = pidLines_.mid(start, pos-start); - if (!item.isEmpty() && item.find(pidCmd_) == -1) + if (!item.isEmpty() && item.tqfind(pidCmd_) == -1) { if(ps_output_line.search(item) == -1) { @@ -172,7 +172,7 @@ void Dbg_PS_Dialog::slotProcessExited() // to 'arg'. i18n("<b>Could not parse output from the <tt>ps</tt> command.</b>" "<p>The following line could not be parsed:" - "<b><tt>%1</tt>").arg(item), + "<b><tt>%1</tt>").tqarg(item), i18n("Internal error"), "gdb_error" ); break; } diff --git a/languages/cpp/debugger/dbgpsdlg.h b/languages/cpp/debugger/dbgpsdlg.h index 214e67a7..273bb7b8 100644 --- a/languages/cpp/debugger/dbgpsdlg.h +++ b/languages/cpp/debugger/dbgpsdlg.h @@ -31,9 +31,10 @@ namespace GDBDebugger class Dbg_PS_Dialog : public KDialog { Q_OBJECT + TQ_OBJECT public: - Dbg_PS_Dialog( TQWidget *parent=0, const char *name=0 ); + Dbg_PS_Dialog( TQWidget *tqparent=0, const char *name=0 ); ~Dbg_PS_Dialog(); int pidSelected(); diff --git a/languages/cpp/debugger/dbgtoolbar.cpp b/languages/cpp/debugger/dbgtoolbar.cpp index 3fbef3c4..aaf4476b 100644 --- a/languages/cpp/debugger/dbgtoolbar.cpp +++ b/languages/cpp/debugger/dbgtoolbar.cpp @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#ifndef QT_MAC +#ifndef TQT_MAC #include "dbgtoolbar.h" #include "debuggerpart.h" #include "dbgcontroller.h" @@ -65,10 +65,10 @@ namespace GDBDebugger // the iconify, close, etc buttons from the window title but again I kept running // into problems. Instead, I used no decoration and this class. Also this looks // similar to the KToolBar floating style. -class DbgMoveHandle : public QFrame +class DbgMoveHandle : public TQFrame { public: - DbgMoveHandle(DbgToolBar *parent=0, const char * name=0, WFlags f=0); + DbgMoveHandle(DbgToolBar *tqparent=0, const char * name=0, WFlags f=0); virtual ~DbgMoveHandle(); virtual void mousePressEvent(TQMouseEvent *e); @@ -83,9 +83,9 @@ private: // ************************************************************************** -DbgMoveHandle::DbgMoveHandle(DbgToolBar *parent, const char * name, WFlags f) - : TQFrame(parent, name, f), - toolBar_(parent), +DbgMoveHandle::DbgMoveHandle(DbgToolBar *tqparent, const char * name, WFlags f) + : TQFrame(tqparent, name, f), + toolBar_(tqparent), offset_(TQPoint(0,0)), moving_(false) { @@ -107,21 +107,21 @@ void DbgMoveHandle::mousePressEvent(TQMouseEvent *e) if (moving_) return; - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { KPopupMenu *menu = new KPopupMenu(this); menu->insertTitle(i18n("Debug Toolbar")); menu->insertItem(i18n("Dock to Panel"), - parent(), TQT_SLOT(slotDock())); + tqparent(), TQT_SLOT(slotDock())); menu->insertItem(i18n("Dock to Panel && Iconify KDevelop"), - parent(), TQT_SLOT(slotIconifyAndDock())); + tqparent(), TQT_SLOT(slotIconifyAndDock())); menu->popup(e->globalPos()); } else { moving_ = true; - offset_ = parentWidget()->pos() - e->globalPos(); + offset_ = tqparentWidget()->pos() - e->globalPos(); setFrameStyle(TQFrame::Panel|TQFrame::Sunken); TQApplication::setOverrideCursor(TQCursor(sizeAllCursor)); - setPalette(TQPalette(colorGroup().background())); - repaint(); + setPalette(TQPalette(tqcolorGroup().background())); + tqrepaint(); } } @@ -134,8 +134,8 @@ void DbgMoveHandle::mouseReleaseEvent(TQMouseEvent *e) offset_ = TQPoint(0,0); setFrameStyle(TQFrame::Panel|TQFrame::Raised); TQApplication::restoreOverrideCursor(); - setPalette(TQPalette(colorGroup().background())); - repaint(); + setPalette(TQPalette(tqcolorGroup().background())); + tqrepaint(); } // ************************************************************************** @@ -153,16 +153,16 @@ void DbgMoveHandle::mouseMoveEvent(TQMouseEvent *e) // ************************************************************************** // ************************************************************************** -// This class adds text _and_ a pixmap to a button. Why doesn't QPushButton +// This class adds text _and_ a pixmap to a button. Why doesn't TQPushButton // support that? It only allowed text _or_ pixmap. -class DbgButton : public QPushButton +class DbgButton : public TQPushButton { public: DbgButton(const TQPixmap &pixmap, const TQString &text, - DbgToolBar *parent, const char *name=0); + DbgToolBar *tqparent, const char *name=0); virtual ~DbgButton() {}; void drawButtonLabel(TQPainter *painter); - TQSize sizeHint() const; + TQSize tqsizeHint() const; private: TQPixmap pixmap_; @@ -171,8 +171,8 @@ private: // ************************************************************************** DbgButton::DbgButton(const TQPixmap& pixmap, const TQString& text, - DbgToolBar* parent, const char* name) - : TQPushButton(parent, name), + DbgToolBar* tqparent, const char* name) + : TQPushButton(tqparent, name), pixmap_(pixmap) { setText(text); @@ -191,21 +191,21 @@ void DbgButton::drawButtonLabel(TQPainter *painter) painter->drawPixmap(x, y, pixmap_); if (hasText) { - painter->setPen(colorGroup().text()); + painter->setPen(tqcolorGroup().text()); painter->drawText(height()+2, 0, width()-(height()+2), height(), AlignLeft|AlignVCenter, text()); } } // ************************************************************************** -TQSize DbgButton::sizeHint() const +TQSize DbgButton::tqsizeHint() const { if (text().isEmpty()) return pixmap_.size(); else { TQSize ps = pixmap_.size(); - TQSize bs = TQPushButton::sizeHint(); + TQSize bs = TQPushButton::tqsizeHint(); TQSize result; result.setWidth( ps.width() + bs.width()+10 ); result.setHeight( ps.height() > bs.height() ? ps.height() : bs.height() ); @@ -217,8 +217,8 @@ TQSize DbgButton::sizeHint() const // ************************************************************************** // ************************************************************************** -DbgDocker::DbgDocker(TQWidget* parent, DbgToolBar* toolBar, const TQPixmap& pixmap) : - KSystemTray(parent, "DbgDocker"), +DbgDocker::DbgDocker(TQWidget* tqparent, DbgToolBar* toolBar, const TQPixmap& pixmap) : + KSystemTray(tqparent, "DbgDocker"), toolBar_(toolBar) { setPixmap(pixmap); @@ -229,17 +229,17 @@ DbgDocker::DbgDocker(TQWidget* parent, DbgToolBar* toolBar, const TQPixmap& pixm void DbgDocker::mousePressEvent(TQMouseEvent *e) { - if (!rect().contains( e->pos())) + if (!TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos())) return; switch (e->button()) { - case LeftButton: + case Qt::LeftButton: { // Not really a click, but it'll hold for the time being !!! emit clicked(); break; } - case RightButton: + case Qt::RightButton: { KPopupMenu* menu = new KPopupMenu(this); menu->insertTitle(i18n("Debug Toolbar")); @@ -258,7 +258,7 @@ void DbgDocker::mousePressEvent(TQMouseEvent *e) // ************************************************************************** DbgToolBar::DbgToolBar(DebuggerPart* part, - TQWidget* parent, const char* name) + TQWidget* tqparent, const char* name) : TQFrame(0, name), part_(part), activeWindow_(0), @@ -268,10 +268,10 @@ DbgToolBar::DbgToolBar(DebuggerPart* part, appIsActive_(false), docked_(false), docker_(0), - dockWindow_(new KSystemTray(parent)) + dockWindow_(new KSystemTray(tqparent)) { - winModule_ = new KWinModule(this); - docker_ = new DbgDocker(parent, this, BarIcon("dbgnext")); + winModule_ = new KWinModule(TQT_TQOBJECT(this)); + docker_ = new DbgDocker(tqparent, this, BarIcon("dbgnext")); connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver())); // Must have noFocus set so that we can see what window was active. @@ -285,7 +285,7 @@ DbgToolBar::DbgToolBar(DebuggerPart* part, // KWin::setType(winId(), NET::Override); // So it has no decoration KWin::setType(winId(), NET::Dock); - setFocusPolicy(NoFocus); + setFocusPolicy(TQ_NoFocus); setFrameStyle( TQFrame::Box | TQFrame::Plain ); setLineWidth(4); setMidLineWidth(0); @@ -300,15 +300,15 @@ DbgToolBar::DbgToolBar(DebuggerPart* part, TQPushButton* bRun = new DbgButton(BarIcon("dbgrun"), i18n("Run"), this); TQPushButton* bInterrupt = new DbgButton(BarIcon("player_pause"), i18n("Interrupt"), this); - TQPushButton* bNext = new DbgButton(BarIcon("dbgnext"), TQString::null, this); - TQPushButton* bNexti = new DbgButton(BarIcon("dbgnextinst"), TQString::null, this); - TQPushButton* bStep = new DbgButton(BarIcon("dbgstep"), TQString::null, this); - TQPushButton* bStepi = new DbgButton(BarIcon("dbgstepinst"), TQString::null, this); + TQPushButton* bNext = new DbgButton(BarIcon("dbgnext"), TQString(), this); + TQPushButton* bNexti = new DbgButton(BarIcon("dbgnextinst"), TQString(), this); + TQPushButton* bStep = new DbgButton(BarIcon("dbgstep"), TQString(), this); + TQPushButton* bStepi = new DbgButton(BarIcon("dbgstepinst"), TQString(), this); TQPushButton* bFinish = new DbgButton(BarIcon("dbgstepout"), i18n("Step Out"), this); TQPushButton* bRunTo = new DbgButton(BarIcon("dbgrunto"), i18n("Run to Cursor"), this); TQPushButton* bView = new DbgButton(BarIcon("dbgmemview"), i18n("Viewers"), this); - bKDevFocus_ = new DbgButton(BarIcon("kdevelop"), TQString::null, this); - bPrevFocus_ = new DbgButton(BarIcon("dbgmemview"), TQString::null, this); + bKDevFocus_ = new DbgButton(BarIcon("kdevelop"), TQString(), this); + bPrevFocus_ = new DbgButton(BarIcon("dbgmemview"), TQString(), this); connect(bRun, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotRun())); connect(bInterrupt, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotPause())); @@ -365,12 +365,12 @@ DbgToolBar::DbgToolBar(DebuggerPart* part, nextLayout->addWidget(bNext); nextLayout->addWidget(bNexti); -// int w = QMAX(bRun->sizeHint().width(), bFinish->sizeHint().width()); -// w = QMAX(w, bInterrupt->sizeHint().width()); -// w = QMAX(w, bView->sizeHint().width()); +// int w = TQMAX(bRun->tqsizeHint().width(), bFinish->tqsizeHint().width()); +// w = TQMAX(w, bInterrupt->tqsizeHint().width()); +// w = TQMAX(w, bView->tqsizeHint().width()); // they should have the same height, so don't be too fussy -// int h = bFinish->sizeHint().height(); +// int h = bFinish->tqsizeHint().height(); // // bNext->setMinimumHeight(h); // bNexti->setMinimumHeight(h); @@ -404,10 +404,10 @@ void DbgToolBar::slotKdevFocus() // If anyone has a way of determining what window the app is _actually_ running on // then please fix and send a patch. - if (winModule_->activeWindow() != topLevelWidget()->winId()) + if (winModule_->activeWindow() != tqtopLevelWidget()->winId()) activeWindow_ = winModule_->activeWindow(); - KWin::activateWindow(topLevelWidget()->winId()); + KWin::activateWindow(tqtopLevelWidget()->winId()); } // ************************************************************************** @@ -421,7 +421,7 @@ void DbgToolBar::slotPrevFocus() // If the app is active then the app button is highlighted, otherwise // kdev button is highlighted. -void DbgToolBar::slotDbgStatus(const TQString&, int state) +void DbgToolBar::slotDbgtqStatus(const TQString&, int state) { bool appIndicator = state & s_dbgBusy; if (appIndicator != appIsActive_) { @@ -435,11 +435,11 @@ void DbgToolBar::slotDbgStatus(const TQString&, int state) void DbgToolBar::setAppIndicator(bool appIndicator) { if (appIndicator) { - bPrevFocus_->setPalette(TQPalette(colorGroup().mid())); - bKDevFocus_->setPalette(TQPalette(colorGroup().background())); + bPrevFocus_->setPalette(TQPalette(tqcolorGroup().mid())); + bKDevFocus_->setPalette(TQPalette(tqcolorGroup().background())); } else { - bPrevFocus_->setPalette(TQPalette(colorGroup().background())); - bKDevFocus_->setPalette(TQPalette(colorGroup().mid())); + bPrevFocus_->setPalette(TQPalette(tqcolorGroup().background())); + bKDevFocus_->setPalette(TQPalette(tqcolorGroup().mid())); } } @@ -487,7 +487,7 @@ void DbgToolBar::slotActivateAndUndock() if (!docked_) return; - KWin::activateWindow(topLevelWidget()->winId()); + KWin::activateWindow(tqtopLevelWidget()->winId()); slotUndock(); } diff --git a/languages/cpp/debugger/dbgtoolbar.h b/languages/cpp/debugger/dbgtoolbar.h index 188862d4..427120d9 100644 --- a/languages/cpp/debugger/dbgtoolbar.h +++ b/languages/cpp/debugger/dbgtoolbar.h @@ -12,7 +12,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#ifndef QT_MAC +#ifndef TQT_MAC #ifndef _DBGTOOLBAR_H_ #define _DBGTOOLBAR_H_ @@ -33,9 +33,10 @@ class DebuggerPart; class DbgDocker : public KSystemTray { Q_OBJECT + TQ_OBJECT public: - DbgDocker(TQWidget *parent, DbgToolBar *toolBar, const TQPixmap &pixmap); + DbgDocker(TQWidget *tqparent, DbgToolBar *toolBar, const TQPixmap &pixmap); virtual ~DbgDocker() {}; virtual void mousePressEvent(TQMouseEvent *e); @@ -47,16 +48,17 @@ private: }; -class DbgToolBar : public QFrame +class DbgToolBar : public TQFrame { Q_OBJECT + TQ_OBJECT public: - DbgToolBar(DebuggerPart *part, TQWidget* parent, const char* name=0); + DbgToolBar(DebuggerPart *part, TQWidget* tqparent, const char* name=0); virtual ~DbgToolBar(); private slots: - void slotDbgStatus(const TQString&, int); + void slotDbgtqStatus(const TQString&, int); void slotDock(); void slotUndock(); void slotIconifyAndDock(); diff --git a/languages/cpp/debugger/debuggerconfigwidget.cpp b/languages/cpp/debugger/debuggerconfigwidget.cpp index f2891378..2fbc6a88 100644 --- a/languages/cpp/debugger/debuggerconfigwidget.cpp +++ b/languages/cpp/debugger/debuggerconfigwidget.cpp @@ -27,8 +27,8 @@ namespace GDBDebugger { -DebuggerConfigWidget::DebuggerConfigWidget(DebuggerPart* part, TQWidget *parent, const char *name) - : DebuggerConfigWidgetBase(parent, name), dom(*part->projectDom()) +DebuggerConfigWidget::DebuggerConfigWidget(DebuggerPart* part, TQWidget *tqparent, const char *name) + : DebuggerConfigWidgetBase(tqparent, name), dom(*part->projectDom()) { gdbPath_edit->setMode(KFile::File|KFile::ExistingOnly|KFile::LocalOnly); @@ -37,7 +37,7 @@ DebuggerConfigWidget::DebuggerConfigWidget(DebuggerPart* part, TQWidget *parent, TQString shell = DomUtil::readEntry(dom, "/kdevdebugger/general/dbgshell","no_value"); if( shell == TQString("no_value") ) { - shell = TQString::null; + shell = TQString(); } debuggingShell_edit->setURL( shell ); @@ -78,7 +78,7 @@ DebuggerConfigWidget::DebuggerConfigWidget(DebuggerPart* part, TQWidget *parent, // ??? DomUtil::readEntry(dom, "/kdevdebugger/general/allowforcedbpset"); - resize(sizeHint()); + resize(tqsizeHint()); } diff --git a/languages/cpp/debugger/debuggerconfigwidget.h b/languages/cpp/debugger/debuggerconfigwidget.h index 3a8283a2..cdd2479d 100644 --- a/languages/cpp/debugger/debuggerconfigwidget.h +++ b/languages/cpp/debugger/debuggerconfigwidget.h @@ -26,9 +26,10 @@ class DebuggerPart; class DebuggerConfigWidget : public DebuggerConfigWidgetBase { Q_OBJECT + TQ_OBJECT public: - DebuggerConfigWidget( DebuggerPart* part, TQWidget *parent=0, const char *name=0 ); + DebuggerConfigWidget( DebuggerPart* part, TQWidget *tqparent=0, const char *name=0 ); ~DebuggerConfigWidget(); public slots: diff --git a/languages/cpp/debugger/debuggerconfigwidgetbase.ui b/languages/cpp/debugger/debuggerconfigwidgetbase.ui index bf81b2d3..38048f18 100644 --- a/languages/cpp/debugger/debuggerconfigwidgetbase.ui +++ b/languages/cpp/debugger/debuggerconfigwidgetbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DebuggerConfigWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>debugger_config_widget</cstring> </property> @@ -25,7 +25,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -34,7 +34,7 @@ or directly in the project manager</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>gdbPath_label</cstring> </property> @@ -64,7 +64,7 @@ <string>To run "gdb" binary from $PATH, leave this field empty. To run custom gdb, for example, for a different architecture, enter the executable name here. You can either run gdb from $PATH, but with a different name (say, "arm-gdb"), by typing the name here, or specify full path to the gdb executable.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>debuggingShell_label</cstring> </property> @@ -100,15 +100,15 @@ <string>If you want gdb to be executed by a special shell or tool insert it here. The main use-case is for Automake based projects where the application is actually only a script and <b>libtool</b> is needed to get it to run inside gdb.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -119,7 +119,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>asmDemangle_box</cstring> </property> @@ -132,7 +132,7 @@ can select to see the methods' mangled names. However, non-mangled names are easier to read.</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>breakOnLoadingLibrary_box</cstring> </property> @@ -149,7 +149,7 @@ for more details relating to this behavior. If you are not "dlopen"ing libs then leave this unchecked.</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>dbgTerminal_box</cstring> </property> @@ -166,7 +166,7 @@ If you use terminal input in your application then check this option. Otherwise leave it unchecked.</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>enableFloatingToolBar_box</cstring> </property> @@ -185,7 +185,7 @@ can also be docked into the panel. This toolbar is in addition to the toolbar in KDevelop.</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>displayStaticMembers_box</cstring> </property> @@ -206,15 +206,15 @@ check this option.</string> </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>globalOutputRadix</cstring> </property> @@ -225,7 +225,7 @@ check this option.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>outputRadixOctal</cstring> </property> @@ -233,7 +233,7 @@ check this option.</string> <string>Oct&al</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>outputRadixHexadecimal</cstring> </property> @@ -241,7 +241,7 @@ check this option.</string> <string>He&xadecimal</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>outputRadixDecimal</cstring> </property> @@ -251,7 +251,7 @@ check this option.</string> </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -262,7 +262,7 @@ check this option.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioFramestack</cstring> </property> @@ -270,7 +270,7 @@ check this option.</string> <string>Framestack</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioGDB</cstring> </property> @@ -284,7 +284,7 @@ check this option.</string> </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -301,15 +301,15 @@ check this option.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>runShellScript_label</cstring> </property> @@ -356,7 +356,7 @@ or if your executable contains the gdb stub 2b) Execute "application" on target.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>runGdbScript_label</cstring> </property> @@ -368,7 +368,7 @@ or if your executable contains the gdb stub <cstring>runGdbScript_edit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>configGdbScript_label</cstring> </property> @@ -404,7 +404,7 @@ or if your executable contains the gdb stub <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -431,8 +431,8 @@ or if your executable contains the gdb stub <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/languages/cpp/debugger/debuggerpart.cpp b/languages/cpp/debugger/debuggerpart.cpp index 4842ca84..22621630 100644 --- a/languages/cpp/debugger/debuggerpart.cpp +++ b/languages/cpp/debugger/debuggerpart.cpp @@ -76,8 +76,8 @@ static const KDevPluginInfo data("kdevdebugger"); typedef KDevGenericFactory<DebuggerPart> DebuggerFactory; K_EXPORT_COMPONENT_FACTORY( libkdevdebugger, DebuggerFactory( data ) ) -DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringList & ) : - KDevPlugin( &data, parent, name ? name : "DebuggerPart" ), +DebuggerPart::DebuggerPart( TQObject *tqparent, const char *name, const TQStringList & ) : + KDevPlugin( &data, tqparent, name ? name : "DebuggerPart" ), controller(0), previousDebuggerState_(s_dbgNotStarted), justRestarted_(false), needRebuild_(true), running_(false) @@ -92,7 +92,7 @@ DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringLi statusBarIndicator = new LabelWithDoubleClick( " ", mainWindow()->statusBar()); statusBarIndicator->setFixedWidth(15); - statusBarIndicator->setAlignment(Qt::AlignCenter); + statusBarIndicator->tqsetAlignment(TQt::AlignCenter); mainWindow()->statusBar()->addWidget(statusBarIndicator, 0, true); statusBarIndicator->show(); @@ -376,7 +376,7 @@ void DebuggerPart::setupDcop() { QCStringList objects = kapp->dcopClient()->registeredApplications(); for (QCStringList::Iterator it = objects.begin(); it != objects.end(); ++it) - if ((*it).find("drkonqi-") == 0) + if ((*it).tqfind("drkonqi-") == 0) slotDCOPApplicationRegistered(*it); connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), TQT_SLOT(slotDCOPApplicationRegistered(const TQCString&))); @@ -385,7 +385,7 @@ void DebuggerPart::setupDcop() void DebuggerPart::slotDCOPApplicationRegistered(const TQCString& appId) { - if (appId.find("drkonqi-") == 0) { + if (appId.tqfind("drkonqi-") == 0) { TQByteArray answer; TQCString replyType; @@ -491,7 +491,7 @@ void DebuggerPart::contextMenu(TQPopupMenu *popup, const Context *context) int index = running ? 0 : -1; if (running) { - // Too bad we can't add TQAction to popup menu in Qt3. + // Too bad we can't add TQAction to popup menu in TQt3. KAction* act = actionCollection()->action("debug_runtocursor"); Q_ASSERT(act); if (act) @@ -500,7 +500,7 @@ void DebuggerPart::contextMenu(TQPopupMenu *popup, const Context *context) this, TQT_SLOT(slotRunToCursor()), 0, -1, index); - popup->setWhatsThis(id, act->whatsThis()); + popup->tqsetWhatsThis(id, act->whatsThis()); index += running; } } @@ -510,21 +510,21 @@ void DebuggerPart::contextMenu(TQPopupMenu *popup, const Context *context) this, TQT_SLOT(toggleBreakpoint()), 0, -1, index); index += running; - popup->setWhatsThis(id, i18n("<b>Toggle breakpoint</b><p>Toggles breakpoint at the current line.")); + popup->tqsetWhatsThis(id, i18n("<b>Toggle breakpoint</b><p>Toggles breakpoint at the current line.")); } if (!m_contextIdent.isEmpty()) { TQString squeezed = KStringHandler::csqueeze(m_contextIdent, 30); - int id = popup->insertItem( i18n("Evaluate: %1").arg(squeezed), + int id = popup->insertItem( i18n("Evaluate: %1").tqarg(squeezed), this, TQT_SLOT(contextEvaluate()), 0, -1, index); index += running; - popup->setWhatsThis(id, i18n("<b>Evaluate expression</b><p>Shows the value of the expression under the cursor.")); - int id2 = popup->insertItem( i18n("Watch: %1").arg(squeezed), + popup->tqsetWhatsThis(id, i18n("<b>Evaluate expression</b><p>Shows the value of the expression under the cursor.")); + int id2 = popup->insertItem( i18n("Watch: %1").tqarg(squeezed), this, TQT_SLOT(contextWatch()), 0, -1, index); index += running; - popup->setWhatsThis(id2, i18n("<b>Watch expression</b><p>Adds an expression under the cursor to the Variables/Watch list.")); + popup->tqsetWhatsThis(id2, i18n("<b>Watch expression</b><p>Adds an expression under the cursor to the Variables/Watch list.")); } if (running) popup->insertSeparator(index); @@ -589,8 +589,8 @@ void DebuggerPart::setupController() disassembleWidget, TQT_SLOT(slotShowStepInSource(const TQString&, int, const TQString&))); // controller -> this - connect( controller, TQT_SIGNAL(dbgStatus(const TQString&, int)), - this, TQT_SLOT(slotStatus(const TQString&, int))); + connect( controller, TQT_SIGNAL(dbgtqStatus(const TQString&, int)), + this, TQT_SLOT(slottqStatus(const TQString&, int))); connect( controller, TQT_SIGNAL(showStepInSource(const TQString&, int, const TQString&)), this, TQT_SLOT(slotShowStep(const TQString&, int))); connect( controller, TQT_SIGNAL(debuggerAbnormalExit()), @@ -613,16 +613,16 @@ void DebuggerPart::setupController() connect( controller, TQT_SIGNAL(gdbStderr(const char*)), gdbOutputWidget, TQT_SLOT(slotReceivedStderr(const char*)) ); - connect( controller, TQT_SIGNAL(dbgStatus(const TQString&, int)), - gdbOutputWidget, TQT_SLOT(slotDbgStatus(const TQString&, int))); + connect( controller, TQT_SIGNAL(dbgtqStatus(const TQString&, int)), + gdbOutputWidget, TQT_SLOT(slotDbgtqStatus(const TQString&, int))); // controller -> viewerWidget - connect( controller, TQT_SIGNAL(dbgStatus(const TQString&, int)), + connect( controller, TQT_SIGNAL(dbgtqStatus(const TQString&, int)), viewerWidget, TQT_SLOT(slotDebuggerState(const TQString&, int))); connect(statusBarIndicator, TQT_SIGNAL(doubleClicked()), - controller, TQT_SLOT(explainDebuggerStatus())); + controller, TQT_SLOT(explainDebuggertqStatus())); } @@ -659,7 +659,7 @@ bool DebuggerPart::startDebugger() { KMessageBox::information( mainWindow()->main(), - i18n("Could not locate the debugging shell '%1'.").arg( shell_without_args ), + i18n("Could not locate the debugging shell '%1'.").tqarg( shell_without_args ), i18n("Debugging Shell Not Found"), "gdb_error" ); return false; } @@ -697,7 +697,7 @@ bool DebuggerPart::startDebugger() if (DomUtil::readBoolEntry(*projectDom(), "/kdevdebugger/general/floatingtoolbar", false)) { -#ifndef QT_MAC +#ifndef TQT_MAC floatingToolBar = new DbgToolBar(this, mainWindow()->main()); floatingToolBar->show(); #endif @@ -955,7 +955,7 @@ void DebuggerPart::slotExamineCore() if (coreFile.isNull()) return; - mainWindow()->statusBar()->message(i18n("Examining core file %1").arg(coreFile), 1000); + mainWindow()->statusBar()->message(i18n("Examining core file %1").tqarg(coreFile), 1000); startDebugger(); controller->slotCoreFile(coreFile); @@ -976,7 +976,7 @@ void DebuggerPart::slotAttachProcess() bool DebuggerPart::attachProcess(int pid) { - mainWindow()->statusBar()->message(i18n("Attaching to process %1").arg(pid), 1000); + mainWindow()->statusBar()->message(i18n("Attaching to process %1").tqarg(pid), 1000); bool ret = startDebugger(); controller->slotAttachTo(pid); @@ -1092,7 +1092,7 @@ void DebuggerPart::slotRefreshBPState( const Breakpoint& BP) } } -void DebuggerPart::slotStatus(const TQString &msg, int state) +void DebuggerPart::slottqStatus(const TQString &msg, int state) { TQString stateIndicator, stateIndicatorFull; diff --git a/languages/cpp/debugger/debuggerpart.h b/languages/cpp/debugger/debuggerpart.h index a217cfee..71d56568 100644 --- a/languages/cpp/debugger/debuggerpart.h +++ b/languages/cpp/debugger/debuggerpart.h @@ -47,9 +47,10 @@ class ViewerWidget; class DebuggerPart : public KDevPlugin, virtual public DebuggerDCOPInterface { Q_OBJECT + TQ_OBJECT public: - DebuggerPart( TQObject *parent, const char *name, const TQStringList & ); + DebuggerPart( TQObject *tqparent, const char *name, const TQStringList & ); ~DebuggerPart(); virtual void restorePartialProjectSession(const TQDomElement* el); virtual void savePartialProjectSession(TQDomElement* el); @@ -94,7 +95,7 @@ private slots: void slotRefreshBPState(const Breakpoint&); - void slotStatus(const TQString &msg, int state); + void slottqStatus(const TQString &msg, int state); void slotShowStep(const TQString &fileName, int lineNum); void slotGotoSource(const TQString &fileName, int lineNum); diff --git a/languages/cpp/debugger/debuggertracingdialog.cpp b/languages/cpp/debugger/debuggertracingdialog.cpp index 6bf70f3b..0af77613 100644 --- a/languages/cpp/debugger/debuggertracingdialog.cpp +++ b/languages/cpp/debugger/debuggertracingdialog.cpp @@ -14,8 +14,8 @@ namespace GDBDebugger DebuggerTracingDialog ::DebuggerTracingDialog(Breakpoint* bp, - TQWidget* parent, const char* name) - : DebuggerTracingDialogBase(parent, name), bp_(bp) + TQWidget* tqparent, const char* name) + : DebuggerTracingDialogBase(tqparent, name), bp_(bp) { expressions->setButtons(KEditListBox::Add | KEditListBox::Remove); diff --git a/languages/cpp/debugger/debuggertracingdialog.h b/languages/cpp/debugger/debuggertracingdialog.h index 916ae912..e0e8dc48 100644 --- a/languages/cpp/debugger/debuggertracingdialog.h +++ b/languages/cpp/debugger/debuggertracingdialog.h @@ -23,9 +23,10 @@ namespace GDBDebugger class DebuggerTracingDialog : public DebuggerTracingDialogBase { Q_OBJECT + TQ_OBJECT public: DebuggerTracingDialog(Breakpoint* bp, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); private slots: void enableOrDisable(int); diff --git a/languages/cpp/debugger/debuggertracingdialogbase.ui b/languages/cpp/debugger/debuggertracingdialogbase.ui index 333dc4de..17321999 100644 --- a/languages/cpp/debugger/debuggertracingdialogbase.ui +++ b/languages/cpp/debugger/debuggertracingdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DebuggerTracingDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>DebuggerTracingDialogBase</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>enable</cstring> </property> @@ -31,7 +31,7 @@ <p>Tracing is a mechanism to automatically print values of the choosed expressions and continue execution when breakpoint is hit. You can think of it as printf debugging that does not require modifying the source.</p></string> </property> </widget> - <widget class="QPushButton" row="5" column="2"> + <widget class="TQPushButton" row="5" column="2"> <property name="name"> <cstring>cancelButton</cstring> </property> @@ -39,7 +39,7 @@ <string>Cancel</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>enableCustomFormat</cstring> </property> @@ -50,7 +50,7 @@ <string>Custom format string</string> </property> </widget> - <widget class="QPushButton" row="5" column="1"> + <widget class="TQPushButton" row="5" column="1"> <property name="name"> <cstring>okButton</cstring> </property> @@ -71,7 +71,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -103,7 +103,7 @@ If custom format string is not enabled, names and values of all expressions will <string></string> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>expressionsLabel</cstring> </property> @@ -130,10 +130,10 @@ If custom format string is not enabled, names and values of all expressions will <slot>reject()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>enableOrDisable()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>keditlistbox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/languages/cpp/debugger/disassemblewidget.cpp b/languages/cpp/debugger/disassemblewidget.cpp index 562aa1ae..6b848a27 100644 --- a/languages/cpp/debugger/disassemblewidget.cpp +++ b/languages/cpp/debugger/disassemblewidget.cpp @@ -35,8 +35,8 @@ namespace GDBDebugger /***************************************************************************/ /***************************************************************************/ -DisassembleWidget::DisassembleWidget(GDBController* controller, TQWidget *parent, const char *name) - : TQTextEdit(parent, name), controller_(controller), +DisassembleWidget::DisassembleWidget(GDBController* controller, TQWidget *tqparent, const char *name) + : TQTextEdit(tqparent, name), controller_(controller), active_(false), lower_(0), upper_(0), diff --git a/languages/cpp/debugger/disassemblewidget.h b/languages/cpp/debugger/disassemblewidget.h index 55288c0c..33f29da9 100644 --- a/languages/cpp/debugger/disassemblewidget.h +++ b/languages/cpp/debugger/disassemblewidget.h @@ -30,12 +30,13 @@ namespace GDBDebugger class Breakpoint; class GDBController; -class DisassembleWidget : public QTextEdit +class DisassembleWidget : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - DisassembleWidget( GDBController* controller, TQWidget *parent=0, const char *name=0 ); + DisassembleWidget( GDBController* controller, TQWidget *tqparent=0, const char *name=0 ); virtual ~DisassembleWidget(); public slots: diff --git a/languages/cpp/debugger/framestackwidget.cpp b/languages/cpp/debugger/framestackwidget.cpp index fb0246e6..28fd076e 100644 --- a/languages/cpp/debugger/framestackwidget.cpp +++ b/languages/cpp/debugger/framestackwidget.cpp @@ -39,9 +39,9 @@ namespace GDBDebugger { FramestackWidget::FramestackWidget(GDBController* controller, - TQWidget *parent, + TQWidget *tqparent, const char *name, WFlags f) - : TQListView(parent, name, f), + : TQListView(tqparent, name, f), viewedThread_(0), controller_(controller), mayUpdate_( false ) @@ -49,9 +49,9 @@ FramestackWidget::FramestackWidget(GDBController* controller, setRootIsDecorated(true); setSorting(-1); setSelectionMode(Single); - addColumn(TQString::null); // Frame number - addColumn(TQString::null); // function name/address - addColumn(TQString::null); // source + addColumn(TQString()); // Frame number + addColumn(TQString()); // function name/address + addColumn(TQString()); // source header()->hide(); @@ -111,7 +111,7 @@ void FramestackWidget::slotSelectionChanged(TQListViewItem *thisItem) if (frame->threadNo() != -1) controller_->addCommand( new GDBCommand(TQString("-thread-select %1") - .arg(frame->threadNo()).ascii())); + .tqarg(frame->threadNo()).ascii())); viewedThread_ = findThread(frame->threadNo()); getBacktrace(frame->frameNo(), frame->frameNo() + frameChunk_); @@ -208,7 +208,7 @@ void FramestackWidget::getBacktrace(int min_frame, int max_frame) maxFrame_ = max_frame; controller_->addCommand( - new GDBCommand(TQString("-stack-info-depth %1").arg(max_frame+1), + new GDBCommand(TQString("-stack-info-depth %1").tqarg(max_frame+1), this, &FramestackWidget::handleStackDepth)); } @@ -224,7 +224,7 @@ void FramestackWidget::handleStackDepth(const GDBMI::ResultRecord& r) //add the following command to the front, so noone switches threads in between controller_->addCommandToFront( new GDBCommand(TQString("-stack-list-frames %1 %2") - .arg(minFrame_).arg(maxFrame_), + .tqarg(minFrame_).tqarg(maxFrame_), this, &FramestackWidget::parseGDBBacktraceList)); } @@ -236,7 +236,7 @@ void FramestackWidget::getBacktraceForThread(int threadNo) // Switch to the target thread. controller_->addCommand( new GDBCommand(TQString("-thread-select %1") - .arg(threadNo).ascii())); + .tqarg(threadNo).ascii())); viewedThread_ = findThread(threadNo); } @@ -248,7 +248,7 @@ void FramestackWidget::getBacktraceForThread(int threadNo) // Switch back to the original thread. controller_->addCommand( new GDBCommand(TQString("-thread-select %1") - .arg(currentThread).ascii())); + .tqarg(currentThread).ascii())); } } @@ -274,13 +274,13 @@ void FramestackWidget::handleThreadList(const GDBMI::ResultRecord& r) TQString id = ids.results[i]->value->literal(); controller_->addCommand( - new GDBCommand(TQString("-thread-select %1").arg(id).ascii(), + new GDBCommand(TQString("-thread-select %1").tqarg(id).ascii(), this, &FramestackWidget::handleThread)); } controller_->addCommand( new GDBCommand(TQString("-thread-select %1") - .arg(controller_->currentThread()).ascii())); + .tqarg(controller_->currentThread()).ascii())); } // Get backtrace for the current thread. We need to do this @@ -493,10 +493,10 @@ void FramestackWidget::drawContentsOffset( TQPainter * p, int ox, int oy, // ************************************************************************** // ************************************************************************** -FrameStackItem::FrameStackItem(FramestackWidget *parent, +FrameStackItem::FrameStackItem(FramestackWidget *tqparent, unsigned frameNo, const TQString &name) - : TQListViewItem(parent, parent->lastChild()), + : TQListViewItem(tqparent, tqparent->lastChild()), frameNo_(frameNo), threadNo_(-1) { @@ -505,12 +505,12 @@ FrameStackItem::FrameStackItem(FramestackWidget *parent, // ************************************************************************** -FrameStackItem::FrameStackItem(ThreadStackItem *parent, +FrameStackItem::FrameStackItem(ThreadStackItem *tqparent, unsigned frameNo, const TQString &name) - : TQListViewItem(parent, parent->lastChild()), + : TQListViewItem(tqparent, tqparent->lastChild()), frameNo_(frameNo), - threadNo_(parent->threadNo()) + threadNo_(tqparent->threadNo()) { setText(0, name); } @@ -554,11 +554,11 @@ void FrameStackItem::setOpen(bool open) // ************************************************************************** // ************************************************************************** -ThreadStackItem::ThreadStackItem(FramestackWidget *parent, unsigned threadNo) -: TQListViewItem(parent), +ThreadStackItem::ThreadStackItem(FramestackWidget *tqparent, unsigned threadNo) +: TQListViewItem(tqparent), threadNo_(threadNo) { - setText(0, i18n("Thread %1").arg(threadNo_)); + setText(0, i18n("Thread %1").tqarg(threadNo_)); setExpandable(true); } diff --git a/languages/cpp/debugger/framestackwidget.h b/languages/cpp/debugger/framestackwidget.h index 656d2cdb..5d0b98e7 100644 --- a/languages/cpp/debugger/framestackwidget.h +++ b/languages/cpp/debugger/framestackwidget.h @@ -30,10 +30,10 @@ namespace GDBDebugger class FramestackWidget; -class ThreadStackItem : public QListViewItem +class ThreadStackItem : public TQListViewItem { public: - ThreadStackItem(FramestackWidget *parent, + ThreadStackItem(FramestackWidget *tqparent, unsigned threadNo); virtual ~ThreadStackItem(); @@ -56,13 +56,13 @@ private: /***************************************************************************/ /***************************************************************************/ -class FrameStackItem : public QListViewItem +class FrameStackItem : public TQListViewItem { public: - FrameStackItem(FramestackWidget *parent, + FrameStackItem(FramestackWidget *tqparent, unsigned frameNo, const TQString &name); - FrameStackItem(ThreadStackItem *parent, + FrameStackItem(ThreadStackItem *tqparent, unsigned frameNo, const TQString &name); virtual ~FrameStackItem(); @@ -88,13 +88,14 @@ private: /** * @author John Birch */ -class FramestackWidget : public QListView +class FramestackWidget : public TQListView { Q_OBJECT + TQ_OBJECT public: FramestackWidget( GDBController* controller, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0, WFlags f=0 ); virtual ~FramestackWidget(); @@ -150,10 +151,6 @@ public slots: void slotEvent(GDBController::event_t e); void slotSelectionChanged(TQListViewItem *thisItem); -#if QT_VERSION < 300 -private: - TQListViewItem* findItemWhichBeginsWith(const TQString& text) const; -#endif virtual void showEvent(TQShowEvent*); private: diff --git a/languages/cpp/debugger/gdbbreakpointwidget.cpp b/languages/cpp/debugger/gdbbreakpointwidget.cpp index b092a015..38d9e7e8 100644 --- a/languages/cpp/debugger/gdbbreakpointwidget.cpp +++ b/languages/cpp/debugger/gdbbreakpointwidget.cpp @@ -56,7 +56,7 @@ enum Column { Control = 0, Enable = 1, Type = 2, - Status = 3, + tqStatus = 3, Location = 4, Condition = 5, IgnoreCount = 6, @@ -76,7 +76,7 @@ static int m_activeFlag = 0; /***************************************************************************/ /***************************************************************************/ -class BreakpointTableRow : public QTableItem +class BreakpointTableRow : public TQTableItem { public: @@ -100,9 +100,9 @@ private: /***************************************************************************/ /***************************************************************************/ -BreakpointTableRow::BreakpointTableRow(TQTable* parent, EditType editType, +BreakpointTableRow::BreakpointTableRow(TQTable* tqparent, EditType editType, Breakpoint* bp) : - TQTableItem(parent, editType, ""), + TQTableItem(tqparent, editType, ""), m_breakpoint(bp) { appendEmptyRow(); @@ -146,7 +146,7 @@ void BreakpointTableRow::appendEmptyRow() ComplexEditCell* act = new ComplexEditCell(table()); table()->setItem(row, Tracing, act); TQObject::connect(act, TQT_SIGNAL(edit(TQTableItem*)), - table()->parent(), TQT_SLOT(editTracing(TQTableItem*))); + table()->tqparent(), TQT_SLOT(editTracing(TQTableItem*))); } /***************************************************************************/ @@ -161,7 +161,7 @@ void BreakpointTableRow::setRow() TQString status=m_breakpoint->statusDisplay(m_activeFlag); - table()->setText(row(), Status, status); + table()->setText(row(), tqStatus, status); table()->setText(row(), Condition, m_breakpoint->conditional()); table()->setText(row(), IgnoreCount, TQString::number(m_breakpoint->ignoreCount() )); table()->setText(row(), Hits, TQString::number(m_breakpoint->hits() )); @@ -183,7 +183,7 @@ void BreakpointTableRow::setRow() table()->setText(row(), Type, displayType); table()->adjustColumn(Type); - table()->adjustColumn(Status); + table()->adjustColumn(tqStatus); table()->adjustColumn(Location); table()->adjustColumn(Hits); table()->adjustColumn(IgnoreCount); @@ -196,8 +196,8 @@ void BreakpointTableRow::setRow() /***************************************************************************/ GDBBreakpointWidget::GDBBreakpointWidget(GDBController* controller, - TQWidget *parent, const char *name) : -TQHBox(parent, name), + TQWidget *tqparent, const char *name) : +TQHBox(tqparent, name), controller_(controller) { m_table = new GDBTable(0, numCols, this, name); @@ -208,7 +208,7 @@ controller_(controller) m_table->hideColumn(Control); m_table->setColumnReadOnly(Type, true); - m_table->setColumnReadOnly(Status, true); + m_table->setColumnReadOnly(tqStatus, true); m_table->setColumnReadOnly(Hits, true); m_table->setColumnWidth( Enable, 20); @@ -216,7 +216,7 @@ controller_(controller) header->setLabel( Enable, "" ); header->setLabel( Type, i18n("Type") ); - header->setLabel( Status, i18n("Status") ); + header->setLabel( tqStatus, i18n("tqStatus") ); header->setLabel( Location, i18n("Location") ); header->setLabel( Condition, i18n("Condition") ); header->setLabel( IgnoreCount, i18n("Ignore Count") ); @@ -238,12 +238,12 @@ controller_(controller) m_ctxMenu->insertItem( i18n( "Show text" ), BW_ITEM_Show ); int edit_id = m_ctxMenu->insertItem( i18n( "Edit" ), BW_ITEM_Edit ); - m_ctxMenu->setAccel(Qt::Key_Enter, edit_id); + m_ctxMenu->setAccel(TQt::Key_Enter, edit_id); m_ctxMenu->insertItem( i18n( "Disable" ), BW_ITEM_Disable ); int del_id = m_ctxMenu->insertItem( SmallIcon("breakpoint_delete"), i18n( "Delete" ), BW_ITEM_Delete ); - m_ctxMenu->setAccel(Qt::Key_Delete, del_id); + m_ctxMenu->setAccel(TQt::Key_Delete, del_id); m_ctxMenu->insertSeparator(); m_ctxMenu->insertItem( i18n( "Disable all"), BW_ITEM_DisableAll ); m_ctxMenu->insertItem( i18n( "Enable all"), BW_ITEM_EnableAll ); @@ -377,15 +377,15 @@ void GDBBreakpointWidget::slotWatchpointHit(int id, "Address: 0x%2<br>" "Old value: %3<br>" "New value: %4") - .arg(b->varName()) - .arg(b->address(), 0, 16) - .arg(oldValue) - .arg(newValue)); + .tqarg(b->varName()) + .tqarg(b->address(), 0, 16) + .tqarg(oldValue) + .tqarg(newValue)); } /***************************************************************************/ -BreakpointTableRow* GDBBreakpointWidget::find(Breakpoint *breakpoint) +BreakpointTableRow* GDBBreakpointWidget::tqfind(Breakpoint *breakpoint) { // NOTE:- The match doesn't have to be equal. Each type of bp // must decide on the match criteria. @@ -493,7 +493,7 @@ void GDBBreakpointWidget::slotToggleBreakpoint(const TQString &fileName, int lin { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); - BreakpointTableRow* btr = find(fpBP); + BreakpointTableRow* btr = tqfind(fpBP); if (btr) { removeBreakpoint(btr); @@ -508,7 +508,7 @@ void GDBBreakpointWidget::slotToggleBreakpointEnabled(const TQString &fileName, { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); - BreakpointTableRow* btr = find(fpBP); + BreakpointTableRow* btr = tqfind(fpBP); delete fpBP; if (btr) { @@ -523,7 +523,7 @@ void GDBBreakpointWidget::slotToggleBreakpointEnabled(const TQString &fileName, void GDBBreakpointWidget::slotToggleWatchpoint(const TQString &varName) { Watchpoint *watchpoint = new Watchpoint(varName, false, true); - BreakpointTableRow* btr = find(watchpoint); + BreakpointTableRow* btr = tqfind(watchpoint); if (btr) { removeBreakpoint(btr); @@ -557,7 +557,7 @@ void GDBBreakpointWidget::handleBreakpointList(const GDBMI::ResultRecord& r) if (b.hasField("cond")) bp->setConditional(b["cond"].literal()); else - bp->setConditional(TQString::null); + bp->setConditional(TQString()); btr->setRow(); emit publishBPState(*bp); } @@ -917,7 +917,7 @@ void GDBBreakpointWidget::slotEditBreakpoint(const TQString &fileName, int lineN { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); - BreakpointTableRow* btr = find(fpBP); + BreakpointTableRow* btr = tqfind(fpBP); delete fpBP; if (btr) @@ -946,7 +946,7 @@ void GDBBreakpointWidget::slotBreakpointModified(Breakpoint* b) { emit publishBPState(*b); - if (BreakpointTableRow* btr = find(b)) + if (BreakpointTableRow* btr = tqfind(b)) { if (b->isActionDie()) { @@ -1031,7 +1031,7 @@ void GDBBreakpointWidget::editTracing(TQTableItem* item) // Note: change cell text here and explicitly call slotNewValue here. // We want this signal to be emitted when we close the tracing dialog - // and not when we select some other cell, as happens in Qt by default. + // and not when we select some other cell, as happens in TQt by default. if (r == TQDialog::Accepted) { // The dialog has modified "btr->breakpoint()" already. @@ -1191,7 +1191,7 @@ void GDBBreakpointWidget::focusInEvent( TQFocusEvent */* e*/ ) // Without the following 'if', when we first open the breakpoints // widget, the background is all black. This happens only with // m_table->setFocusStyle(TQTable::FollowStyle); - // in constructor, so I suspect Qt bug. But anyway, without + // in constructor, so I suspect TQt bug. But anyway, without // current cell keyboard actions like Enter for edit won't work, // so keyboard focus does not makes much sense. if (m_table->currentRow() == -1 || @@ -1213,28 +1213,28 @@ TQWidget* ComplexEditCell::createEditor() const { TQHBox* box = new TQHBox( table()->viewport() ); box->setPaletteBackgroundColor( - table()->palette().active().highlight()); + table()->tqpalette().active().highlight()); label_ = new TQLabel(text(), box, "label"); - label_->setBackgroundMode(Qt::PaletteHighlight); + label_->setBackgroundMode(TQt::PaletteHighlight); // Sorry for hardcode, but '2' is already hardcoded in - // Qt source, in TQTableItem::paint. Since I don't want the + // TQt source, in TQTableItem::paint. Since I don't want the // text to jump 2 pixels to the right when editor is activated, // need to set the same indent for label. label_->setIndent(2); TQPalette p = label_->palette(); p.setColor(TQPalette::Active, TQColorGroup::Foreground, - table()->palette().active().highlightedText()); + table()->tqpalette().active().highlightedText()); p.setColor(TQPalette::Inactive, TQColorGroup::Foreground, - table()->palette().active().highlightedText()); + table()->tqpalette().active().highlightedText()); label_->setPalette(p); TQPushButton* b = new TQPushButton("...", box); - // This is exactly what is done in QDesigner source in the + // This is exactly what is done in TQDesigner source in the // similar context. Haven't had any success making the good look - // with layout, I suppose that sizeHint for button is always larger + // with tqlayout, I suppose that tqsizeHint for button is always larger // than 20. b->setFixedWidth( 20 ); diff --git a/languages/cpp/debugger/gdbbreakpointwidget.h b/languages/cpp/debugger/gdbbreakpointwidget.h index c0728dec..f67bb03e 100644 --- a/languages/cpp/debugger/gdbbreakpointwidget.h +++ b/languages/cpp/debugger/gdbbreakpointwidget.h @@ -41,13 +41,14 @@ class BreakpointTableRow; class GDBTable; class GDBController; -class GDBBreakpointWidget : public QHBox +class GDBBreakpointWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: GDBBreakpointWidget( GDBController* controller, - TQWidget* parent=0, const char* name=0 ); + TQWidget* tqparent=0, const char* name=0 ); virtual ~GDBBreakpointWidget(); void reset(); @@ -105,7 +106,7 @@ signals: void tracingOutput(const char*); private: - BreakpointTableRow* find(Breakpoint *bp); + BreakpointTableRow* tqfind(Breakpoint *bp); BreakpointTableRow* findId(int id); BreakpointTableRow* findKey(int BPKey); @@ -135,14 +136,15 @@ class BreakpointTableRow; When editing is done, the receiver of 'edit' should change the value in the table, and then call the 'updateValue' method. */ -class ComplexEditCell : public TQObject, public QTableItem +class ComplexEditCell : public TQObject, public TQTableItem { Q_OBJECT + TQ_OBJECT public: ComplexEditCell(TQTable* table); - /** Called by Qt when the current cell should become editable. + /** Called by TQt when the current cell should become editable. In our case, when the item becomes current. Creates a widget that will be shown in the cell and should be able to edit cell content. In our case -- text plus "..." button that invokes diff --git a/languages/cpp/debugger/gdbcommand.cpp b/languages/cpp/debugger/gdbcommand.cpp index bf8d5bc4..b783b31f 100644 --- a/languages/cpp/debugger/gdbcommand.cpp +++ b/languages/cpp/debugger/gdbcommand.cpp @@ -99,13 +99,13 @@ ModifyBreakpointCommand::ModifyBreakpointCommand( bp_(bp) {} -QString +TQString ModifyBreakpointCommand::cmdToSend() { if (bp_->dbgId() > 0) { TQString s(initialString()); - s = s.arg(bp_->dbgId()) + "\n"; + s = s.tqarg(bp_->dbgId()) + "\n"; return s.local8Bit(); } else diff --git a/languages/cpp/debugger/gdbcommand.h b/languages/cpp/debugger/gdbcommand.h index 946bc3aa..7000235a 100644 --- a/languages/cpp/debugger/gdbcommand.h +++ b/languages/cpp/debugger/gdbcommand.h @@ -91,8 +91,8 @@ public: private: TQString command_; - TQGuardedPtr<TQObject> handler_this; - typedef void (TQObject::* handler_t)(const GDBMI::ResultRecord&); + TQGuardedPtr<TQT_BASE_OBJECT_NAME> handler_this; + typedef void (TQT_BASE_OBJECT_NAME::* handler_t)(const GDBMI::ResultRecord&); handler_t handler_method; TQValueVector<TQString> lines; bool run; @@ -153,8 +153,8 @@ public: // GDBCommand overrides bool invokeHandler(const GDBMI::ResultRecord& r); private: - TQGuardedPtr<TQObject> cli_handler_this; - typedef void (TQObject::* cli_handler_t)(const TQValueVector<TQString>&); + TQGuardedPtr<TQT_BASE_OBJECT_NAME> cli_handler_this; + typedef void (TQT_BASE_OBJECT_NAME::* cli_handler_t)(const TQValueVector<TQString>&); cli_handler_t cli_handler_method; }; @@ -165,7 +165,7 @@ private: class SentinelCommand : public GDBCommand { public: - typedef void (TQObject::*handler_method_t)(); + typedef void (TQT_BASE_OBJECT_NAME::*handler_method_t)(); template<class Handler> SentinelCommand(Handler* handler_this, @@ -186,7 +186,7 @@ public: } private: - TQGuardedPtr<TQObject> handler_this; + TQGuardedPtr<TQT_BASE_OBJECT_NAME> handler_this; handler_method_t handler_method; }; @@ -207,7 +207,7 @@ private: class ExpressionValueCommand : public TQObject, public GDBCommand { public: - typedef void (TQObject::*handler_method_t)(const TQString&); + typedef void (TQT_BASE_OBJECT_NAME::*handler_method_t)(const TQString&); template<class Handler> ExpressionValueCommand( @@ -226,7 +226,7 @@ public: } private: - TQGuardedPtr<TQObject> handler_this; + TQGuardedPtr<TQT_BASE_OBJECT_NAME> handler_this; handler_method_t handler_method; }; diff --git a/languages/cpp/debugger/gdbcontroller.cpp b/languages/cpp/debugger/gdbcontroller.cpp index 3fd912ec..93424396 100644 --- a/languages/cpp/debugger/gdbcontroller.cpp +++ b/languages/cpp/debugger/gdbcontroller.cpp @@ -179,7 +179,7 @@ void GDBController::configure() config_runShellScript_ = DomUtil::readEntry(dom, "/kdevdebugger/general/runShellScript").latin1(); config_runGdbScript_ = DomUtil::readEntry(dom, "/kdevdebugger/general/runGdbScript").latin1(); -// add macros for reading QStrings? or in configGdbScript? +// add macros for reading TQStrings? or in configGdbScript? config_forceBPSet_ = DomUtil::readBoolEntry(dom, "/kdevdebugger/general/allowforcedbpset", true); config_dbgTerminal_ = DomUtil::readBoolEntry(dom, "/kdevdebugger/general/separatetty", false); config_gdbPath_ = DomUtil::readEntry(dom, "/kdevdebugger/general/gdbpath"); @@ -294,7 +294,7 @@ void GDBController::queueCmd(GDBCommand *cmd, enum queue_where queue_where) KMessageBox::information( 0, i18n("<b>Gdb command sent when debugger is not running</b><br>" - "The command was:<br> %1").arg(cmd->initialString()), + "The command was:<br> %1").tqarg(cmd->initialString()), i18n("Internal error"), "gdb_error"); return; } @@ -316,11 +316,11 @@ void GDBController::queueCmd(GDBCommand *cmd, enum queue_where queue_where) cmdList_.insert(i, cmd); } - kdDebug(9012) << "QUEUE: " << cmd->initialString() + kdDebug(9012) << "TQUEUE: " << cmd->initialString() << (stateReloadInProgress_ ? " (state reloading)\n" : "\n"); setStateOn(s_dbgBusy); - emit dbgStatus("", state_); + emit dbgtqStatus("", state_); raiseEvent(debugger_busy); executeCmd(); @@ -401,7 +401,7 @@ void GDBController::executeCmd() setStateOn(s_waitForWrite); TQString prettyCmd = currentCmd_->cmdToSend(); - prettyCmd.replace( TQRegExp("set prompt \032.\n"), "" ); + prettyCmd.tqreplace( TQRegExp("set prompt \032.\n"), "" ); prettyCmd = "(gdb) " + prettyCmd; if (currentCmd_->isUserCommand()) @@ -409,7 +409,7 @@ void GDBController::executeCmd() else emit gdbInternalCommandStdout( prettyCmd.latin1() ); - emit dbgStatus ("", state_); + emit dbgtqStatus ("", state_); } // ************************************************************************** @@ -500,7 +500,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) if (reason == "exited-signalled") { programNoApp(i18n("Exited on signal %1") - .arg(r["signal-name"].literal()), false); + .tqarg(r["signal-name"].literal()), false); // FIXME: figure out why this variable is needed. programHasExited_ = true; state_reload_needed = false; @@ -540,7 +540,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) // or whatever). setStateOff(s_explicitBreakInto); - emit dbgStatus("Application interrupted", state_); + emit dbgtqStatus("Application interrupted", state_); // Will show the source line in the code // handling non-special stop kinds, below. } @@ -554,7 +554,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) // that'll end the program. KMessageBox::information(0, i18n("Program received signal %1 (%2)") - .arg(name).arg(user_name), + .tqarg(name).tqarg(user_name), i18n("Received signal")); } } @@ -592,7 +592,7 @@ void GDBController::reloadProgramState() maybeAnnounceWatchpointHit(); } - emit dbgStatus ("", state_); + emit dbgtqStatus ("", state_); // We're always at frame zero when the program stops // and we must reset the active flag @@ -635,7 +635,7 @@ void GDBController::programNoApp(const TQString &msg, bool msgBox) if (tty_) tty_->readRemaining(); - // Tty is no longer usable, delete it. Without this, QSocketNotifier + // Tty is no longer usable, delete it. Without this, TQSocketNotifier // will continiously bomd STTY with signals, so we need to either disable // TQSocketNotifier, or delete STTY. The latter is simpler, since we can't // reuse it for future debug sessions anyway. @@ -648,7 +648,7 @@ void GDBController::programNoApp(const TQString &msg, bool msgBox) if (msgBox) KMessageBox::information(0, i18n("gdb message:\n")+msg,"Warning", "gdb_error"); - emit dbgStatus (msg, state_); + emit dbgtqStatus (msg, state_); /* Also show message in gdb window, so that users who prefer to look at gdb window know what's up. */ emit gdbUserCommandStdout(msg.ascii()); @@ -716,9 +716,9 @@ void GDBController::handleMiFileListExecSourceFile(const GDBMI::ResultRecord& r) "Command was: %1\n" "Response is: %2\n" "Invalid response kind: \"%3\"") - .arg(currentCmd_->rawDbgCommand()) - .arg(buf) - .arg(r.reason), + .tqarg(currentCmd_->rawDbgCommand()) + .tqarg(buf) + .tqarg(r.reason), i18n("Invalid gdb reply"), "gdb_error"); #endif } @@ -755,7 +755,7 @@ void GDBController::maybeAnnounceWatchpointHit() } else if (last_stop_reason == "read-watchpoint-trigger") { - emit dbgStatus ("Read watchpoint triggered", state_); + emit dbgtqStatus ("Read watchpoint triggered", state_); } } } @@ -846,14 +846,14 @@ bool GDBController::start(const TQString& shell, const DomUtil::PairList& run_en i18n("<b>Could not start debugger.</b>" "<p>Could not run '%1'. " "Make sure that the path name is specified correctly." - ).arg(dbgProcess_->args()[0]), + ).tqarg(dbgProcess_->args()[0].data()), i18n("Could not start debugger"), "gdb_error"); return false; } setStateOff(s_dbgNotStarted); - emit dbgStatus ("", state_); + emit dbgtqStatus ("", state_); saw_gdb_prompt_ = false; @@ -1043,7 +1043,7 @@ void GDBController::slotStopDebugger() gdbOutput_ = ""; setState(s_dbgNotStarted | s_appNotStarted); - emit dbgStatus (i18n("Debugger stopped"), state_); + emit dbgtqStatus (i18n("Debugger stopped"), state_); raiseEvent(debugger_exited); } @@ -1159,7 +1159,7 @@ void GDBController::slotRun() " %1\n" "<br>does not exist. Check that you have specified " "the right application in the debugger configuration." - ).arg(app.fileName()), + ).tqarg(app.fileName()), i18n("Application does not exist")); // FIXME: after this, KDevelop will still show that debugger @@ -1176,7 +1176,7 @@ void GDBController::slotRun() "<p>The application does not have the executable bit set. " "Try rebuilding the project, or change permissions " "manually." - ).arg(app.fileName()), + ).tqarg(app.fileName()), i18n("Could not run application")); slotStopDebugger(); } @@ -1324,11 +1324,11 @@ void GDBController::selectFrame(int frameNo, int threadNo) { if (viewedThread_ != threadNo) queueCmd(new GDBCommand( - TQString("-thread-select %1").arg(threadNo).ascii())); + TQString("-thread-select %1").tqarg(threadNo).ascii())); } queueCmd(new GDBCommand( - TQString("-stack-select-frame %1").arg(frameNo).ascii())); + TQString("-stack-select-frame %1").tqarg(frameNo).ascii())); // Will emit the 'thread_or_frame_changed' event. queueCmd(new GDBCommand("-stack-info-frame", @@ -1349,10 +1349,10 @@ void GDBController::defaultErrorHandler(const GDBMI::ResultRecord& result) { TQString msg = result["msg"].literal(); - if (msg.contains("No such process")) + if (msg.tqcontains("No such process")) { setState(s_appNotStarted|s_programExited); - emit dbgStatus (i18n("Process exited"), state_); + emit dbgtqStatus (i18n("Process exited"), state_); raiseEvent(program_exited); return; } @@ -1433,7 +1433,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) // Already parsing? then get out quick. // VP, 2006-01-30. I'm not sure how this could happen, since - // parsing of gdb reply should not ever execute Qt message loop. Except, + // parsing of gdb reply should not ever execute TQt message loop. Except, // maybe, when we pop up a message box. But even in that case, // it's likely we won't return to slotDbgStdout again. if (parsing) @@ -1447,7 +1447,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) int i; bool got_any_command = false; // For each gdb reply. In MI mode, each reply is one string. - while((i = holdingZone_.find('\n')) != -1) + while((i = holdingZone_.tqfind('\n')) != -1) { got_any_command = true; @@ -1590,7 +1590,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) "<p>The debugger component encountered an internal error while " "processing a reply from gdb. Please submit a bug report."), i18n("The exception is: %1\n" - "The MI response is: %2").arg(e.what()).arg(reply), + "The MI response is: %2").tqarg(e.what()).tqarg(reply.data()), i18n("Internal debugger error")); destroyCurrentCommand(); @@ -1629,7 +1629,7 @@ void GDBController::commandDone() { kdDebug(9012) << "No more commands\n"; setStateOff(s_dbgBusy); - emit dbgStatus("", state_); + emit dbgtqStatus("", state_); raiseEvent(debugger_ready); } } @@ -1650,7 +1650,7 @@ void GDBController::removeStateReloadingCommands() GDBCommand* cmd = cmdList_.at(i); if (stateReloadingCommands_.count(cmd)) { - kdDebug(9012) << "UNQUEUE: " << cmd->initialString() << "\n"; + kdDebug(9012) << "UNTQUEUE: " << cmd->initialString() << "\n"; delete cmdList_.take(i); } } @@ -1688,7 +1688,7 @@ void GDBController::raiseEvent(event_t e) void GDBController::slotDbgStderr(KProcess *proc, char *buf, int buflen) { // At the moment, just drop a message out and redirect - kdDebug(9012) << "STDERR: " << TQString::fromLatin1(buf, buflen+1) << endl; + kdDebug(9012) << "STDERR: " << TQString::tqfromLatin1(buf, buflen+1) << endl; slotDbgStdout(proc, buf, buflen); } @@ -1722,7 +1722,7 @@ void GDBController::slotDbgProcessExited(KProcess* process) destroyCmds(); setState(s_dbgNotStarted|s_appNotStarted|s_programExited); - emit dbgStatus (i18n("Process exited"), state_); + emit dbgtqStatus (i18n("Process exited"), state_); emit gdbUserCommandStdout("(gdb) Process exited\n"); } @@ -1743,14 +1743,14 @@ void GDBController::slotUserGDBCmd(const TQString& cmd) // raiseEvent(program_state_changed); } -void GDBController::explainDebuggerStatus() +void GDBController::explainDebuggertqStatus() { TQString information("%1 commands in queue\n" "%2 commands being processed by gdb\n" "Debugger state: %3\n"); information = - information.arg(cmdList_.count()).arg(currentCmd_ ? 1 : 0) - .arg(state_); + information.tqarg(cmdList_.count()).tqarg(currentCmd_ ? 1 : 0) + .tqarg(state_); if (currentCmd_) { @@ -1758,8 +1758,8 @@ void GDBController::explainDebuggerStatus() "Current command text: '%2'\n" "Current command origianl text: '%3'\n"); - extra = extra.arg( - typeid(*currentCmd_).name()).arg(currentCmd_->cmdToSend()). + extra = extra.tqarg( + typeid(*currentCmd_).name()).tqarg(currentCmd_->cmdToSend()). arg(currentCmd_->initialString()); information += extra; } diff --git a/languages/cpp/debugger/gdbcontroller.h b/languages/cpp/debugger/gdbcontroller.h index a8b6bd2b..8cbf3b26 100644 --- a/languages/cpp/debugger/gdbcontroller.h +++ b/languages/cpp/debugger/gdbcontroller.h @@ -52,6 +52,7 @@ class STTY; class GDBController : public DbgController { Q_OBJECT + TQ_OBJECT public: GDBController(TQDomDocument &projectDom); @@ -249,7 +250,7 @@ public slots: // Pops up a dialog box with some hopefully // detailed information about which state debugger // is in, which commands were sent and so on. - void explainDebuggerStatus(); + void explainDebuggertqStatus(); protected slots: diff --git a/languages/cpp/debugger/gdboutputwidget.cpp b/languages/cpp/debugger/gdboutputwidget.cpp index 836886bb..7877a92c 100644 --- a/languages/cpp/debugger/gdboutputwidget.cpp +++ b/languages/cpp/debugger/gdboutputwidget.cpp @@ -39,8 +39,8 @@ namespace GDBDebugger /***************************************************************************/ -GDBOutputWidget::GDBOutputWidget( TQWidget *parent, const char *name) : - TQWidget(parent, name), +GDBOutputWidget::GDBOutputWidget( TQWidget *tqparent, const char *name) : + TQWidget(tqparent, name), m_userGDBCmdEditor(0), m_Interrupt(0), m_gdbView(0), @@ -62,7 +62,7 @@ GDBOutputWidget::GDBOutputWidget( TQWidget *parent, const char *name) : userGDBCmdEntry->setStretchFactor(m_userGDBCmdEditor, 1); m_Interrupt = new TQToolButton( this, "add breakpoint" ); - m_Interrupt->setSizePolicy ( TQSizePolicy ( (TQSizePolicy::SizeType)0, + m_Interrupt->tqsetSizePolicy ( TQSizePolicy ( (TQSizePolicy::SizeType)0, ( TQSizePolicy::SizeType)0, 0, 0, @@ -76,7 +76,7 @@ GDBOutputWidget::GDBOutputWidget( TQWidget *parent, const char *name) : topLayout->addWidget(m_gdbView, 10); topLayout->addLayout(userGDBCmdEntry); - slotDbgStatus( "", s_dbgNotStarted); + slotDbgtqStatus( "", s_dbgNotStarted); connect( m_userGDBCmdEditor, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotGDBCmd()) ); connect( m_Interrupt, TQT_SIGNAL(clicked()), TQT_SIGNAL(breakInto())); @@ -257,7 +257,7 @@ void GDBOutputWidget::flushPending() /***************************************************************************/ -void GDBOutputWidget::slotDbgStatus(const TQString &, int statusFlag) +void GDBOutputWidget::slotDbgtqStatus(const TQString &, int statusFlag) { if (statusFlag & s_dbgNotStarted) { @@ -291,8 +291,8 @@ void GDBOutputWidget::focusInEvent(TQFocusEvent */*e*/) TQString GDBOutputWidget::html_escape(const TQString& s) { TQString r(s); - r.replace("<", "<"); - r.replace(">", ">"); + r.tqreplace("<", "<"); + r.tqreplace(">", ">"); return r; } @@ -327,8 +327,8 @@ TQPopupMenu* OutputText::createPopupMenu(const TQPoint&) this, TQT_SLOT(toggleShowInternalCommands())); - popup->setItemChecked(id, parent_->showInternalCommands_); - popup->setWhatsThis( + popup->setItemChecked(id, tqparent_->showInternalCommands_); + popup->tqsetWhatsThis( id, i18n( "Controls if commands issued internally by KDevelop " @@ -348,21 +348,21 @@ void OutputText::copyAll() { /* See comments for allCommandRaw_ for explanations of this complex logic, as opposed to calling text(). */ - TQStringList& raw = parent_->showInternalCommands_ ? - parent_->allCommandsRaw_ : parent_->userCommandsRaw_; + TQStringList& raw = tqparent_->showInternalCommands_ ? + tqparent_->allCommandsRaw_ : tqparent_->userCommandsRaw_; TQString text; for (unsigned i = 0; i < raw.size(); ++i) text += raw[i]; // Make sure the text is pastable both with Ctrl-C and with // middle click. - TQApplication::clipboard()->setText(text, QClipboard::Clipboard); - TQApplication::clipboard()->setText(text, QClipboard::Selection); + TQApplication::tqclipboard()->setText(text, TQClipboard::Clipboard); + TQApplication::tqclipboard()->setText(text, TQClipboard::Selection); } void OutputText::toggleShowInternalCommands() { - parent_->setShowInternalCommands(!parent_->showInternalCommands_); + tqparent_->setShowInternalCommands(!tqparent_->showInternalCommands_); } diff --git a/languages/cpp/debugger/gdboutputwidget.h b/languages/cpp/debugger/gdboutputwidget.h index e0ad9c39..ace1c00d 100644 --- a/languages/cpp/debugger/gdboutputwidget.h +++ b/languages/cpp/debugger/gdboutputwidget.h @@ -32,12 +32,13 @@ class TQDomElement; namespace GDBDebugger { -class GDBOutputWidget : public QWidget +class GDBOutputWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - GDBOutputWidget( TQWidget *parent=0, const char *name=0 ); + GDBOutputWidget( TQWidget *tqparent=0, const char *name=0 ); ~GDBOutputWidget(); void savePartialProjectSession(TQDomElement* el); @@ -49,7 +50,7 @@ public slots: void slotInternalCommandStdout(const char* line); void slotUserCommandStdout(const char* line); void slotReceivedStderr(const char* line); - void slotDbgStatus (const TQString &status, int statusFlag); + void slotDbgtqStatus (const TQString &status, int statusFlag); void slotGDBCmd(); @@ -100,7 +101,7 @@ private: /** For performance reasons, we don't immediately add new text - to QTExtEdit. Instead we add it to pendingOutput_ and + to TQTExtEdit. Instead we add it to pendingOutput_ and flush it on timer. */ TQString pendingOutput_; @@ -113,13 +114,14 @@ private: /** Add popup menu specific to gdb output window to TQTextEdit. */ -class OutputText : public QTextEdit +class OutputText : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - OutputText(GDBOutputWidget* parent) - : TQTextEdit(parent), - parent_(parent) + OutputText(GDBOutputWidget* tqparent) + : TQTextEdit(tqparent), + tqparent_(tqparent) {} TQPopupMenu* createPopupMenu(const TQPoint& pos); @@ -129,7 +131,7 @@ private slots: void toggleShowInternalCommands(); private: - GDBOutputWidget* parent_; + GDBOutputWidget* tqparent_; }; } diff --git a/languages/cpp/debugger/gdbparser.cpp b/languages/cpp/debugger/gdbparser.cpp index 5a8588b1..d8ae62b8 100644 --- a/languages/cpp/debugger/gdbparser.cpp +++ b/languages/cpp/debugger/gdbparser.cpp @@ -97,7 +97,7 @@ TQString GDBParser::undecorateValue(DataType type, const TQString& s) // - composites (arrays and structures) // - pointers to functions. In this case type is // enclosed in "{}". Not sure why it's so, as - // when printing pointer, type is in parenthesis. + // when printing pointer, type is in tqparenthesis. if (type == typePointer) { // Looks like type in braces at the beginning. Strip it. @@ -126,7 +126,7 @@ TQString GDBParser::undecorateValue(DataType type, const TQString& s) // We can't find the first ')', because type can contain '(' and ')' // characters if its function pointer. So count opening and closing - // parentheses. + // tqparentheses. start = skipDelim(start, '(', ')'); } @@ -138,7 +138,7 @@ TQString GDBParser::undecorateValue(DataType type, const TQString& s) if (value[0] == '@') { // It's a reference, we need to show just the value. - if (int i = value.find(":")) + if (int i = value.tqfind(":")) { value = value.mid(i+2); } @@ -149,7 +149,7 @@ TQString GDBParser::undecorateValue(DataType type, const TQString& s) } } - if (value.find("Cannot access memory") == 0) + if (value.tqfind("Cannot access memory") == 0) value = "(inaccessible)"; return value.stripWhiteSpace(); diff --git a/languages/cpp/debugger/gdbparser.h b/languages/cpp/debugger/gdbparser.h index a56c082d..08e5cda7 100644 --- a/languages/cpp/debugger/gdbparser.h +++ b/languages/cpp/debugger/gdbparser.h @@ -35,7 +35,7 @@ public: static void destroy(); private: - void parseArray(TrimmableItem *parent, const char *buf); + void parseArray(TrimmableItem *tqparent, const char *buf); const char *skipTokenEnd(const char *buf) const; const char *skipTokenValue(const char *buf) const; diff --git a/languages/cpp/debugger/gdbtable.cpp b/languages/cpp/debugger/gdbtable.cpp index c9c1bf2f..c4b16da8 100644 --- a/languages/cpp/debugger/gdbtable.cpp +++ b/languages/cpp/debugger/gdbtable.cpp @@ -11,13 +11,13 @@ namespace GDBDebugger { -GDBTable::GDBTable(TQWidget *parent, const char *name) - : TQTable(parent, name) +GDBTable::GDBTable(TQWidget *tqparent, const char *name) + : TQTable(tqparent, name) { } -GDBTable::GDBTable(int nr, int nc, TQWidget * parent, const char * name) - : TQTable(nr, nc, parent, name) +GDBTable::GDBTable(int nr, int nc, TQWidget * tqparent, const char * name) + : TQTable(nr, nc, tqparent, name) { } diff --git a/languages/cpp/debugger/gdbtable.h b/languages/cpp/debugger/gdbtable.h index 78c45055..55374380 100644 --- a/languages/cpp/debugger/gdbtable.h +++ b/languages/cpp/debugger/gdbtable.h @@ -14,12 +14,13 @@ namespace GDBDebugger { -class GDBTable : public QTable +class GDBTable : public TQTable { Q_OBJECT + TQ_OBJECT public: - GDBTable(TQWidget *parent = 0, const char *name = 0); - GDBTable( int numRows, int numCols, TQWidget * parent = 0, const char * name = 0 ); + GDBTable(TQWidget *tqparent = 0, const char *name = 0); + GDBTable( int numRows, int numCols, TQWidget * tqparent = 0, const char * name = 0 ); ~GDBTable(); virtual void keyPressEvent ( TQKeyEvent * e ); diff --git a/languages/cpp/debugger/label_with_double_click.cpp b/languages/cpp/debugger/label_with_double_click.cpp index f08c7358..deaab3cc 100644 --- a/languages/cpp/debugger/label_with_double_click.cpp +++ b/languages/cpp/debugger/label_with_double_click.cpp @@ -1,8 +1,8 @@ #include "label_with_double_click.h" -LabelWithDoubleClick::LabelWithDoubleClick(const TQString& s, TQWidget* parent) -: TQLabel(s, parent) +LabelWithDoubleClick::LabelWithDoubleClick(const TQString& s, TQWidget* tqparent) +: TQLabel(s, tqparent) {} void LabelWithDoubleClick::mouseDoubleClickEvent(TQMouseEvent*) diff --git a/languages/cpp/debugger/label_with_double_click.h b/languages/cpp/debugger/label_with_double_click.h index 35ade271..616ad903 100644 --- a/languages/cpp/debugger/label_with_double_click.h +++ b/languages/cpp/debugger/label_with_double_click.h @@ -4,11 +4,12 @@ #include <tqlabel.h> -class LabelWithDoubleClick : public QLabel +class LabelWithDoubleClick : public TQLabel { Q_OBJECT + TQ_OBJECT public: - LabelWithDoubleClick(const TQString& s, TQWidget* parent); + LabelWithDoubleClick(const TQString& s, TQWidget* tqparent); signals: void doubleClicked(); diff --git a/languages/cpp/debugger/memviewdlg.cpp b/languages/cpp/debugger/memviewdlg.cpp index 6d700233..44a95b1a 100644 --- a/languages/cpp/debugger/memviewdlg.cpp +++ b/languages/cpp/debugger/memviewdlg.cpp @@ -71,7 +71,7 @@ namespace GDBDebugger it's not a standalone dialog. However, we want to have easy way to hide/show all controls, so we group them in this class. */ - class MemoryRangeSelector : public QWidget + class MemoryRangeSelector : public TQWidget { public: KLineEdit* startAddressLineEdit; @@ -79,12 +79,12 @@ namespace GDBDebugger TQPushButton* okButton; TQPushButton* cancelButton; - MemoryRangeSelector(TQWidget* parent) - : TQWidget(parent) + MemoryRangeSelector(TQWidget* tqparent) + : TQWidget(tqparent) { TQVBoxLayout* l = new TQVBoxLayout(this); - // Grid layout: labels + address field + // Grid tqlayout: labels + address field TQGridLayout* gl = new TQGridLayout(l); gl->setColSpacing(0, 2); @@ -127,8 +127,8 @@ namespace GDBDebugger MemoryView::MemoryView(GDBController* controller, - TQWidget* parent, const char* name) - : TQWidget(parent, name), + TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name), controller_(controller), // New memory view can be created only when debugger is active, // so don't set s_appNotStarted here. @@ -263,8 +263,8 @@ namespace GDBDebugger new GDBCommand( TQString("-data-read-memory %1 x 1 1 %2") - .arg(rangeSelector_->startAddressLineEdit->text()) - .arg(size).ascii(), + .tqarg(rangeSelector_->startAddressLineEdit->text()) + .tqarg(size).ascii(), this, &MemoryView::memoryRead)); } @@ -280,7 +280,7 @@ namespace GDBDebugger start_ = startAsString_.toUInt(0, 0); setCaption(TQString("%1 (%2 bytes)") - .arg(startAsString_).arg(amount_)); + .tqarg(startAsString_).tqarg(amount_)); emit captionChanged(caption()); KHE::BytesEditInterface* bytesEditor @@ -328,9 +328,9 @@ namespace GDBDebugger controller_->addCommand( new GDBCommand( TQString("set *(char*)(%1 + %2) = %3") - .arg(start_) - .arg(i) - .arg(TQString::number(data_[i])))); + .tqarg(start_) + .tqarg(i) + .tqarg(TQString::number(data_[i])))); } } @@ -374,7 +374,7 @@ namespace GDBDebugger new GDBCommand( TQString("-data-read-memory %1 x 1 1 %2") - .arg(start_).arg(amount_).ascii(), + .tqarg(start_).tqarg(amount_).ascii(), this, &MemoryView::memoryRead)); } @@ -403,9 +403,9 @@ namespace GDBDebugger ViewerWidget::ViewerWidget(GDBController* controller, - TQWidget* parent, + TQWidget* tqparent, const char* name) - : TQWidget(parent, name), + : TQWidget(tqparent, name), controller_(controller) { setIcon(SmallIcon("math_brace")); @@ -457,7 +457,7 @@ namespace GDBDebugger TQWidget* ncs = const_cast<TQWidget*>(s); TQString cap = caption; // Prevent intepreting '&' as accelerator specifier. - cap.replace("&", "&&"); + cap.tqreplace("&", "&&"); toolBox_->setItemLabel(toolBox_->indexOf(ncs), cap); } @@ -466,7 +466,7 @@ namespace GDBDebugger TQValueVector<MemoryView*>::iterator i, e; for(i = memoryViews_.begin(), e = memoryViews_.end(); i != e; ++i) { - if (*i == child) + if (TQT_BASE_OBJECT(*i) == TQT_BASE_OBJECT(child)) { memoryViews_.erase(i); break; diff --git a/languages/cpp/debugger/memviewdlg.h b/languages/cpp/debugger/memviewdlg.h index 4febe14a..991efbb3 100644 --- a/languages/cpp/debugger/memviewdlg.h +++ b/languages/cpp/debugger/memviewdlg.h @@ -31,12 +31,13 @@ namespace GDBDebugger class MemoryView; class GDBController; - class ViewerWidget : public QWidget + class ViewerWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: ViewerWidget(GDBController* controller, - TQWidget* parent, const char* name); + TQWidget* tqparent, const char* name); public slots: /** Adds a new memory view to *this, initially showing @@ -61,12 +62,13 @@ namespace GDBDebugger TQValueVector<MemoryView*> memoryViews_; }; - class MemoryView : public QWidget + class MemoryView : public TQWidget { Q_OBJECT + TQ_OBJECT public: MemoryView(GDBController* controller, - TQWidget* parent, const char* name = 0); + TQWidget* tqparent, const char* name = 0); void debuggerStateChanged(int state); diff --git a/languages/cpp/debugger/mi/gdbmi.h b/languages/cpp/debugger/mi/gdbmi.h index 64252ee5..03985958 100644 --- a/languages/cpp/debugger/mi/gdbmi.h +++ b/languages/cpp/debugger/mi/gdbmi.h @@ -189,7 +189,7 @@ namespace GDBMI struct Record { virtual ~Record() {} - virtual TQString toString() const { Q_ASSERT( 0 ); return TQString::null; } + virtual TQString toString() const { Q_ASSERT( 0 ); return TQString(); } enum { Prompt, Stream, Result } kind; }; diff --git a/languages/cpp/debugger/mi/milexer.cpp b/languages/cpp/debugger/mi/milexer.cpp index 7813d091..74b8eda9 100644 --- a/languages/cpp/debugger/mi/milexer.cpp +++ b/languages/cpp/debugger/mi/milexer.cpp @@ -275,7 +275,7 @@ void TokenStream::positionAt(int position, int *line, int *column) const len = half; } - *line = QMAX(first - 1, 0); + *line = TQMAX(first - 1, 0); *column = position - m_lines.at(*line); Q_ASSERT( *column >= 0 ); diff --git a/languages/cpp/debugger/stty.cpp b/languages/cpp/debugger/stty.cpp index ac3cd4e1..27bde0aa 100644 --- a/languages/cpp/debugger/stty.cpp +++ b/languages/cpp/debugger/stty.cpp @@ -105,7 +105,7 @@ static int chownpty(int fd, int grant) // { // signal from other child, behave like catchChild. // // guess this gives quite some control chaos... - // Shell* sh = shells.find(rc); + // Shell* sh = shells.tqfind(rc); // if (sh) { shells.remove(rc); sh->doneShell(w); } // goto retry; // } @@ -263,7 +263,7 @@ void STTY::OutReceived(int f) if (n == 0 /* eof */ || (n == -1 && errno != EAGAIN)) { - // Found eof or error. Disable socket notifier, otherwise Qt + // Found eof or error. Disable socket notifier, otherwise TQt // will repeatedly call this method, eating CPU // cycles. out->setEnabled(false); @@ -321,7 +321,7 @@ bool STTY::findExternalTTY(const TQString &termApp) const char* prog = appName.latin1(); TQString script = TQString("tty>") + TQString(fifo) + TQString(";" // fifo name - "trap \"\" INT QUIT TSTP;" // ignore various signals + "trap \"\" INT TQUIT TSTP;" // ignore various signals "exec<&-;exec>&-;" // close stdin and stdout "while :;do sleep 3600;done"); const char* scriptStr = script.latin1(); @@ -346,11 +346,11 @@ bool STTY::findExternalTTY(const TQString &termApp) ::exit(1); } - // parent process + // tqparent process if (pid <= 0) ::exit(1); - // Open the communication between us (the parent) and the + // Open the communication between us (the tqparent) and the // child (the process running on a tty console) fifo_fd = ::open(fifo, O_RDONLY); if (fifo_fd < 0) diff --git a/languages/cpp/debugger/stty.h b/languages/cpp/debugger/stty.h index 9cacf50f..5fd45cc6 100644 --- a/languages/cpp/debugger/stty.h +++ b/languages/cpp/debugger/stty.h @@ -33,9 +33,10 @@ class TQSocketNotifier; namespace GDBDebugger { -class STTY : public QObject +class STTY : public TQObject { Q_OBJECT + TQ_OBJECT public: STTY(bool ext=false, const TQString &termAppName=TQString()); diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop b/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop index 03faba9a..af025ba1 100644 --- a/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop @@ -9,7 +9,7 @@ <ignoreparts> <part>kdevsecurity</part> <part>kdevkonsoleview</part> - <part>kdevreplace</part> + <part>kdevtqreplace</part> <part>kdevctags2</part> <part>kdevvalgrind</part> </ignoreparts> diff --git a/languages/cpp/debugger/variablewidget.cpp b/languages/cpp/debugger/variablewidget.cpp index 163c2024..c5293c8c 100644 --- a/languages/cpp/debugger/variablewidget.cpp +++ b/languages/cpp/debugger/variablewidget.cpp @@ -47,14 +47,14 @@ /** The variables widget is passive, and is invoked by the rest of the code via two main slots: - - slotDbgStatus + - slotDbgtqStatus - slotCurrentFrame The first is received the program status changes and the second is recieved after current frame in the debugger can possibly changes. The widget has a list item for each frame/thread combination, with - variables as children. However, at each moment only one item is shown. + variables as tqchildren. However, at each moment only one item is shown. When handling the slotCurrentFrame, we check if variables for the current frame are available. If yes, we simply show the corresponding item. Otherwise, we fetch the new data from debugger. @@ -77,8 +77,8 @@ namespace GDBDebugger VariableWidget::VariableWidget(GDBController* controller, GDBBreakpointWidget* breakpointWidget, - TQWidget *parent, const char *name) -: TQWidget(parent, name) + TQWidget *tqparent, const char *name) +: TQWidget(tqparent, name) { setIcon(SmallIcon("math_brace")); setCaption(i18n("Variable Tree")); @@ -197,11 +197,11 @@ void VariableWidget::focusInEvent(TQFocusEvent */*e*/) // ************************************************************************** // ************************************************************************** -VariableTree::VariableTree(VariableWidget *parent, +VariableTree::VariableTree(VariableWidget *tqparent, GDBController* controller, GDBBreakpointWidget* breakpointWidget, const char *name) - : KListView(parent, name), + : KListView(tqparent, name), TQToolTip( viewport() ), controller_(controller), breakpointWidget_(breakpointWidget), @@ -244,7 +244,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) setSelected(item, true); // Need to select this item. - if (item->parent()) + if (item->tqparent()) { KPopupMenu popup(this); KPopupMenu format(this); @@ -271,19 +271,19 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) format.setCheckable(true); idNatural = format.insertItem(i18n("Natural"), (int)VarItem::natural); - format.setAccel(Qt::Key_N, idNatural); + format.setAccel(TQt::Key_N, idNatural); idHex = format.insertItem(i18n("Hexadecimal"), (int)VarItem::hexadecimal); - format.setAccel(Qt::Key_X, idHex); + format.setAccel(TQt::Key_X, idHex); idDecimal = format.insertItem(i18n("Decimal"), (int)VarItem::decimal); - format.setAccel(Qt::Key_D, idDecimal); + format.setAccel(TQt::Key_D, idDecimal); idCharacter = format.insertItem(i18n("Character"), (int)VarItem::character); - format.setAccel(Qt::Key_C, idCharacter); + format.setAccel(TQt::Key_C, idCharacter); idBinary = format.insertItem(i18n("Binary"), (int)VarItem::binary); - format.setAccel(Qt::Key_T, idBinary); + format.setAccel(TQt::Key_T, idBinary); format.setItemChecked((int)(var->format()), true); @@ -305,7 +305,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) if (dynamic_cast<WatchRoot*>(root)) { idRemove = popup.insertItem( SmallIcon("editdelete"), i18n("Remove Watch Variable") ); - popup.setAccel(Qt::Key_Delete, idRemove); + popup.setAccel(TQt::Key_Delete, idRemove); } else if (root != recentExpressions_) { idWatch = popup.insertItem( i18n("Watch Variable")); @@ -317,7 +317,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) MAYBE_DISABLE(idReevaluate); idRemove = popup.insertItem( SmallIcon("editdelete"), i18n("Remove Expression") ); - popup.setAccel(Qt::Key_Delete, idRemove); + popup.setAccel(TQt::Key_Delete, idRemove); } if (var) @@ -328,7 +328,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) int idCopyToClipboard = popup.insertItem( SmallIcon("editcopy"), i18n("Copy Value") ); - popup.setAccel(Qt::CTRL + Qt::Key_C, idCopyToClipboard); + popup.setAccel(TQt::CTRL + TQt::Key_C, idCopyToClipboard); activePopup_ = &popup; /* This code can be executed when debugger is stopped, @@ -338,7 +338,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) controller_->addCommand( new GDBCommand( TQString("-data-evaluate-expression &%1") - .arg(var->gdbExpression()), + .tqarg(var->gdbExpression()), this, &VariableTree::handleAddressComputed, true /*handles error*/)); @@ -360,7 +360,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) { if (VarItem *item = dynamic_cast<VarItem*>(currentItem())) { - ((VariableWidget*)parent())-> + ((VariableWidget*)tqparent())-> slotEvaluateExpression(item->gdbExpression()); } } @@ -368,7 +368,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) { if (VarItem *item = dynamic_cast<VarItem*>(currentItem())) { - ((VariableWidget*)parent())-> + ((VariableWidget*)tqparent())-> slotAddWatchVariable(item->gdbExpression()); } } @@ -505,8 +505,8 @@ void VariableTree::updateCurrentFrame() controller_->addCommand( new GDBCommand(TQString("-stack-list-arguments 0 %1 %2") - .arg(controller_->currentFrame()) - .arg(controller_->currentFrame()) + .tqarg(controller_->currentFrame()) + .tqarg(controller_->currentFrame()) .ascii(), this, &VariableTree::argumentsReady)); @@ -547,8 +547,8 @@ void VariableTree::slotEvaluateExpression(const TQString &expression) TQListViewItem *VariableTree::findRoot(TQListViewItem *item) const { - while (item->parent()) - item = item->parent(); + while (item->tqparent()) + item = item->tqparent(); return item; } @@ -607,7 +607,7 @@ void VariableTree::maybeTip(const TQPoint &p) VarItem * item = dynamic_cast<VarItem*>( itemAt( p ) ); if ( item ) { - TQRect r = itemRect( item ); + TQRect r = tqitemRect( item ); if ( r.isValid() ) tip( r, item->tipText() ); } @@ -711,7 +711,7 @@ void VariableTree::frameIdReady(const TQValueVector<TQString>& lines) frame_info += lines[i]; kdDebug(9012) << "frame info: " << frame_info << "\n"; - frame_info.replace('\n', ""); + frame_info.tqreplace('\n', ""); static TQRegExp frame_base_rx("frame at 0x([0-9a-fA-F]*)"); static TQRegExp frame_code_rx("saved [a-zA-Z0-9]* 0x([0-9a-fA-F]*)"); @@ -882,8 +882,8 @@ void VarItem::handleCliPrint(const TQValueVector<TQString>& lines) { controller_->addCommand( new GDBCommand(TQString("-var-create %1 * \"%2\"") - .arg(varobjName_) - .arg(r.cap(1)), + .tqarg(varobjName_) + .tqarg(r.cap(1)), this, &VarItem::varobjCreated, // On initial create, errors get reported @@ -968,7 +968,7 @@ void VariableTree::keyPressEvent(TQKeyEvent* e) item->formatFromGdbModifier(text[0].latin1())); } - if (e->key() == Qt::Key_Delete) + if (e->key() == TQt::Key_Delete) { TQListViewItem* root = findRoot(item); @@ -978,7 +978,7 @@ void VariableTree::keyPressEvent(TQKeyEvent* e) } } - if (e->key() == Qt::Key_C && e->state() == Qt::ControlButton) + if (e->key() == TQt::Key_C && e->state() == TQt::ControlButton) { copyToClipboard(item); } @@ -988,10 +988,10 @@ void VariableTree::keyPressEvent(TQKeyEvent* e) void VariableTree::copyToClipboard(TQListViewItem* item) { - QClipboard *qb = KApplication::clipboard(); + TQClipboard *qb = KApplication::tqclipboard(); TQString text = item->text( 1 ); - qb->setText( text, QClipboard::Clipboard ); + qb->setText( text, TQClipboard::Clipboard ); } void VariableTree::handleAddressComputed(const GDBMI::ResultRecord& r) @@ -1018,15 +1018,15 @@ void VariableTree::handleAddressComputed(const GDBMI::ResultRecord& r) // ************************************************************************** // ************************************************************************** -TrimmableItem::TrimmableItem(VariableTree *parent) - : KListViewItem (parent, parent->lastChild()) +TrimmableItem::TrimmableItem(VariableTree *tqparent) + : KListViewItem (tqparent, tqparent->lastChild()) { } // ************************************************************************** -TrimmableItem::TrimmableItem(TrimmableItem *parent) - : KListViewItem (parent, parent->lastChild()) +TrimmableItem::TrimmableItem(TrimmableItem *tqparent) + : KListViewItem (tqparent, tqparent->lastChild()) { } @@ -1044,7 +1044,7 @@ void TrimmableItem::paintCell(TQPainter *p, const TQColorGroup &cg, if ( !p ) return; // make toplevel item (watch and frame items) names bold - if (column == 0 && !parent()) + if (column == 0 && !tqparent()) { TQFont f = p->font(); f.setBold(true); @@ -1069,16 +1069,16 @@ TQListViewItem *TrimmableItem::lastChild() const int VarItem::varobjIndex = 0; -VarItem::VarItem(TrimmableItem *parent, +VarItem::VarItem(TrimmableItem *tqparent, const TQString& expression, bool frozen) - : TrimmableItem (parent), + : TrimmableItem (tqparent), expression_(expression), highlight_(false), oldSpecialRepresentationSet_(false), format_(natural), numChildren_(0), - childrenFetched_(false), + tqchildrenFetched_(false), updateUnconditionally_(false), frozen_(frozen), initialCreation_(true), @@ -1116,14 +1116,14 @@ VarItem::VarItem(TrimmableItem *parent, createVarobj(); } -VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, +VarItem::VarItem(TrimmableItem *tqparent, const GDBMI::Value& varobj, format_t format, bool baseClassMember) -: TrimmableItem (parent), +: TrimmableItem (tqparent), highlight_(false), oldSpecialRepresentationSet_(false), format_(format), numChildren_(0), - childrenFetched_(false), + tqchildrenFetched_(false), updateUnconditionally_(false), frozen_(false), initialCreation_(false), @@ -1146,7 +1146,7 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, controller_ = varTree()->controller(); - // Set type and children. + // Set type and tqchildren. originalValueType_ = varobj["type"].literal(); numChildren_ = varobj["numchild"].literal().toInt(); setExpandable(numChildren_ != 0); @@ -1159,7 +1159,7 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, void VarItem::createVarobj() { TQString old = varobjName_; - varobjName_ = TQString("KDEV%1").arg(varobjIndex++); + varobjName_ = TQString("KDEV%1").tqarg(varobjIndex++); emit varobjNameChange(old, varobjName_); if (frozen_) @@ -1169,7 +1169,7 @@ void VarItem::createVarobj() // variable and we create variable object from that. controller_->addCommand( new CliCommand( - TQString("print %1").arg(expression_), + TQString("print %1").tqarg(expression_), this, &VarItem::handleCliPrint)); } @@ -1177,7 +1177,7 @@ void VarItem::createVarobj() { controller_->addCommand( new CliCommand( - TQString("print /x &%1").arg(expression_), + TQString("print /x &%1").tqarg(expression_), this, &VarItem::handleCurrentAddress, true)); @@ -1186,8 +1186,8 @@ void VarItem::createVarobj() // Need to quote expression, otherwise gdb won't like // spaces inside it. new GDBCommand(TQString("-var-create %1 * \"%2\"") - .arg(varobjName_) - .arg(expression_), + .tqarg(varobjName_) + .tqarg(expression_), this, &VarItem::varobjCreated, initialCreation_ ? false : true)); @@ -1209,7 +1209,7 @@ void VarItem::varobjCreated(const GDBMI::ResultRecord& r) originalValueType_ = r["type"].literal(); if (!oldType.isEmpty() && oldType != originalValueType_) { - // Type changed, the children might be no longer valid, + // Type changed, the tqchildren might be no longer valid, // so delete them. for(TQListViewItem* child = firstChild(); child; ) { @@ -1239,7 +1239,7 @@ void VarItem::setVarobjName(const TQString& name) { controller_->addCommand( new GDBCommand(TQString("-var-set-format \"%1\" %2") - .arg(varobjName_).arg(varobjFormatName()))); + .tqarg(varobjName_).tqarg(varobjFormatName()))); } // Get the initial value. @@ -1247,7 +1247,7 @@ void VarItem::setVarobjName(const TQString& name) if (isOpen()) { - // This regets children list. + // This regets tqchildren list. setOpen(true); } } @@ -1333,18 +1333,18 @@ void VarItem::valueDone(const GDBMI::ResultRecord& r) } void VarItem::createChildren(const GDBMI::ResultRecord& r, - bool children_of_fake) + bool tqchildren_of_fake) { - const GDBMI::Value& children = r["children"]; + const GDBMI::Value& tqchildren = r["tqchildren"]; /* In order to figure out which variable objects correspond to base class subobject, we first must detect if *this is a structure type. We use present of 'public'/'private'/'protected' fake child as an indicator. */ bool structureType = false; - if (!children_of_fake && children.size() > 0) + if (!tqchildren_of_fake && tqchildren.size() > 0) { - TQString exp = children[0]["exp"].literal(); + TQString exp = tqchildren[0]["exp"].literal(); bool ok = false; exp.toInt(&ok); if (!ok || exp[0] != '*') @@ -1353,23 +1353,23 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, } } - for (unsigned i = 0; i < children.size(); ++i) + for (unsigned i = 0; i < tqchildren.size(); ++i) { - TQString exp = children[i]["exp"].literal(); + TQString exp = tqchildren[i]["exp"].literal(); // For artificial accessibility nodes, - // fetch their children. + // fetch their tqchildren. if (exp == "public" || exp == "protected" || exp == "private") { - TQString name = children[i]["name"].literal(); + TQString name = tqchildren[i]["name"].literal(); controller_->addCommand(new GDBCommand( - "-var-list-children \"" + + "-var-list-tqchildren \"" + name + "\"", this, - &VarItem::childrenOfFakesDone)); + &VarItem::tqchildrenOfFakesDone)); } else { - /* All children of structures that are not artifical + /* All tqchildren of structures that are not artifical are base subobjects. */ bool baseObject = structureType; @@ -1388,28 +1388,28 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, } if (existing) { - existing->setVarobjName(children[i]["name"].literal()); + existing->setVarobjName(tqchildren[i]["name"].literal()); } else { kdDebug(9012) << "Creating new varobj " << exp << " " << baseObject << "\n"; - // Propagate format from parent. + // Propagate format from tqparent. VarItem* v = 0; - v = new VarItem(this, children[i], format_, baseObject); + v = new VarItem(this, tqchildren[i], format_, baseObject); } } } } -void VarItem::childrenDone(const GDBMI::ResultRecord& r) +void VarItem::tqchildrenDone(const GDBMI::ResultRecord& r) { createChildren(r, false); - childrenFetched_ = true; + tqchildrenFetched_ = true; } -void VarItem::childrenOfFakesDone(const GDBMI::ResultRecord& r) +void VarItem::tqchildrenOfFakesDone(const GDBMI::ResultRecord& r) { createChildren(r, true); } @@ -1469,10 +1469,10 @@ TQString VarItem::displayName() const if (expression_[0] != '*') return expression_; - if (const VarItem* parent = - dynamic_cast<const VarItem*>(TrimmableItem::parent())) + if (const VarItem* tqparent = + dynamic_cast<const VarItem*>(TrimmableItem::tqparent())) { - return "*" + parent->displayName(); + return "*" + tqparent->displayName(); } else { @@ -1504,24 +1504,24 @@ TQString VarItem::gdbExpression() const // - number, for array element // - identifier, for member, // - ***intentifier, for derefenreced pointer. - const VarItem* parent = dynamic_cast<const VarItem*>(TrimmableItem::parent()); + const VarItem* tqparent = dynamic_cast<const VarItem*>(TrimmableItem::tqparent()); bool ok = false; expression_.toInt(&ok); if (ok) { - // Array, parent always exists. - return parent->gdbExpression() + "[" + expression_ + "]"; + // Array, tqparent always exists. + return tqparent->gdbExpression() + "[" + expression_ + "]"; } else if (expression_[0] == '*') { - if (parent) + if (tqparent) { // For MI, expression_ can be "*0" (meaing // references 0-th element of some array). - // So, we really need to get to the parent to computed the right + // So, we really need to get to the tqparent to computed the right // gdb expression. - return "*" + parent->gdbExpression(); + return "*" + tqparent->gdbExpression(); } else { @@ -1532,14 +1532,14 @@ TQString VarItem::gdbExpression() const } else { - if (parent) + if (tqparent) /* This is varitem corresponds to a base suboject, - the expression should cast parent to the base's + the expression should cast tqparent to the base's type. */ if (baseClassMember_) - return "((" + expression_ + ")" + parent->gdbExpression() + ")"; + return "((" + expression_ + ")" + tqparent->gdbExpression() + ")"; else - return parent->gdbExpression() + "." + expression_; + return tqparent->gdbExpression() + "." + expression_; else return expression_; } @@ -1603,8 +1603,8 @@ void VarItem::updateValue() void VarItem::setValue(const TQString& new_value) { controller_->addCommand( - new GDBCommand(TQString("-var-assign \"%1\" %2").arg(varobjName_) - .arg(new_value))); + new GDBCommand(TQString("-var-assign \"%1\" %2").tqarg(varobjName_) + .tqarg(new_value))); // And immediately reload it from gdb, // so that it's display format is the one gdb uses, @@ -1619,12 +1619,12 @@ void VarItem::updateSpecialRepresentation(const TQString& xs) TQString s(xs); if (s[0] == '$') { - int i = s.find('='); + int i = s.tqfind('='); if (i != -1) s = s.mid(i+2); } - // A hack to nicely display QStrings. The content of TQString is unicode + // A hack to nicely display TQStrings. The content of TQString is tqunicode // for for ASCII only strings we get ascii character mixed with \000. // Remove those \000 now. @@ -1638,7 +1638,7 @@ void VarItem::updateSpecialRepresentation(const TQString& xs) // one TQChar from two characters from gdb. But to do that, we *should* // now if the data if generic gdb value, and result of request for string // data. Fixing is is for later. - s.replace( TQRegExp("\\\\000|\\\\0"), "" ); + s.tqreplace( TQRegExp("\\\\000|\\\\0"), "" ); // FIXME: for now, assume that all special representations are // just strings. @@ -1661,14 +1661,14 @@ void VarItem::recreateLocallyMaybe() { controller_->addCommand( new CliCommand( - TQString("print /x &%1").arg(expression_), + TQString("print /x &%1").tqarg(expression_), this, &VarItem::handleCurrentAddress, true)); controller_->addCommand( new CliCommand( - TQString("whatis %1").arg(expression_), + TQString("whatis %1").tqarg(expression_), this, &VarItem::handleType)); } @@ -1688,12 +1688,12 @@ void VarItem::setOpen(bool open) { TQListViewItem::setOpen(open); - if (open && !childrenFetched_) + if (open && !tqchildrenFetched_) { controller_->addCommand(new GDBCommand( - "-var-list-children \"" + varobjName_ + "\"", + "-var-list-tqchildren \"" + varobjName_ + "\"", this, - &VarItem::childrenDone)); + &VarItem::tqchildrenDone)); } } @@ -1703,7 +1703,7 @@ bool VarItem::handleSpecialTypes() if (originalValueType_.isEmpty()) return false; - static TQRegExp qstring("^(const)?[ ]*QString[ ]*&?$"); + static TQRegExp qstring("^(const)?[ ]*TQString[ ]*&?$"); if (qstring.exactMatch(originalValueType_)) { @@ -1712,7 +1712,7 @@ bool VarItem::handleSpecialTypes() return false; varTree->controller()->addCommand( new ResultlessCommand(TQString("print $kdev_d=%1.d") - .arg(gdbExpression()), + .tqarg(gdbExpression()), true /* ignore error */)); if (varTree->controller()->qtVersion() >= 4) @@ -1736,7 +1736,7 @@ bool VarItem::handleSpecialTypes() else varTree->controller()->addCommand( new ValueSpecialRepresentationCommand( - this, "print ($kdev_s>0) ? (*((char*)&$kdev_d.unicode[0])@$kdev_s) : \"\"")); + this, "print ($kdev_s>0) ? (*((char*)&$kdev_d.tqunicode[0])@$kdev_s) : \"\"")); return true; } @@ -1760,7 +1760,7 @@ void VarItem::setFormat(format_t f) if (numChildren_) { - // If variable has children, change format for children. + // If variable has tqchildren, change format for tqchildren. // - for structures, that's clearly right // - for arrays, that's clearly right // - for pointers, this can be confusing, but nobody ever wants to @@ -1775,7 +1775,7 @@ void VarItem::setFormat(format_t f) { controller_->addCommand( new GDBCommand(TQString("-var-set-format \"%1\" %2") - .arg(varobjName_).arg(varobjFormatName()))); + .tqarg(varobjName_).tqarg(varobjFormatName()))); updateValue(); } @@ -1853,7 +1853,7 @@ void VarItem::paintCell(TQPainter *p, const TQColorGroup &cg, if (!alive_) { /* Draw this as disabled. */ - TQListViewItem::paintCell(p, varTree()->TQWidget::palette().disabled(), + TQListViewItem::paintCell(p, varTree()->TQWidget::tqpalette().disabled(), column, width, align); } else @@ -1876,8 +1876,8 @@ VariableTree* VarItem::varTree() const void VarItem::unhookFromGdb() { - // Unhook children first, so that child varitems are deleted - // before parent. Strictly speaking, we can avoid calling + // Unhook tqchildren first, so that child varitems are deleted + // before tqparent. Strictly speaking, we can avoid calling // -var-delete on child varitems, but that's a bit cheesy, for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) @@ -1886,7 +1886,7 @@ void VarItem::unhookFromGdb() } alive_ = false; - childrenFetched_ = false; + tqchildrenFetched_ = false; emit varobjNameChange(varobjName_, ""); @@ -1894,7 +1894,7 @@ void VarItem::unhookFromGdb() { controller_->addCommand( new GDBCommand( - TQString("-var-delete \"%1\"").arg(varobjName_))); + TQString("-var-delete \"%1\"").tqarg(varobjName_))); } varobjName_ = ""; @@ -1931,8 +1931,8 @@ bool VarItem::isAlive() const // ************************************************************************** // ************************************************************************** -VarFrameRoot::VarFrameRoot(VariableTree *parent, int frameNo, int threadNo) - : TrimmableItem (parent), +VarFrameRoot::VarFrameRoot(VariableTree *tqparent, int frameNo, int threadNo) + : TrimmableItem (tqparent), needLocals_(false), frameNo_(frameNo), threadNo_(threadNo), @@ -1956,8 +1956,8 @@ void VarFrameRoot::setOpen(bool open) if (frameOpened && needLocals_) { needLocals_ = false; - VariableTree* parent = static_cast<VariableTree*>(listView()); - parent->updateCurrentFrame(); + VariableTree* tqparent = static_cast<VariableTree*>(listView()); + tqparent->updateCurrentFrame(); } } @@ -1978,8 +1978,8 @@ void VarFrameRoot::setDirty() // ************************************************************************** // ************************************************************************** -WatchRoot::WatchRoot(VariableTree *parent) - : TrimmableItem(parent) +WatchRoot::WatchRoot(VariableTree *tqparent) + : TrimmableItem(tqparent) { setText(0, i18n("Watch")); setOpen(true); diff --git a/languages/cpp/debugger/variablewidget.h b/languages/cpp/debugger/variablewidget.h index 5c77ea43..d56e8977 100644 --- a/languages/cpp/debugger/variablewidget.h +++ b/languages/cpp/debugger/variablewidget.h @@ -46,17 +46,18 @@ class GDBBreakpointWidget; enum { VarNameCol = 0, ValueCol = 1, VarTypeCol = 2}; enum DataType { typeUnknown, typeValue, typePointer, typeReference, - typeStruct, typeArray, typeQString, typeWhitespace, + typeStruct, typeArray, typeTQString, typeWhitespace, typeName }; -class VariableWidget : public QWidget +class VariableWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: VariableWidget( GDBController* controller, GDBBreakpointWidget* breakpointWidget, - TQWidget *parent=0, const char *name=0 ); + TQWidget *tqparent=0, const char *name=0 ); VariableTree *varTree() const { return varTree_; } @@ -82,11 +83,12 @@ private: /***************************************************************************/ /***************************************************************************/ -class VariableTree : public KListView, public QToolTip +class VariableTree : public KListView, public TQToolTip { Q_OBJECT + TQ_OBJECT public: - VariableTree(VariableWidget *parent, + VariableTree(VariableWidget *tqparent, GDBController* controller, GDBBreakpointWidget* breakpointWidget, const char *name=0 ); @@ -184,16 +186,16 @@ private: /***************************************************************************/ /***************************************************************************/ -/** List view item that can 'trim' outdated children. +/** List view item that can 'trim' outdated tqchildren. - The instances of this class hold a number of children corresponding + The instances of this class hold a number of tqchildren corresponding to variables. When program state changes, such as after a step in source, some variable values can change, and some variables can go out of scope. We need - highlight modified variables - remove gone variables - We could just remove all children and repopulate the list from + We could just remove all tqchildren and repopulate the list from the data from debugger, but then we'd loose information about previous variable values. @@ -205,8 +207,8 @@ private: class TrimmableItem : public KListViewItem { public: - TrimmableItem(VariableTree *parent); - TrimmableItem(TrimmableItem *parent); + TrimmableItem(VariableTree *tqparent); + TrimmableItem(TrimmableItem *tqparent); virtual ~TrimmableItem(); @@ -226,17 +228,18 @@ class VarItem : public TQObject, public TrimmableItem { Q_OBJECT + TQ_OBJECT public: enum format_t { natural, hexadecimal, decimal, character, binary }; /** Creates top-level variable item from the specified expression. Optionally, alternative display name can be provided. */ - VarItem( TrimmableItem *parent, + VarItem( TrimmableItem *tqparent, const TQString& expression, bool frozen = false); - VarItem( TrimmableItem *parent, const GDBMI::Value& varobj, + VarItem( TrimmableItem *tqparent, const GDBMI::Value& varobj, format_t format, bool baseClassMember); virtual ~VarItem(); @@ -283,7 +286,7 @@ public: /** Recursively clears the varobjName_ field, making *this completely disconnected from gdb. - Automatically makes *this and children disables, + Automatically makes *this and tqchildren disables, since there's no possible interaction with unhooked object. */ @@ -297,7 +300,7 @@ public: format_t formatFromGdbModifier(char c) const; /** Clears highliting for this variable and - all its children. */ + all its tqchildren. */ void clearHighlight(); /** Sets new top-level textual value of this variable. @@ -330,7 +333,7 @@ private: - sets varobjName_ to 'name' - sets format, if it's not default one - gets initial value - - if item is open, gets children. + - if item is open, gets tqchildren. */ void setVarobjName(const TQString& name); @@ -345,12 +348,12 @@ private: int column, int width, int align ); void varobjCreated(const GDBMI::ResultRecord& r); void valueDone(const GDBMI::ResultRecord& r); - void childrenDone(const GDBMI::ResultRecord& r); - void childrenOfFakesDone(const GDBMI::ResultRecord& r); + void tqchildrenDone(const GDBMI::ResultRecord& r); + void tqchildrenOfFakesDone(const GDBMI::ResultRecord& r); void handleCurrentAddress(const TQValueVector<TQString>& lines); void handleType(const TQValueVector<TQString>& lines); - void createChildren(const GDBMI::ResultRecord& r, bool children_of_fake); + void createChildren(const GDBMI::ResultRecord& r, bool tqchildren_of_fake); /** Called to handle the output of the cli print command. */ @@ -370,7 +373,7 @@ private: private: // The gdb expression for this varItem relatively to - // parent VarItem. + // tqparent VarItem. TQString expression_; bool highlight_; @@ -388,7 +391,7 @@ private: static int varobjIndex; int numChildren_; - bool childrenFetched_; + bool tqchildrenFetched_; TQString currentAddress_; TQString lastObtainedAddress_; @@ -415,7 +418,7 @@ private: class VarFrameRoot : public TrimmableItem { public: - VarFrameRoot(VariableTree *parent, int frameNo, int threadNo); + VarFrameRoot(VariableTree *tqparent, int frameNo, int threadNo); virtual ~VarFrameRoot(); void setOpen(bool open); @@ -453,7 +456,7 @@ private: class WatchRoot : public TrimmableItem { public: - WatchRoot(VariableTree *parent); + WatchRoot(VariableTree *tqparent); virtual ~WatchRoot(); }; |