diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/debugger | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/debugger')
46 files changed, 1338 insertions, 1338 deletions
diff --git a/languages/cpp/debugger/breakpoint.cpp b/languages/cpp/debugger/breakpoint.cpp index 7bcf674f..c9ed193e 100644 --- a/languages/cpp/debugger/breakpoint.cpp +++ b/languages/cpp/debugger/breakpoint.cpp @@ -20,11 +20,11 @@ #include <klocale.h> #include <kdebug.h> -#include <qfileinfo.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqfileinfo.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqregexp.h> +#include <tqstring.h> #include <stdio.h> #include <typeinfo> @@ -174,18 +174,18 @@ void Breakpoint::modifyBreakpoint(GDBController* controller) { controller-> addCommandBeforeRun( - new ModifyBreakpointCommand(QString("-break-condition %1 ") + + new ModifyBreakpointCommand(TQString("-break-condition %1 ") + conditional(), this)); controller-> addCommandBeforeRun( - new ModifyBreakpointCommand(QString("-break-after %1 ") + - QString::number(ignoreCount()), this)); + new ModifyBreakpointCommand(TQString("-break-after %1 ") + + TQString::number(ignoreCount()), this)); controller-> addCommandBeforeRun( new ModifyBreakpointCommand(isEnabled() ? - QString("-break-enable %1") - : QString("-break-disable %1"), this)); + TQString("-break-enable %1") + : TQString("-break-disable %1"), this)); } void Breakpoint::removedInGdb() @@ -210,12 +210,12 @@ bool Breakpoint::match(const Breakpoint* breakpoint) const /***************************************************************************/ -QString Breakpoint::dbgRemoveCommand() const +TQString Breakpoint::dbgRemoveCommand() const { if (dbgId_>0) - return QString("-break-delete %1").arg(dbgId_); // gdb command - not translatable + return TQString("-break-delete %1").arg(dbgId_); // gdb command - not translatable - return QString(); + return TQString(); } @@ -258,9 +258,9 @@ void Breakpoint::setActive(int active, int id) /***************************************************************************/ -QString Breakpoint::statusDisplay(int activeFlag) const +TQString Breakpoint::statusDisplay(int activeFlag) const { - QString status=""; + TQString status=""; if (!s_enabled_) status = i18n("Disabled"); else @@ -280,9 +280,9 @@ QString Breakpoint::statusDisplay(int activeFlag) const return status; } -QString Breakpoint::traceRealFormatString() const +TQString Breakpoint::traceRealFormatString() const { - QString result; + TQString result; if (traceFormatStringEnabled()) { @@ -298,9 +298,9 @@ QString Breakpoint::traceRealFormatString() const } else { - result += " " + QString::number(key()) + ": "; + result += " " + TQString::number(key()) + ": "; } - for(QStringList::const_iterator i = tracedExpressions_.begin(), + for(TQStringList::const_iterator i = tracedExpressions_.begin(), e = tracedExpressions_.end(); i != e; ++i) { result += " " + *i + " = %d"; @@ -310,7 +310,7 @@ QString Breakpoint::traceRealFormatString() const // Quote the thing result = "\"" + result + "\\n\""; - for(QStringList::const_iterator i = tracedExpressions_.begin(), + for(TQStringList::const_iterator i = tracedExpressions_.begin(), e = tracedExpressions_.end(); i != e; ++i) { result += ", " + *i; @@ -381,21 +381,21 @@ FilePosBreakpoint::FilePosBreakpoint() line_(-1) {} -FilePosBreakpoint::FilePosBreakpoint(const QString &fileName, int lineNum, +FilePosBreakpoint::FilePosBreakpoint(const TQString &fileName, int lineNum, bool temporary, bool enabled) : Breakpoint(temporary, enabled) { // Sets 'subtype' - setLocation(QString("%1:%2").arg(fileName).arg(lineNum)); + setLocation(TQString("%1:%2").arg(fileName).arg(lineNum)); } FilePosBreakpoint::~FilePosBreakpoint() { } -QString FilePosBreakpoint::dbgSetCommand(GDBController *c) const +TQString FilePosBreakpoint::dbgSetCommand(GDBController *c) const { - QString cmdStr = "-break-insert"; + TQString cmdStr = "-break-insert"; if (isTemporary()) cmdStr = cmdStr + " -t"; @@ -416,7 +416,7 @@ bool FilePosBreakpoint::match_data(const Breakpoint *xb) const return false; } -QString FilePosBreakpoint::displayType() const +TQString FilePosBreakpoint::displayType() const { return i18n("Code breakpoint", "Code"); } @@ -431,7 +431,7 @@ bool FilePosBreakpoint::hasFileAndLine() const return line_ != -1; } -QString FilePosBreakpoint::fileName() const +TQString FilePosBreakpoint::fileName() const { return fileName_; } @@ -443,11 +443,11 @@ unsigned FilePosBreakpoint::lineNum() const -QString FilePosBreakpoint::location(bool compact) const +TQString FilePosBreakpoint::location(bool compact) const { if (subtype_ == filepos && hasFileAndLine() && compact) { - return QFileInfo(fileName_).fileName()+":"+QString::number(line_); + return TQFileInfo(fileName_).fileName()+":"+TQString::number(line_); } else { @@ -457,21 +457,21 @@ QString FilePosBreakpoint::location(bool compact) const /***************************************************************************/ -void FilePosBreakpoint::setLocation(const QString& location) +void FilePosBreakpoint::setLocation(const TQString& location) { location_ = location; - QRegExp regExp1("(.*):(\\d+)$"); + TQRegExp regExp1("(.*):(\\d+)$"); regExp1.setMinimal(true); if ( regExp1.search(location, 0) >= 0 ) { subtype_ = filepos; - QString t = regExp1.cap(1); - QString dirPath = QFileInfo(t).dirPath(); + TQString t = regExp1.cap(1); + TQString dirPath = TQFileInfo(t).dirPath(); if ( dirPath == "." ) { - QString existingDirPath = QFileInfo(fileName_).dirPath(); + TQString existingDirPath = TQFileInfo(fileName_).dirPath(); if (existingDirPath != ".") fileName_ = existingDirPath+"/"+regExp1.cap(1); else @@ -482,7 +482,7 @@ void FilePosBreakpoint::setLocation(const QString& location) line_ = regExp1.cap(2).toInt(); - location_ = QString("%1:%2").arg(fileName_).arg(regExp1.cap(2)); + location_ = TQString("%1:%2").arg(fileName_).arg(regExp1.cap(2)); } else { @@ -516,7 +516,7 @@ void FilePosBreakpoint::handleSet(const GDBMI::ResultRecord& r) /***************************************************************************/ /***************************************************************************/ -Watchpoint::Watchpoint(const QString& varName, bool temporary, bool enabled) +Watchpoint::Watchpoint(const TQString& varName, bool temporary, bool enabled) : Breakpoint(temporary, enabled), varName_(varName) { @@ -536,7 +536,7 @@ void Watchpoint::setBreakpoint(GDBController* controller) controller->addCommandBeforeRun( new GDBCommand( - QString("-data-evaluate-expression &%1").arg(varName_), + TQString("-data-evaluate-expression &%1").arg(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( - QString("-break-watch *%1").arg(r["value"].literal()), + TQString("-break-watch *%1").arg(r["value"].literal()), static_cast<Breakpoint*>(this), &Watchpoint::handleSet)); } @@ -577,9 +577,9 @@ void Watchpoint::removedInGdb() /***************************************************************************/ -QString Watchpoint::dbgSetCommand(GDBController *) const +TQString Watchpoint::dbgSetCommand(GDBController *) const { - return QString("-break-watch ")+varName_; // gdb command - not translatable + return TQString("-break-watch ")+varName_; // gdb command - not translatable } /***************************************************************************/ @@ -591,14 +591,14 @@ bool Watchpoint::match_data(const Breakpoint* xb) const return (varName_ == b->varName_); } -ReadWatchpoint::ReadWatchpoint(const QString& varName, bool temporary, bool enabled) +ReadWatchpoint::ReadWatchpoint(const TQString& varName, bool temporary, bool enabled) : Watchpoint(varName, temporary, enabled) { } -QString ReadWatchpoint::dbgSetCommand(GDBController *) const +TQString ReadWatchpoint::dbgSetCommand(GDBController *) const { - return QString("-break-watch -r ")+varName(); + return TQString("-break-watch -r ")+varName(); } bool ReadWatchpoint::match_data(const Breakpoint* xb) const @@ -625,7 +625,7 @@ bool ReadWatchpoint::match_data(const Breakpoint* xb) const // ///***************************************************************************/ // -//QString ExitBreakpoint::dbgSetCommand() const +//TQString ExitBreakpoint::dbgSetCommand() const //{ // return ""; //} @@ -667,14 +667,14 @@ bool ReadWatchpoint::match_data(const Breakpoint* xb) const // ///***************************************************************************/ // -//QString RegExpBreakpoint::dbgSetCommand() const +//TQString RegExpBreakpoint::dbgSetCommand() const //{ // return ""; //} // ///***************************************************************************/ // -////QString RegExpBreakpoint::dbgRemoveCommand() const +////TQString RegExpBreakpoint::dbgRemoveCommand() const ////{ //// return ""; ////} @@ -698,14 +698,14 @@ bool ReadWatchpoint::match_data(const Breakpoint* xb) const // ///***************************************************************************/ // -//QString CatchBreakpoint::dbgSetCommand() const +//TQString CatchBreakpoint::dbgSetCommand() const //{ // return ""; //} // ///***************************************************************************/ // -////QString CatchBreakpoint::dbgRemoveCommand() const +////TQString CatchBreakpoint::dbgRemoveCommand() const ////{ //// return ""; ////} diff --git a/languages/cpp/debugger/breakpoint.h b/languages/cpp/debugger/breakpoint.h index f06fc3d3..8470617c 100644 --- a/languages/cpp/debugger/breakpoint.h +++ b/languages/cpp/debugger/breakpoint.h @@ -18,9 +18,9 @@ #include <klocale.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> /***************************************************************************/ /***************************************************************************/ @@ -60,8 +60,8 @@ public: - virtual QString dbgSetCommand(GDBController *) const = 0; - virtual QString dbgRemoveCommand() const; + virtual TQString dbgSetCommand(GDBController *) const = 0; + virtual TQString dbgRemoveCommand() const; /** Returns true if 'breakpoint' is identical to *this. Checks for trival cases like pointer equality and differing typeid() and then calls virtual @@ -95,11 +95,11 @@ public: void setIgnoreCount(int ignoreCount) { ignoreCount_ = ignoreCount; } int ignoreCount() const { return ignoreCount_; } - void setAddress(const QString &address) { address_ = address; } - QString address() const { return address_; } + void setAddress(const TQString &address) { address_ = address; } + TQString address() const { return address_; } - void setConditional(const QString &condition) { condition_ = condition; } - QString conditional() const { return condition_; } + void setConditional(const TQString &condition) { condition_ = condition; } + TQString conditional() const { return condition_; } void setPending(bool pending) { s_pending_ = pending; } bool isPending() const { return s_pending_; } @@ -127,27 +127,27 @@ public: void setHits(int hits) { hits_ = hits; } int hits() const { return hits_; } - virtual QString statusDisplay(int activeFlag) const; + virtual TQString statusDisplay(int activeFlag) const; virtual BP_TYPES type() const { return BP_TYPE_Invalid; } - virtual QString displayType() const { return i18n( "Invalid" ); } + virtual TQString displayType() const { return i18n( "Invalid" ); } bool tracingEnabled() const { return s_tracingEnabled_; } void setTracingEnabled(bool enable) { s_tracingEnabled_ = enable; } - const QStringList& tracedExpressions() const { return tracedExpressions_; } - void setTracedExpressions(const QStringList& l) { tracedExpressions_ = l; } + const TQStringList& tracedExpressions() const { return tracedExpressions_; } + void setTracedExpressions(const TQStringList& l) { tracedExpressions_ = l; } bool traceFormatStringEnabled() const { return s_traceFormatStringEnabled_; } void setTraceFormatStringEnabled(bool en) { s_traceFormatStringEnabled_ = en; } - const QString& traceFormatString() const { return traceFormatString_; } - void setTraceFormatString(const QString& s) { traceFormatString_ = s; } + const TQString& traceFormatString() const { return traceFormatString_; } + void setTraceFormatString(const TQString& s) { traceFormatString_ = s; } - QString traceRealFormatString() const; + TQString traceRealFormatString() const; - virtual QString location(bool compact=true) const = 0; - virtual void setLocation(const QString& ) = 0; + virtual TQString location(bool compact=true) const = 0; + virtual void setLocation(const TQString& ) = 0; virtual bool isValid() const = 0; signals: @@ -187,10 +187,10 @@ private: int active_; // counter incremented on receipt of all BP's int ignoreCount_; - QString address_; - QString condition_; - QStringList tracedExpressions_; - QString traceFormatString_; + TQString address_; + TQString condition_; + TQStringList tracedExpressions_; + TQString traceFormatString_; GDBController* controller_; }; @@ -203,20 +203,20 @@ class FilePosBreakpoint : public Breakpoint public: FilePosBreakpoint(); - FilePosBreakpoint(const QString &fileName, int lineNum, + FilePosBreakpoint(const TQString &fileName, int lineNum, bool temporary=false, bool enabled=true); virtual ~FilePosBreakpoint(); - virtual QString dbgSetCommand(GDBController *) const; + virtual TQString dbgSetCommand(GDBController *) const; virtual bool match_data(const Breakpoint *brkpt) const; BP_TYPES type () const { return BP_TYPE_FilePos; } - QString displayType() const; - QString location(bool compact=true) const; - void setLocation(const QString& location); + TQString displayType() const; + TQString location(bool compact=true) const; + void setLocation(const TQString& location); bool isValid() const; bool hasFileAndLine() const; - QString fileName() const; + TQString fileName() const; unsigned lineNum() const; protected: @@ -228,8 +228,8 @@ private: enum subtype { filepos = 1, function, address }; subtype subtype_; - QString location_; - QString fileName_; + TQString location_; + TQString fileName_; int line_; }; /***************************************************************************/ @@ -240,7 +240,7 @@ private: //public: // RegExpBreakpoint(bool temporary=false, bool enabled=true); // virtual ~RegExpBreakpoint(); -// virtual QString dbgSetCommand() const; +// virtual TQString dbgSetCommand() const; //}; /***************************************************************************/ /***************************************************************************/ @@ -250,7 +250,7 @@ private: //public: // CatchBreakpoint(bool temporary=false, bool enabled=true); // virtual ~CatchBreakpoint(); -// virtual QString dbgSetCommand() const; +// virtual TQString dbgSetCommand() const; // virtual CatchBreakpoint& operator=(const CatchBreakpoint& rhs); //}; /***************************************************************************/ @@ -261,7 +261,7 @@ private: //public: // ExitBreakpoint(bool temporary=false, bool enabled=true); // virtual ~ExitBreakpoint(); -// virtual QString dbgSetCommand() const; +// virtual TQString dbgSetCommand() const; // bool match(const Breakpoint* brkpt) const; // virtual void configureDisplay(); //}; @@ -271,9 +271,9 @@ private: class Watchpoint : public Breakpoint { public: - Watchpoint(const QString &varName, bool temporary=false, bool enabled=true); + Watchpoint(const TQString &varName, bool temporary=false, bool enabled=true); virtual ~Watchpoint(); - virtual QString dbgSetCommand(GDBController *) const; + virtual TQString dbgSetCommand(GDBController *) const; void applicationExited(GDBController*); void removedInGdb(); @@ -281,31 +281,31 @@ public: bool match_data(const Breakpoint *brkpt) const; BP_TYPES type () const { return BP_TYPE_Watchpoint; } - QString displayType() const { return i18n("Watchpoint"); } - void setVarName(const QString& varName) { varName_ = varName; } - QString varName() const { return varName_; } + TQString displayType() const { return i18n("Watchpoint"); } + void setVarName(const TQString& varName) { varName_ = varName; } + TQString varName() const { return varName_; } unsigned long long address() const { return address_; } - QString location(bool) const { return varName_; } - void setLocation(const QString& location) { varName_ = location; } + TQString location(bool) const { return varName_; } + void setLocation(const TQString& location) { varName_ = location; } bool isValid() const { return !varName_.isEmpty(); } private: void setBreakpoint(GDBController* controller); void handleAddressComputed(const GDBMI::ResultRecord&); - QString varName_; + TQString varName_; unsigned long long address_; }; class ReadWatchpoint : public Watchpoint { public: - ReadWatchpoint(const QString &varName, bool temporary=false, bool enabled=true); - virtual QString dbgSetCommand(GDBController *) const; + ReadWatchpoint(const TQString &varName, bool temporary=false, bool enabled=true); + virtual TQString dbgSetCommand(GDBController *) const; bool match_data(const Breakpoint *brkpt) const; BP_TYPES type () const { return BP_TYPE_ReadWatchpoint; } - QString displayType() const { return i18n("Read Watchpoint"); } + TQString displayType() const { return i18n("Read Watchpoint"); } }; } diff --git a/languages/cpp/debugger/dbgcontroller.h b/languages/cpp/debugger/dbgcontroller.h index 8d13f2d0..5085da79 100644 --- a/languages/cpp/debugger/dbgcontroller.h +++ b/languages/cpp/debugger/dbgcontroller.h @@ -18,7 +18,7 @@ #include "mi/gdbmi.h" -#include <qobject.h> +#include <tqobject.h> #include <domutil.h> @@ -79,7 +79,7 @@ public: public slots: virtual void configure() = 0; - virtual void slotCoreFile(const QString &coreFile) = 0; + virtual void slotCoreFile(const TQString &coreFile) = 0; virtual void slotAttachTo(int pid) = 0; virtual void slotStopDebugger() = 0; @@ -87,8 +87,8 @@ public slots: virtual void slotRun() = 0; // Kills the application but does not stop the debugger itself. virtual void slotKill() = 0; - virtual void slotRunUntil(const QString &fileName, int lineNum) = 0; - virtual void slotJumpTo(const QString &fileName, int lineNum) = 0; + virtual void slotRunUntil(const TQString &fileName, int lineNum) = 0; + virtual void slotJumpTo(const TQString &fileName, int lineNum) = 0; virtual void slotStepInto() = 0; virtual void slotStepOver() = 0; virtual void slotStepIntoIns() = 0; @@ -107,7 +107,7 @@ protected slots: virtual void slotDbgProcessExited(KProcess *proc) = 0; signals: - void gotoSourcePosition (const QString &fileName, int lineNum); + void gotoSourcePosition (const TQString &fileName, int lineNum); void rawGDBMemoryDump (char *buf); void rawGDBRegisters (char *buf); void rawGDBLibraries (char *buf); @@ -116,8 +116,8 @@ signals: void gdbInternalCommandStdout (const char *output); void gdbUserCommandStdout (const char *output); void gdbStderr (const char *output); - void showStepInSource (const QString &fileName, int lineNum, const QString &address); - void dbgStatus (const QString &status, int statusFlag); + void showStepInSource (const TQString &fileName, int lineNum, const TQString &address); + void dbgStatus (const TQString &status, int statusFlag); protected: KProcess *dbgProcess_; diff --git a/languages/cpp/debugger/dbgpsdlg.cpp b/languages/cpp/debugger/dbgpsdlg.cpp index 524e4539..e96d7395 100644 --- a/languages/cpp/debugger/dbgpsdlg.cpp +++ b/languages/cpp/debugger/dbgpsdlg.cpp @@ -26,15 +26,15 @@ #include <klistviewsearchline.h> #include <kmessagebox.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> -#include <qtoolbutton.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqtoolbutton.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqheader.h> +#include <tqtimer.h> #include <unistd.h> #include <sys/types.h> @@ -50,11 +50,11 @@ 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(QWidget *parent, const char *name) +Dbg_PS_Dialog::Dbg_PS_Dialog(TQWidget *parent, const char *name) : KDialog(parent, name, true), // modal psProc_(0), pids_(new KListView(this)), - pidLines_(QString()) + pidLines_(TQString()) { setCaption(i18n("Attach to Process")); @@ -65,7 +65,7 @@ Dbg_PS_Dialog::Dbg_PS_Dialog(QWidget *parent, const char *name) pids_->addColumn("COMMAND"); - QBoxLayout *topLayout = new QVBoxLayout(this, 5); + TQBoxLayout *topLayout = new TQVBoxLayout(this, 5); searchLineWidget_ = new KListViewSearchLineWidget(pids_, this); topLayout->addWidget(searchLineWidget_); @@ -75,19 +75,19 @@ Dbg_PS_Dialog::Dbg_PS_Dialog(QWidget *parent, const char *name) KButtonBox *buttonbox = new KButtonBox(this, Qt::Horizontal); buttonbox->addStretch(); - QPushButton *ok = buttonbox->addButton(KStdGuiItem::ok()); - QPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel()); + TQPushButton *ok = buttonbox->addButton(KStdGuiItem::ok()); + TQPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel()); buttonbox->layout(); topLayout->addWidget(buttonbox); - connect(ok, SIGNAL(clicked()), SLOT(accept())); - connect(cancel, SIGNAL(clicked()), SLOT(reject())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); // Default display to 40 chars wide, default height is okay resize( ((KGlobalSettings::fixedFont()).pointSize())*40, height()); topLayout->activate(); - QTimer::singleShot(0, this, SLOT(slotInit())); + TQTimer::singleShot(0, this, TQT_SLOT(slotInit())); } @@ -133,8 +133,8 @@ void Dbg_PS_Dialog::slotInit() } #endif - connect( psProc_, SIGNAL(processExited(KProcess *)), SLOT(slotProcessExited()) ); - connect( psProc_, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(slotReceivedOutput(KProcess *, char *, int)) ); + connect( psProc_, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(slotProcessExited()) ); + connect( psProc_, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(slotReceivedOutput(KProcess *, char *, int)) ); psProc_->start(KProcess::NotifyOnExit, KProcess::Stdout); } @@ -143,7 +143,7 @@ void Dbg_PS_Dialog::slotInit() void Dbg_PS_Dialog::slotReceivedOutput(KProcess */*proc*/, char *buffer, int buflen) { - pidLines_ += QString::fromLocal8Bit(buffer, buflen); + pidLines_ += TQString::fromLocal8Bit(buffer, buflen); } /***************************************************************************/ @@ -158,10 +158,10 @@ void Dbg_PS_Dialog::slotProcessExited() int start = pidLines_.find('\n', 0); // Skip the first line (header line) int pos; - static QRegExp ps_output_line("^\\s*(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(.+)"); + static TQRegExp ps_output_line("^\\s*(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(.+)"); while ( (pos = pidLines_.find('\n', start)) != -1) { - QString item = pidLines_.mid(start, pos-start); + TQString item = pidLines_.mid(start, pos-start); if (!item.isEmpty() && item.find(pidCmd_) == -1) { if(ps_output_line.search(item) == -1) @@ -177,7 +177,7 @@ void Dbg_PS_Dialog::slotProcessExited() break; } - new QListViewItem(pids_, + new TQListViewItem(pids_, ps_output_line.cap(1), ps_output_line.cap(2), ps_output_line.cap(3), @@ -192,7 +192,7 @@ void Dbg_PS_Dialog::slotProcessExited() searchLineWidget_->searchLine()->setFocus(); } -void Dbg_PS_Dialog::focusIn(QFocusEvent*) +void Dbg_PS_Dialog::focusIn(TQFocusEvent*) { searchLineWidget_->searchLine()->setFocus(); } diff --git a/languages/cpp/debugger/dbgpsdlg.h b/languages/cpp/debugger/dbgpsdlg.h index d88eb72f..acc725bc 100644 --- a/languages/cpp/debugger/dbgpsdlg.h +++ b/languages/cpp/debugger/dbgpsdlg.h @@ -33,7 +33,7 @@ class Dbg_PS_Dialog : public KDialog Q_OBJECT public: - Dbg_PS_Dialog( QWidget *parent=0, const char *name=0 ); + Dbg_PS_Dialog( TQWidget *parent=0, const char *name=0 ); ~Dbg_PS_Dialog(); int pidSelected(); @@ -44,14 +44,14 @@ private slots: void slotProcessExited(); protected: - void focusIn(QFocusEvent*); + void focusIn(TQFocusEvent*); private: KProcess* psProc_; KListView* pids_; KListViewSearchLineWidget* searchLineWidget_; - QString pidLines_; - QString pidCmd_; + TQString pidLines_; + TQString pidCmd_; }; } diff --git a/languages/cpp/debugger/dbgtoolbar.cpp b/languages/cpp/debugger/dbgtoolbar.cpp index a3e58343..3fbef3c4 100644 --- a/languages/cpp/debugger/dbgtoolbar.cpp +++ b/languages/cpp/debugger/dbgtoolbar.cpp @@ -25,14 +25,14 @@ #include <kwin.h> #include <kwinmodule.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> // ************************************************************************** // ************************************************************************** @@ -71,25 +71,25 @@ public: DbgMoveHandle(DbgToolBar *parent=0, const char * name=0, WFlags f=0); virtual ~DbgMoveHandle(); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); private: DbgToolBar* toolBar_; - QPoint offset_; + TQPoint offset_; bool moving_; }; // ************************************************************************** DbgMoveHandle::DbgMoveHandle(DbgToolBar *parent, const char * name, WFlags f) - : QFrame(parent, name, f), + : TQFrame(parent, name, f), toolBar_(parent), - offset_(QPoint(0,0)), + offset_(TQPoint(0,0)), moving_(false) { - setFrameStyle(QFrame::Panel|QFrame::Raised); + setFrameStyle(TQFrame::Panel|TQFrame::Raised); setFixedHeight(12); } @@ -101,9 +101,9 @@ DbgMoveHandle::~DbgMoveHandle() // ************************************************************************** -void DbgMoveHandle::mousePressEvent(QMouseEvent *e) +void DbgMoveHandle::mousePressEvent(TQMouseEvent *e) { - QFrame::mousePressEvent(e); + TQFrame::mousePressEvent(e); if (moving_) return; @@ -111,38 +111,38 @@ void DbgMoveHandle::mousePressEvent(QMouseEvent *e) KPopupMenu *menu = new KPopupMenu(this); menu->insertTitle(i18n("Debug Toolbar")); menu->insertItem(i18n("Dock to Panel"), - parent(), SLOT(slotDock())); + parent(), TQT_SLOT(slotDock())); menu->insertItem(i18n("Dock to Panel && Iconify KDevelop"), - parent(), SLOT(slotIconifyAndDock())); + parent(), TQT_SLOT(slotIconifyAndDock())); menu->popup(e->globalPos()); } else { moving_ = true; offset_ = parentWidget()->pos() - e->globalPos(); - setFrameStyle(QFrame::Panel|QFrame::Sunken); - QApplication::setOverrideCursor(QCursor(sizeAllCursor)); - setPalette(QPalette(colorGroup().background())); + setFrameStyle(TQFrame::Panel|TQFrame::Sunken); + TQApplication::setOverrideCursor(TQCursor(sizeAllCursor)); + setPalette(TQPalette(colorGroup().background())); repaint(); } } // ************************************************************************** -void DbgMoveHandle::mouseReleaseEvent(QMouseEvent *e) +void DbgMoveHandle::mouseReleaseEvent(TQMouseEvent *e) { - QFrame::mouseReleaseEvent(e); + TQFrame::mouseReleaseEvent(e); moving_ = false; - offset_ = QPoint(0,0); - setFrameStyle(QFrame::Panel|QFrame::Raised); - QApplication::restoreOverrideCursor(); - setPalette(QPalette(colorGroup().background())); + offset_ = TQPoint(0,0); + setFrameStyle(TQFrame::Panel|TQFrame::Raised); + TQApplication::restoreOverrideCursor(); + setPalette(TQPalette(colorGroup().background())); repaint(); } // ************************************************************************** -void DbgMoveHandle::mouseMoveEvent(QMouseEvent *e) +void DbgMoveHandle::mouseMoveEvent(TQMouseEvent *e) { - QFrame::mouseMoveEvent(e); + TQFrame::mouseMoveEvent(e); if (!moving_) return; @@ -158,21 +158,21 @@ void DbgMoveHandle::mouseMoveEvent(QMouseEvent *e) class DbgButton : public QPushButton { public: - DbgButton(const QPixmap &pixmap, const QString &text, + DbgButton(const TQPixmap &pixmap, const TQString &text, DbgToolBar *parent, const char *name=0); virtual ~DbgButton() {}; - void drawButtonLabel(QPainter *painter); - QSize sizeHint() const; + void drawButtonLabel(TQPainter *painter); + TQSize sizeHint() const; private: - QPixmap pixmap_; + TQPixmap pixmap_; }; // ************************************************************************** -DbgButton::DbgButton(const QPixmap& pixmap, const QString& text, +DbgButton::DbgButton(const TQPixmap& pixmap, const TQString& text, DbgToolBar* parent, const char* name) - : QPushButton(parent, name), + : TQPushButton(parent, name), pixmap_(pixmap) { setText(text); @@ -180,7 +180,7 @@ DbgButton::DbgButton(const QPixmap& pixmap, const QString& text, // ************************************************************************** -void DbgButton::drawButtonLabel(QPainter *painter) +void DbgButton::drawButtonLabel(TQPainter *painter) { // We always have a pixmap (today...) // Centre it if there's no text @@ -198,15 +198,15 @@ void DbgButton::drawButtonLabel(QPainter *painter) // ************************************************************************** -QSize DbgButton::sizeHint() const +TQSize DbgButton::sizeHint() const { if (text().isEmpty()) return pixmap_.size(); else { - QSize ps = pixmap_.size(); - QSize bs = QPushButton::sizeHint(); - QSize result; + TQSize ps = pixmap_.size(); + TQSize bs = TQPushButton::sizeHint(); + TQSize result; result.setWidth( ps.width() + bs.width()+10 ); result.setHeight( ps.height() > bs.height() ? ps.height() : bs.height() ); return result; @@ -217,17 +217,17 @@ QSize DbgButton::sizeHint() const // ************************************************************************** // ************************************************************************** -DbgDocker::DbgDocker(QWidget* parent, DbgToolBar* toolBar, const QPixmap& pixmap) : +DbgDocker::DbgDocker(TQWidget* parent, DbgToolBar* toolBar, const TQPixmap& pixmap) : KSystemTray(parent, "DbgDocker"), toolBar_(toolBar) { setPixmap(pixmap); - QToolTip::add( this, i18n("KDevelop debugger: Click to execute one line of code (\"step\")") ); + TQToolTip::add( this, i18n("KDevelop debugger: Click to execute one line of code (\"step\")") ); } // ************************************************************************** -void DbgDocker::mousePressEvent(QMouseEvent *e) +void DbgDocker::mousePressEvent(TQMouseEvent *e) { if (!rect().contains( e->pos())) return; @@ -243,8 +243,8 @@ void DbgDocker::mousePressEvent(QMouseEvent *e) { KPopupMenu* menu = new KPopupMenu(this); menu->insertTitle(i18n("Debug Toolbar")); - menu->insertItem(i18n("Activate"), toolBar_, SLOT(slotUndock())); - menu->insertItem(i18n("Activate (KDevelop gets focus)"), toolBar_, SLOT(slotActivateAndUndock())); + menu->insertItem(i18n("Activate"), toolBar_, TQT_SLOT(slotUndock())); + menu->insertItem(i18n("Activate (KDevelop gets focus)"), toolBar_, TQT_SLOT(slotActivateAndUndock())); menu->popup(e->globalPos()); break; } @@ -258,8 +258,8 @@ void DbgDocker::mousePressEvent(QMouseEvent *e) // ************************************************************************** DbgToolBar::DbgToolBar(DebuggerPart* part, - QWidget* parent, const char* name) - : QFrame(0, name), + TQWidget* parent, const char* name) + : TQFrame(0, name), part_(part), activeWindow_(0), winModule_(0), @@ -272,7 +272,7 @@ DbgToolBar::DbgToolBar(DebuggerPart* part, { winModule_ = new KWinModule(this); docker_ = new DbgDocker(parent, this, BarIcon("dbgnext")); - connect(docker_, SIGNAL(clicked()), part_, SLOT(slotStepOver())); + connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver())); // Must have noFocus set so that we can see what window was active. // see slotDbgKdevFocus() for more comments @@ -286,65 +286,65 @@ DbgToolBar::DbgToolBar(DebuggerPart* part, KWin::setType(winId(), NET::Dock); setFocusPolicy(NoFocus); - setFrameStyle( QFrame::Box | QFrame::Plain ); + setFrameStyle( TQFrame::Box | TQFrame::Plain ); setLineWidth(4); setMidLineWidth(0); - QBoxLayout* topLayout = new QVBoxLayout(this); + TQBoxLayout* topLayout = new TQVBoxLayout(this); - QBoxLayout* nextLayout = new QHBoxLayout(); - QBoxLayout* stepLayout = new QHBoxLayout(); - QBoxLayout* focusLayout = new QHBoxLayout(); + TQBoxLayout* nextLayout = new TQHBoxLayout(); + TQBoxLayout* stepLayout = new TQHBoxLayout(); + TQBoxLayout* focusLayout = new TQHBoxLayout(); DbgMoveHandle* moveHandle= new DbgMoveHandle(this); - QPushButton* bRun = new DbgButton(BarIcon("dbgrun"), i18n("Run"), this); - QPushButton* bInterrupt = new DbgButton(BarIcon("player_pause"), i18n("Interrupt"), this); - QPushButton* bNext = new DbgButton(BarIcon("dbgnext"), QString::null, this); - QPushButton* bNexti = new DbgButton(BarIcon("dbgnextinst"), QString::null, this); - QPushButton* bStep = new DbgButton(BarIcon("dbgstep"), QString::null, this); - QPushButton* bStepi = new DbgButton(BarIcon("dbgstepinst"), QString::null, this); - QPushButton* bFinish = new DbgButton(BarIcon("dbgstepout"), i18n("Step Out"), this); - QPushButton* bRunTo = new DbgButton(BarIcon("dbgrunto"), i18n("Run to Cursor"), this); - QPushButton* bView = new DbgButton(BarIcon("dbgmemview"), i18n("Viewers"), this); - bKDevFocus_ = new DbgButton(BarIcon("kdevelop"), QString::null, this); - bPrevFocus_ = new DbgButton(BarIcon("dbgmemview"), QString::null, this); - - connect(bRun, SIGNAL(clicked()), part_, SLOT(slotRun())); - connect(bInterrupt, SIGNAL(clicked()), part_, SLOT(slotPause())); - connect(bNext, SIGNAL(clicked()), part_, SLOT(slotStepOver())); - connect(bNexti, SIGNAL(clicked()), part_, SLOT(slotStepOverInstruction())); - connect(bStep, SIGNAL(clicked()), part_, SLOT(slotStepInto())); - connect(bStepi, SIGNAL(clicked()), part_, SLOT(slotStepIntoInstruction())); - connect(bFinish, SIGNAL(clicked()), part_, SLOT(slotStepOut())); - connect(bRunTo, SIGNAL(clicked()), part_, SLOT(slotRunToCursor())); - connect(bView, SIGNAL(clicked()), part_, SLOT(slotMemoryView())); - connect(bKDevFocus_, SIGNAL(clicked()), this, SLOT(slotKdevFocus())); - connect(bPrevFocus_, SIGNAL(clicked()), this, SLOT(slotPrevFocus())); - - QToolTip::add( bRun, i18n("Continue with application execution, may start the application") ); - QToolTip::add( bInterrupt, i18n("Interrupt the application execution") ); - QToolTip::add( bNext, i18n("Execute one line of code, but run through functions") ); - QToolTip::add( bNexti, i18n("Execute one assembler instruction, but run through functions") ); - QToolTip::add( bStep, i18n("Execute one line of code, stepping into functions if appropriate") ); - QToolTip::add( bStepi, i18n("Execute one assembler instruction, stepping into functions if appropriate") ); - QToolTip::add( bFinish, i18n("Execute to end of current stack frame") ); - QToolTip::add( bRunTo, i18n("Continues execution until the cursor position is reached.") ); - QToolTip::add( bView, i18n("Memory, dissemble, registers, library viewers") ); - QToolTip::add( bKDevFocus_, i18n("Set focus on KDevelop") ); - QToolTip::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus") ); - - QWhatsThis::add( bRun, i18n("Continue with application execution. May start the application.") ); - QWhatsThis::add( bInterrupt, i18n("Interrupt the application execution.") ); - QWhatsThis::add( bNext, i18n("Execute one line of code, but run through functions.") ); - QWhatsThis::add( bNexti, i18n("Execute one assembler instruction, but run through functions.") ); - QWhatsThis::add( bStep, i18n("Execute one line of code, stepping into functions if appropriate.") ); - QWhatsThis::add( bStepi, i18n("Execute one assembler instruction, stepping into functions if appropriate.") ); - QWhatsThis::add( bFinish, i18n("Execute to end of current stack frame.") ); - QWhatsThis::add( bRunTo, i18n("Continues execution until the cursor position is reached.") ); - QWhatsThis::add( bView, i18n("Memory, dissemble, registers, library viewers.") ); - QWhatsThis::add( bKDevFocus_, i18n("Set focus on KDevelop.") ); - QWhatsThis::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus.") ); + 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* 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); + + connect(bRun, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotRun())); + connect(bInterrupt, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotPause())); + connect(bNext, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver())); + connect(bNexti, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOverInstruction())); + connect(bStep, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepInto())); + connect(bStepi, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepIntoInstruction())); + connect(bFinish, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOut())); + connect(bRunTo, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotRunToCursor())); + connect(bView, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotMemoryView())); + connect(bKDevFocus_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotKdevFocus())); + connect(bPrevFocus_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrevFocus())); + + TQToolTip::add( bRun, i18n("Continue with application execution, may start the application") ); + TQToolTip::add( bInterrupt, i18n("Interrupt the application execution") ); + TQToolTip::add( bNext, i18n("Execute one line of code, but run through functions") ); + TQToolTip::add( bNexti, i18n("Execute one assembler instruction, but run through functions") ); + TQToolTip::add( bStep, i18n("Execute one line of code, stepping into functions if appropriate") ); + TQToolTip::add( bStepi, i18n("Execute one assembler instruction, stepping into functions if appropriate") ); + TQToolTip::add( bFinish, i18n("Execute to end of current stack frame") ); + TQToolTip::add( bRunTo, i18n("Continues execution until the cursor position is reached.") ); + TQToolTip::add( bView, i18n("Memory, dissemble, registers, library viewers") ); + TQToolTip::add( bKDevFocus_, i18n("Set focus on KDevelop") ); + TQToolTip::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus") ); + + TQWhatsThis::add( bRun, i18n("Continue with application execution. May start the application.") ); + TQWhatsThis::add( bInterrupt, i18n("Interrupt the application execution.") ); + TQWhatsThis::add( bNext, i18n("Execute one line of code, but run through functions.") ); + TQWhatsThis::add( bNexti, i18n("Execute one assembler instruction, but run through functions.") ); + TQWhatsThis::add( bStep, i18n("Execute one line of code, stepping into functions if appropriate.") ); + TQWhatsThis::add( bStepi, i18n("Execute one assembler instruction, stepping into functions if appropriate.") ); + TQWhatsThis::add( bFinish, i18n("Execute to end of current stack frame.") ); + TQWhatsThis::add( bRunTo, i18n("Continues execution until the cursor position is reached.") ); + TQWhatsThis::add( bView, i18n("Memory, dissemble, registers, library viewers.") ); + TQWhatsThis::add( bKDevFocus_, i18n("Set focus on KDevelop.") ); + TQWhatsThis::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus.") ); topLayout->addWidget(moveHandle); topLayout->addWidget(bRun); @@ -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 QString&, int state) +void DbgToolBar::slotDbgStatus(const TQString&, int state) { bool appIndicator = state & s_dbgBusy; if (appIndicator != appIsActive_) { @@ -435,11 +435,11 @@ void DbgToolBar::slotDbgStatus(const QString&, int state) void DbgToolBar::setAppIndicator(bool appIndicator) { if (appIndicator) { - bPrevFocus_->setPalette(QPalette(colorGroup().mid())); - bKDevFocus_->setPalette(QPalette(colorGroup().background())); + bPrevFocus_->setPalette(TQPalette(colorGroup().mid())); + bKDevFocus_->setPalette(TQPalette(colorGroup().background())); } else { - bPrevFocus_->setPalette(QPalette(colorGroup().background())); - bKDevFocus_->setPalette(QPalette(colorGroup().mid())); + bPrevFocus_->setPalette(TQPalette(colorGroup().background())); + bKDevFocus_->setPalette(TQPalette(colorGroup().mid())); } } diff --git a/languages/cpp/debugger/dbgtoolbar.h b/languages/cpp/debugger/dbgtoolbar.h index 4f284701..188862d4 100644 --- a/languages/cpp/debugger/dbgtoolbar.h +++ b/languages/cpp/debugger/dbgtoolbar.h @@ -21,7 +21,7 @@ class KWinModule; #include <ksystemtray.h> #include <kwin.h> // needed for WId :( -#include <qframe.h> +#include <tqframe.h> namespace GDBDebugger { @@ -35,9 +35,9 @@ class DbgDocker : public KSystemTray Q_OBJECT public: - DbgDocker(QWidget *parent, DbgToolBar *toolBar, const QPixmap &pixmap); + DbgDocker(TQWidget *parent, DbgToolBar *toolBar, const TQPixmap &pixmap); virtual ~DbgDocker() {}; - virtual void mousePressEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); signals: void clicked(); @@ -52,11 +52,11 @@ class DbgToolBar : public QFrame Q_OBJECT public: - DbgToolBar(DebuggerPart *part, QWidget* parent, const char* name=0); + DbgToolBar(DebuggerPart *part, TQWidget* parent, const char* name=0); virtual ~DbgToolBar(); private slots: - void slotDbgStatus(const QString&, int); + void slotDbgStatus(const TQString&, int); void slotDock(); void slotUndock(); void slotIconifyAndDock(); diff --git a/languages/cpp/debugger/debuggerconfigwidget.cpp b/languages/cpp/debugger/debuggerconfigwidget.cpp index 11de247f..f2891378 100644 --- a/languages/cpp/debugger/debuggerconfigwidget.cpp +++ b/languages/cpp/debugger/debuggerconfigwidget.cpp @@ -20,24 +20,24 @@ #include <kurlrequester.h> #include <klineedit.h> -#include <qcheckbox.h> -#include <qfileinfo.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqfileinfo.h> +#include <tqradiobutton.h> namespace GDBDebugger { -DebuggerConfigWidget::DebuggerConfigWidget(DebuggerPart* part, QWidget *parent, const char *name) +DebuggerConfigWidget::DebuggerConfigWidget(DebuggerPart* part, TQWidget *parent, const char *name) : DebuggerConfigWidgetBase(parent, name), dom(*part->projectDom()) { gdbPath_edit->setMode(KFile::File|KFile::ExistingOnly|KFile::LocalOnly); gdbPath_edit->setURL( DomUtil::readEntry(dom, "/kdevdebugger/general/gdbpath")); - QString shell = DomUtil::readEntry(dom, "/kdevdebugger/general/dbgshell","no_value"); - if( shell == QString("no_value") ) + TQString shell = DomUtil::readEntry(dom, "/kdevdebugger/general/dbgshell","no_value"); + if( shell == TQString("no_value") ) { - shell = QString::null; + shell = TQString::null; } debuggingShell_edit->setURL( shell ); diff --git a/languages/cpp/debugger/debuggerconfigwidget.h b/languages/cpp/debugger/debuggerconfigwidget.h index dbf63d4b..3a8283a2 100644 --- a/languages/cpp/debugger/debuggerconfigwidget.h +++ b/languages/cpp/debugger/debuggerconfigwidget.h @@ -16,7 +16,7 @@ #include "debuggerconfigwidgetbase.h" -#include <qdom.h> +#include <tqdom.h> namespace GDBDebugger { @@ -28,14 +28,14 @@ class DebuggerConfigWidget : public DebuggerConfigWidgetBase Q_OBJECT public: - DebuggerConfigWidget( DebuggerPart* part, QWidget *parent=0, const char *name=0 ); + DebuggerConfigWidget( DebuggerPart* part, TQWidget *parent=0, const char *name=0 ); ~DebuggerConfigWidget(); public slots: void accept(); private: - QDomDocument &dom; + TQDomDocument &dom; }; } diff --git a/languages/cpp/debugger/debuggerdcopinterface.h b/languages/cpp/debugger/debuggerdcopinterface.h index 4a9bcf30..afde8b09 100644 --- a/languages/cpp/debugger/debuggerdcopinterface.h +++ b/languages/cpp/debugger/debuggerdcopinterface.h @@ -23,7 +23,7 @@ public: k_dcop: virtual ASYNC slotDebugExternalProcess() = 0; - virtual ASYNC slotDebugCommandLine(const QString& command) = 0; + virtual ASYNC slotDebugCommandLine(const TQString& command) = 0; }; #endif diff --git a/languages/cpp/debugger/debuggerpart.cpp b/languages/cpp/debugger/debuggerpart.cpp index c8c3c1a1..4842ca84 100644 --- a/languages/cpp/debugger/debuggerpart.cpp +++ b/languages/cpp/debugger/debuggerpart.cpp @@ -14,11 +14,11 @@ #include "debuggerpart.h" #include "label_with_double_click.h" -#include <qdir.h> -#include <qvbox.h> -#include <qwhatsthis.h> -#include <qpopupmenu.h> -#include <qtooltip.h> +#include <tqdir.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> +#include <tqpopupmenu.h> +#include <tqtooltip.h> #include <kaction.h> #include <kdebug.h> @@ -33,7 +33,7 @@ #include <kmessagebox.h> #include <kapplication.h> #include <dcopclient.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kstringhandler.h> #include <kdockwidget.h> @@ -76,7 +76,7 @@ static const KDevPluginInfo data("kdevdebugger"); typedef KDevGenericFactory<DebuggerPart> DebuggerFactory; K_EXPORT_COMPONENT_FACTORY( libkdevdebugger, DebuggerFactory( data ) ) -DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList & ) : +DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringList & ) : KDevPlugin( &data, parent, name ? name : "DebuggerPart" ), controller(0), previousDebuggerState_(s_dbgNotStarted), justRestarted_(false), needRebuild_(true), @@ -104,7 +104,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList gdbBreakpointWidget = new GDBBreakpointWidget( controller, 0, "gdbBreakpointWidget" ); gdbBreakpointWidget->setCaption(i18n("Breakpoint List")); - QWhatsThis::add + TQWhatsThis::add (gdbBreakpointWidget, i18n("<b>Breakpoint list</b><p>" "Displays a list of breakpoints with " "their current status. Clicking on a " @@ -124,7 +124,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList framestackWidget = new FramestackWidget( controller, 0, "framestackWidget" ); framestackWidget->setEnabled(false); framestackWidget->setCaption(i18n("Frame Stack")); - QWhatsThis::add + TQWhatsThis::add (framestackWidget, i18n("<b>Frame stack</b><p>" "Often referred to as the \"call stack\", " "this is a list showing what function is " @@ -140,7 +140,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList disassembleWidget = new DisassembleWidget( controller, 0, "disassembleWidget" ); disassembleWidget->setEnabled(false); disassembleWidget->setCaption(i18n("Machine Code Display")); - QWhatsThis::add + TQWhatsThis::add (disassembleWidget, i18n("<b>Machine code display</b><p>" "A machine code view into your running " "executable with the current instruction " @@ -157,7 +157,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList gdbOutputWidget->setEnabled(false); gdbOutputWidget->setIcon( SmallIcon("inline_image") ); gdbOutputWidget->setCaption(i18n("GDB Output")); - QWhatsThis::add + TQWhatsThis::add (gdbOutputWidget, i18n("<b>GDB output</b><p>" "Shows all gdb commands being executed. " "You can also issue any other gdb command while debugging.")); @@ -166,12 +166,12 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList mainWindow()->setViewAvailable(gdbOutputWidget, false); // gdbBreakpointWidget -> this - connect( gdbBreakpointWidget, SIGNAL(refreshBPState(const Breakpoint&)), - this, SLOT(slotRefreshBPState(const Breakpoint&))); - connect( gdbBreakpointWidget, SIGNAL(publishBPState(const Breakpoint&)), - this, SLOT(slotRefreshBPState(const Breakpoint&))); - connect( gdbBreakpointWidget, SIGNAL(gotoSourcePosition(const QString&, int)), - this, SLOT(slotGotoSource(const QString&, int)) ); + connect( gdbBreakpointWidget, TQT_SIGNAL(refreshBPState(const Breakpoint&)), + this, TQT_SLOT(slotRefreshBPState(const Breakpoint&))); + connect( gdbBreakpointWidget, TQT_SIGNAL(publishBPState(const Breakpoint&)), + this, TQT_SLOT(slotRefreshBPState(const Breakpoint&))); + connect( gdbBreakpointWidget, TQT_SIGNAL(gotoSourcePosition(const TQString&, int)), + this, TQT_SLOT(slotGotoSource(const TQString&, int)) ); viewerWidget = new ViewerWidget( controller, 0, "viewerWidget"); @@ -179,15 +179,15 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList i18n("Debug views"), i18n("Special debugger views")); mainWindow()->setViewAvailable(viewerWidget, false); - connect(viewerWidget, SIGNAL(setViewShown(bool)), - this, SLOT(slotShowView(bool))); + connect(viewerWidget, TQT_SIGNAL(setViewShown(bool)), + this, TQT_SLOT(slotShowView(bool))); // Now setup the actions KAction *action; // action = new KAction(i18n("&Start"), "1rightarrow", CTRL+SHIFT+Key_F9, action = new KAction(i18n("&Start"), "dbgrun", Key_F9, - this, SLOT(slotRun()), + this, TQT_SLOT(slotRun()), actionCollection(), "debug_run"); action->setToolTip( i18n("Start in debugger") ); action->setWhatsThis( i18n("<b>Start in debugger</b><p>" @@ -198,7 +198,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList "about variables, frame stack, and so on.") ); action = new KAction(i18n("&Restart"), "dbgrestart", 0, - this, SLOT(slotRestart()), + this, TQT_SLOT(slotRestart()), actionCollection(), "debug_restart"); action->setToolTip( i18n("Restart program") ); action->setWhatsThis( i18n("<b>Restarts application</b><p>" @@ -208,33 +208,33 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList action = new KAction(i18n("Sto&p"), "stop", 0, - this, SLOT(slotStop()), + this, TQT_SLOT(slotStop()), actionCollection(), "debug_stop"); action->setToolTip( i18n("Stop debugger") ); action->setWhatsThis(i18n("<b>Stop debugger</b><p>Kills the executable and exits the debugger.")); action = new KAction(i18n("Interrupt"), "player_pause", 0, - this, SLOT(slotPause()), + this, TQT_SLOT(slotPause()), actionCollection(), "debug_pause"); action->setToolTip( i18n("Interrupt application") ); action->setWhatsThis(i18n("<b>Interrupt application</b><p>Interrupts the debugged process or current GDB command.")); action = new KAction(i18n("Run to &Cursor"), "dbgrunto", 0, - this, SLOT(slotRunToCursor()), + this, TQT_SLOT(slotRunToCursor()), actionCollection(), "debug_runtocursor"); action->setToolTip( i18n("Run to cursor") ); action->setWhatsThis(i18n("<b>Run to cursor</b><p>Continues execution until the cursor position is reached.")); action = new KAction(i18n("Set E&xecution Position to Cursor"), "dbgjumpto", 0, - this, SLOT(slotJumpToCursor()), + this, TQT_SLOT(slotJumpToCursor()), actionCollection(), "debug_jumptocursor"); action->setToolTip( i18n("Jump to cursor") ); action->setWhatsThis(i18n("<b>Set Execution Position </b><p>Set the execution pointer to the current cursor position.")); action = new KAction(i18n("Step &Over"), "dbgnext", Key_F10, - this, SLOT(slotStepOver()), + this, TQT_SLOT(slotStepOver()), actionCollection(), "debug_stepover"); action->setToolTip( i18n("Step over the next line") ); action->setWhatsThis( i18n("<b>Step over</b><p>" @@ -245,14 +245,14 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList action = new KAction(i18n("Step over Ins&truction"), "dbgnextinst", 0, - this, SLOT(slotStepOverInstruction()), + this, TQT_SLOT(slotStepOverInstruction()), actionCollection(), "debug_stepoverinst"); action->setToolTip( i18n("Step over instruction") ); action->setWhatsThis(i18n("<b>Step over instruction</b><p>Steps over the next assembly instruction.")); action = new KAction(i18n("Step &Into"), "dbgstep", Key_F11, - this, SLOT(slotStepInto()), + this, TQT_SLOT(slotStepInto()), actionCollection(), "debug_stepinto"); action->setToolTip( i18n("Step into the next statement") ); action->setWhatsThis( i18n("<b>Step into</b><p>" @@ -262,14 +262,14 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList action = new KAction(i18n("Step into I&nstruction"), "dbgstepinst", 0, - this, SLOT(slotStepIntoInstruction()), + this, TQT_SLOT(slotStepIntoInstruction()), actionCollection(), "debug_stepintoinst"); action->setToolTip( i18n("Step into instruction") ); action->setWhatsThis(i18n("<b>Step into instruction</b><p>Steps into the next assembly instruction.")); action = new KAction(i18n("Step O&ut"), "dbgstepout", Key_F12, - this, SLOT(slotStepOut()), + this, TQT_SLOT(slotStepOut()), actionCollection(), "debug_stepout"); action->setToolTip( i18n("Steps out of the current function") ); action->setWhatsThis( i18n("<b>Step out</b><p>" @@ -281,7 +281,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList action = new KAction(i18n("Viewers"), "dbgmemview", 0, - this, SLOT(slotMemoryView()), + this, TQT_SLOT(slotMemoryView()), actionCollection(), "debug_memview"); action->setToolTip( i18n("Debugger viewers") ); action->setWhatsThis(i18n("<b>Debugger viewers</b><p>Various information about application being executed. There are 4 views available:<br>" @@ -292,7 +292,7 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList action = new KAction(i18n("Examine Core File..."), "core", 0, - this, SLOT(slotExamineCore()), + this, TQT_SLOT(slotExamineCore()), actionCollection(), "debug_core"); action->setToolTip( i18n("Examine core file") ); action->setWhatsThis( i18n("<b>Examine core file</b><p>" @@ -304,72 +304,72 @@ DebuggerPart::DebuggerPart( QObject *parent, const char *name, const QStringList action = new KAction(i18n("Attach to Process"), "connect_creating", 0, - this, SLOT(slotAttachProcess()), + this, TQT_SLOT(slotAttachProcess()), actionCollection(), "debug_attach"); action->setToolTip( i18n("Attach to process") ); action->setWhatsThis(i18n("<b>Attach to process</b><p>Attaches the debugger to a running process.")); action = new KAction(i18n("Toggle Breakpoint"), 0, 0, - this, SLOT(toggleBreakpoint()), + this, TQT_SLOT(toggleBreakpoint()), actionCollection(), "debug_toggle_breakpoint"); action->setToolTip(i18n("Toggle breakpoint")); action->setWhatsThis(i18n("<b>Toggle breakpoint</b><p>Toggles the breakpoint at the current line in editor.")); - connect( mainWindow()->main()->guiFactory(), SIGNAL(clientAdded(KXMLGUIClient*)), - this, SLOT(guiClientAdded(KXMLGUIClient*)) ); + connect( mainWindow()->main()->guiFactory(), TQT_SIGNAL(clientAdded(KXMLGUIClient*)), + this, TQT_SLOT(guiClientAdded(KXMLGUIClient*)) ); - connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), - this, SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( partController(), SIGNAL(loadedFile(const KURL &)), - gdbBreakpointWidget, SLOT(slotRefreshBP(const KURL &)) ); - connect( debugger(), SIGNAL(toggledBreakpoint(const QString &, int)), - gdbBreakpointWidget, SLOT(slotToggleBreakpoint(const QString &, int)) ); - connect( debugger(), SIGNAL(editedBreakpoint(const QString &, int)), - gdbBreakpointWidget, SLOT(slotEditBreakpoint(const QString &, int)) ); - connect( debugger(), SIGNAL(toggledBreakpointEnabled(const QString &, int)), - gdbBreakpointWidget, SLOT(slotToggleBreakpointEnabled(const QString &, int)) ); + connect( partController(), TQT_SIGNAL(loadedFile(const KURL &)), + gdbBreakpointWidget, TQT_SLOT(slotRefreshBP(const KURL &)) ); + connect( debugger(), TQT_SIGNAL(toggledBreakpoint(const TQString &, int)), + gdbBreakpointWidget, TQT_SLOT(slotToggleBreakpoint(const TQString &, int)) ); + connect( debugger(), TQT_SIGNAL(editedBreakpoint(const TQString &, int)), + gdbBreakpointWidget, TQT_SLOT(slotEditBreakpoint(const TQString &, int)) ); + connect( debugger(), TQT_SIGNAL(toggledBreakpointEnabled(const TQString &, int)), + gdbBreakpointWidget, TQT_SLOT(slotToggleBreakpointEnabled(const TQString &, int)) ); - connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *)) ); + connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); - connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)), - this, SLOT(slotStop(KDevPlugin*)) ); - connect( core(), SIGNAL(projectClosed()), - this, SLOT(projectClosed()) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStop(KDevPlugin*)) ); + connect( core(), TQT_SIGNAL(projectClosed()), + this, TQT_SLOT(projectClosed()) ); - connect( partController(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(slotActivePartChanged(KParts::Part*)) ); + connect( partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) ); procLineMaker = new ProcessLineMaker(); - connect( procLineMaker, SIGNAL(receivedStdoutLine(const QCString&)), - appFrontend(), SLOT(insertStdoutLine(const QCString&)) ); - connect( procLineMaker, SIGNAL(receivedStderrLine(const QCString&)), - appFrontend(), SLOT(insertStderrLine(const QCString&)) ); + connect( procLineMaker, TQT_SIGNAL(receivedStdoutLine(const TQCString&)), + appFrontend(), TQT_SLOT(insertStdoutLine(const TQCString&)) ); + connect( procLineMaker, TQT_SIGNAL(receivedStderrLine(const TQCString&)), + appFrontend(), TQT_SLOT(insertStderrLine(const TQCString&)) ); - connect( procLineMaker, SIGNAL(receivedPartialStdoutLine(const QCString&)), - appFrontend(), SLOT(addPartialStdoutLine(const QCString&))); - connect( procLineMaker, SIGNAL(receivedPartialStderrLine(const QCString&)), - appFrontend(), SLOT(addPartialStderrLine(const QCString&))); + connect( procLineMaker, TQT_SIGNAL(receivedPartialStdoutLine(const TQCString&)), + appFrontend(), TQT_SLOT(addPartialStdoutLine(const TQCString&))); + connect( procLineMaker, TQT_SIGNAL(receivedPartialStderrLine(const TQCString&)), + appFrontend(), TQT_SLOT(addPartialStderrLine(const TQCString&))); // The output from tracepoints goes to "application" window, because // we don't have any better alternative, and using yet another window // is undesirable. Besides, this makes tracepoint look even more similar // to printf debugging. - connect( gdbBreakpointWidget, SIGNAL(tracingOutput(const char*)), - procLineMaker, SLOT(slotReceivedStdout(const char*))); + connect( gdbBreakpointWidget, TQT_SIGNAL(tracingOutput(const char*)), + procLineMaker, TQT_SLOT(slotReceivedStdout(const char*))); - connect(partController(), SIGNAL(savedFile(const KURL &)), - this, SLOT(slotFileSaved())); + connect(partController(), TQT_SIGNAL(savedFile(const KURL &)), + this, TQT_SLOT(slotFileSaved())); if (project()) - connect(project(), SIGNAL(projectCompiled()), - this, SLOT(slotProjectCompiled())); + connect(project(), TQT_SIGNAL(projectCompiled()), + this, TQT_SLOT(slotProjectCompiled())); setupController(); - QTimer::singleShot(0, this, SLOT(setupDcop())); + TQTimer::singleShot(0, this, TQT_SLOT(setupDcop())); } void DebuggerPart::setupDcop() @@ -379,24 +379,24 @@ void DebuggerPart::setupDcop() if ((*it).find("drkonqi-") == 0) slotDCOPApplicationRegistered(*it); - connect(kapp->dcopClient(), SIGNAL(applicationRegistered(const QCString&)), SLOT(slotDCOPApplicationRegistered(const QCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), TQT_SLOT(slotDCOPApplicationRegistered(const TQCString&))); kapp->dcopClient()->setNotifications(true); } -void DebuggerPart::slotDCOPApplicationRegistered(const QCString& appId) +void DebuggerPart::slotDCOPApplicationRegistered(const TQCString& appId) { if (appId.find("drkonqi-") == 0) { - QByteArray answer; - QCString replyType; + TQByteArray answer; + TQCString replyType; - kapp->dcopClient()->call(appId, "krashinfo", "appName()", QByteArray(), replyType, answer, true, 5000); + kapp->dcopClient()->call(appId, "krashinfo", "appName()", TQByteArray(), replyType, answer, true, 5000); - QDataStream d(answer, IO_ReadOnly); - QCString appName; + TQDataStream d(answer, IO_ReadOnly); + TQCString appName; d >> appName; if (appName.length() && project() && project()->mainProgram().endsWith(appName)) { - kapp->dcopClient()->send(appId, "krashinfo", "registerDebuggingApplication(QString)", i18n("Debug in &KDevelop")); + kapp->dcopClient()->send(appId, "krashinfo", "registerDebuggingApplication(TQString)", i18n("Debug in &KDevelop")); connectDCOPSignal(appId, "krashinfo", "acceptDebuggingApplication()", "slotDebugExternalProcess()", true); } } @@ -404,32 +404,32 @@ void DebuggerPart::slotDCOPApplicationRegistered(const QCString& appId) ASYNC DebuggerPart::slotDebugExternalProcess() { - QByteArray answer; - QCString replyType; + TQByteArray answer; + TQCString replyType; - kapp->dcopClient()->call(kapp->dcopClient()->senderId(), "krashinfo", "pid()", QByteArray(), replyType, answer, true, 5000); + kapp->dcopClient()->call(kapp->dcopClient()->senderId(), "krashinfo", "pid()", TQByteArray(), replyType, answer, true, 5000); - QDataStream d(answer, IO_ReadOnly); + TQDataStream d(answer, IO_ReadOnly); int pid; d >> pid; if (attachProcess(pid) && m_drkonqi.isEmpty()) { m_drkonqi = kapp->dcopClient()->senderId(); - QTimer::singleShot(15000, this, SLOT(slotCloseDrKonqi())); + TQTimer::singleShot(15000, this, TQT_SLOT(slotCloseDrKonqi())); mainWindow()->raiseView(framestackWidget); } mainWindow()->main()->raise(); } -ASYNC DebuggerPart::slotDebugCommandLine(const QString& /*command*/) +ASYNC DebuggerPart::slotDebugCommandLine(const TQString& /*command*/) { KMessageBox::information(0, "Asked to debug command line"); } void DebuggerPart::slotCloseDrKonqi() { - kapp->dcopClient()->send(m_drkonqi, "MainApplication-Interface", "quit()", QByteArray()); + kapp->dcopClient()->send(m_drkonqi, "MainApplication-Interface", "quit()", TQByteArray()); m_drkonqi = ""; } @@ -467,10 +467,10 @@ void DebuggerPart::guiClientAdded( KXMLGUIClient* client ) // Can't change state until after XMLGUI has been loaded... // Anyone know of a better way of doing this? if( client == this ) - stateChanged( QString("stopped") ); + stateChanged( TQString("stopped") ); } -void DebuggerPart::contextMenu(QPopupMenu *popup, const Context *context) +void DebuggerPart::contextMenu(TQPopupMenu *popup, const Context *context) { if (!context->hasType( Context::EditorContext )) return; @@ -491,13 +491,13 @@ void DebuggerPart::contextMenu(QPopupMenu *popup, const Context *context) int index = running ? 0 : -1; if (running) { - // Too bad we can't add QAction to popup menu in Qt3. + // Too bad we can't add TQAction to popup menu in Qt3. KAction* act = actionCollection()->action("debug_runtocursor"); Q_ASSERT(act); if (act) { int id = popup->insertItem( act->iconSet(), i18n("Run to &Cursor"), - this, SLOT(slotRunToCursor()), + this, TQT_SLOT(slotRunToCursor()), 0, -1, index); popup->setWhatsThis(id, act->whatsThis()); @@ -507,21 +507,21 @@ void DebuggerPart::contextMenu(QPopupMenu *popup, const Context *context) if (econtext->url().isLocalFile()) { int id = popup->insertItem( i18n("Toggle Breakpoint"), - this, SLOT(toggleBreakpoint()), + this, TQT_SLOT(toggleBreakpoint()), 0, -1, index); index += running; popup->setWhatsThis(id, i18n("<b>Toggle breakpoint</b><p>Toggles breakpoint at the current line.")); } if (!m_contextIdent.isEmpty()) { - QString squeezed = KStringHandler::csqueeze(m_contextIdent, 30); + TQString squeezed = KStringHandler::csqueeze(m_contextIdent, 30); int id = popup->insertItem( i18n("Evaluate: %1").arg(squeezed), - this, SLOT(contextEvaluate()), + 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), - this, SLOT(contextWatch()), + 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.")); @@ -560,10 +560,10 @@ void DebuggerPart::contextEvaluate() void DebuggerPart::projectConfigWidget(KDialogBase *dlg) { - QVBox *vbox = dlg->addVBoxPage(i18n("Debugger"), i18n("Debugger"), BarIcon( info()->icon(), KIcon::SizeMedium) ); + TQVBox *vbox = dlg->addVBoxPage(i18n("Debugger"), i18n("Debugger"), BarIcon( info()->icon(), KIcon::SizeMedium) ); DebuggerConfigWidget *w = new DebuggerConfigWidget(this, vbox, "debugger config widget"); - connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); - connect( dlg, SIGNAL(finished()), controller, SLOT(configure()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(finished()), controller, TQT_SLOT(configure()) ); } @@ -572,68 +572,68 @@ void DebuggerPart::setupController() VariableTree *variableTree = variableWidget->varTree(); // variableTree -> gdbBreakpointWidget - connect( variableTree, SIGNAL(toggleWatchpoint(const QString &)), - gdbBreakpointWidget, SLOT(slotToggleWatchpoint(const QString &))); + connect( variableTree, TQT_SIGNAL(toggleWatchpoint(const TQString &)), + gdbBreakpointWidget, TQT_SLOT(slotToggleWatchpoint(const TQString &))); // gdbOutputWidget -> controller - connect( gdbOutputWidget, SIGNAL(userGDBCmd(const QString &)), - controller, SLOT(slotUserGDBCmd(const QString&))); - connect( gdbOutputWidget, SIGNAL(breakInto()), - controller, SLOT(slotBreakInto())); + connect( gdbOutputWidget, TQT_SIGNAL(userGDBCmd(const TQString &)), + controller, TQT_SLOT(slotUserGDBCmd(const TQString&))); + connect( gdbOutputWidget, TQT_SIGNAL(breakInto()), + controller, TQT_SLOT(slotBreakInto())); - connect( controller, SIGNAL(breakpointHit(int)), - gdbBreakpointWidget, SLOT(slotBreakpointHit(int))); + connect( controller, TQT_SIGNAL(breakpointHit(int)), + gdbBreakpointWidget, TQT_SLOT(slotBreakpointHit(int))); // controller -> disassembleWidget - connect( controller, SIGNAL(showStepInSource(const QString&, int, const QString&)), - disassembleWidget, SLOT(slotShowStepInSource(const QString&, int, const QString&))); + connect( controller, TQT_SIGNAL(showStepInSource(const TQString&, int, const TQString&)), + disassembleWidget, TQT_SLOT(slotShowStepInSource(const TQString&, int, const TQString&))); // controller -> this - connect( controller, SIGNAL(dbgStatus(const QString&, int)), - this, SLOT(slotStatus(const QString&, int))); - connect( controller, SIGNAL(showStepInSource(const QString&, int, const QString&)), - this, SLOT(slotShowStep(const QString&, int))); - connect( controller, SIGNAL(debuggerAbnormalExit()), - this, SLOT(slotDebuggerAbnormalExit())); + connect( controller, TQT_SIGNAL(dbgStatus(const TQString&, int)), + this, TQT_SLOT(slotStatus(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()), + this, TQT_SLOT(slotDebuggerAbnormalExit())); - connect(controller, SIGNAL(event(GDBController::event_t)), - this, SLOT(slotEvent(GDBController::event_t))); + connect(controller, TQT_SIGNAL(event(GDBController::event_t)), + this, TQT_SLOT(slotEvent(GDBController::event_t))); // controller -> procLineMaker - connect( controller, SIGNAL(ttyStdout(const char*)), - procLineMaker, SLOT(slotReceivedStdout(const char*))); - connect( controller, SIGNAL(ttyStderr(const char*)), - procLineMaker, SLOT(slotReceivedStderr(const char*))); + connect( controller, TQT_SIGNAL(ttyStdout(const char*)), + procLineMaker, TQT_SLOT(slotReceivedStdout(const char*))); + connect( controller, TQT_SIGNAL(ttyStderr(const char*)), + procLineMaker, TQT_SLOT(slotReceivedStderr(const char*))); // controller -> gdbOutputWidget - connect( controller, SIGNAL(gdbInternalCommandStdout(const char*)), - gdbOutputWidget, SLOT(slotInternalCommandStdout(const char*)) ); - connect( controller, SIGNAL(gdbUserCommandStdout(const char*)), - gdbOutputWidget, SLOT(slotUserCommandStdout(const char*)) ); + connect( controller, TQT_SIGNAL(gdbInternalCommandStdout(const char*)), + gdbOutputWidget, TQT_SLOT(slotInternalCommandStdout(const char*)) ); + connect( controller, TQT_SIGNAL(gdbUserCommandStdout(const char*)), + gdbOutputWidget, TQT_SLOT(slotUserCommandStdout(const char*)) ); - connect( controller, SIGNAL(gdbStderr(const char*)), - gdbOutputWidget, SLOT(slotReceivedStderr(const char*)) ); - connect( controller, SIGNAL(dbgStatus(const QString&, int)), - gdbOutputWidget, SLOT(slotDbgStatus(const QString&, int))); + 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))); // controller -> viewerWidget - connect( controller, SIGNAL(dbgStatus(const QString&, int)), - viewerWidget, SLOT(slotDebuggerState(const QString&, int))); + connect( controller, TQT_SIGNAL(dbgStatus(const TQString&, int)), + viewerWidget, TQT_SLOT(slotDebuggerState(const TQString&, int))); - connect(statusBarIndicator, SIGNAL(doubleClicked()), - controller, SLOT(explainDebuggerStatus())); + connect(statusBarIndicator, TQT_SIGNAL(doubleClicked()), + controller, TQT_SLOT(explainDebuggerStatus())); } bool DebuggerPart::startDebugger() { - QString build_dir; // Currently selected build directory + TQString build_dir; // Currently selected build directory DomUtil::PairList run_envvars; // List with the environment variables - QString run_directory; // Directory from where the program should be run - QString program; // Absolute path to application - QString run_arguments; // Command line arguments to be passed to the application + TQString run_directory; // Directory from where the program should be run + TQString program; // Absolute path to application + TQString run_arguments; // Command line arguments to be passed to the application if (project()) { build_dir = project()->buildDirectory(); @@ -643,13 +643,13 @@ bool DebuggerPart::startDebugger() run_arguments = project()->debugArguments(); } - QString shell = DomUtil::readEntry(*projectDom(), "/kdevdebugger/general/dbgshell"); + TQString shell = DomUtil::readEntry(*projectDom(), "/kdevdebugger/general/dbgshell"); if( !shell.isEmpty() ) { shell = shell.simplifyWhiteSpace(); - QString shell_without_args = QStringList::split(QChar(' '), shell ).first(); + TQString shell_without_args = TQStringList::split(TQChar(' '), shell ).first(); - QFileInfo info( shell_without_args ); + TQFileInfo info( shell_without_args ); if( info.isRelative() ) { shell_without_args = build_dir + "/" + shell_without_args; @@ -670,7 +670,7 @@ bool DebuggerPart::startDebugger() { core()->running(this, true); - stateChanged( QString("active") ); + stateChanged( TQString("active") ); KActionCollection *ac = actionCollection(); ac->action("debug_run")->setText( i18n("&Continue") ); @@ -748,15 +748,15 @@ void DebuggerPart::slotStopDebugger() "while it is running, in order to get information " "about variables, frame stack, and so on.") ); - stateChanged( QString("stopped") ); + stateChanged( TQString("stopped") ); core()->running(this, false); } void DebuggerPart::slotShowView(bool show) { - const QWidget* s = static_cast<const QWidget*>(sender()); - QWidget* ncs = const_cast<QWidget*>(s); + const TQWidget* s = static_cast<const TQWidget*>(sender()); + TQWidget* ncs = const_cast<TQWidget*>(s); mainWindow()->setViewAvailable(ncs, show); if (show) mainWindow()->raiseView(ncs); @@ -857,18 +857,18 @@ void DebuggerPart::slotRun() if (rebuild) { - disconnect(SIGNAL(buildProject())); + disconnect(TQT_SIGNAL(buildProject())); // The KDevProject has no method to build the project, // so try connecting to a slot has is present to all // existing project managers. // Note: this assumes that 'slotBuild' will save // modified files. - if (connect(this, SIGNAL(buildProject()), - project(), SLOT(slotBuild()))) + if (connect(this, TQT_SIGNAL(buildProject()), + project(), TQT_SLOT(slotBuild()))) { - connect(project(), SIGNAL(projectCompiled()), - this, SLOT(slotRun_part2())); + connect(project(), TQT_SIGNAL(projectCompiled()), + this, TQT_SLOT(slotRun_part2())); emit buildProject(); rebuild = true; @@ -894,8 +894,8 @@ void DebuggerPart::slotRun_part2() { needRebuild_ = false; - disconnect(project(), SIGNAL(projectCompiled()), - this, SLOT(slotRun_part2())); + disconnect(project(), TQT_SIGNAL(projectCompiled()), + this, TQT_SLOT(slotRun_part2())); if (controller->stateIsOn( s_dbgNotStarted )) { @@ -950,8 +950,8 @@ void DebuggerPart::slotExamineCore() { mainWindow()->statusBar()->message(i18n("Choose a core file to examine..."), 1000); - QString dirName = project()? project()->projectDirectory() : QDir::homeDirPath(); - QString coreFile = KFileDialog::getOpenFileName(dirName); + TQString dirName = project()? project()->projectDirectory() : TQDir::homeDirPath(); + TQString coreFile = KFileDialog::getOpenFileName(dirName); if (coreFile.isNull()) return; @@ -1092,33 +1092,33 @@ void DebuggerPart::slotRefreshBPState( const Breakpoint& BP) } } -void DebuggerPart::slotStatus(const QString &msg, int state) +void DebuggerPart::slotStatus(const TQString &msg, int state) { - QString stateIndicator, stateIndicatorFull; + TQString stateIndicator, stateIndicatorFull; if (state & s_dbgNotStarted) { stateIndicator = " "; stateIndicatorFull = "Debugger not started"; - stateChanged( QString("stopped") ); + stateChanged( TQString("stopped") ); } else if (state & s_dbgBusy) { stateIndicator = "R"; stateIndicatorFull = "Debugger is busy"; - stateChanged( QString("active") ); + stateChanged( TQString("active") ); } else if (state & s_programExited) { stateIndicator = "E"; stateIndicatorFull = "Application has exited"; - stateChanged( QString("stopped") ); + stateChanged( TQString("stopped") ); } else { stateIndicator = "P"; stateIndicatorFull = "Application is paused"; - stateChanged( QString("paused") ); + stateChanged( TQString("paused") ); // On the first stop, show the variables view. // We do it on first stop, and not at debugger start, because // a program might just successfully run till completion. If we show @@ -1173,7 +1173,7 @@ void DebuggerPart::slotStatus(const QString &msg, int state) kdDebug(9012) << " " << msg << endl; statusBarIndicator->setText(stateIndicator); - QToolTip::add(statusBarIndicator, stateIndicatorFull); + TQToolTip::add(statusBarIndicator, stateIndicatorFull); if (!msg.isEmpty()) mainWindow()->statusBar()->message(msg, 3000); @@ -1192,7 +1192,7 @@ void DebuggerPart::slotEvent(GDBController::event_t e) } -void DebuggerPart::slotShowStep(const QString &fileName, int lineNum) +void DebuggerPart::slotShowStep(const TQString &fileName, int lineNum) { if ( ! fileName.isEmpty() ) { @@ -1206,7 +1206,7 @@ void DebuggerPart::slotShowStep(const QString &fileName, int lineNum) } -void DebuggerPart::slotGotoSource(const QString &fileName, int lineNum) +void DebuggerPart::slotGotoSource(const TQString &fileName, int lineNum) { if ( ! fileName.isEmpty() ) partController()->editDocument(KURL( fileName ), lineNum); @@ -1229,13 +1229,13 @@ void DebuggerPart::slotActivePartChanged( KParts::Part* part ) action->setEnabled( iface != 0 ); } -void DebuggerPart::restorePartialProjectSession(const QDomElement* el) +void DebuggerPart::restorePartialProjectSession(const TQDomElement* el) { gdbBreakpointWidget->restorePartialProjectSession(el); gdbOutputWidget->restorePartialProjectSession(el); } -void DebuggerPart::savePartialProjectSession(QDomElement* el) +void DebuggerPart::savePartialProjectSession(TQDomElement* el) { gdbBreakpointWidget->savePartialProjectSession(el); gdbOutputWidget->savePartialProjectSession(el); diff --git a/languages/cpp/debugger/debuggerpart.h b/languages/cpp/debugger/debuggerpart.h index afb3b340..c20b1f39 100644 --- a/languages/cpp/debugger/debuggerpart.h +++ b/languages/cpp/debugger/debuggerpart.h @@ -14,7 +14,7 @@ #ifndef _DEBUGGERPART_H_ #define _DEBUGGERPART_H_ -#include <qguardedptr.h> +#include <tqguardedptr.h> #include "kdevplugin.h" #include "kdevcore.h" @@ -49,19 +49,19 @@ class DebuggerPart : public KDevPlugin, virtual public DebuggerDCOPInterface Q_OBJECT public: - DebuggerPart( QObject *parent, const char *name, const QStringList & ); + DebuggerPart( TQObject *parent, const char *name, const TQStringList & ); ~DebuggerPart(); - virtual void restorePartialProjectSession(const QDomElement* el); - virtual void savePartialProjectSession(QDomElement* el); + virtual void restorePartialProjectSession(const TQDomElement* el); + virtual void savePartialProjectSession(TQDomElement* el); k_dcop: virtual ASYNC slotDebugExternalProcess(); - virtual ASYNC slotDebugCommandLine(const QString& command); + virtual ASYNC slotDebugCommandLine(const TQString& command); private slots: void setupDcop(); void guiClientAdded(KXMLGUIClient*); - void contextMenu(QPopupMenu *popup, const Context *context); + void contextMenu(TQPopupMenu *popup, const Context *context); void toggleBreakpoint(); void contextEvaluate(); void contextWatch(); @@ -94,11 +94,11 @@ private slots: void slotRefreshBPState(const Breakpoint&); - void slotStatus(const QString &msg, int state); - void slotShowStep(const QString &fileName, int lineNum); - void slotGotoSource(const QString &fileName, int lineNum); + void slotStatus(const TQString &msg, int state); + void slotShowStep(const TQString &fileName, int lineNum); + void slotGotoSource(const TQString &fileName, int lineNum); - void slotDCOPApplicationRegistered(const QCString &appId); + void slotDCOPApplicationRegistered(const TQCString &appId); void slotCloseDrKonqi(); // Hide or show the view that's the sender of this signal. @@ -123,20 +123,20 @@ private: void setupController(); bool haveModifiedFiles(); - QGuardedPtr<VariableWidget> variableWidget; - QGuardedPtr<GDBBreakpointWidget> gdbBreakpointWidget; - QGuardedPtr<FramestackWidget> framestackWidget; - QGuardedPtr<DisassembleWidget> disassembleWidget; - QGuardedPtr<GDBOutputWidget> gdbOutputWidget; - QGuardedPtr<ViewerWidget> viewerWidget; + TQGuardedPtr<VariableWidget> variableWidget; + TQGuardedPtr<GDBBreakpointWidget> gdbBreakpointWidget; + TQGuardedPtr<FramestackWidget> framestackWidget; + TQGuardedPtr<DisassembleWidget> disassembleWidget; + TQGuardedPtr<GDBOutputWidget> gdbOutputWidget; + TQGuardedPtr<ViewerWidget> viewerWidget; GDBController *controller; - QGuardedPtr<QLabel> statusBarIndicator; - QGuardedPtr<DbgToolBar> floatingToolBar; + TQGuardedPtr<TQLabel> statusBarIndicator; + TQGuardedPtr<DbgToolBar> floatingToolBar; ProcessLineMaker* procLineMaker; ProcessLineMaker* gdbLineMaker; - QString m_contextIdent; - QCString m_drkonqi; + TQString m_contextIdent; + TQCString m_drkonqi; KDevDebugger *m_debugger; int previousDebuggerState_; diff --git a/languages/cpp/debugger/debuggertracingdialog.cpp b/languages/cpp/debugger/debuggertracingdialog.cpp index 217f0b88..41eb7896 100644 --- a/languages/cpp/debugger/debuggertracingdialog.cpp +++ b/languages/cpp/debugger/debuggertracingdialog.cpp @@ -2,9 +2,9 @@ #include "debuggertracingdialog.h" #include "breakpoint.h" -#include <qbutton.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqbutton.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klineedit.h> #include <keditlistbox.h> #include <kmessagebox.h> @@ -14,16 +14,16 @@ namespace GDBDebugger DebuggerTracingDialog ::DebuggerTracingDialog(Breakpoint* bp, - QWidget* parent, const char* name) + TQWidget* parent, const char* name) : DebuggerTracingDialogBase(parent, name), bp_(bp) { expressions->setButtons(KEditListBox::Add | KEditListBox::Remove); - connect(enable, SIGNAL(stateChanged(int)), - this, SLOT(enableOrDisable(int))); + connect(enable, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(enableOrDisable(int))); - connect(enableCustomFormat, SIGNAL(stateChanged(int)), - this, SLOT(enableOrDisableCustomFormat(int))); + connect(enableCustomFormat, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(enableOrDisableCustomFormat(int))); enable->setChecked(bp_->tracingEnabled()); expressions->setItems(bp_->tracedExpressions()); @@ -35,7 +35,7 @@ namespace GDBDebugger void DebuggerTracingDialog::enableOrDisable(int state) { - bool enable = (state == QButton::On); + bool enable = (state == TQButton::On); expressionsLabel->setEnabled(enable); expressions->setEnabled(enable); @@ -45,7 +45,7 @@ namespace GDBDebugger void DebuggerTracingDialog::enableOrDisableCustomFormat(int state) { - customFormat->setEnabled(state == QButton::On); + customFormat->setEnabled(state == TQButton::On); } void DebuggerTracingDialog::accept() @@ -57,7 +57,7 @@ namespace GDBDebugger if (enableCustomFormat->isOn()) { - QString s = customFormat->text(); + TQString s = customFormat->text(); unsigned percent_count = 0; for (unsigned i = 0; i < s.length(); ++i) if (s[i] == '%') diff --git a/languages/cpp/debugger/debuggertracingdialog.h b/languages/cpp/debugger/debuggertracingdialog.h index 1379f684..916ae912 100644 --- a/languages/cpp/debugger/debuggertracingdialog.h +++ b/languages/cpp/debugger/debuggertracingdialog.h @@ -25,7 +25,7 @@ namespace GDBDebugger Q_OBJECT public: DebuggerTracingDialog(Breakpoint* bp, - QWidget* parent, const char* name = 0); + TQWidget* parent, const char* name = 0); private slots: void enableOrDisable(int); diff --git a/languages/cpp/debugger/disassemblewidget.cpp b/languages/cpp/debugger/disassemblewidget.cpp index 759393f5..562aa1ae 100644 --- a/languages/cpp/debugger/disassemblewidget.cpp +++ b/languages/cpp/debugger/disassemblewidget.cpp @@ -22,9 +22,9 @@ #include <ktextedit.h> #include <kglobalsettings.h> -#include <qdict.h> -#include <qheader.h> -#include <qtextedit.h> +#include <tqdict.h> +#include <tqheader.h> +#include <tqtextedit.h> #include <stdlib.h> @@ -35,8 +35,8 @@ namespace GDBDebugger /***************************************************************************/ /***************************************************************************/ -DisassembleWidget::DisassembleWidget(GDBController* controller, QWidget *parent, const char *name) - : QTextEdit(parent, name), controller_(controller), +DisassembleWidget::DisassembleWidget(GDBController* controller, TQWidget *parent, const char *name) + : TQTextEdit(parent, name), controller_(controller), active_(false), lower_(0), upper_(0), @@ -92,8 +92,8 @@ void DisassembleWidget::slotActivate(bool activate) /***************************************************************************/ -void DisassembleWidget::slotShowStepInSource( const QString &, int, - const QString ¤tAddress) +void DisassembleWidget::slotShowStepInSource( const TQString &, int, + const TQString ¤tAddress) { kdDebug(9012) << "DisasssembleWidget::slotShowStepInSource()" << endl; @@ -116,7 +116,7 @@ void DisassembleWidget::getNextDisplay() { Q_ASSERT(!currentAddress_.isNull()); - QString cmd = QString("-data-disassemble -s $pc -e \"$pc + 128\" -- 0"); + TQString cmd = TQString("-data-disassemble -s $pc -e \"$pc + 128\" -- 0"); controller_->addCommandToFront( new GDBCommand( cmd, this, &DisassembleWidget::memoryRead ) ); } @@ -127,7 +127,7 @@ void DisassembleWidget::getNextDisplay() void DisassembleWidget::memoryRead(const GDBMI::ResultRecord& r) { const GDBMI::Value& content = r["asm_insns"]; - QString rawdata; + TQString rawdata; clear(); @@ -135,12 +135,12 @@ void DisassembleWidget::memoryRead(const GDBMI::ResultRecord& r) { const GDBMI::Value& line = content[i]; - QString addr = line["address"].literal(); - QString fct = line["func-name"].literal(); - QString offs = line["offset"].literal(); - QString inst = line["inst"].literal(); + TQString addr = line["address"].literal(); + TQString fct = line["func-name"].literal(); + TQString offs = line["offset"].literal(); + TQString inst = line["inst"].literal(); - rawdata += QString(addr + " " + fct+"+"+offs + " " + inst + "\n"); + rawdata += TQString(addr + " " + fct+"+"+offs + " " + inst + "\n"); if (i == 0) { lower_ = strtoul(addr.latin1(), 0, 0); @@ -155,13 +155,13 @@ void DisassembleWidget::memoryRead(const GDBMI::ResultRecord& r) } -void DisassembleWidget::showEvent(QShowEvent*) +void DisassembleWidget::showEvent(TQShowEvent*) { slotActivate(true); } -void DisassembleWidget::hideEvent(QHideEvent*) +void DisassembleWidget::hideEvent(TQHideEvent*) { slotActivate(false); } diff --git a/languages/cpp/debugger/disassemblewidget.h b/languages/cpp/debugger/disassemblewidget.h index 6b2fdd3a..55288c0c 100644 --- a/languages/cpp/debugger/disassemblewidget.h +++ b/languages/cpp/debugger/disassemblewidget.h @@ -18,7 +18,7 @@ #include "mi/gdbmi.h" -#include <qtextedit.h> +#include <tqtextedit.h> /***************************************************************************/ /***************************************************************************/ @@ -35,16 +35,16 @@ class DisassembleWidget : public QTextEdit Q_OBJECT public: - DisassembleWidget( GDBController* controller, QWidget *parent=0, const char *name=0 ); + DisassembleWidget( GDBController* controller, TQWidget *parent=0, const char *name=0 ); virtual ~DisassembleWidget(); public slots: void slotActivate(bool activate); - void slotShowStepInSource(const QString &fileName, int lineNum, const QString &address); + void slotShowStepInSource(const TQString &fileName, int lineNum, const TQString &address); private: - virtual void showEvent(QShowEvent*); - virtual void hideEvent(QHideEvent*); + virtual void showEvent(TQShowEvent*); + virtual void hideEvent(TQHideEvent*); bool displayCurrent(); void getNextDisplay(); @@ -57,7 +57,7 @@ private: unsigned long lower_; unsigned long upper_; unsigned long address_; - QString currentAddress_; + TQString currentAddress_; }; } diff --git a/languages/cpp/debugger/framestackwidget.cpp b/languages/cpp/debugger/framestackwidget.cpp index e731a1ee..fb0246e6 100644 --- a/languages/cpp/debugger/framestackwidget.cpp +++ b/languages/cpp/debugger/framestackwidget.cpp @@ -21,11 +21,11 @@ #include <kdebug.h> #include <kglobalsettings.h> -#include <qheader.h> -#include <qlistbox.h> -#include <qregexp.h> -#include <qstrlist.h> -#include <qpainter.h> +#include <tqheader.h> +#include <tqlistbox.h> +#include <tqregexp.h> +#include <tqstrlist.h> +#include <tqpainter.h> #include <ctype.h> @@ -39,9 +39,9 @@ namespace GDBDebugger { FramestackWidget::FramestackWidget(GDBController* controller, - QWidget *parent, + TQWidget *parent, const char *name, WFlags f) - : QListView(parent, name, f), + : TQListView(parent, name, f), viewedThread_(0), controller_(controller), mayUpdate_( false ) @@ -49,19 +49,19 @@ FramestackWidget::FramestackWidget(GDBController* controller, setRootIsDecorated(true); setSorting(-1); setSelectionMode(Single); - addColumn(QString::null); // Frame number - addColumn(QString::null); // function name/address - addColumn(QString::null); // source + addColumn(TQString::null); // Frame number + addColumn(TQString::null); // function name/address + addColumn(TQString::null); // source header()->hide(); // FIXME: maybe, all debugger components should derive from // a base class that does this connect. - connect(controller, SIGNAL(event(GDBController::event_t)), - this, SLOT(slotEvent(GDBController::event_t))); + connect(controller, TQT_SIGNAL(event(GDBController::event_t)), + this, TQT_SLOT(slotEvent(GDBController::event_t))); - connect( this, SIGNAL(clicked(QListViewItem*)), - this, SLOT(slotSelectionChanged(QListViewItem*)) ); + connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)) ); } @@ -72,11 +72,11 @@ FramestackWidget::~FramestackWidget() /***************************************************************************/ -QListViewItem *FramestackWidget::lastChild() const +TQListViewItem *FramestackWidget::lastChild() const { - QListViewItem* child = firstChild(); + TQListViewItem* child = firstChild(); if (child) - while (QListViewItem* nextChild = child->nextSibling()) + while (TQListViewItem* nextChild = child->nextSibling()) child = nextChild; return child; @@ -88,12 +88,12 @@ void FramestackWidget::clear() { viewedThread_ = 0; - QListView::clear(); + TQListView::clear(); } /***************************************************************************/ -void FramestackWidget::slotSelectionChanged(QListViewItem *thisItem) +void FramestackWidget::slotSelectionChanged(TQListViewItem *thisItem) { ThreadStackItem *thread = dynamic_cast<ThreadStackItem*> (thisItem); if (thread) @@ -110,7 +110,7 @@ void FramestackWidget::slotSelectionChanged(QListViewItem *thisItem) // Switch to the target thread. if (frame->threadNo() != -1) controller_->addCommand( - new GDBCommand(QString("-thread-select %1") + new GDBCommand(TQString("-thread-select %1") .arg(frame->threadNo()).ascii())); viewedThread_ = findThread(frame->threadNo()); @@ -186,7 +186,7 @@ void FramestackWidget::slotEvent(GDBController::event_t e) } } -void FramestackWidget::showEvent(QShowEvent*) +void FramestackWidget::showEvent(TQShowEvent*) { if (controller_->stateIsOn(s_appRunning|s_dbgBusy|s_dbgNotStarted|s_shuttingDown)) return; @@ -208,7 +208,7 @@ void FramestackWidget::getBacktrace(int min_frame, int max_frame) maxFrame_ = max_frame; controller_->addCommand( - new GDBCommand(QString("-stack-info-depth %1").arg(max_frame+1), + new GDBCommand(TQString("-stack-info-depth %1").arg(max_frame+1), this, &FramestackWidget::handleStackDepth)); } @@ -223,7 +223,7 @@ void FramestackWidget::handleStackDepth(const GDBMI::ResultRecord& r) maxFrame_ = existing_frames; //add the following command to the front, so noone switches threads in between controller_->addCommandToFront( - new GDBCommand(QString("-stack-list-frames %1 %2") + new GDBCommand(TQString("-stack-list-frames %1 %2") .arg(minFrame_).arg(maxFrame_), this, &FramestackWidget::parseGDBBacktraceList)); } @@ -235,7 +235,7 @@ void FramestackWidget::getBacktraceForThread(int threadNo) { // Switch to the target thread. controller_->addCommand( - new GDBCommand(QString("-thread-select %1") + new GDBCommand(TQString("-thread-select %1") .arg(threadNo).ascii())); viewedThread_ = findThread(threadNo); @@ -247,7 +247,7 @@ void FramestackWidget::getBacktraceForThread(int threadNo) { // Switch back to the original thread. controller_->addCommand( - new GDBCommand(QString("-thread-select %1") + new GDBCommand(TQString("-thread-select %1") .arg(currentThread).ascii())); } } @@ -271,15 +271,15 @@ void FramestackWidget::handleThreadList(const GDBMI::ResultRecord& r) // Really threaded program. for(unsigned i = 0, e = ids.results.size(); i != e; ++i) { - QString id = ids.results[i]->value->literal(); + TQString id = ids.results[i]->value->literal(); controller_->addCommand( - new GDBCommand(QString("-thread-select %1").arg(id).ascii(), + new GDBCommand(TQString("-thread-select %1").arg(id).ascii(), this, &FramestackWidget::handleThread)); } controller_->addCommand( - new GDBCommand(QString("-thread-select %1") + new GDBCommand(TQString("-thread-select %1") .arg(controller_->currentThread()).ascii())); } @@ -292,13 +292,13 @@ void FramestackWidget::handleThreadList(const GDBMI::ResultRecord& r) void FramestackWidget::handleThread(const GDBMI::ResultRecord& r) { - QString id = r["new-thread-id"].literal(); + TQString id = r["new-thread-id"].literal(); int id_num = id.toInt(); - QString name_column; - QString func_column; - QString args_column; - QString source_column; + TQString name_column; + TQString func_column; + TQString args_column; + TQString source_column; formatFrame(r["frame"], func_column, source_column); @@ -329,7 +329,7 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r) Q_ASSERT(dynamic_cast<const GDBMI::ListValue*>(&frames)); // Remove "..." item, if there's one. - QListViewItem* last; + TQListViewItem* last; if (viewedThread_) { last = viewedThread_->firstChild(); @@ -352,13 +352,13 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r) // For now, just produce string simular to gdb // console output. In future we might have a table, // or something better. - QString frameDesc; + TQString frameDesc; - QString name_column; - QString func_column; - QString source_column; + TQString name_column; + TQString func_column; + TQString source_column; - QString level_s = frame["level"].literal(); + TQString level_s = frame["level"].literal(); int level = level_s.toInt(); name_column = "#" + level_s; @@ -377,7 +377,7 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r) } if (has_more_frames) { - QListViewItem* item; + TQListViewItem* item; if (viewedThread_) item = new FrameStackItem(viewedThread_, lastLevel+1, "..."); else @@ -404,7 +404,7 @@ void FramestackWidget::parseGDBBacktraceList(const GDBMI::ResultRecord& r) ThreadStackItem *FramestackWidget::findThread(int threadNo) { - QListViewItem *sibling = firstChild(); + TQListViewItem *sibling = firstChild(); while (sibling) { ThreadStackItem *thread = dynamic_cast<ThreadStackItem*> (sibling); @@ -422,7 +422,7 @@ ThreadStackItem *FramestackWidget::findThread(int threadNo) FrameStackItem *FramestackWidget::findFrame(int frameNo, int threadNo) { - QListViewItem* frameItem = 0; + TQListViewItem* frameItem = 0; if (threadNo != -1) { @@ -445,8 +445,8 @@ FrameStackItem *FramestackWidget::findFrame(int frameNo, int threadNo) } void FramestackWidget::formatFrame(const GDBMI::Value& frame, - QString& func_column, - QString& source_column) + TQString& func_column, + TQString& source_column) { func_column = source_column = ""; @@ -476,15 +476,15 @@ void FramestackWidget::formatFrame(const GDBMI::Value& frame, } -void FramestackWidget::drawContentsOffset( QPainter * p, int ox, int oy, +void FramestackWidget::drawContentsOffset( TQPainter * p, int ox, int oy, int cx, int cy, int cw, int ch ) { - QListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); + TQListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); int s1_x = header()->sectionPos(1); int s1_w = header()->sectionSize(1); - QRect section1(s1_x, contentsHeight(), s1_w, viewport()->height()); + TQRect section1(s1_x, contentsHeight(), s1_w, viewport()->height()); p->fillRect(section1, KGlobalSettings::alternateBackgroundColor()); } @@ -495,8 +495,8 @@ void FramestackWidget::drawContentsOffset( QPainter * p, int ox, int oy, FrameStackItem::FrameStackItem(FramestackWidget *parent, unsigned frameNo, - const QString &name) - : QListViewItem(parent, parent->lastChild()), + const TQString &name) + : TQListViewItem(parent, parent->lastChild()), frameNo_(frameNo), threadNo_(-1) { @@ -507,8 +507,8 @@ FrameStackItem::FrameStackItem(FramestackWidget *parent, FrameStackItem::FrameStackItem(ThreadStackItem *parent, unsigned frameNo, - const QString &name) - : QListViewItem(parent, parent->lastChild()), + const TQString &name) + : TQListViewItem(parent, parent->lastChild()), frameNo_(frameNo), threadNo_(parent->threadNo()) { @@ -522,11 +522,11 @@ FrameStackItem::~FrameStackItem() // ************************************************************************** -QListViewItem *FrameStackItem::lastChild() const +TQListViewItem *FrameStackItem::lastChild() const { - QListViewItem* child = firstChild(); + TQListViewItem* child = firstChild(); if (child) - while (QListViewItem* nextChild = child->nextSibling()) + while (TQListViewItem* nextChild = child->nextSibling()) child = nextChild; return child; @@ -547,7 +547,7 @@ void FrameStackItem::setOpen(bool open) } } #endif - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); } // ************************************************************************** @@ -555,7 +555,7 @@ void FrameStackItem::setOpen(bool open) // ************************************************************************** ThreadStackItem::ThreadStackItem(FramestackWidget *parent, unsigned threadNo) -: QListViewItem(parent), +: TQListViewItem(parent), threadNo_(threadNo) { setText(0, i18n("Thread %1").arg(threadNo_)); @@ -569,11 +569,11 @@ ThreadStackItem::~ThreadStackItem() // ************************************************************************** -QListViewItem *ThreadStackItem::lastChild() const +TQListViewItem *ThreadStackItem::lastChild() const { - QListViewItem* child = firstChild(); + TQListViewItem* child = firstChild(); if (child) - while (QListViewItem* nextChild = child->nextSibling()) + while (TQListViewItem* nextChild = child->nextSibling()) child = nextChild; return child; @@ -609,31 +609,31 @@ void ThreadStackItem::setOpen(bool open) setText(2, savedSource_); } - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); } -void FrameStackItem::paintCell(QPainter * p, const QColorGroup & cg, +void FrameStackItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { - QColorGroup cg2(cg); + TQColorGroup cg2(cg); if (column % 2) { - cg2.setColor(QColorGroup::Base, + cg2.setColor(TQColorGroup::Base, KGlobalSettings::alternateBackgroundColor()); } - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } -void ThreadStackItem::paintCell(QPainter * p, const QColorGroup & cg, +void ThreadStackItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { - QColorGroup cg2(cg); + TQColorGroup cg2(cg); if (column % 2) { - cg2.setColor(QColorGroup::Base, + cg2.setColor(TQColorGroup::Base, KGlobalSettings::alternateBackgroundColor()); } - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } diff --git a/languages/cpp/debugger/framestackwidget.h b/languages/cpp/debugger/framestackwidget.h index 36cac1ba..656d2cdb 100644 --- a/languages/cpp/debugger/framestackwidget.h +++ b/languages/cpp/debugger/framestackwidget.h @@ -16,8 +16,8 @@ #ifndef _FRAMESTACKWIDGET_H_ #define _FRAMESTACKWIDGET_H_ -#include <qlistview.h> -#include <qstringlist.h> +#include <tqlistview.h> +#include <tqstringlist.h> #include "gdbcontroller.h" #include "mi/miparser.h" @@ -38,9 +38,9 @@ public: virtual ~ThreadStackItem(); void setOpen(bool open); - QListViewItem *lastChild() const; + TQListViewItem *lastChild() const; - void paintCell(QPainter * p, const QColorGroup & cg, + void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); int threadNo() @@ -48,8 +48,8 @@ public: private: int threadNo_; - QString savedFunc_; - QString savedSource_; + TQString savedFunc_; + TQString savedSource_; }; /***************************************************************************/ @@ -61,16 +61,16 @@ class FrameStackItem : public QListViewItem public: FrameStackItem(FramestackWidget *parent, unsigned frameNo, - const QString &name); + const TQString &name); FrameStackItem(ThreadStackItem *parent, unsigned frameNo, - const QString &name); + const TQString &name); virtual ~FrameStackItem(); void setOpen(bool open); - QListViewItem *lastChild() const; + TQListViewItem *lastChild() const; - void paintCell(QPainter * p, const QColorGroup & cg, + void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); int frameNo() @@ -94,11 +94,11 @@ class FramestackWidget : public QListView public: FramestackWidget( GDBController* controller, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0, WFlags f=0 ); virtual ~FramestackWidget(); - QListViewItem *lastChild() const; + TQListViewItem *lastChild() const; ThreadStackItem *findThread(int threadNo); FrameStackItem *findFrame(int frameNo, int threadNo); @@ -108,7 +108,7 @@ public: protected: - void drawContentsOffset( QPainter * p, int ox, int oy, + void drawContentsOffset( TQPainter * p, int ox, int oy, int cx, int cy, int cw, int ch ); @@ -120,8 +120,8 @@ private: The function is used both for frames and threads. */ void formatFrame(const GDBMI::Value& frame, - QString& func_column, - QString& source_column); + TQString& func_column, + TQString& source_column); /** Cause gdb to produce backtrace for the current thread. @@ -148,13 +148,13 @@ private: public slots: void slotEvent(GDBController::event_t e); - void slotSelectionChanged(QListViewItem *thisItem); + void slotSelectionChanged(TQListViewItem *thisItem); #if QT_VERSION < 300 private: - QListViewItem* findItemWhichBeginsWith(const QString& text) const; + TQListViewItem* findItemWhichBeginsWith(const TQString& text) const; #endif - virtual void showEvent(QShowEvent*); + virtual void showEvent(TQShowEvent*); private: diff --git a/languages/cpp/debugger/gdbbreakpointwidget.cpp b/languages/cpp/debugger/gdbbreakpointwidget.cpp index f9a83d6c..b092a015 100644 --- a/languages/cpp/debugger/gdbbreakpointwidget.cpp +++ b/languages/cpp/debugger/gdbbreakpointwidget.cpp @@ -29,18 +29,18 @@ #include <kurl.h> #include <kmessagebox.h> -#include <qvbuttongroup.h> -#include <qfileinfo.h> -#include <qheader.h> -#include <qtable.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcheckbox.h> +#include <tqvbuttongroup.h> +#include <tqfileinfo.h> +#include <tqheader.h> +#include <tqtable.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> #include <stdlib.h> #include <ctype.h> @@ -80,7 +80,7 @@ class BreakpointTableRow : public QTableItem { public: - BreakpointTableRow(QTable* table, EditType editType, Breakpoint* bp); + BreakpointTableRow(TQTable* table, EditType editType, Breakpoint* bp); ~BreakpointTableRow(); bool match (Breakpoint* bp) const; @@ -100,9 +100,9 @@ private: /***************************************************************************/ /***************************************************************************/ -BreakpointTableRow::BreakpointTableRow(QTable* parent, EditType editType, +BreakpointTableRow::BreakpointTableRow(TQTable* parent, EditType editType, Breakpoint* bp) : - QTableItem(parent, editType, ""), + TQTableItem(parent, editType, ""), m_breakpoint(bp) { appendEmptyRow(); @@ -140,13 +140,13 @@ void BreakpointTableRow::appendEmptyRow() table()->setItem(row, Control, this); - QCheckTableItem* cti = new QCheckTableItem( table(), ""); + TQCheckTableItem* cti = new TQCheckTableItem( table(), ""); table()->setItem(row, Enable, cti); ComplexEditCell* act = new ComplexEditCell(table()); table()->setItem(row, Tracing, act); - QObject::connect(act, SIGNAL(edit(QTableItem*)), - table()->parent(), SLOT(editTracing(QTableItem*))); + TQObject::connect(act, TQT_SIGNAL(edit(TQTableItem*)), + table()->parent(), TQT_SLOT(editTracing(TQTableItem*))); } /***************************************************************************/ @@ -155,22 +155,22 @@ void BreakpointTableRow::setRow() { if ( m_breakpoint ) { - QTableItem *item = table()->item ( row(), Enable ); + TQTableItem *item = table()->item ( row(), Enable ); Q_ASSERT(item->rtti() == 2); - ((QCheckTableItem*)item)->setChecked(m_breakpoint->isEnabled()); + ((TQCheckTableItem*)item)->setChecked(m_breakpoint->isEnabled()); - QString status=m_breakpoint->statusDisplay(m_activeFlag); + TQString status=m_breakpoint->statusDisplay(m_activeFlag); table()->setText(row(), Status, status); table()->setText(row(), Condition, m_breakpoint->conditional()); - table()->setText(row(), IgnoreCount, QString::number(m_breakpoint->ignoreCount() )); - table()->setText(row(), Hits, QString::number(m_breakpoint->hits() )); + table()->setText(row(), IgnoreCount, TQString::number(m_breakpoint->ignoreCount() )); + table()->setText(row(), Hits, TQString::number(m_breakpoint->hits() )); - QString displayType = m_breakpoint->displayType(); + TQString displayType = m_breakpoint->displayType(); table()->setText(row(), Location, m_breakpoint->location()); - QTableItem* ce = table()->item( row(), Tracing ); + TQTableItem* ce = table()->item( row(), Tracing ); ce->setText(breakpoint()->tracingEnabled() ? "Enabled" : "Disabled"); // In case there's editor open in this cell, update it too. static_cast<ComplexEditCell*>(ce)->updateValue(); @@ -196,15 +196,15 @@ void BreakpointTableRow::setRow() /***************************************************************************/ GDBBreakpointWidget::GDBBreakpointWidget(GDBController* controller, - QWidget *parent, const char *name) : -QHBox(parent, name), + TQWidget *parent, const char *name) : +TQHBox(parent, name), controller_(controller) { m_table = new GDBTable(0, numCols, this, name); - m_table->setSelectionMode(QTable::SingleRow); + m_table->setSelectionMode(TQTable::SingleRow); m_table->setShowGrid (false); m_table->setLeftMargin(0); - m_table->setFocusStyle(QTable::FollowStyle); + m_table->setFocusStyle(TQTable::FollowStyle); m_table->hideColumn(Control); m_table->setColumnReadOnly(Type, true); @@ -212,7 +212,7 @@ controller_(controller) m_table->setColumnReadOnly(Hits, true); m_table->setColumnWidth( Enable, 20); - QHeader *header = m_table->horizontalHeader(); + TQHeader *header = m_table->horizontalHeader(); header->setLabel( Enable, "" ); header->setLabel( Type, i18n("Type") ); @@ -223,7 +223,7 @@ controller_(controller) header->setLabel( Hits, i18n("Hits") ); header->setLabel( Tracing, i18n("Tracing") ); - QPopupMenu* newBreakpoint = new QPopupMenu(this); + TQPopupMenu* newBreakpoint = new TQPopupMenu(this); newBreakpoint->insertItem(i18n("Code breakpoint", "Code"), BP_TYPE_FilePos); newBreakpoint->insertItem(i18n("Data breakpoint", "Data write"), @@ -232,7 +232,7 @@ controller_(controller) BP_TYPE_ReadWatchpoint); - m_ctxMenu = new QPopupMenu( this ); + m_ctxMenu = new TQPopupMenu( this ); m_ctxMenu->insertItem( i18n("New breakpoint", "New"), newBreakpoint); m_ctxMenu->insertItem( i18n( "Show text" ), BW_ITEM_Show ); @@ -251,39 +251,39 @@ controller_(controller) m_table->show(); - connect( newBreakpoint, SIGNAL(activated(int)), - this, SLOT(slotAddBlankBreakpoint(int)) ); + connect( newBreakpoint, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotAddBlankBreakpoint(int)) ); - connect( m_table, SIGNAL(contextMenuRequested(int, int, const QPoint &)), - this, SLOT(slotContextMenuShow(int, int, const QPoint & )) ); - connect( m_ctxMenu, SIGNAL(activated(int)), - this, SLOT(slotContextMenuSelect(int)) ); + connect( m_table, TQT_SIGNAL(contextMenuRequested(int, int, const TQPoint &)), + this, TQT_SLOT(slotContextMenuShow(int, int, const TQPoint & )) ); + connect( m_ctxMenu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotContextMenuSelect(int)) ); - connect( m_table, SIGNAL(doubleClicked(int, int, int, const QPoint &)), - this, SLOT(slotRowDoubleClicked(int, int, int, const QPoint &))); + connect( m_table, TQT_SIGNAL(doubleClicked(int, int, int, const TQPoint &)), + this, TQT_SLOT(slotRowDoubleClicked(int, int, int, const TQPoint &))); - connect( m_table, SIGNAL(valueChanged(int, int)), - this, SLOT(slotNewValue(int, int))); + connect( m_table, TQT_SIGNAL(valueChanged(int, int)), + this, TQT_SLOT(slotNewValue(int, int))); - connect( m_table, SIGNAL(returnPressed()), - this, SLOT(slotEditBreakpoint())); -// connect( m_table, SIGNAL(f2Pressed()), -// this, SLOT(slotEditBreakpoint())); - connect( m_table, SIGNAL(deletePressed()), - this, SLOT(slotRemoveBreakpoint())); + connect( m_table, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(slotEditBreakpoint())); +// connect( m_table, TQT_SIGNAL(f2Pressed()), +// this, TQT_SLOT(slotEditBreakpoint())); + connect( m_table, TQT_SIGNAL(deletePressed()), + this, TQT_SLOT(slotRemoveBreakpoint())); // This slot doesn't exist anymore -// connect( m_table, SIGNAL(insertPressed()), -// this, SLOT(slotAddBlankBreakpoint())); +// connect( m_table, TQT_SIGNAL(insertPressed()), +// this, TQT_SLOT(slotAddBlankBreakpoint())); // FIXME: maybe, all debugger components should derive from // a base class that does this connect. - connect(controller, SIGNAL(event(GDBController::event_t)), - this, SLOT(slotEvent(GDBController::event_t))); + connect(controller, TQT_SIGNAL(event(GDBController::event_t)), + this, TQT_SLOT(slotEvent(GDBController::event_t))); connect(controller, - SIGNAL(watchpointHit(int, const QString&, const QString&)), + TQT_SIGNAL(watchpointHit(int, const TQString&, const TQString&)), this, - SLOT(slotWatchpointHit(int, const QString&, const QString&))); + TQT_SLOT(slotWatchpointHit(int, const TQString&, const TQString&))); } /***************************************************************************/ @@ -357,8 +357,8 @@ void GDBBreakpointWidget::slotBreakpointHit(int id) } void GDBBreakpointWidget::slotWatchpointHit(int id, - const QString& oldValue, - const QString& newValue) + const TQString& oldValue, + const TQString& newValue) { BreakpointTableRow* br = findId(id); @@ -451,10 +451,10 @@ bool GDBBreakpointWidget::hasWatchpointForAddress( BreakpointTableRow* GDBBreakpointWidget::addBreakpoint(Breakpoint *bp) { BreakpointTableRow* btr = - new BreakpointTableRow( m_table, QTableItem::WhenCurrent, bp ); + new BreakpointTableRow( m_table, TQTableItem::WhenCurrent, bp ); - connect(bp, SIGNAL(modified(Breakpoint*)), - this, SLOT(slotBreakpointModified(Breakpoint*))); + connect(bp, TQT_SIGNAL(modified(Breakpoint*)), + this, TQT_SLOT(slotBreakpointModified(Breakpoint*))); sendToGdb(*bp); @@ -489,7 +489,7 @@ void GDBBreakpointWidget::removeBreakpoint(BreakpointTableRow* btr) /***************************************************************************/ -void GDBBreakpointWidget::slotToggleBreakpoint(const QString &fileName, int lineNum) +void GDBBreakpointWidget::slotToggleBreakpoint(const TQString &fileName, int lineNum) { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); @@ -504,7 +504,7 @@ void GDBBreakpointWidget::slotToggleBreakpoint(const QString &fileName, int line /***************************************************************************/ -void GDBBreakpointWidget::slotToggleBreakpointEnabled(const QString &fileName, int lineNum) +void GDBBreakpointWidget::slotToggleBreakpointEnabled(const TQString &fileName, int lineNum) { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); @@ -520,7 +520,7 @@ void GDBBreakpointWidget::slotToggleBreakpointEnabled(const QString &fileName, i /***************************************************************************/ -void GDBBreakpointWidget::slotToggleWatchpoint(const QString &varName) +void GDBBreakpointWidget::slotToggleWatchpoint(const TQString &varName) { Watchpoint *watchpoint = new Watchpoint(varName, false, true); BreakpointTableRow* btr = find(watchpoint); @@ -557,7 +557,7 @@ void GDBBreakpointWidget::handleBreakpointList(const GDBMI::ResultRecord& r) if (b.hasField("cond")) bp->setConditional(b["cond"].literal()); else - bp->setConditional(QString::null); + bp->setConditional(TQString::null); btr->setRow(); emit publishBPState(*bp); } @@ -565,7 +565,7 @@ void GDBBreakpointWidget::handleBreakpointList(const GDBMI::ResultRecord& r) { // It's a breakpoint added outside, most probably // via gdb console. Add it now. - QString type = b["type"].literal(); + TQString type = b["type"].literal(); if (type == "breakpoint" || type == "hw breakpoint") { @@ -580,7 +580,7 @@ void GDBBreakpointWidget::handleBreakpointList(const GDBMI::ResultRecord& r) bp->setPending(false); new BreakpointTableRow(m_table, - QTableItem::WhenCurrent, + TQTableItem::WhenCurrent, bp); emit publishBPState(*bp); @@ -607,7 +607,7 @@ void GDBBreakpointWidget::handleBreakpointList(const GDBMI::ResultRecord& r) } } -void GDBBreakpointWidget::handleTracingPrintf(const QValueVector<QString>& s) +void GDBBreakpointWidget::handleTracingPrintf(const TQValueVector<TQString>& s) { // The first line of output is the command itself, which we don't need. for(unsigned i = 1; i < s.size(); ++i) @@ -684,7 +684,7 @@ void GDBBreakpointWidget::slotRemoveAllBreakpoints() /***************************************************************************/ -void GDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const QPoint &) +void GDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const TQPoint &) { if ( btn == Qt::LeftButton ) { @@ -703,7 +703,7 @@ void GDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const } } -void GDBBreakpointWidget::slotContextMenuShow( int row, int /*col*/, const QPoint &mousePos ) +void GDBBreakpointWidget::slotContextMenuShow( int row, int /*col*/, const TQPoint &mousePos ) { BreakpointTableRow *btr = (BreakpointTableRow *)m_table->item(row, Control ); @@ -813,7 +813,7 @@ void GDBBreakpointWidget::slotContextMenuSelect( int item ) /***************************************************************************/ -void GDBBreakpointWidget::slotEditRow(int row, int col, const QPoint &) +void GDBBreakpointWidget::slotEditRow(int row, int col, const TQPoint &) { // kdDebug(9012) << "in slotEditRow row=" << row << endl; BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(row, Control); @@ -830,7 +830,7 @@ void GDBBreakpointWidget::slotNewValue(int row, int col) { BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(row, Control); - QString new_value = m_table->text(row, col); + TQString new_value = m_table->text(row, col); if (btr) { @@ -839,8 +839,8 @@ void GDBBreakpointWidget::slotNewValue(int row, int col) { case Enable: { - QCheckTableItem *item = - (QCheckTableItem*)m_table->item ( row, Enable ); + TQCheckTableItem *item = + (TQCheckTableItem*)m_table->item ( row, Enable ); bp->setEnabled(item->isChecked()); } break; @@ -913,7 +913,7 @@ void GDBBreakpointWidget::slotNewValue(int row, int col) /***************************************************************************/ -void GDBBreakpointWidget::slotEditBreakpoint(const QString &fileName, int lineNum) +void GDBBreakpointWidget::slotEditBreakpoint(const TQString &fileName, int lineNum) { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); @@ -922,7 +922,7 @@ void GDBBreakpointWidget::slotEditBreakpoint(const QString &fileName, int lineNu if (btr) { - QTableSelection ts; + TQTableSelection ts; ts.init(btr->row(), 0); ts.expandTo(btr->row(), numCols); m_table->addSelection(ts); @@ -1019,7 +1019,7 @@ void GDBBreakpointWidget::slotEditBreakpoint() } -void GDBBreakpointWidget::editTracing(QTableItem* item) +void GDBBreakpointWidget::editTracing(TQTableItem* item) { BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(item->row(), Control); @@ -1032,7 +1032,7 @@ void GDBBreakpointWidget::editTracing(QTableItem* 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. - if (r == QDialog::Accepted) + if (r == TQDialog::Accepted) { // The dialog has modified "btr->breakpoint()" already. // Calling 'slotNewValue' will flush the changes back @@ -1046,42 +1046,42 @@ void GDBBreakpointWidget::editTracing(QTableItem* item) /***************************************************************************/ -void GDBBreakpointWidget::savePartialProjectSession(QDomElement* el) +void GDBBreakpointWidget::savePartialProjectSession(TQDomElement* el) { - QDomDocument domDoc = el->ownerDocument(); + TQDomDocument domDoc = el->ownerDocument(); if (domDoc.isNull()) return; - QDomElement breakpointListEl = domDoc.createElement("breakpointList"); + TQDomElement breakpointListEl = domDoc.createElement("breakpointList"); for ( int row = 0; row < m_table->numRows(); row++ ) { BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(row, Control); Breakpoint* bp = btr->breakpoint(); - QDomElement breakpointEl = - domDoc.createElement("breakpoint"+QString::number(row)); + TQDomElement breakpointEl = + domDoc.createElement("breakpoint"+TQString::number(row)); breakpointEl.setAttribute("type", bp->type()); breakpointEl.setAttribute("location", bp->location(false)); breakpointEl.setAttribute("enabled", bp->isEnabled()); breakpointEl.setAttribute("condition", bp->conditional()); breakpointEl.setAttribute("tracingEnabled", - QString::number(bp->tracingEnabled())); + TQString::number(bp->tracingEnabled())); breakpointEl.setAttribute("traceFormatStringEnabled", - QString::number(bp->traceFormatStringEnabled())); + TQString::number(bp->traceFormatStringEnabled())); breakpointEl.setAttribute("tracingFormatString", bp->traceFormatString()); - QDomElement tracedExpressions = + TQDomElement tracedExpressions = domDoc.createElement("tracedExpressions"); - QStringList::const_iterator i, e; + TQStringList::const_iterator i, e; for(i = bp->tracedExpressions().begin(), e = bp->tracedExpressions().end(); i != e; ++i) { - QDomElement expr = domDoc.createElement("expression"); + TQDomElement expr = domDoc.createElement("expression"); expr.setAttribute("value", *i); tracedExpressions.appendChild(expr); } @@ -1097,7 +1097,7 @@ void GDBBreakpointWidget::savePartialProjectSession(QDomElement* el) /***************************************************************************/ -void GDBBreakpointWidget::restorePartialProjectSession(const QDomElement* el) +void GDBBreakpointWidget::restorePartialProjectSession(const TQDomElement* el) { /** Eventually, would be best to make each breakpoint type handle loading/ saving it's data. The only problem is that on load, we need to allocate @@ -1106,10 +1106,10 @@ void GDBBreakpointWidget::restorePartialProjectSession(const QDomElement* el) KDE (Boost.Serialization is too much dependency, and rolling my own is boring). */ - QDomElement breakpointListEl = el->namedItem("breakpointList").toElement(); + TQDomElement breakpointListEl = el->namedItem("breakpointList").toElement(); if (!breakpointListEl.isNull()) { - QDomElement breakpointEl; + TQDomElement breakpointEl; for (breakpointEl = breakpointListEl.firstChild().toElement(); !breakpointEl.isNull(); breakpointEl = breakpointEl.nextSibling().toElement()) @@ -1155,17 +1155,17 @@ void GDBBreakpointWidget::restorePartialProjectSession(const QDomElement* el) breakpointEl.attribute("traceFormatStringEnabled", "0") .toInt()); - QDomNode tracedExpr = + TQDomNode tracedExpr = breakpointEl.namedItem("tracedExpressions"); if (!tracedExpr.isNull()) { - QStringList l; + TQStringList l; - for(QDomNode c = tracedExpr.firstChild(); !c.isNull(); + for(TQDomNode c = tracedExpr.firstChild(); !c.isNull(); c = c.nextSibling()) { - QDomElement el = c.toElement(); + TQDomElement el = c.toElement(); l.push_back(el.attribute("value", "")); } bp->setTracedExpressions(l); @@ -1186,11 +1186,11 @@ void GDBBreakpointWidget::restorePartialProjectSession(const QDomElement* el) /***************************************************************************/ -void GDBBreakpointWidget::focusInEvent( QFocusEvent */* e*/ ) +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(QTable::FollowStyle); + // m_table->setFocusStyle(TQTable::FollowStyle); // in constructor, so I suspect Qt bug. But anyway, without // current cell keyboard actions like Enter for edit won't work, // so keyboard focus does not makes much sense. @@ -1203,42 +1203,42 @@ void GDBBreakpointWidget::focusInEvent( QFocusEvent */* e*/ ) } ComplexEditCell:: -ComplexEditCell(QTable* table) -: QTableItem(table, QTableItem::WhenCurrent) +ComplexEditCell(TQTable* table) +: TQTableItem(table, TQTableItem::WhenCurrent) { } -QWidget* ComplexEditCell::createEditor() const +TQWidget* ComplexEditCell::createEditor() const { - QHBox* box = new QHBox( table()->viewport() ); + TQHBox* box = new TQHBox( table()->viewport() ); box->setPaletteBackgroundColor( table()->palette().active().highlight()); - label_ = new QLabel(text(), box, "label"); + label_ = new TQLabel(text(), box, "label"); label_->setBackgroundMode(Qt::PaletteHighlight); // Sorry for hardcode, but '2' is already hardcoded in - // Qt source, in QTableItem::paint. Since I don't want the + // Qt 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); - QPalette p = label_->palette(); + TQPalette p = label_->palette(); - p.setColor(QPalette::Active, QColorGroup::Foreground, + p.setColor(TQPalette::Active, TQColorGroup::Foreground, table()->palette().active().highlightedText()); - p.setColor(QPalette::Inactive, QColorGroup::Foreground, + p.setColor(TQPalette::Inactive, TQColorGroup::Foreground, table()->palette().active().highlightedText()); label_->setPalette(p); - QPushButton* b = new QPushButton("...", box); + TQPushButton* b = new TQPushButton("...", box); // This is exactly what is done in QDesigner 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 // than 20. b->setFixedWidth( 20 ); - connect(b, SIGNAL(clicked()), this, SLOT(slotEdit())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit())); return box; } diff --git a/languages/cpp/debugger/gdbbreakpointwidget.h b/languages/cpp/debugger/gdbbreakpointwidget.h index 91dc40a5..42d1286d 100644 --- a/languages/cpp/debugger/gdbbreakpointwidget.h +++ b/languages/cpp/debugger/gdbbreakpointwidget.h @@ -16,11 +16,11 @@ #ifndef _GDBBreakpointWidget_H_ #define _GDBBreakpointWidget_H_ -#include <qhbox.h> -#include <qpopupmenu.h> -#include <qtable.h> -#include <qguardedptr.h> -#include <qvaluevector.h> +#include <tqhbox.h> +#include <tqpopupmenu.h> +#include <tqtable.h> +#include <tqguardedptr.h> +#include <tqvaluevector.h> #include "mi/gdbmi.h" #include "gdbcontroller.h" @@ -47,24 +47,24 @@ class GDBBreakpointWidget : public QHBox public: GDBBreakpointWidget( GDBController* controller, - QWidget* parent=0, const char* name=0 ); + TQWidget* parent=0, const char* name=0 ); virtual ~GDBBreakpointWidget(); void reset(); - void savePartialProjectSession(QDomElement* el); - void restorePartialProjectSession(const QDomElement* el); + void savePartialProjectSession(TQDomElement* el); + void restorePartialProjectSession(const TQDomElement* el); bool hasWatchpointForAddress(unsigned long long address) const; public slots: // Connected to from the editor widget: - void slotToggleBreakpoint(const QString &filename, int lineNum); - void slotToggleBreakpointEnabled(const QString &fileName, int lineNum); + void slotToggleBreakpoint(const TQString &filename, int lineNum); + void slotToggleBreakpointEnabled(const TQString &fileName, int lineNum); // Connected to from the variable widget: - void slotToggleWatchpoint(const QString &varName); + void slotToggleWatchpoint(const TQString &varName); void slotBreakpointSet(Breakpoint*); @@ -74,33 +74,33 @@ public slots: protected: - virtual void focusInEvent(QFocusEvent *e); + virtual void focusInEvent(TQFocusEvent *e); friend class BreakpointActionCell; // for access to slotNewValue private slots: void slotRemoveBreakpoint(); void slotRemoveAllBreakpoints(); - void slotEditBreakpoint(const QString &fileName, int lineNum); + void slotEditBreakpoint(const TQString &fileName, int lineNum); void slotEditBreakpoint(); void slotAddBlankBreakpoint(int idx); - void slotRowDoubleClicked(int row, int col, int button, const QPoint & mousePos); - void slotContextMenuShow( int row, int col, const QPoint &mousePos ); + void slotRowDoubleClicked(int row, int col, int button, const TQPoint & mousePos); + void slotContextMenuShow( int row, int col, const TQPoint &mousePos ); void slotContextMenuSelect( int item ); - void slotEditRow(int row, int col, const QPoint & mousePos); + void slotEditRow(int row, int col, const TQPoint & mousePos); void slotNewValue(int row, int col); - void editTracing(QTableItem* item); + void editTracing(TQTableItem* item); void slotBreakpointModified(Breakpoint*); void slotEvent(GDBController::event_t); void slotWatchpointHit(int id, - const QString& oldValue, - const QString& newValue); + const TQString& oldValue, + const TQString& newValue); signals: void publishBPState(const Breakpoint& brkpt); void refreshBPState(const Breakpoint& brkpt); - void gotoSourcePosition(const QString &fileName, int lineNum); + void gotoSourcePosition(const TQString &fileName, int lineNum); // Emitted when output from yet another passed tracepoint is available. void tracingOutput(const char*); @@ -116,13 +116,13 @@ private: void sendToGdb(Breakpoint &); void handleBreakpointList(const GDBMI::ResultRecord&); - void handleTracingPrintf(const QValueVector<QString>& s); + void handleTracingPrintf(const TQValueVector<TQString>& s); private: GDBController* controller_; GDBTable* m_table; - QPopupMenu* m_ctxMenu; + TQPopupMenu* m_ctxMenu; }; class BreakpointTableRow; @@ -135,12 +135,12 @@ 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 QObject, public QTableItem +class ComplexEditCell : public TQObject, public QTableItem { Q_OBJECT public: - ComplexEditCell(QTable* table); + ComplexEditCell(TQTable* table); /** Called by Qt when the current cell should become editable. In our case, when the item becomes current. Creates a widget @@ -148,7 +148,7 @@ public: content. In our case -- text plus "..." button that invokes action dialog. */ - QWidget* createEditor() const; + TQWidget* createEditor() const; void updateValue(); @@ -158,10 +158,10 @@ private slots: void slotEdit(); signals: - void edit(QTableItem*); + void edit(TQTableItem*); private: - mutable QGuardedPtr<QLabel> label_; + mutable TQGuardedPtr<TQLabel> label_; }; diff --git a/languages/cpp/debugger/gdbcommand.cpp b/languages/cpp/debugger/gdbcommand.cpp index de5aeb9d..bf8d5bc4 100644 --- a/languages/cpp/debugger/gdbcommand.cpp +++ b/languages/cpp/debugger/gdbcommand.cpp @@ -20,17 +20,17 @@ namespace GDBDebugger { -GDBCommand::GDBCommand(const QString &command) +GDBCommand::GDBCommand(const TQString &command) : command_(command), run(false), handler_this(0) { } -QString GDBCommand::cmdToSend() +TQString GDBCommand::cmdToSend() { return initialString() + "\n"; } -QString GDBCommand::initialString() const +TQString GDBCommand::initialString() const { return command_; } @@ -52,12 +52,12 @@ GDBCommand::invokeHandler(const GDBMI::ResultRecord& r) } } -void GDBCommand::newOutput(const QString& line) +void GDBCommand::newOutput(const TQString& line) { lines.push_back(line); } -const QValueVector<QString>& GDBCommand::allStreamOutput() const +const TQValueVector<TQString>& GDBCommand::allStreamOutput() const { return lines; } @@ -82,7 +82,7 @@ void GDBCommand::setRun(bool run) } -UserCommand::UserCommand(const QString& s) +UserCommand::UserCommand(const TQString& s) : GDBCommand(s) { } @@ -94,7 +94,7 @@ bool UserCommand::isUserCommand() const ModifyBreakpointCommand::ModifyBreakpointCommand( - const QString& command, const Breakpoint* bp) + const TQString& command, const Breakpoint* bp) : GDBCommand(command.local8Bit()), bp_(bp) {} @@ -104,7 +104,7 @@ ModifyBreakpointCommand::cmdToSend() { if (bp_->dbgId() > 0) { - QString s(initialString()); + TQString s(initialString()); s = s.arg(bp_->dbgId()) + "\n"; return s.local8Bit(); } diff --git a/languages/cpp/debugger/gdbcommand.h b/languages/cpp/debugger/gdbcommand.h index 8c928394..946bc3aa 100644 --- a/languages/cpp/debugger/gdbcommand.h +++ b/languages/cpp/debugger/gdbcommand.h @@ -16,12 +16,12 @@ #ifndef _GDBCOMMAND_H_ #define _GDBCOMMAND_H_ -#include <qobject.h> -#include <qstring.h> -#include <qvaluevector.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include "mi/gdbmi.h" -#include <qguardedptr.h> +#include <tqguardedptr.h> namespace GDBDebugger { @@ -38,10 +38,10 @@ class ValueCallback; class GDBCommand { public: - GDBCommand(const QString& command); + GDBCommand(const TQString& command); template<class Handler> - GDBCommand(const QString& command, + GDBCommand(const TQString& command, Handler* handler_this, void (Handler::* handler_method)(const GDBMI::ResultRecord&), bool handlesError = false); @@ -51,7 +51,7 @@ public: dynamically, possibly using results of the previous commands. If the empty string is returned, nothing is sent. */ - virtual QString cmdToSend(); + virtual TQString cmdToSend(); /* Returns the initial string that was specified in ctor invocation. The actual command will be @@ -59,7 +59,7 @@ public: value of this method is only used in various diagnostic messages emitted before actually sending the command. */ - QString initialString() const; + TQString initialString() const; /* Returns true if this is command entered by the user and so should be always shown in the gdb output window. */ @@ -78,9 +78,9 @@ public: // Called by gdbcontroller for each new output string // gdb emits for this command. In MI mode, this includes // all "stream" messages, but does not include MI responses. - void newOutput(const QString&); + void newOutput(const TQString&); - const QValueVector<QString>& allStreamOutput() const; + const TQValueVector<TQString>& allStreamOutput() const; // True if this command run then target for // unspecified period of time -- that is either 'run' or @@ -90,11 +90,11 @@ public: void setRun(bool run); private: - QString command_; - QGuardedPtr<QObject> handler_this; - typedef void (QObject::* handler_t)(const GDBMI::ResultRecord&); + TQString command_; + TQGuardedPtr<TQObject> handler_this; + typedef void (TQObject::* handler_t)(const GDBMI::ResultRecord&); handler_t handler_method; - QValueVector<QString> lines; + TQValueVector<TQString> lines; bool run; protected: // FIXME: should be private, after I kill the first ctor @@ -106,7 +106,7 @@ protected: // FIXME: should be private, after I kill the first ctor class UserCommand : public GDBCommand { public: - UserCommand(const QString& s); + UserCommand(const TQString& s); bool isUserCommand() const; }; @@ -125,10 +125,10 @@ public: /** The 'comamnd' should include a single format specifier "%1" that will be replaced with the id of breakpoint. */ - ModifyBreakpointCommand(const QString& command, const Breakpoint* bp); + ModifyBreakpointCommand(const TQString& command, const Breakpoint* bp); public: // DbgCommand overrides - virtual QString cmdToSend(); + virtual TQString cmdToSend(); private: const Breakpoint* bp_; @@ -142,9 +142,9 @@ class CliCommand : public GDBCommand { public: template<class Handler> - CliCommand(const QString& command, + CliCommand(const TQString& command, Handler* handler_this, - void (Handler::* handler_method)(const QValueVector<QString>&), + void (Handler::* handler_method)(const TQValueVector<TQString>&), bool handlesError = false); @@ -153,8 +153,8 @@ public: // GDBCommand overrides bool invokeHandler(const GDBMI::ResultRecord& r); private: - QGuardedPtr<QObject> cli_handler_this; - typedef void (QObject::* cli_handler_t)(const QValueVector<QString>&); + TQGuardedPtr<TQObject> cli_handler_this; + typedef void (TQObject::* cli_handler_t)(const TQValueVector<TQString>&); cli_handler_t cli_handler_method; }; @@ -165,7 +165,7 @@ private: class SentinelCommand : public GDBCommand { public: - typedef void (QObject::*handler_method_t)(); + typedef void (TQObject::*handler_method_t)(); template<class Handler> SentinelCommand(Handler* handler_this, @@ -180,22 +180,22 @@ public: (handler_this->*handler_method)(); } - QString cmdToSend() + TQString cmdToSend() { return ""; } private: - QGuardedPtr<QObject> handler_this; + TQGuardedPtr<TQObject> handler_this; handler_method_t handler_method; }; /* Command for which we don't want any reply. */ -class ResultlessCommand : public QObject, public GDBCommand +class ResultlessCommand : public TQObject, public GDBCommand { public: - ResultlessCommand(const QString& command, bool handlesError = false) + ResultlessCommand(const TQString& command, bool handlesError = false) : GDBCommand(command, this, &ResultlessCommand::handle, handlesError) {} @@ -204,16 +204,16 @@ private: {} }; -class ExpressionValueCommand : public QObject, public GDBCommand +class ExpressionValueCommand : public TQObject, public GDBCommand { public: - typedef void (QObject::*handler_method_t)(const QString&); + typedef void (TQObject::*handler_method_t)(const TQString&); template<class Handler> ExpressionValueCommand( - const QString& expression, + const TQString& expression, Handler* handler_this, - void (Handler::* handler_method)(const QString&)) + void (Handler::* handler_method)(const TQString&)) : GDBCommand(("-data-evaluate-expression " + expression).ascii(), this, &ExpressionValueCommand::handleResponse), handler_this(handler_this), @@ -226,7 +226,7 @@ public: } private: - QGuardedPtr<QObject> handler_this; + TQGuardedPtr<TQObject> handler_this; handler_method_t handler_method; }; @@ -234,7 +234,7 @@ private: template<class Handler> GDBCommand::GDBCommand( - const QString& command, + const TQString& command, Handler* handler_this, void (Handler::* handler_method)(const GDBMI::ResultRecord&), bool handlesError) @@ -248,9 +248,9 @@ GDBCommand::GDBCommand( template<class Handler> CliCommand::CliCommand( - const QString& command, + const TQString& command, Handler* handler_this, - void (Handler::* handler_method)(const QValueVector<QString>&), + void (Handler::* handler_method)(const TQValueVector<TQString>&), bool handlesError) : GDBCommand(command.latin1()), cli_handler_this(handler_this), diff --git a/languages/cpp/debugger/gdbcontroller.cpp b/languages/cpp/debugger/gdbcontroller.cpp index 05954069..3fd912ec 100644 --- a/languages/cpp/debugger/gdbcontroller.cpp +++ b/languages/cpp/debugger/gdbcontroller.cpp @@ -33,13 +33,13 @@ #include <kprocess.h> #include <kwin.h> -#include <qdatetime.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qstring.h> -#include <qdir.h> -#include <qvaluevector.h> -#include <qeventloop.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqdir.h> +#include <tqvaluevector.h> +#include <tqeventloop.h> #include <iostream> #include <ctype.h> @@ -82,7 +82,7 @@ using namespace std; // output the final echo. Hence the data will be thrown away. // (certain "info locals" will generate this error. // -// queueCmd(new GDBCommand(QString().sprintf("define printlocal\n" +// queueCmd(new GDBCommand(TQString().sprintf("define printlocal\n" // "echo \32%c\ninfo locals\necho \32%c\n" // "end", // LOCALS, LOCALS))); @@ -130,14 +130,14 @@ namespace GDBDebugger int debug_controllerExists = false; -GDBController::GDBController(QDomDocument &projectDom) +GDBController::GDBController(TQDomDocument &projectDom) : DbgController(), currentFrame_(0), viewedThread_(-1), holdingZone_(), currentCmd_(0), tty_(0), - badCore_(QString()), + badCore_(TQString()), state_(s_dbgNotStarted|s_appNotStarted), programHasExited_(false), dom(projectDom), @@ -232,7 +232,7 @@ void GDBController::configure() // Disabled for MI port. if (old_outputRadix != config_outputRadix_) { - queueCmd(new GDBCommand(QCString().sprintf("set output-radix %d", + queueCmd(new GDBCommand(TQCString().sprintf("set output-radix %d", config_outputRadix_))); // FIXME: should do this in variable widget anyway. @@ -256,7 +256,7 @@ void GDBController::addCommand(GDBCommand* cmd) queueCmd(cmd); } -void GDBController::addCommand(const QString& str) +void GDBController::addCommand(const TQString& str) { queueCmd(new GDBCommand(str)); } @@ -352,9 +352,9 @@ void GDBController::executeCmd() return; } - QString commandText = currentCmd_->cmdToSend(); + TQString commandText = currentCmd_->cmdToSend(); bool bad_command = false; - QString message; + TQString message; unsigned length = commandText.length(); // No i18n for message since it's mainly for debugging. @@ -400,8 +400,8 @@ void GDBController::executeCmd() commandText.length()); setStateOn(s_waitForWrite); - QString prettyCmd = currentCmd_->cmdToSend(); - prettyCmd.replace( QRegExp("set prompt \032.\n"), "" ); + TQString prettyCmd = currentCmd_->cmdToSend(); + prettyCmd.replace( TQRegExp("set prompt \032.\n"), "" ); prettyCmd = "(gdb) " + prettyCmd; if (currentCmd_->isUserCommand()) @@ -456,7 +456,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) bool shared_library_load = false; if (currentCmd_) { - const QValueVector<QString>& lines = currentCmd_->allStreamOutput(); + const TQValueVector<TQString>& lines = currentCmd_->allStreamOutput(); for(unsigned int i = 0; i < lines.count(); ++i) { if (lines[i].startsWith("Stopped due to shared library event")) @@ -488,7 +488,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) return; } - QString reason = r["reason"].literal(); + TQString reason = r["reason"].literal(); if (reason == "exited-normally" || reason == "exited") { programNoApp("Exited normally", false); @@ -509,7 +509,7 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) if (reason == "watchpoint-scope") { - QString number = r["wpnum"].literal(); + TQString number = r["wpnum"].literal(); // FIXME: shuld remove this watchpoint // But first, we should consider if removing all @@ -524,8 +524,8 @@ void GDBController::actOnProgramPauseMI(const GDBMI::ResultRecord& r) if (reason == "signal-received") { - QString name = r["signal-name"].literal(); - QString user_name = r["signal-meaning"].literal(); + TQString name = r["signal-name"].literal(); + TQString user_name = r["signal-meaning"].literal(); // SIGINT is a "break into running program". // We do this when the user set/mod/clears a breakpoint but the @@ -613,7 +613,7 @@ void GDBController::reloadProgramState() // an invalid program specified or ... // gdb is still running though, but only the run command (may) make sense // all other commands are disabled. -void GDBController::programNoApp(const QString &msg, bool msgBox) +void GDBController::programNoApp(const TQString &msg, bool msgBox) { setState(s_appNotStarted|s_programExited|(state_&s_shuttingDown)); @@ -637,7 +637,7 @@ void GDBController::programNoApp(const QString &msg, bool msgBox) // Tty is no longer usable, delete it. Without this, QSocketNotifier // will continiously bomd STTY with signals, so we need to either disable - // QSocketNotifier, or delete STTY. The latter is simpler, since we can't + // TQSocketNotifier, or delete STTY. The latter is simpler, since we can't // reuse it for future debug sessions anyway. delete tty_; @@ -654,7 +654,7 @@ void GDBController::programNoApp(const QString &msg, bool msgBox) emit gdbUserCommandStdout(msg.ascii()); } -void GDBController::parseCliLine(const QString& line) +void GDBController::parseCliLine(const TQString& line) { if (line.startsWith("The program no longer exists") || line.startsWith("Program exited") @@ -694,7 +694,7 @@ void GDBController::parseCliLine(const QString& line) strncmp(buf, "ptrace: Operation not permitted.", 32)==0 || strncmp(buf, "No executable file specified.", 29)==0) { - programNoApp(QString(buf), true); + programNoApp(TQString(buf), true); kdDebug(9012) << "Bad file <" << buf << ">" << endl; return; } @@ -723,7 +723,7 @@ void GDBController::handleMiFileListExecSourceFile(const GDBMI::ResultRecord& r) #endif } - QString fullname = ""; + TQString fullname = ""; if (r.hasField("fullname")) fullname = r["fullname"].literal(); @@ -744,7 +744,7 @@ void GDBController::maybeAnnounceWatchpointHit() gdb does not report any reason at all. */ if ((*last_stop_result).hasField("reason")) { - QString last_stop_reason = (*last_stop_result)["reason"].literal(); + TQString last_stop_reason = (*last_stop_result)["reason"].literal(); if (last_stop_reason == "watchpoint-trigger") { @@ -766,7 +766,7 @@ void GDBController::handleMiFrameSwitch(const GDBMI::ResultRecord& r) const GDBMI::Value& frame = r["frame"]; - QString file; + TQString file; if (frame.hasField("fullname")) file = frame["fullname"].literal(); else if (frame.hasField("file")) @@ -789,31 +789,31 @@ void GDBController::handleMiFrameSwitch(const GDBMI::ResultRecord& r) // ************************************************************************** -bool GDBController::start(const QString& shell, const DomUtil::PairList& run_envvars, const QString& run_directory, const QString &application, const QString& run_arguments) +bool GDBController::start(const TQString& shell, const DomUtil::PairList& run_envvars, const TQString& run_directory, const TQString &application, const TQString& run_arguments) { kdDebug(9012) << "Starting debugger controller\n"; - badCore_ = QString(); + badCore_ = TQString(); Q_ASSERT (!dbgProcess_ && !tty_); dbgProcess_ = new KProcess; - connect( dbgProcess_, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotDbgStdout(KProcess *, char *, int)) ); + connect( dbgProcess_, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotDbgStdout(KProcess *, char *, int)) ); - connect( dbgProcess_, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(slotDbgStderr(KProcess *, char *, int)) ); + connect( dbgProcess_, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(slotDbgStderr(KProcess *, char *, int)) ); - connect( dbgProcess_, SIGNAL(wroteStdin(KProcess *)), - this, SLOT(slotDbgWroteStdin(KProcess *)) ); + connect( dbgProcess_, TQT_SIGNAL(wroteStdin(KProcess *)), + this, TQT_SLOT(slotDbgWroteStdin(KProcess *)) ); - connect( dbgProcess_, SIGNAL(processExited(KProcess*)), - this, SLOT(slotDbgProcessExited(KProcess*)) ); + connect( dbgProcess_, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotDbgProcessExited(KProcess*)) ); application_ = application; - QString gdb = "gdb"; - // Prepend path to gdb, if needed. Using QDir, + TQString gdb = "gdb"; + // Prepend path to gdb, if needed. Using TQDir, // path can either end with slash, or not. if (!config_gdbPath_.isEmpty()) { @@ -825,7 +825,7 @@ bool GDBController::start(const QString& shell, const DomUtil::PairList& run_env *dbgProcess_ << "/bin/sh" << "-c" << shell + " " + gdb + + " " + application + " --interpreter=mi2 -quiet"; emit gdbUserCommandStdout( - QString( "/bin/sh -c " + shell + " " + gdb + TQString( "/bin/sh -c " + shell + " " + gdb + " " + application + " --interpreter=mi2 -quiet\n" ).latin1()); } @@ -834,7 +834,7 @@ bool GDBController::start(const QString& shell, const DomUtil::PairList& run_env *dbgProcess_ << gdb << application << "-interpreter=mi2" << "-quiet"; emit gdbUserCommandStdout( - QString( gdb + " " + application + + TQString( gdb + " " + application + " --interpreter=mi2 -quiet\n" ).latin1()); } @@ -888,23 +888,23 @@ bool GDBController::start(const QString& shell, const DomUtil::PairList& run_env queueCmd(new GDBCommand("set print asm-demangle off")); // make sure output radix is always set to users view. - queueCmd(new GDBCommand(QCString().sprintf("set output-radix %d", config_outputRadix_))); + queueCmd(new GDBCommand(TQCString().sprintf("set output-radix %d", config_outputRadix_))); // Change the "Working directory" to the correct one - QCString tmp( "cd " + QFile::encodeName( run_directory )); + TQCString tmp( "cd " + TQFile::encodeName( run_directory )); queueCmd(new GDBCommand(tmp)); // Set the run arguments if (!run_arguments.isEmpty()) queueCmd( - new GDBCommand(QCString("set args ") + run_arguments.local8Bit())); + new GDBCommand(TQCString("set args ") + run_arguments.local8Bit())); // Get the run environment variables pairs into the environstr string // in the form of: "ENV_VARIABLE=ENV_VALUE" and send to gdb using the // "set enviroment" command // Note that we quote the variable value due to the possibility of // embedded spaces - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; for (it = run_envvars.begin(); it != run_envvars.end(); ++it) { @@ -972,8 +972,8 @@ void GDBController::slotStopDebugger() setStateOn(s_shuttingDown); kdDebug(9012) << "GDBController::slotStopDebugger() executing" << endl; - QTime start; - QTime now; + TQTime start; + TQTime now; // Get gdb's attention if it's busy. We need gdb to be at the // command line so we can stop it. @@ -981,11 +981,11 @@ void GDBController::slotStopDebugger() { kdDebug(9012) << "gdb busy on shutdown - stopping gdb (SIGINT)" << endl; dbgProcess_->kill(SIGINT); - start = QTime::currentTime(); + start = TQTime::currentTime(); while (-1) { - kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 20 ); - now = QTime::currentTime(); + kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 20 ); + now = TQTime::currentTime(); if (!stateIsOn(s_dbgBusy) || start.msecsTo( now ) > 2000) break; } @@ -999,11 +999,11 @@ void GDBController::slotStopDebugger() if (!dbgProcess_->writeStdin(detach, strlen(detach))) kdDebug(9012) << "failed to write 'detach' to gdb" << endl; emit gdbUserCommandStdout("(gdb) detach\n"); - start = QTime::currentTime(); + start = TQTime::currentTime(); while (-1) { - kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 20 ); - now = QTime::currentTime(); + kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 20 ); + now = TQTime::currentTime(); if (!stateIsOn(s_attached) || start.msecsTo( now ) > 2000) break; } @@ -1015,11 +1015,11 @@ void GDBController::slotStopDebugger() kdDebug(9012) << "failed to write 'quit' to gdb" << endl; emit gdbUserCommandStdout("(gdb) quit"); - start = QTime::currentTime(); + start = TQTime::currentTime(); while (-1) { - kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 20 ); - now = QTime::currentTime(); + kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 20 ); + now = TQTime::currentTime(); if (stateIsOn(s_programExited) || start.msecsTo( now ) > 2000) break; } @@ -1050,12 +1050,12 @@ void GDBController::slotStopDebugger() // ************************************************************************** -void GDBController::slotCoreFile(const QString &coreFile) +void GDBController::slotCoreFile(const TQString &coreFile) { setStateOff(s_programExited|s_appNotStarted); setStateOn(s_core); - queueCmd(new GDBCommand(QCString("core ") + coreFile.latin1())); + queueCmd(new GDBCommand(TQCString("core ") + coreFile.latin1())); raiseEvent(connected_to_program); raiseEvent(program_state_changed); @@ -1074,12 +1074,12 @@ void GDBController::slotAttachTo(int pid) // We can't omit application name from gdb invocation // because for libtool binaries, we have no way to guess // real binary name. - queueCmd(new GDBCommand(QString("file"))); + queueCmd(new GDBCommand(TQString("file"))); // The MI interface does not implements -target-attach yet, // and we don't recognize whatever gibberish 'attach' pours out, so... queueCmd(new GDBCommand( - QCString().sprintf("attach %d", pid))); + TQCString().sprintf("attach %d", pid))); raiseEvent(connected_to_program); @@ -1101,11 +1101,11 @@ void GDBController::slotRun() tty_ = new STTY(config_dbgTerminal_, Settings::terminalEmulatorName( *kapp->config() )); if (!config_dbgTerminal_) { - connect( tty_, SIGNAL(OutOutput(const char*)), SIGNAL(ttyStdout(const char*)) ); - connect( tty_, SIGNAL(ErrOutput(const char*)), SIGNAL(ttyStderr(const char*)) ); + connect( tty_, TQT_SIGNAL(OutOutput(const char*)), TQT_SIGNAL(ttyStdout(const char*)) ); + connect( tty_, TQT_SIGNAL(ErrOutput(const char*)), TQT_SIGNAL(ttyStderr(const char*)) ); } - QString tty(tty_->getSlave()); + TQString tty(tty_->getSlave()); if (tty.isEmpty()) { KMessageBox::information(0, i18n("GDB cannot use the tty* or pty* devices.\n" @@ -1119,12 +1119,12 @@ void GDBController::slotRun() return; } - queueCmd(new GDBCommand(QCString("tty ")+tty.latin1())); + queueCmd(new GDBCommand(TQCString("tty ")+tty.latin1())); if (!config_runShellScript_.isEmpty()) { // Special for remote debug... - QCString tty(tty_->getSlave().latin1()); - QCString options = QCString(">") + tty + QCString(" 2>&1 <") + tty; + TQCString tty(tty_->getSlave().latin1()); + TQCString options = TQCString(">") + tty + TQCString(" 2>&1 <") + tty; KProcess *proc = new KProcess; @@ -1148,7 +1148,7 @@ void GDBController::slotRun() } else { - QFileInfo app(application_); + TQFileInfo app(application_); if (!app.exists()) { @@ -1214,7 +1214,7 @@ void GDBController::slotKill() // ************************************************************************** -void GDBController::slotRunUntil(const QString &fileName, int lineNum) +void GDBController::slotRunUntil(const TQString &fileName, int lineNum) { if (stateIsOn(s_dbgBusy|s_dbgNotStarted|s_shuttingDown)) return; @@ -1223,23 +1223,23 @@ void GDBController::slotRunUntil(const QString &fileName, int lineNum) if (fileName.isEmpty()) queueCmd(new GDBCommand( - QCString().sprintf("-exec-until %d", lineNum))); + TQCString().sprintf("-exec-until %d", lineNum))); else queueCmd(new GDBCommand( - QCString(). + TQCString(). sprintf("-exec-until %s:%d", fileName.latin1(), lineNum))); } // ************************************************************************** -void GDBController::slotJumpTo(const QString &fileName, int lineNum) +void GDBController::slotJumpTo(const TQString &fileName, int lineNum) { if (stateIsOn(s_dbgBusy|s_dbgNotStarted|s_shuttingDown)) return; if (!fileName.isEmpty()) { - queueCmd(new GDBCommand(QCString().sprintf("tbreak %s:%d", fileName.latin1(), lineNum))); - queueCmd(new GDBCommand(QCString().sprintf("jump %s:%d", fileName.latin1(), lineNum))); + queueCmd(new GDBCommand(TQCString().sprintf("tbreak %s:%d", fileName.latin1(), lineNum))); + queueCmd(new GDBCommand(TQCString().sprintf("jump %s:%d", fileName.latin1(), lineNum))); } } @@ -1324,11 +1324,11 @@ void GDBController::selectFrame(int frameNo, int threadNo) { if (viewedThread_ != threadNo) queueCmd(new GDBCommand( - QString("-thread-select %1").arg(threadNo).ascii())); + TQString("-thread-select %1").arg(threadNo).ascii())); } queueCmd(new GDBCommand( - QString("-stack-select-frame %1").arg(frameNo).ascii())); + TQString("-stack-select-frame %1").arg(frameNo).ascii())); // Will emit the 'thread_or_frame_changed' event. queueCmd(new GDBCommand("-stack-info-frame", @@ -1347,7 +1347,7 @@ void GDBController::selectFrame(int frameNo, int threadNo) void GDBController::defaultErrorHandler(const GDBMI::ResultRecord& result) { - QString msg = result["msg"].literal(); + TQString msg = result["msg"].literal(); if (msg.contains("No such process")) { @@ -1425,11 +1425,11 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) { static bool parsing = false; - QCString msg(buf, buflen+1); + TQCString msg(buf, buflen+1); // Copy the data out of the KProcess buffer before it gets overwritten // Append to the back of the holding zone. - holdingZone_ += QCString(buf, buflen+1); + holdingZone_ += TQCString(buf, buflen+1); // Already parsing? then get out quick. // VP, 2006-01-30. I'm not sure how this could happen, since @@ -1451,7 +1451,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) { got_any_command = true; - QCString reply(holdingZone_.left(i)); + TQCString reply(holdingZone_.left(i)); holdingZone_ = holdingZone_.mid(i+1); kdDebug(9012) << "REPLY: " << reply << "\n"; @@ -1561,7 +1561,7 @@ void GDBController::slotDbgStdout(KProcess *, char *buf, int buflen) parseCliLine(s.message); - static QRegExp print_output("^\\$(\\d+) = "); + static TQRegExp print_output("^\\$(\\d+) = "); if (print_output.search(s.message) != -1) { kdDebug(9012) << "Found 'print' output: " << s.message << "\n"; @@ -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: " << QString::fromLatin1(buf, buflen+1) << endl; + kdDebug(9012) << "STDERR: " << TQString::fromLatin1(buf, buflen+1) << endl; slotDbgStdout(proc, buf, buflen); } @@ -1729,7 +1729,7 @@ void GDBController::slotDbgProcessExited(KProcess* process) // ************************************************************************** -void GDBController::slotUserGDBCmd(const QString& cmd) +void GDBController::slotUserGDBCmd(const TQString& cmd) { queueCmd(new UserCommand(cmd.latin1())); @@ -1745,7 +1745,7 @@ void GDBController::slotUserGDBCmd(const QString& cmd) void GDBController::explainDebuggerStatus() { - QString information("%1 commands in queue\n" + TQString information("%1 commands in queue\n" "%2 commands being processed by gdb\n" "Debugger state: %3\n"); information = @@ -1754,7 +1754,7 @@ void GDBController::explainDebuggerStatus() if (currentCmd_) { - QString extra("Current command class: '%1'\n" + TQString extra("Current command class: '%1'\n" "Current command text: '%2'\n" "Current command origianl text: '%3'\n"); @@ -1795,7 +1795,7 @@ void GDBController::debugStateChange(int oldState, int newState) int delta = oldState ^ newState; if (delta) { - QString out = "STATE: "; + TQString out = "STATE: "; for(unsigned i = 1; i < s_lastDbgState; i <<= 1) { if (delta & i) @@ -1824,7 +1824,7 @@ void GDBController::debugStateChange(int oldState, int newState) #undef STATE_CHECK if (!found) - out += QString::number(i); + out += TQString::number(i); out += " "; } @@ -1840,7 +1840,7 @@ int GDBController::qtVersion( ) const void GDBController::demandAttention() const { - if ( QWidget * w = kapp->mainWidget() ) + if ( TQWidget * w = kapp->mainWidget() ) { KWin::demandAttention( w->winId(), true ); } diff --git a/languages/cpp/debugger/gdbcontroller.h b/languages/cpp/debugger/gdbcontroller.h index 6a9e3385..a8b6bd2b 100644 --- a/languages/cpp/debugger/gdbcontroller.h +++ b/languages/cpp/debugger/gdbcontroller.h @@ -22,13 +22,13 @@ #include "mi/gdbmi.h" #include "mi/miparser.h" -#include <qcstring.h> -#include <qdom.h> -#include <qobject.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qmap.h> -#include <qdatetime.h> +#include <tqcstring.h> +#include <tqdom.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqdatetime.h> #include <memory> #include <set> @@ -54,7 +54,7 @@ class GDBController : public DbgController Q_OBJECT public: - GDBController(QDomDocument &projectDom); + GDBController(TQDomDocument &projectDom); ~GDBController(); enum event_t { program_state_changed = 1, program_exited, debugger_exited, @@ -82,7 +82,7 @@ public: /** Same as above, but internally constructs new GDBCommand instance from the string. */ - void addCommand(const QString& cmd); + void addCommand(const TQString& cmd); /** Adds command to the front of the commands queue. It will be executed next. @@ -127,11 +127,11 @@ public: int currentFrame() const; - bool start(const QString& shell, + bool start(const TQString& shell, const DomUtil::PairList& run_envvars, - const QString& run_directory, - const QString &application, - const QString& run_arguments); + const TQString& run_directory, + const TQString &application, + const TQString& run_arguments); int qtVersion() const; @@ -161,7 +161,7 @@ private: run "continue" there will be no MI message if the application has exited. */ - void parseCliLine (const QString&); + void parseCliLine (const TQString&); /** Handles a result response from a MI command -- that is all MI responses except for Stream and Prompt responses. @@ -188,7 +188,7 @@ private: */ void reloadProgramState(); - void programNoApp(const QString &msg, bool msgBox); + void programNoApp(const TQString &msg, bool msgBox); void setStateOn(int stateOn); void setStateOff(int stateOff); @@ -226,16 +226,16 @@ public slots: void configure(); - //void slotStart(const QString& shell, const QString &application); - void slotCoreFile(const QString &coreFile); + //void slotStart(const TQString& shell, const TQString &application); + void slotCoreFile(const TQString &coreFile); void slotAttachTo(int pid); void slotStopDebugger(); void slotRun(); void slotKill(); - void slotRunUntil(const QString &filename, int lineNum); - void slotJumpTo(const QString &filename, int lineNum); + void slotRunUntil(const TQString &filename, int lineNum); + void slotJumpTo(const TQString &filename, int lineNum); void slotStepInto(); void slotStepOver(); void slotStepIntoIns(); @@ -244,7 +244,7 @@ public slots: void slotBreakInto(); - void slotUserGDBCmd(const QString&); + void slotUserGDBCmd(const TQString&); // Pops up a dialog box with some hopefully // detailed information about which state debugger @@ -276,14 +276,14 @@ signals: void breakpointHit(int id); /** Emitted for watchpoint hit, after line indicator is shown. */ void watchpointHit(int id, - const QString& oldValue, const QString& newValue); + const TQString& oldValue, const TQString& newValue); private: int currentFrame_; int viewedThread_; // The output from gdb that was not parsed yet - QCString gdbOutput_; + TQCString gdbOutput_; // The output from gdb that arrived where we was // parsing the previous output. To avoid messing // things up, it's not directly added to @@ -291,35 +291,35 @@ private: // VP: It's not clear why the previous code was doing // this, and holdingZone_ won't be processed until // next output arrives, so probably should be just removed. - QCString holdingZone_; + TQCString holdingZone_; - QPtrList<GDBCommand> cmdList_; + TQPtrList<GDBCommand> cmdList_; GDBCommand* currentCmd_; STTY* tty_; - QString badCore_; - QString application_; + TQString badCore_; + TQString application_; // Gdb command that should be issued when we stop on breakpoint // with the given gdb breakpoint id. - QMap<int, const Breakpoint*> tracedBreakpoints_; + TQMap<int, const Breakpoint*> tracedBreakpoints_; // Some state variables int state_; bool programHasExited_; // Configuration values - QDomDocument &dom; + TQDomDocument &dom; bool config_breakOnLoadingLibrary_; bool config_forceBPSet_; bool config_displayStaticMembers_; bool config_asmDemangle_; bool config_dbgTerminal_; - QString config_gdbPath_; - QString config_dbgShell_; - QCString config_configGdbScript_; - QCString config_runShellScript_; - QCString config_runGdbScript_; + TQString config_gdbPath_; + TQString config_dbgShell_; + TQCString config_configGdbScript_; + TQCString config_runShellScript_; + TQCString config_runGdbScript_; int config_outputRadix_; MIParser mi_parser_; @@ -335,11 +335,11 @@ private: // so the only way it can work is via the "print" command. As gdb // outputs things, we'll grep for lines that look like output from // print, and store such lines in this variable, so later use. - QCString print_command_result; + TQCString print_command_result; bool state_reload_needed; - QTime commandExecutionTime; + TQTime commandExecutionTime; bool stateReloadInProgress_; diff --git a/languages/cpp/debugger/gdboutputwidget.cpp b/languages/cpp/debugger/gdboutputwidget.cpp index 817f8692..836886bb 100644 --- a/languages/cpp/debugger/gdboutputwidget.cpp +++ b/languages/cpp/debugger/gdboutputwidget.cpp @@ -24,14 +24,14 @@ #include <klocale.h> #include <kpopupmenu.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qdom.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqdom.h> namespace GDBDebugger @@ -39,8 +39,8 @@ namespace GDBDebugger /***************************************************************************/ -GDBOutputWidget::GDBOutputWidget( QWidget *parent, const char *name) : - QWidget(parent, name), +GDBOutputWidget::GDBOutputWidget( TQWidget *parent, const char *name) : + TQWidget(parent, name), m_userGDBCmdEditor(0), m_Interrupt(0), m_gdbView(0), @@ -49,40 +49,40 @@ GDBOutputWidget::GDBOutputWidget( QWidget *parent, const char *name) : { m_gdbView = new OutputText(this); - m_gdbView->setTextFormat(QTextEdit::LogText); + m_gdbView->setTextFormat(TQTextEdit::LogText); - QBoxLayout *userGDBCmdEntry = new QHBoxLayout(); + TQBoxLayout *userGDBCmdEntry = new TQHBoxLayout(); m_userGDBCmdEditor = new KHistoryCombo (this, "gdb-user-cmd-editor"); - QLabel *label = new QLabel(i18n("&GDB cmd:"), this); + TQLabel *label = new TQLabel(i18n("&GDB cmd:"), this); label->setBuddy(m_userGDBCmdEditor); userGDBCmdEntry->addWidget(label); userGDBCmdEntry->addWidget(m_userGDBCmdEditor); userGDBCmdEntry->setStretchFactor(m_userGDBCmdEditor, 1); - m_Interrupt = new QToolButton( this, "add breakpoint" ); - m_Interrupt->setSizePolicy ( QSizePolicy ( (QSizePolicy::SizeType)0, - ( QSizePolicy::SizeType)0, + m_Interrupt = new TQToolButton( this, "add breakpoint" ); + m_Interrupt->setSizePolicy ( TQSizePolicy ( (TQSizePolicy::SizeType)0, + ( TQSizePolicy::SizeType)0, 0, 0, m_Interrupt->sizePolicy().hasHeightForWidth()) ); m_Interrupt->setPixmap ( SmallIcon ( "player_pause" ) ); userGDBCmdEntry->addWidget(m_Interrupt); - QToolTip::add ( m_Interrupt, i18n ( "Pause execution of the app to enter gdb commands" ) ); + TQToolTip::add ( m_Interrupt, i18n ( "Pause execution of the app to enter gdb commands" ) ); - QVBoxLayout *topLayout = new QVBoxLayout(this, 2); + TQVBoxLayout *topLayout = new TQVBoxLayout(this, 2); topLayout->addWidget(m_gdbView, 10); topLayout->addLayout(userGDBCmdEntry); slotDbgStatus( "", s_dbgNotStarted); - connect( m_userGDBCmdEditor, SIGNAL(returnPressed()), SLOT(slotGDBCmd()) ); - connect( m_Interrupt, SIGNAL(clicked()), SIGNAL(breakInto())); + connect( m_userGDBCmdEditor, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotGDBCmd()) ); + connect( m_Interrupt, TQT_SIGNAL(clicked()), TQT_SIGNAL(breakInto())); - connect( &updateTimer_, SIGNAL(timeout()), - this, SLOT(flushPending())); + connect( &updateTimer_, TQT_SIGNAL(timeout()), + this, TQT_SLOT(flushPending())); } /***************************************************************************/ @@ -117,7 +117,7 @@ void GDBOutputWidget::slotUserCommandStdout(const char* line) } namespace { - QString colorify(QString text, const QString& color) + TQString colorify(TQString text, const TQString& color) { // Make sure the newline is at the end of the newly-added // string. This is so that we can always correctly remove @@ -133,10 +133,10 @@ namespace { } -void GDBOutputWidget::newStdoutLine(const QString& line, +void GDBOutputWidget::newStdoutLine(const TQString& line, bool internal) { - QString s = html_escape(line); + TQString s = html_escape(line); if (s.startsWith("(gdb)")) { s = colorify(s, "blue"); @@ -160,7 +160,7 @@ void GDBOutputWidget::newStdoutLine(const QString& line, } -void GDBOutputWidget::showLine(const QString& line) +void GDBOutputWidget::showLine(const TQString& line) { pendingOutput_ += line; @@ -171,7 +171,7 @@ void GDBOutputWidget::showLine(const QString& line) } } -void GDBOutputWidget::trimList(QStringList& l, unsigned max_size) +void GDBOutputWidget::trimList(TQStringList& l, unsigned max_size) { unsigned int length = l.count(); if (length > max_size) @@ -192,10 +192,10 @@ void GDBOutputWidget::setShowInternalCommands(bool show) // Set of strings to show changes, text edit still has old // set. Refresh. m_gdbView->clear(); - QStringList& newList = + TQStringList& newList = showInternalCommands_ ? allCommands_ : userCommands_; - QStringList::iterator i = newList.begin(), e = newList.end(); + TQStringList::iterator i = newList.begin(), e = newList.end(); for(; i != e; ++i) { // Note that color formatting is already applied to '*i'. @@ -208,7 +208,7 @@ void GDBOutputWidget::setShowInternalCommands(bool show) void GDBOutputWidget::slotReceivedStderr(const char* line) { - QString colored = colorify(html_escape(line), "red"); + TQString colored = colorify(html_escape(line), "red"); // Errors are shown inside user commands too. allCommands_.append(colored); trimList(allCommands_, maxLines_); @@ -227,7 +227,7 @@ void GDBOutputWidget::slotReceivedStderr(const char* line) void GDBOutputWidget::slotGDBCmd() { - QString GDBCmd(m_userGDBCmdEditor->currentText()); + TQString GDBCmd(m_userGDBCmdEditor->currentText()); if (!GDBCmd.isEmpty()) { m_userGDBCmdEditor->addToHistory(GDBCmd); @@ -240,7 +240,7 @@ void GDBOutputWidget::flushPending() { m_gdbView->setUpdatesEnabled(false); - // QTextEdit adds newline after paragraph automatically. + // TQTextEdit adds newline after paragraph automatically. // So, remove trailing newline to avoid double newlines. if (pendingOutput_.endsWith("\n")) pendingOutput_.remove(pendingOutput_.length()-1, 1); @@ -257,7 +257,7 @@ void GDBOutputWidget::flushPending() /***************************************************************************/ -void GDBOutputWidget::slotDbgStatus(const QString &, int statusFlag) +void GDBOutputWidget::slotDbgStatus(const TQString &, int statusFlag) { if (statusFlag & s_dbgNotStarted) { @@ -282,33 +282,33 @@ void GDBOutputWidget::slotDbgStatus(const QString &, int statusFlag) /***************************************************************************/ -void GDBOutputWidget::focusInEvent(QFocusEvent */*e*/) +void GDBOutputWidget::focusInEvent(TQFocusEvent */*e*/) { m_gdbView->scrollToBottom(); m_userGDBCmdEditor->setFocus(); } -QString GDBOutputWidget::html_escape(const QString& s) +TQString GDBOutputWidget::html_escape(const TQString& s) { - QString r(s); + TQString r(s); r.replace("<", "<"); r.replace(">", ">"); return r; } -void GDBOutputWidget::savePartialProjectSession(QDomElement* el) +void GDBOutputWidget::savePartialProjectSession(TQDomElement* el) { - QDomDocument doc = el->ownerDocument(); + TQDomDocument doc = el->ownerDocument(); - QDomElement showInternal = doc.createElement("showInternalCommands"); - showInternal.setAttribute("value", QString::number(showInternalCommands_)); + TQDomElement showInternal = doc.createElement("showInternalCommands"); + showInternal.setAttribute("value", TQString::number(showInternalCommands_)); el->appendChild(showInternal); } -void GDBOutputWidget::restorePartialProjectSession(const QDomElement* el) +void GDBOutputWidget::restorePartialProjectSession(const TQDomElement* el) { - QDomElement showInternal = + TQDomElement showInternal = el->namedItem("showInternalCommands").toElement(); if (!showInternal.isNull()) @@ -318,14 +318,14 @@ void GDBOutputWidget::restorePartialProjectSession(const QDomElement* el) } -//void OutputText::contextMenuEvent(QContextMenuEvent* e) -QPopupMenu* OutputText::createPopupMenu(const QPoint&) +//void OutputText::contextMenuEvent(TQContextMenuEvent* e) +TQPopupMenu* OutputText::createPopupMenu(const TQPoint&) { KPopupMenu* popup = new KPopupMenu; int id = popup->insertItem(i18n("Show Internal Commands"), this, - SLOT(toggleShowInternalCommands())); + TQT_SLOT(toggleShowInternalCommands())); popup->setItemChecked(id, parent_->showInternalCommands_); popup->setWhatsThis( @@ -338,7 +338,7 @@ QPopupMenu* OutputText::createPopupMenu(const QPoint&) popup->insertItem(i18n("Copy All"), this, - SLOT(copyAll())); + TQT_SLOT(copyAll())); return popup; @@ -348,16 +348,16 @@ void OutputText::copyAll() { /* See comments for allCommandRaw_ for explanations of this complex logic, as opposed to calling text(). */ - QStringList& raw = parent_->showInternalCommands_ ? + TQStringList& raw = parent_->showInternalCommands_ ? parent_->allCommandsRaw_ : parent_->userCommandsRaw_; - QString text; + 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. - QApplication::clipboard()->setText(text, QClipboard::Clipboard); - QApplication::clipboard()->setText(text, QClipboard::Selection); + TQApplication::clipboard()->setText(text, QClipboard::Clipboard); + TQApplication::clipboard()->setText(text, QClipboard::Selection); } void OutputText::toggleShowInternalCommands() diff --git a/languages/cpp/debugger/gdboutputwidget.h b/languages/cpp/debugger/gdboutputwidget.h index ddf79823..0b14b599 100644 --- a/languages/cpp/debugger/gdboutputwidget.h +++ b/languages/cpp/debugger/gdboutputwidget.h @@ -18,10 +18,10 @@ #ifndef _GDBOUTPUTWIDGET_H_ #define _GDBOUTPUTWIDGET_H_ -#include <qwidget.h> -#include <qtextedit.h> -#include <qtimer.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqtextedit.h> +#include <tqtimer.h> +#include <tqstringlist.h> class KHistoryCombo; @@ -37,11 +37,11 @@ class GDBOutputWidget : public QWidget Q_OBJECT public: - GDBOutputWidget( QWidget *parent=0, const char *name=0 ); + GDBOutputWidget( TQWidget *parent=0, const char *name=0 ); ~GDBOutputWidget(); - void savePartialProjectSession(QDomElement* el); - void restorePartialProjectSession(const QDomElement* el); + void savePartialProjectSession(TQDomElement* el); + void restorePartialProjectSession(const TQDomElement* el); void clear(); @@ -49,38 +49,38 @@ public slots: void slotInternalCommandStdout(const char* line); void slotUserCommandStdout(const char* line); void slotReceivedStderr(const char* line); - void slotDbgStatus (const QString &status, int statusFlag); + void slotDbgStatus (const TQString &status, int statusFlag); void slotGDBCmd(); void flushPending(); protected: - virtual void focusInEvent(QFocusEvent *e); + virtual void focusInEvent(TQFocusEvent *e); signals: - void userGDBCmd(const QString &cmd); + void userGDBCmd(const TQString &cmd); void breakInto(); private: - QString html_escape(const QString& s); + TQString html_escape(const TQString& s); - void newStdoutLine(const QString& line, bool internal); + void newStdoutLine(const TQString& line, bool internal); /** Arranges for 'line' to be shown to the user. Adds 'line' to pendingOutput_ and makes sure updateTimer_ is running. */ - void showLine(const QString& line); + void showLine(const TQString& line); /** Makes 'l' no longer then 'max_size' by removing excessive elements from the top. */ - void trimList(QStringList& l, unsigned max_size); + void trimList(TQStringList& l, unsigned max_size); KHistoryCombo* m_userGDBCmdEditor; - QToolButton* m_Interrupt; - QTextEdit* m_gdbView; + TQToolButton* m_Interrupt; + TQTextEdit* m_gdbView; void setShowInternalCommands(bool); friend class OutputText; @@ -90,39 +90,39 @@ private: "Show internal commands" on, we can show previous internal commands. */ - QStringList userCommands_, allCommands_; + TQStringList userCommands_, allCommands_; /** Same output, without any fancy formatting. Keeping it here because I can't find any way to extract raw text, - without formatting, out of QTextEdit except for + without formatting, out of TQTextEdit except for selecting everything and calling 'copy()'. The latter approach is just ugly. */ - QStringList userCommandsRaw_, allCommandsRaw_; + TQStringList userCommandsRaw_, allCommandsRaw_; /** For performance reasons, we don't immediately add new text to QTExtEdit. Instead we add it to pendingOutput_ and flush it on timer. */ - QString pendingOutput_; - QTimer updateTimer_; + TQString pendingOutput_; + TQTimer updateTimer_; bool showInternalCommands_; int maxLines_; }; -/** Add popup menu specific to gdb output window to QTextEdit. +/** Add popup menu specific to gdb output window to TQTextEdit. */ class OutputText : public QTextEdit { Q_OBJECT public: OutputText(GDBOutputWidget* parent) - : QTextEdit(parent), + : TQTextEdit(parent), parent_(parent) {} - QPopupMenu* createPopupMenu(const QPoint& pos); + TQPopupMenu* createPopupMenu(const TQPoint& pos); private slots: void copyAll(); diff --git a/languages/cpp/debugger/gdbparser.cpp b/languages/cpp/debugger/gdbparser.cpp index 79057af5..5a8588b1 100644 --- a/languages/cpp/debugger/gdbparser.cpp +++ b/languages/cpp/debugger/gdbparser.cpp @@ -17,7 +17,7 @@ #include "variablewidget.h" #include <kdebug.h> -#include <qregexp.h> +#include <tqregexp.h> #include <ctype.h> #include <stdlib.h> @@ -62,32 +62,32 @@ GDBParser::~GDBParser() // ************************************************************************** -QString GDBParser::getName(const char **buf) +TQString GDBParser::getName(const char **buf) { const char *start = skipNextTokenStart(*buf); if (*start) { *buf = skipTokenValue(start); - return QCString(start, *buf - start + 1); + return TQCString(start, *buf - start + 1); } else *buf = start; - return QString(); + return TQString(); } // ************************************************************************** -QString GDBParser::getValue(const char **buf) +TQString GDBParser::getValue(const char **buf) { const char *start = skipNextTokenStart(*buf); *buf = skipTokenValue(start); - QString value(QCString(start, *buf - start + 1).data()); + TQString value(TQCString(start, *buf - start + 1).data()); return value; } -QString GDBParser::undecorateValue(DataType type, const QString& s) +TQString GDBParser::undecorateValue(DataType type, const TQString& s) { - QCString l8 = s.local8Bit(); + TQCString l8 = s.local8Bit(); const char* start = l8; const char* end = start + s.length(); @@ -106,7 +106,7 @@ QString GDBParser::undecorateValue(DataType type, const QString& s) else { // Looks like composite, strip the braces and return. - return QCString(start+1, end - start -1); + return TQCString(start+1, end - start -1); } } else if (*start == '(') @@ -131,7 +131,7 @@ QString GDBParser::undecorateValue(DataType type, const QString& s) start = skipDelim(start, '(', ')'); } - QString value(QCString(start, end - start + 1).data()); + TQString value(TQCString(start, end - start + 1).data()); value = value.stripWhiteSpace(); @@ -155,10 +155,10 @@ QString GDBParser::undecorateValue(DataType type, const QString& s) return value.stripWhiteSpace(); } -QString GDBParser::undecorateValue(const QString& s) +TQString GDBParser::undecorateValue(const TQString& s) { DataType dataType = determineType(s.local8Bit()); - QString r = undecorateValue(dataType, s.local8Bit()); + TQString r = undecorateValue(dataType, s.local8Bit()); return r; } diff --git a/languages/cpp/debugger/gdbparser.h b/languages/cpp/debugger/gdbparser.h index 8972e5df..a56c082d 100644 --- a/languages/cpp/debugger/gdbparser.h +++ b/languages/cpp/debugger/gdbparser.h @@ -25,7 +25,7 @@ class GDBParser { public: DataType determineType(const char *buf) const; - QString undecorateValue(const QString& s); + TQString undecorateValue(const TQString& s); const char *skipString(const char *buf) const; const char *skipQuotes(const char *buf, char quote) const; @@ -41,12 +41,12 @@ private: const char *skipTokenValue(const char *buf) const; const char *skipNextTokenStart(const char *buf) const; - QString getName(const char **buf); + TQString getName(const char **buf); /** Assuming 'buf' points to a value, return a pointer to the position right after the value. */ - QString getValue(const char **buf); - QString undecorateValue(DataType type, const QString& s); + TQString getValue(const char **buf); + TQString undecorateValue(DataType type, const TQString& s); protected: GDBParser(); diff --git a/languages/cpp/debugger/gdbtable.cpp b/languages/cpp/debugger/gdbtable.cpp index c4d75f3a..c9c1bf2f 100644 --- a/languages/cpp/debugger/gdbtable.cpp +++ b/languages/cpp/debugger/gdbtable.cpp @@ -11,13 +11,13 @@ namespace GDBDebugger { -GDBTable::GDBTable(QWidget *parent, const char *name) - : QTable(parent, name) +GDBTable::GDBTable(TQWidget *parent, const char *name) + : TQTable(parent, name) { } -GDBTable::GDBTable(int nr, int nc, QWidget * parent, const char * name) - : QTable(nr, nc, parent, name) +GDBTable::GDBTable(int nr, int nc, TQWidget * parent, const char * name) + : TQTable(nr, nc, parent, name) { } @@ -25,7 +25,7 @@ GDBTable::~GDBTable() { } -void GDBTable::keyPressEvent( QKeyEvent * e ) +void GDBTable::keyPressEvent( TQKeyEvent * e ) { emit keyPressed(e->key()); @@ -33,12 +33,12 @@ void GDBTable::keyPressEvent( QKeyEvent * e ) emit returnPressed(); else if (e->key() == Key_F2) emit f2Pressed(); - else if ((e->text() == QString("a")) && (e->state() == AltButton)) + else if ((e->text() == TQString("a")) && (e->state() == AltButton)) { emit insertPressed(); return; } - else if ((e->text() == QString("A")) && (e->state() == AltButton)) + else if ((e->text() == TQString("A")) && (e->state() == AltButton)) { emit insertPressed(); return; @@ -46,7 +46,7 @@ void GDBTable::keyPressEvent( QKeyEvent * e ) else if (e->key() == Key_Delete) emit deletePressed(); - QTable::keyPressEvent(e); + TQTable::keyPressEvent(e); } } diff --git a/languages/cpp/debugger/gdbtable.h b/languages/cpp/debugger/gdbtable.h index f8741e26..78c45055 100644 --- a/languages/cpp/debugger/gdbtable.h +++ b/languages/cpp/debugger/gdbtable.h @@ -10,7 +10,7 @@ #ifndef GDBDEBUGGERGDBTABLE_H #define GDBDEBUGGERGDBTABLE_H -#include <qtable.h> +#include <tqtable.h> namespace GDBDebugger { @@ -18,11 +18,11 @@ class GDBTable : public QTable { Q_OBJECT public: - GDBTable(QWidget *parent = 0, const char *name = 0); - GDBTable( int numRows, int numCols, QWidget * parent = 0, const char * name = 0 ); + GDBTable(TQWidget *parent = 0, const char *name = 0); + GDBTable( int numRows, int numCols, TQWidget * parent = 0, const char * name = 0 ); ~GDBTable(); - virtual void keyPressEvent ( QKeyEvent * e ); + virtual void keyPressEvent ( TQKeyEvent * e ); signals: void keyPressed(int key); diff --git a/languages/cpp/debugger/label_with_double_click.cpp b/languages/cpp/debugger/label_with_double_click.cpp index a0a2014b..f08c7358 100644 --- a/languages/cpp/debugger/label_with_double_click.cpp +++ b/languages/cpp/debugger/label_with_double_click.cpp @@ -1,11 +1,11 @@ #include "label_with_double_click.h" -LabelWithDoubleClick::LabelWithDoubleClick(const QString& s, QWidget* parent) -: QLabel(s, parent) +LabelWithDoubleClick::LabelWithDoubleClick(const TQString& s, TQWidget* parent) +: TQLabel(s, parent) {} -void LabelWithDoubleClick::mouseDoubleClickEvent(QMouseEvent*) +void LabelWithDoubleClick::mouseDoubleClickEvent(TQMouseEvent*) { emit doubleClicked(); } diff --git a/languages/cpp/debugger/label_with_double_click.h b/languages/cpp/debugger/label_with_double_click.h index 11dec898..35ade271 100644 --- a/languages/cpp/debugger/label_with_double_click.h +++ b/languages/cpp/debugger/label_with_double_click.h @@ -2,19 +2,19 @@ #ifndef LABEL_WITH_DOUBLE_CLICK_HPP_VP_2006_04_04 #define LABEL_WITH_DOUBLE_CLICK_HPP_VP_2006_04_04 -#include <qlabel.h> +#include <tqlabel.h> class LabelWithDoubleClick : public QLabel { Q_OBJECT public: - LabelWithDoubleClick(const QString& s, QWidget* parent); + LabelWithDoubleClick(const TQString& s, TQWidget* parent); signals: void doubleClicked(); protected: - void mouseDoubleClickEvent(QMouseEvent*); + void mouseDoubleClickEvent(TQMouseEvent*); }; #endif diff --git a/languages/cpp/debugger/memviewdlg.cpp b/languages/cpp/debugger/memviewdlg.cpp index 5316aa91..6d700233 100644 --- a/languages/cpp/debugger/memviewdlg.cpp +++ b/languages/cpp/debugger/memviewdlg.cpp @@ -26,15 +26,15 @@ #include <kdebug.h> #include <kiconloader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qmultilineedit.h> -#include <qpushbutton.h> -#include <qvariant.h> -#include <qpopupmenu.h> -#include <qhbox.h> -#include <qtoolbox.h> -#include <qtextedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqmultilineedit.h> +#include <tqpushbutton.h> +#include <tqvariant.h> +#include <tqpopupmenu.h> +#include <tqhbox.h> +#include <tqtoolbox.h> +#include <tqtextedit.h> #include <kmessagebox.h> @@ -76,28 +76,28 @@ namespace GDBDebugger public: KLineEdit* startAddressLineEdit; KLineEdit* amountLineEdit; - QPushButton* okButton; - QPushButton* cancelButton; + TQPushButton* okButton; + TQPushButton* cancelButton; - MemoryRangeSelector(QWidget* parent) - : QWidget(parent) + MemoryRangeSelector(TQWidget* parent) + : TQWidget(parent) { - QVBoxLayout* l = new QVBoxLayout(this); + TQVBoxLayout* l = new TQVBoxLayout(this); // Grid layout: labels + address field - QGridLayout* gl = new QGridLayout(l); + TQGridLayout* gl = new TQGridLayout(l); gl->setColSpacing(0, 2); gl->setColSpacing(1, 4); gl->setRowSpacing(1, 2); - QLabel* l1 = new QLabel(i18n("Start"), this); + TQLabel* l1 = new TQLabel(i18n("Start"), this); gl->addWidget(l1, 0, 1); startAddressLineEdit = new KLineEdit(this); gl->addWidget(startAddressLineEdit, 0, 3); - QLabel* l2 = new QLabel(i18n("Amount"), this); + TQLabel* l2 = new TQLabel(i18n("Amount"), this); gl->addWidget(l2, 2, 1); amountLineEdit = new KLineEdit(this); @@ -105,30 +105,30 @@ namespace GDBDebugger l->addSpacing(2); - QHBoxLayout* hb = new QHBoxLayout(l); + TQHBoxLayout* hb = new TQHBoxLayout(l); hb->addStretch(); - okButton = new QPushButton(i18n("OK"), this); + okButton = new TQPushButton(i18n("OK"), this); hb->addWidget(okButton); - cancelButton = new QPushButton(i18n("Cancel"), this); + cancelButton = new TQPushButton(i18n("Cancel"), this); hb->addWidget(cancelButton); l->addSpacing(2); - connect(startAddressLineEdit, SIGNAL(returnPressed()), - okButton, SLOT(animateClick())); + connect(startAddressLineEdit, TQT_SIGNAL(returnPressed()), + okButton, TQT_SLOT(animateClick())); - connect(amountLineEdit, SIGNAL(returnPressed()), - okButton, SLOT(animateClick())); + connect(amountLineEdit, TQT_SIGNAL(returnPressed()), + okButton, TQT_SLOT(animateClick())); } }; MemoryView::MemoryView(GDBController* controller, - QWidget* parent, const char* name) - : QWidget(parent, name), + TQWidget* parent, const char* name) + : TQWidget(parent, name), controller_(controller), // New memory view can be created only when debugger is active, // so don't set s_appNotStarted here. @@ -147,7 +147,7 @@ namespace GDBDebugger void MemoryView::initWidget() { - QVBoxLayout *l = new QVBoxLayout(this, 0, 0); + TQVBoxLayout *l = new TQVBoxLayout(this, 0, 0); khexedit2_widget = KHE::createBytesEditWidget(this); @@ -155,22 +155,22 @@ namespace GDBDebugger if (khexedit2_widget) { - QWidget* real_widget = (QWidget*) + TQWidget* real_widget = (TQWidget*) khexedit2_widget->child("BytesEdit"); if (real_widget) { ok_ = true; - connect(real_widget, SIGNAL(bufferChanged(int, int)), - this, SLOT(memoryEdited(int, int))); + connect(real_widget, TQT_SIGNAL(bufferChanged(int, int)), + this, TQT_SLOT(memoryEdited(int, int))); khexedit2_real_widget = real_widget; - QVariant resize_style(2); // full size usage. + TQVariant resize_style(2); // full size usage. real_widget->setProperty("ResizeStyle", resize_style); - //QVariant group(8); + //TQVariant group(8); //real_widget->setProperty("StartOffset", start); //real_widget->setProperty("NoOfBytesPerLine", group); @@ -179,10 +179,10 @@ namespace GDBDebugger // 3 -- binary // 1 -- decimal // 0 -- hex - //QVariant coding(3); + //TQVariant coding(3); //real_widget->setProperty("Coding", coding); - //QVariant gap(32); + //TQVariant gap(32); //real_widget->setProperty("BinaryGapWidth", gap); } @@ -197,28 +197,28 @@ namespace GDBDebugger rangeSelector_ = new MemoryRangeSelector(this); l->addWidget(rangeSelector_); - connect(rangeSelector_->okButton, SIGNAL(clicked()), - this, SLOT(slotChangeMemoryRange())); + connect(rangeSelector_->okButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChangeMemoryRange())); - connect(rangeSelector_->cancelButton, SIGNAL(clicked()), - this, SLOT(slotHideRangeDialog())); + connect(rangeSelector_->cancelButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotHideRangeDialog())); connect(rangeSelector_->startAddressLineEdit, - SIGNAL(textChanged(const QString&)), + TQT_SIGNAL(textChanged(const TQString&)), this, - SLOT(slotEnableOrDisable())); + TQT_SLOT(slotEnableOrDisable())); connect(rangeSelector_->amountLineEdit, - SIGNAL(textChanged(const QString&)), + TQT_SIGNAL(textChanged(const TQString&)), this, - SLOT(slotEnableOrDisable())); + TQT_SLOT(slotEnableOrDisable())); l->addWidget(khexedit2_widget); } else { - QTextEdit* edit = new QTextEdit(this); + TQTextEdit* edit = new TQTextEdit(this); l->addWidget(edit); edit->setText( @@ -257,12 +257,12 @@ namespace GDBDebugger this, &MemoryView::sizeComputed)); } - void MemoryView::sizeComputed(const QString& size) + void MemoryView::sizeComputed(const TQString& size) { controller_->addCommand( new GDBCommand( - QString("-data-read-memory %1 x 1 1 %2") + TQString("-data-read-memory %1 x 1 1 %2") .arg(rangeSelector_->startAddressLineEdit->text()) .arg(size).ascii(), this, @@ -279,7 +279,7 @@ namespace GDBDebugger amountAsString_ = rangeSelector_->amountLineEdit->text(); start_ = startAsString_.toUInt(0, 0); - setCaption(QString("%1 (%2 bytes)") + setCaption(TQString("%1 (%2 bytes)") .arg(startAsString_).arg(amount_)); emit captionChanged(caption()); @@ -302,10 +302,10 @@ namespace GDBDebugger // inserting new data. bytesEditor->setOverwriteOnly( true ); - QVariant start_v(start_); + TQVariant start_v(start_); khexedit2_real_widget->setProperty("FirstLineOffset", start_v); - //QVariant bsw(0); + //TQVariant bsw(0); //khexedit2_real_widget->setProperty("ByteSpacingWidth", bsw); // HACK: use hardcoded constant taht should match @@ -313,7 +313,7 @@ namespace GDBDebugger // 3 -- binary // 1 -- decimal // 0 -- hex - //QVariant coding(1); + //TQVariant coding(1); //khexedit2_real_widget->setProperty("Coding", coding); @@ -327,19 +327,19 @@ namespace GDBDebugger { controller_->addCommand( new GDBCommand( - QString("set *(char*)(%1 + %2) = %3") + TQString("set *(char*)(%1 + %2) = %3") .arg(start_) .arg(i) - .arg(QString::number(data_[i])))); + .arg(TQString::number(data_[i])))); } } - void MemoryView::contextMenuEvent ( QContextMenuEvent * e ) + void MemoryView::contextMenuEvent ( TQContextMenuEvent * e ) { if (!isOk()) return; - QPopupMenu menu; + TQPopupMenu menu; bool app_running = !(debuggerState_ & s_appNotStarted); @@ -373,7 +373,7 @@ namespace GDBDebugger controller_->addCommand( new GDBCommand( - QString("-data-read-memory %1 x 1 1 %2") + TQString("-data-read-memory %1 x 1 1 %2") .arg(start_).arg(amount_).ascii(), this, &MemoryView::memoryRead)); @@ -403,16 +403,16 @@ namespace GDBDebugger ViewerWidget::ViewerWidget(GDBController* controller, - QWidget* parent, + TQWidget* parent, const char* name) - : QWidget(parent, name), + : TQWidget(parent, name), controller_(controller) { setIcon(SmallIcon("math_brace")); - QVBoxLayout *l = new QVBoxLayout(this, 0, 0); + TQVBoxLayout *l = new TQVBoxLayout(this, 0, 0); - toolBox_ = new QToolBox(this); + toolBox_ = new TQToolBox(this); l->addWidget(toolBox_); } @@ -436,14 +436,14 @@ namespace GDBDebugger toolBox_->setCurrentItem(widget); memoryViews_.push_back(widget); - connect(widget, SIGNAL(captionChanged(const QString&)), - this, SLOT(slotChildCaptionChanged(const QString&))); + connect(widget, TQT_SIGNAL(captionChanged(const TQString&)), + this, TQT_SLOT(slotChildCaptionChanged(const TQString&))); - connect(widget, SIGNAL(destroyed(QObject*)), - this, SLOT(slotChildDestroyed(QObject*))); + connect(widget, TQT_SIGNAL(destroyed(TQObject*)), + this, TQT_SLOT(slotChildDestroyed(TQObject*))); } - void ViewerWidget::slotDebuggerState(const QString&, int state) + void ViewerWidget::slotDebuggerState(const TQString&, int state) { for(unsigned i = 0; i < memoryViews_.size(); ++i) { @@ -451,19 +451,19 @@ namespace GDBDebugger } } - void ViewerWidget::slotChildCaptionChanged(const QString& caption) + void ViewerWidget::slotChildCaptionChanged(const TQString& caption) { - const QWidget* s = static_cast<const QWidget*>(sender()); - QWidget* ncs = const_cast<QWidget*>(s); - QString cap = caption; + const TQWidget* s = static_cast<const TQWidget*>(sender()); + TQWidget* ncs = const_cast<TQWidget*>(s); + TQString cap = caption; // Prevent intepreting '&' as accelerator specifier. cap.replace("&", "&&"); toolBox_->setItemLabel(toolBox_->indexOf(ncs), cap); } - void ViewerWidget::slotChildDestroyed(QObject* child) + void ViewerWidget::slotChildDestroyed(TQObject* child) { - QValueVector<MemoryView*>::iterator i, e; + TQValueVector<MemoryView*>::iterator i, e; for(i = memoryViews_.begin(), e = memoryViews_.end(); i != e; ++i) { if (*i == child) diff --git a/languages/cpp/debugger/memviewdlg.h b/languages/cpp/debugger/memviewdlg.h index a29de924..7008fb48 100644 --- a/languages/cpp/debugger/memviewdlg.h +++ b/languages/cpp/debugger/memviewdlg.h @@ -20,7 +20,7 @@ #include <kdialog.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> class KLineEdit; class QMultiLineEdit; @@ -36,7 +36,7 @@ namespace GDBDebugger Q_OBJECT public: ViewerWidget(GDBController* controller, - QWidget* parent, const char* name); + TQWidget* parent, const char* name); public slots: /** Adds a new memory view to *this, initially showing @@ -45,20 +45,20 @@ namespace GDBDebugger /** Informs *this about change in debugger state. Should always be connected to, so that *this can disable itself when debugger is not running. */ - void slotDebuggerState(const QString&, int state); + void slotDebuggerState(const TQString&, int state); signals: void setViewShown(bool shown); private slots: - void slotChildCaptionChanged(const QString& caption); - void slotChildDestroyed(QObject* child); + void slotChildCaptionChanged(const TQString& caption); + void slotChildDestroyed(TQObject* child); private: // Data GDBController* controller_; - QToolBox* toolBox_; - QValueVector<MemoryView*> memoryViews_; + TQToolBox* toolBox_; + TQValueVector<MemoryView*> memoryViews_; }; class MemoryView : public QWidget @@ -66,15 +66,15 @@ namespace GDBDebugger Q_OBJECT public: MemoryView(GDBController* controller, - QWidget* parent, const char* name = 0); + TQWidget* parent, const char* name = 0); void debuggerStateChanged(int state); signals: - void captionChanged(const QString& caption); + void captionChanged(const TQString& caption); private: // Callbacks - void sizeComputed(const QString& value); + void sizeComputed(const TQString& value); void memoryRead(const GDBMI::ResultRecord& r); @@ -95,8 +95,8 @@ namespace GDBDebugger void slotHideRangeDialog(); void slotEnableOrDisable(); - private: // QWidget overrides - void contextMenuEvent(QContextMenuEvent* e); + private: // TQWidget overrides + void contextMenuEvent(TQContextMenuEvent* e); private: void initWidget(); @@ -104,11 +104,11 @@ namespace GDBDebugger private: GDBController* controller_; class MemoryRangeSelector* rangeSelector_; - QWidget* khexedit2_widget; - QWidget* khexedit2_real_widget; + TQWidget* khexedit2_widget; + TQWidget* khexedit2_real_widget; uint start_, amount_; - QString startAsString_, amountAsString_; + TQString startAsString_, amountAsString_; char* data_; int debuggerState_; diff --git a/languages/cpp/debugger/mi/gdbmi.cpp b/languages/cpp/debugger/mi/gdbmi.cpp index fa27355f..27f90284 100644 --- a/languages/cpp/debugger/mi/gdbmi.cpp +++ b/languages/cpp/debugger/mi/gdbmi.cpp @@ -28,7 +28,7 @@ type_error::type_error() : std::logic_error("MI type error") {} -QString Value::literal() const +TQString Value::literal() const { throw type_error(); } @@ -38,12 +38,12 @@ int Value::toInt(int /*base*/) const throw type_error(); } -bool Value::hasField(const QString&) const +bool Value::hasField(const TQString&) const { throw type_error(); } -const Value& Value::operator[](const QString&) const +const Value& Value::operator[](const TQString&) const { throw type_error(); } @@ -64,7 +64,7 @@ const Value& Value::operator[](unsigned) const throw type_error(); } -QString StringLiteralValue::literal() const +TQString StringLiteralValue::literal() const { return literal_; } @@ -80,16 +80,16 @@ int StringLiteralValue::toInt(int base) const TupleValue::~TupleValue() { - for (QValueListIterator<Result*> it=results.begin(); it!=results.end(); ++it) + for (TQValueListIterator<Result*> it=results.begin(); it!=results.end(); ++it) delete *it; } -bool TupleValue::hasField(const QString& variable) const +bool TupleValue::hasField(const TQString& variable) const { return results_by_name.count(variable); } -const Value& TupleValue::operator[](const QString& variable) const +const Value& TupleValue::operator[](const TQString& variable) const { if (results_by_name.count(variable)) return *results_by_name[variable]->value; @@ -99,7 +99,7 @@ const Value& TupleValue::operator[](const QString& variable) const ListValue::~ListValue() { - for (QValueListIterator<Result*> it=results.begin(); it!=results.end(); ++it) + for (TQValueListIterator<Result*> it=results.begin(); it!=results.end(); ++it) delete *it; } diff --git a/languages/cpp/debugger/mi/gdbmi.h b/languages/cpp/debugger/mi/gdbmi.h index 667246a0..64252ee5 100644 --- a/languages/cpp/debugger/mi/gdbmi.h +++ b/languages/cpp/debugger/mi/gdbmi.h @@ -22,9 +22,9 @@ #ifndef GDBMI_H #define GDBMI_H -#include <qstring.h> -#include <qvaluelist.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqmap.h> #include <stdexcept> @@ -94,7 +94,7 @@ namespace GDBMI /** If this value is a string literals, returns the string value. Othewise, throws type_error. */ - virtual QString literal() const; + virtual TQString literal() const; /** If the value is a string literal, converts it to int and returns. If conversion fails, or the value cannot be @@ -106,7 +106,7 @@ namespace GDBMI has a field named 'variable'. Otherwise, throws type_error. */ - virtual bool hasField(const QString& variable) const; + virtual bool hasField(const TQString& variable) const; /** If this value is a tuple, and contains named field 'variable', returns it. Otherwise, throws 'type_error'. @@ -114,7 +114,7 @@ namespace GDBMI we can save on casting, when we know for sure that instance is TupleValue, or ListValue. */ - virtual const Value& operator[](const QString& variable) const; + virtual const Value& operator[](const TQString& variable) const; /** If this value is a list, returns true if the list is empty. If this value is not a list, throws 'type_error'. @@ -140,22 +140,22 @@ namespace GDBMI Result() : value(0) {} ~Result() { delete value; value = 0; } - QString variable; + TQString variable; Value *value; }; struct StringLiteralValue : public Value { - StringLiteralValue(const QString &lit) + StringLiteralValue(const TQString &lit) : literal_(lit) { Value::kind = StringLiteral; } public: // Value overrides - QString literal() const; + TQString literal() const; int toInt(int base) const; private: - QString literal_; + TQString literal_; }; struct TupleValue : public Value @@ -163,12 +163,12 @@ namespace GDBMI TupleValue() { Value::kind = Tuple; } ~TupleValue(); - bool hasField(const QString&) const; - const Value& operator[](const QString& variable) const; + bool hasField(const TQString&) const; + const Value& operator[](const TQString& variable) const; - QValueList<Result*> results; - QMap<QString, GDBMI::Result*> results_by_name; + TQValueList<Result*> results; + TQMap<TQString, GDBMI::Result*> results_by_name; }; struct ListValue : public Value @@ -182,14 +182,14 @@ namespace GDBMI const Value& operator[](unsigned index) const; - QValueList<Result*> results; + TQValueList<Result*> results; }; struct Record { virtual ~Record() {} - virtual QString toString() const { Q_ASSERT( 0 ); return QString::null; } + virtual TQString toString() const { Q_ASSERT( 0 ); return TQString::null; } enum { Prompt, Stream, Result } kind; }; @@ -198,14 +198,14 @@ namespace GDBMI { ResultRecord() { Record::kind = Result; } - QString reason; + TQString reason; }; struct PromptRecord : public Record { inline PromptRecord() { Record::kind = Prompt; } - virtual QString toString() const + virtual TQString toString() const { return "(prompt)\n"; } }; @@ -214,7 +214,7 @@ namespace GDBMI inline StreamRecord() : reason(0) { Record::kind = Stream; } char reason; - QString message; + TQString message; }; } diff --git a/languages/cpp/debugger/mi/milexer.cpp b/languages/cpp/debugger/mi/milexer.cpp index 847733ad..7813d091 100644 --- a/languages/cpp/debugger/mi/milexer.cpp +++ b/languages/cpp/debugger/mi/milexer.cpp @@ -281,10 +281,10 @@ void TokenStream::positionAt(int position, int *line, int *column) const Q_ASSERT( *column >= 0 ); } -QCString TokenStream::tokenText(int index) const +TQCString TokenStream::tokenText(int index) const { Token *t = index < 0 ? m_currentToken : m_firstToken + index; const char* data = m_contents; - return QCString(data + t->position, t->length+1); + return TQCString(data + t->position, t->length+1); } diff --git a/languages/cpp/debugger/mi/milexer.h b/languages/cpp/debugger/mi/milexer.h index 8f39820c..8f07ba58 100644 --- a/languages/cpp/debugger/mi/milexer.h +++ b/languages/cpp/debugger/mi/milexer.h @@ -20,9 +20,9 @@ #ifndef MILEXER_H #define MILEXER_H -#include <qmemarray.h> -#include <qmap.h> -#include <qstring.h> +#include <tqmemarray.h> +#include <tqmap.h> +#include <tqstring.h> class MILexer; class TokenStream; @@ -38,7 +38,7 @@ struct Token struct FileSymbol { - QCString contents; + TQCString contents; TokenStream *tokenStream; inline FileSymbol() @@ -55,10 +55,10 @@ struct TokenStream inline int currentToken() const { return m_currentToken->kind; } - inline QCString currentTokenText() const + inline TQCString currentTokenText() const { return tokenText(-1); } - QCString tokenText(int index = 0) const; + TQCString tokenText(int index = 0) const; inline int lineOffset(int line) const { return m_lines.at(line); } @@ -84,12 +84,12 @@ struct TokenStream { m_currentToken++; m_cursor++; } //private: - QCString m_contents; + TQCString m_contents; - QMemArray<int> m_lines; + TQMemArray<int> m_lines; int m_line; - QMemArray<Token> m_tokens; + TQMemArray<Token> m_tokens; int m_tokensCount; Token *m_firstToken; @@ -123,15 +123,15 @@ private: static bool s_initialized; static scan_fun_ptr s_scan_table[128 + 1]; - QCString m_contents; + TQCString m_contents; int m_ptr; // Cached 'm_contents.length()' int m_length; - QMemArray<int> m_lines; + TQMemArray<int> m_lines; int m_line; - QMemArray<Token> m_tokens; + TQMemArray<Token> m_tokens; int m_tokensCount; int m_cursor; diff --git a/languages/cpp/debugger/mi/miparser.cpp b/languages/cpp/debugger/mi/miparser.cpp index 252c4e1b..fdd16137 100644 --- a/languages/cpp/debugger/mi/miparser.cpp +++ b/languages/cpp/debugger/mi/miparser.cpp @@ -125,7 +125,7 @@ bool MIParser::parseResultRecord(Record *&record) lex->nextToken(); MATCH(Token_identifier); - QString reason = lex->currentTokenText(); + TQString reason = lex->currentTokenText(); lex->nextToken(); std::auto_ptr<ResultRecord> res(new ResultRecord); @@ -148,7 +148,7 @@ bool MIParser::parseResultRecord(Record *&record) bool MIParser::parseResult(Result *&result) { MATCH(Token_identifier); - QString variable = lex->currentTokenText(); + TQString variable = lex->currentTokenText(); lex->nextToken(); std::auto_ptr<Result> res(new Result); @@ -289,12 +289,12 @@ bool MIParser::parseCSV(GDBMI::TupleValue& value, } -QString MIParser::parseStringLiteral() +TQString MIParser::parseStringLiteral() { - QCString message = lex->currentTokenText(); + TQCString message = lex->currentTokenText(); unsigned int length = message.length(); - QString message2; + TQString message2; message2.setLength(length); // The [1,length-1] range removes quotes without extra // call to 'mid' diff --git a/languages/cpp/debugger/mi/miparser.h b/languages/cpp/debugger/mi/miparser.h index b11ba504..9bea70b2 100644 --- a/languages/cpp/debugger/mi/miparser.h +++ b/languages/cpp/debugger/mi/miparser.h @@ -23,8 +23,8 @@ #include "milexer.h" #include "gdbmi.h" -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> /** @author Roberto Raggi @@ -70,7 +70,7 @@ protected: // rules in the string. @pre lex->lookAhead(0) == Token_string_literal */ - QString parseStringLiteral(); + TQString parseStringLiteral(); diff --git a/languages/cpp/debugger/stty.cpp b/languages/cpp/debugger/stty.cpp index f0bc2627..cdf4c81e 100644 --- a/languages/cpp/debugger/stty.cpp +++ b/languages/cpp/debugger/stty.cpp @@ -59,10 +59,10 @@ #include <bsdtty.h> #endif -#include <qintdict.h> -#include <qsocketnotifier.h> -#include <qstring.h> -#include <qfile.h> +#include <tqintdict.h> +#include <tqsocketnotifier.h> +#include <tqstring.h> +#include <tqfile.h> #include <klocale.h> #include <kstandarddirs.h> @@ -92,8 +92,8 @@ static int chownpty(int fd, int grant) if (fd != PTY_FILENO && dup2(fd, PTY_FILENO) < 0) ::exit(1); - QString path = locate("exe", BASE_CHOWN); - execle(QFile::encodeName(path), BASE_CHOWN, grant?"--grant":"--revoke", (void *)0, NULL); + TQString path = locate("exe", BASE_CHOWN); + execle(TQFile::encodeName(path), BASE_CHOWN, grant?"--grant":"--revoke", (void *)0, NULL); ::exit(1); // should not be reached } if (pid > 0) { @@ -118,8 +118,8 @@ static int chownpty(int fd, int grant) // ************************************************************************** -STTY::STTY(bool ext, const QString &termAppName) - : QObject(), +STTY::STTY(bool ext, const TQString &termAppName) + : TQObject(), out(0), ttySlave(""), pid_(0), @@ -130,9 +130,9 @@ STTY::STTY(bool ext, const QString &termAppName) } else { fout = findTTY(); if (fout >= 0) { - ttySlave = QString(tty_slave); - out = new QSocketNotifier(fout, QSocketNotifier::Read, this); - connect( out, SIGNAL(activated(int)), this, SLOT(OutReceived(int)) ); + ttySlave = TQString(tty_slave); + out = new TQSocketNotifier(fout, TQSocketNotifier::Read, this); + connect( out, TQT_SIGNAL(activated(int)), this, TQT_SLOT(OutReceived(int)) ); } } } @@ -281,9 +281,9 @@ void STTY::readRemaining() #define FIFO_FILE "/tmp/debug_tty.XXXXXX" -bool STTY::findExternalTTY(const QString &termApp) +bool STTY::findExternalTTY(const TQString &termApp) { - QString appName(termApp.isEmpty() ? QString("xterm") : termApp); + TQString appName(termApp.isEmpty() ? TQString("xterm") : termApp); if ( KStandardDirs::findExe( termApp ).isEmpty() ) { @@ -319,8 +319,8 @@ bool STTY::findExternalTTY(const QString &termApp) */ const char* prog = appName.latin1(); - QString script = QString("tty>") + QString(fifo) + - QString(";" // fifo name + TQString script = TQString("tty>") + TQString(fifo) + + TQString(";" // fifo name "trap \"\" INT QUIT TSTP;" // ignore various signals "exec<&-;exec>&-;" // close stdin and stdout "while :;do sleep 3600;done"); diff --git a/languages/cpp/debugger/stty.h b/languages/cpp/debugger/stty.h index 639e8417..7c026251 100644 --- a/languages/cpp/debugger/stty.h +++ b/languages/cpp/debugger/stty.h @@ -27,8 +27,8 @@ class QSocketNotifier; -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> namespace GDBDebugger { @@ -38,10 +38,10 @@ class STTY : public QObject Q_OBJECT public: - STTY(bool ext=false, const QString &termAppName=QString()); + STTY(bool ext=false, const TQString &termAppName=TQString()); ~STTY(); - QString getSlave() { return ttySlave; }; + TQString getSlave() { return ttySlave; }; void readRemaining(); private slots: @@ -53,13 +53,13 @@ signals: private: int findTTY(); - bool findExternalTTY(const QString &termApp); + bool findExternalTTY(const TQString &termApp); private: int fout; int ferr; - QSocketNotifier *out; - QString ttySlave; + TQSocketNotifier *out; + TQString ttySlave; int pid_; bool external_; diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp b/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp index 09053b51..cc03679f 100644 --- a/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp @@ -1,5 +1,5 @@ -#include <qstring.h> +#include <tqstring.h> #include <vector> struct B { int i; int j; static int k; }; @@ -17,7 +17,7 @@ void func2() printf("func2\n"); } -void func(QString& xs) +void func(TQString& xs) { int ac = 10; std::string s; @@ -30,7 +30,7 @@ void func(QString& xs) class Test { public: - QString n; + TQString n; int b; }; @@ -67,9 +67,9 @@ int test_main(int ac, char* av[]) wchar_t* p15 = L"test1"; - QString s = "test test test test"; - QString* sp = &s; - const QString& sr = s; + TQString s = "test test test test"; + TQString* sp = &s; + const TQString& sr = s; func(s); i = 15; diff --git a/languages/cpp/debugger/tests/two_module/src/foo.cpp b/languages/cpp/debugger/tests/two_module/src/foo.cpp index b66f9924..f0e30f15 100644 --- a/languages/cpp/debugger/tests/two_module/src/foo.cpp +++ b/languages/cpp/debugger/tests/two_module/src/foo.cpp @@ -1,10 +1,10 @@ #include <stdio.h> -#include <qstring.h> +#include <tqstring.h> void foo(int a) { - QString s = "foo"; + TQString s = "foo"; int i = 10; int i2 = 12; int i3 = i + i2; diff --git a/languages/cpp/debugger/variablewidget.cpp b/languages/cpp/debugger/variablewidget.cpp index 263afdf9..163c2024 100644 --- a/languages/cpp/debugger/variablewidget.cpp +++ b/languages/cpp/debugger/variablewidget.cpp @@ -24,19 +24,19 @@ #include <kdeversion.h> #include <kiconloader.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qcursor.h> -#include <qwhatsthis.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqcursor.h> +#include <tqwhatsthis.h> #include <klocale.h> -#include <qpoint.h> -#include <qclipboard.h> +#include <tqpoint.h> +#include <tqclipboard.h> #include <kapplication.h> #include <kmessagebox.h> @@ -77,8 +77,8 @@ namespace GDBDebugger VariableWidget::VariableWidget(GDBController* controller, GDBBreakpointWidget* breakpointWidget, - QWidget *parent, const char *name) -: QWidget(parent, name) + TQWidget *parent, const char *name) +: TQWidget(parent, name) { setIcon(SmallIcon("math_brace")); setCaption(i18n("Variable Tree")); @@ -88,35 +88,35 @@ VariableWidget::VariableWidget(GDBController* controller, watchVarEditor_ = new KHistoryCombo( this, "var-to-watch editor"); - QHBoxLayout* buttons = new QHBoxLayout(); + TQHBoxLayout* buttons = new TQHBoxLayout(); buttons->addStretch(); - QPushButton *evalButton = new QPushButton(i18n("&Evaluate"), this ); + TQPushButton *evalButton = new TQPushButton(i18n("&Evaluate"), this ); buttons->addWidget(evalButton); - QPushButton *addButton = new QPushButton(i18n("&Watch"), this ); + TQPushButton *addButton = new TQPushButton(i18n("&Watch"), this ); buttons->addWidget(addButton); - QVBoxLayout *topLayout = new QVBoxLayout(this, 2); + TQVBoxLayout *topLayout = new TQVBoxLayout(this, 2); topLayout->addWidget(varTree_, 10); topLayout->addWidget(watchVarEditor_); topLayout->addItem(buttons); - connect( addButton, SIGNAL(clicked()), SLOT(slotAddWatchVariable()) ); - connect( evalButton, SIGNAL(clicked()), SLOT(slotEvaluateExpression()) ); + connect( addButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddWatchVariable()) ); + connect( evalButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEvaluateExpression()) ); - connect( watchVarEditor_, SIGNAL(returnPressed()), - SLOT(slotEvaluateExpression()) ); + connect( watchVarEditor_, TQT_SIGNAL(returnPressed()), + TQT_SLOT(slotEvaluateExpression()) ); - connect(controller, SIGNAL(event(GDBController::event_t)), - varTree_, SLOT(slotEvent(GDBController::event_t))); + connect(controller, TQT_SIGNAL(event(GDBController::event_t)), + varTree_, TQT_SLOT(slotEvent(GDBController::event_t))); // Setup help items. - QWhatsThis::add(this, i18n( + TQWhatsThis::add(this, i18n( "<b>Variable tree</b><p>" "The variable tree allows you to see the values of local " "variables and arbitrary expressions." @@ -130,22 +130,22 @@ VariableWidget::VariableWidget(GDBController* controller, "<p>To change the value of a variable or an expression, " "click on the value.")); - QWhatsThis::add(watchVarEditor_, + TQWhatsThis::add(watchVarEditor_, i18n("<b>Expression entry</b>" "<p>Type in expression to evaluate.")); - QWhatsThis::add(evalButton, + TQWhatsThis::add(evalButton, i18n("Evaluate the expression.")); - QWhatsThis::add(addButton, + TQWhatsThis::add(addButton, i18n("Evaluate the expression and " "auto-update the value when stepping.")); } void VariableWidget::slotAddWatchVariable() { -// QString watchVar(watchVarEntry_->text()); - QString watchVar(watchVarEditor_->currentText()); +// TQString watchVar(watchVarEntry_->text()); + TQString watchVar(watchVarEditor_->currentText()); if (!watchVar.isEmpty()) { slotAddWatchVariable(watchVar); @@ -154,7 +154,7 @@ void VariableWidget::slotAddWatchVariable() // ************************************************************************** -void VariableWidget::slotAddWatchVariable(const QString &ident) +void VariableWidget::slotAddWatchVariable(const TQString &ident) { if (!ident.isEmpty()) { @@ -166,14 +166,14 @@ void VariableWidget::slotAddWatchVariable(const QString &ident) void VariableWidget::slotEvaluateExpression() { - QString exp(watchVarEditor_->currentText()); + TQString exp(watchVarEditor_->currentText()); if (!exp.isEmpty()) { slotEvaluateExpression(exp); } } -void VariableWidget::slotEvaluateExpression(const QString &ident) +void VariableWidget::slotEvaluateExpression(const TQString &ident) { if (!ident.isEmpty()) { @@ -185,7 +185,7 @@ void VariableWidget::slotEvaluateExpression(const QString &ident) // ************************************************************************** -void VariableWidget::focusInEvent(QFocusEvent */*e*/) +void VariableWidget::focusInEvent(TQFocusEvent */*e*/) { varTree_->setFocus(); } @@ -202,7 +202,7 @@ VariableTree::VariableTree(VariableWidget *parent, GDBBreakpointWidget* breakpointWidget, const char *name) : KListView(parent, name), - QToolTip( viewport() ), + TQToolTip( viewport() ), controller_(controller), breakpointWidget_(breakpointWidget), activeFlag_(0), @@ -213,7 +213,7 @@ VariableTree::VariableTree(VariableWidget *parent, setRootIsDecorated(true); setAllColumnsShowFocus(true); setSorting(-1); - QListView::setSelectionMode(QListView::Single); + TQListView::setSelectionMode(TQListView::Single); // Note: it might be reasonable to set width of value // column to 10 characters ('0x12345678'), and rely on @@ -223,10 +223,10 @@ VariableTree::VariableTree(VariableWidget *parent, addColumn(i18n("Value")); // setResizeMode(AllColumns); - connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - SLOT(slotContextMenu(KListView*, QListViewItem*)) ); - connect( this, SIGNAL(itemRenamed( QListViewItem*, int, const QString&)), - this, SLOT(slotItemRenamed( QListViewItem*, int, const QString&))); + connect( this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*)) ); + connect( this, TQT_SIGNAL(itemRenamed( TQListViewItem*, int, const TQString&)), + this, TQT_SLOT(slotItemRenamed( TQListViewItem*, int, const TQString&))); } // ************************************************************************** @@ -237,7 +237,7 @@ VariableTree::~VariableTree() // ************************************************************************** -void VariableTree::slotContextMenu(KListView *, QListViewItem *item) +void VariableTree::slotContextMenu(KListView *, TQListViewItem *item) { if (!item) return; @@ -293,7 +293,7 @@ void VariableTree::slotContextMenu(KListView *, QListViewItem *item) } - QListViewItem* root = findRoot(item); + TQListViewItem* root = findRoot(item); if (root != recentExpressions_) { @@ -337,14 +337,14 @@ void VariableTree::slotContextMenu(KListView *, QListViewItem *item) if (var && var->isAlive() && !controller()->stateIsOn(s_dbgNotStarted)) controller_->addCommand( new GDBCommand( - QString("-data-evaluate-expression &%1") + TQString("-data-evaluate-expression &%1") .arg(var->gdbExpression()), this, &VariableTree::handleAddressComputed, true /*handles error*/)); - int res = popup.exec(QCursor::pos()); + int res = popup.exec(TQCursor::pos()); activePopup_ = 0; @@ -401,7 +401,7 @@ void VariableTree::slotContextMenu(KListView *, QListViewItem *item) SmallIcon("reload"), i18n("Reevaluate All")); if (controller()->stateIsOn(s_dbgNotStarted)) popup.setItemEnabled(idReevaluate, false); - int res = popup.exec(QCursor::pos()); + int res = popup.exec(TQCursor::pos()); if (res == idRemove) { @@ -410,7 +410,7 @@ void VariableTree::slotContextMenu(KListView *, QListViewItem *item) } else if (res == idReevaluate) { - for(QListViewItem* child = recentExpressions_->firstChild(); + for(TQListViewItem* child = recentExpressions_->firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->recreate(); @@ -427,10 +427,10 @@ void VariableTree::slotEvent(GDBController::event_t event) case GDBController::debugger_exited: { // Remove all locals. - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); while (child) { - QListViewItem *nextChild = child->nextSibling(); + TQListViewItem *nextChild = child->nextSibling(); // don't remove the watch root, or 'recent expressions' root. if (!(dynamic_cast<WatchRoot*> (child)) @@ -444,7 +444,7 @@ void VariableTree::slotEvent(GDBController::event_t event) if (recentExpressions_) { - for(QListViewItem* child = recentExpressions_->firstChild(); + for(TQListViewItem* child = recentExpressions_->firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->unhookFromGdb(); @@ -453,7 +453,7 @@ void VariableTree::slotEvent(GDBController::event_t event) if (WatchRoot* w = findWatch()) { - for(QListViewItem* child = w->firstChild(); + for(TQListViewItem* child = w->firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->unhookFromGdb(); @@ -504,7 +504,7 @@ void VariableTree::updateCurrentFrame() // We'll fetch values separately: controller_->addCommand( - new GDBCommand(QString("-stack-list-arguments 0 %1 %2") + new GDBCommand(TQString("-stack-list-arguments 0 %1 %2") .arg(controller_->currentFrame()) .arg(controller_->currentFrame()) .ascii(), @@ -522,13 +522,13 @@ void VariableTree::updateCurrentFrame() // ************************************************************************** -void VariableTree::slotAddWatchVariable(const QString &watchVar) +void VariableTree::slotAddWatchVariable(const TQString &watchVar) { VarItem *varItem = 0; varItem = new VarItem(findWatch(), watchVar); } -void VariableTree::slotEvaluateExpression(const QString &expression) +void VariableTree::slotEvaluateExpression(const TQString &expression) { if (recentExpressions_ == 0) { @@ -545,7 +545,7 @@ void VariableTree::slotEvaluateExpression(const QString &expression) // ************************************************************************** -QListViewItem *VariableTree::findRoot(QListViewItem *item) const +TQListViewItem *VariableTree::findRoot(TQListViewItem *item) const { while (item->parent()) item = item->parent(); @@ -557,7 +557,7 @@ QListViewItem *VariableTree::findRoot(QListViewItem *item) const VarFrameRoot *VariableTree::findFrame(int frameNo, int threadNo) const { - QListViewItem *sibling = firstChild(); + TQListViewItem *sibling = firstChild(); // frames only exist on th top level so we only need to // check the siblings @@ -576,7 +576,7 @@ VarFrameRoot *VariableTree::findFrame(int frameNo, int threadNo) const WatchRoot *VariableTree::findWatch() { - QListViewItem *sibling = firstChild(); + TQListViewItem *sibling = firstChild(); while (sibling) { if (WatchRoot *watch = dynamic_cast<WatchRoot*> (sibling)) @@ -590,11 +590,11 @@ WatchRoot *VariableTree::findWatch() // ************************************************************************** -QListViewItem *VariableTree::lastChild() const +TQListViewItem *VariableTree::lastChild() const { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); if (child) - while (QListViewItem *nextChild = child->nextSibling()) + while (TQListViewItem *nextChild = child->nextSibling()) child = nextChild; return child; @@ -602,21 +602,21 @@ QListViewItem *VariableTree::lastChild() const // ************************************************************************** -void VariableTree::maybeTip(const QPoint &p) +void VariableTree::maybeTip(const TQPoint &p) { VarItem * item = dynamic_cast<VarItem*>( itemAt( p ) ); if ( item ) { - QRect r = itemRect( item ); + TQRect r = itemRect( item ); if ( r.isValid() ) tip( r, item->tipText() ); } } -class ValueSpecialRepresentationCommand : public QObject, public CliCommand +class ValueSpecialRepresentationCommand : public TQObject, public CliCommand { public: - ValueSpecialRepresentationCommand(VarItem* item, const QString& command) + ValueSpecialRepresentationCommand(VarItem* item, const TQString& command) : CliCommand(command.ascii(), this, &ValueSpecialRepresentationCommand::handleReply, @@ -628,9 +628,9 @@ private: VarItem* item_; - void handleReply(const QValueVector<QString>& lines) + void handleReply(const TQValueVector<TQString>& lines) { - QString s; + TQString s; for(unsigned i = 1; i < lines.count(); ++i) s += lines[i]; item_->updateSpecialRepresentation(s.local8Bit()); @@ -638,7 +638,7 @@ private: }; void VariableTree::slotVarobjNameChanged( - const QString& from, const QString& to) + const TQString& from, const TQString& to) { if (!from.isEmpty()) varobj2varitem.erase(from); @@ -686,7 +686,7 @@ void VariableTree::localsReady(const GDBMI::ResultRecord& r) for(unsigned i = 0; i < locals.size(); ++i) { - QString val = locals[i].literal(); + TQString val = locals[i].literal(); // Check ada internal variables like <R45b>, <L23R> ... bool is_ada_variable = (val[0] == '<' && val[val.length() - 1] == '>'); @@ -702,19 +702,19 @@ void VariableTree::localsReady(const GDBMI::ResultRecord& r) &VariableTree::frameIdReady)); } -void VariableTree::frameIdReady(const QValueVector<QString>& lines) +void VariableTree::frameIdReady(const TQValueVector<TQString>& lines) { //kdDebug(9012) << "localAddresses: " << lines[1] << "\n"; - QString frame_info; + TQString frame_info; for(unsigned i = 1; i < lines.size(); ++i) frame_info += lines[i]; kdDebug(9012) << "frame info: " << frame_info << "\n"; frame_info.replace('\n', ""); - static QRegExp frame_base_rx("frame at 0x([0-9a-fA-F]*)"); - static QRegExp frame_code_rx("saved [a-zA-Z0-9]* 0x([0-9a-fA-F]*)"); + 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]*)"); int i = frame_base_rx.search(frame_info); int i2 = frame_code_rx.search(frame_info); @@ -741,12 +741,12 @@ void VariableTree::frameIdReady(const QValueVector<QString>& lines) frame_base_rx.cap(1).toULongLong(0, 16); unsigned long long new_code_address = frame_code_rx.cap(1).toULongLong(0, 16); - kdDebug(9012) << "Frame base = " << QString::number(new_frame_base, 16) - << " code = " << QString::number(new_code_address, 16) + kdDebug(9012) << "Frame base = " << TQString::number(new_frame_base, 16) + << " code = " << TQString::number(new_code_address, 16) << "\n"; kdDebug(9012) << "Previous frame " << - QString::number(frame->currentFrameBase, 16) - << " code = " << QString::number( + TQString::number(frame->currentFrameBase, 16) + << " code = " << TQString::number( frame->currentFrameCodeAddress, 16) << "\n"; @@ -770,8 +770,8 @@ void VariableTree::frameIdReady(const QValueVector<QString>& lines) { // Remove all variables. // FIXME: probably, need to do this in all frames. - QListViewItem* child = frame->firstChild(); - QListViewItem* next; + TQListViewItem* child = frame->firstChild(); + TQListViewItem* next; for(; child; child = next) { next = child->nextSibling(); @@ -781,15 +781,15 @@ void VariableTree::frameIdReady(const QValueVector<QString>& lines) setUpdatesEnabled(false); - std::set<QListViewItem*> alive; + std::set<TQListViewItem*> alive; for(unsigned i = 0; i < locals_and_arguments.size(); ++i) { - QString name = locals_and_arguments[i]; + TQString name = locals_and_arguments[i]; // See if we've got VarItem for this one already. VarItem* var = 0; - for(QListViewItem *child = frame->firstChild(); + for(TQListViewItem *child = frame->firstChild(); child; child = child->nextSibling()) { @@ -811,9 +811,9 @@ void VariableTree::frameIdReady(const QValueVector<QString>& lines) // Remove VarItems that don't correspond to any local // variables any longer. Perform type/address updates // for others. - for(QListViewItem* child = frame->firstChild(); child;) + for(TQListViewItem* child = frame->firstChild(); child;) { - QListViewItem* current = child; + TQListViewItem* current = child; child = current->nextSibling(); if (!alive.count(current)) delete current; @@ -821,7 +821,7 @@ void VariableTree::frameIdReady(const QValueVector<QString>& lines) static_cast<VarItem*>(current)->recreateLocallyMaybe(); } - for(QListViewItem* child = findWatch()->firstChild(); + for(TQListViewItem* child = findWatch()->firstChild(); child; child = child->nextSibling()) { VarItem* var = static_cast<VarItem*>(child); @@ -848,20 +848,20 @@ void VariableTree::handleVarUpdate(const GDBMI::ResultRecord& r) { const GDBMI::Value& changed = r["changelist"]; - std::set<QString> names_to_update; + std::set<TQString> names_to_update; for(unsigned i = 0; i < changed.size(); ++i) { const GDBMI::Value& c = changed[i]; - QString name = c["name"].literal(); + TQString name = c["name"].literal(); if (c.hasField("in_scope") && c["in_scope"].literal() == "false") continue; names_to_update.insert(name); } - QMap<QString, VarItem*>::iterator i, e; + TQMap<TQString, VarItem*>::iterator i, e; for (i = varobj2varitem.begin(), e = varobj2varitem.end(); i != e; ++i) { if (names_to_update.count(i.key()) @@ -872,16 +872,16 @@ void VariableTree::handleVarUpdate(const GDBMI::ResultRecord& r) } } -void VarItem::handleCliPrint(const QValueVector<QString>& lines) +void VarItem::handleCliPrint(const TQValueVector<TQString>& lines) { - static QRegExp r("(\\$[0-9]+)"); + static TQRegExp r("(\\$[0-9]+)"); if (lines.size() >= 2) { int i = r.search(lines[1]); if (i == 0) { controller_->addCommand( - new GDBCommand(QString("-var-create %1 * \"%2\"") + new GDBCommand(TQString("-var-create %1 * \"%2\"") .arg(varobjName_) .arg(r.cap(1)), this, @@ -907,7 +907,7 @@ void VarItem::handleCliPrint(const QValueVector<QString>& lines) void VariableTree::variablesFetchDone() { // During parsing of fetched variable values, we might have issued - // extra command to handle 'special values', like QString. + // extra command to handle 'special values', like TQString. // We don't want to enable updates just yet, because this will cause // flicker, so add a sentinel command just to enable updates. // @@ -941,7 +941,7 @@ void VariableTree::fetchSpecialValuesDone() } void -VariableTree::slotItemRenamed(QListViewItem* item, int col, const QString& text) +VariableTree::slotItemRenamed(TQListViewItem* item, int col, const TQString& text) { if (col == ValueCol) { @@ -955,11 +955,11 @@ VariableTree::slotItemRenamed(QListViewItem* item, int col, const QString& text) } -void VariableTree::keyPressEvent(QKeyEvent* e) +void VariableTree::keyPressEvent(TQKeyEvent* e) { if (VarItem* item = dynamic_cast<VarItem*>(currentItem())) { - QString text = e->text(); + TQString text = e->text(); if (text == "n" || text == "x" || text == "d" || text == "c" || text == "t") @@ -970,7 +970,7 @@ void VariableTree::keyPressEvent(QKeyEvent* e) if (e->key() == Qt::Key_Delete) { - QListViewItem* root = findRoot(item); + TQListViewItem* root = findRoot(item); if (dynamic_cast<WatchRoot*>(root) || root == recentExpressions_) { @@ -986,10 +986,10 @@ void VariableTree::keyPressEvent(QKeyEvent* e) } -void VariableTree::copyToClipboard(QListViewItem* item) +void VariableTree::copyToClipboard(TQListViewItem* item) { QClipboard *qb = KApplication::clipboard(); - QString text = item->text( 1 ); + TQString text = item->text( 1 ); qb->setText( text, QClipboard::Clipboard ); } @@ -1038,7 +1038,7 @@ TrimmableItem::~TrimmableItem() // ************************************************************************** -void TrimmableItem::paintCell(QPainter *p, const QColorGroup &cg, +void TrimmableItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if ( !p ) @@ -1046,18 +1046,18 @@ void TrimmableItem::paintCell(QPainter *p, const QColorGroup &cg, // make toplevel item (watch and frame items) names bold if (column == 0 && !parent()) { - QFont f = p->font(); + TQFont f = p->font(); f.setBold(true); p->setFont(f); } - QListViewItem::paintCell( p, cg, column, width, align ); + TQListViewItem::paintCell( p, cg, column, width, align ); } -QListViewItem *TrimmableItem::lastChild() const +TQListViewItem *TrimmableItem::lastChild() const { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); if (child) - while (QListViewItem *nextChild = child->nextSibling()) + while (TQListViewItem *nextChild = child->nextSibling()) child = nextChild; return child; @@ -1070,7 +1070,7 @@ QListViewItem *TrimmableItem::lastChild() const int VarItem::varobjIndex = 0; VarItem::VarItem(TrimmableItem *parent, - const QString& expression, + const TQString& expression, bool frozen) : TrimmableItem (parent), expression_(expression), @@ -1085,9 +1085,9 @@ VarItem::VarItem(TrimmableItem *parent, baseClassMember_(false), alive_(true) { - connect(this, SIGNAL(varobjNameChange(const QString&, const QString&)), + connect(this, TQT_SIGNAL(varobjNameChange(const TQString&, const TQString&)), varTree(), - SLOT(slotVarobjNameChanged(const QString&, const QString&))); + TQT_SLOT(slotVarobjNameChanged(const TQString&, const TQString&))); // User might have entered format together with expression: like @@ -1098,7 +1098,7 @@ VarItem::VarItem(TrimmableItem *parent, // - detect initial value of format_ // - remove the format specifier from the string. - static QRegExp explicit_format("^\\s*/(.)\\s*(.*)"); + static TQRegExp explicit_format("^\\s*/(.)\\s*(.*)"); if (explicit_format.search(expression_) == 0) { format_ = formatFromGdbModifier(explicit_format.cap(1)[0].latin1()); @@ -1130,9 +1130,9 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, baseClassMember_(baseClassMember), alive_(true) { - connect(this, SIGNAL(varobjNameChange(const QString&, const QString&)), + connect(this, TQT_SIGNAL(varobjNameChange(const TQString&, const TQString&)), varTree(), - SLOT(slotVarobjNameChanged(const QString&, const QString&))); + TQT_SLOT(slotVarobjNameChanged(const TQString&, const TQString&))); expression_ = varobj["exp"].literal(); varobjName_ = varobj["name"].literal(); @@ -1158,8 +1158,8 @@ VarItem::VarItem(TrimmableItem *parent, const GDBMI::Value& varobj, void VarItem::createVarobj() { - QString old = varobjName_; - varobjName_ = QString("KDEV%1").arg(varobjIndex++); + TQString old = varobjName_; + varobjName_ = TQString("KDEV%1").arg(varobjIndex++); emit varobjNameChange(old, varobjName_); if (frozen_) @@ -1169,7 +1169,7 @@ void VarItem::createVarobj() // variable and we create variable object from that. controller_->addCommand( new CliCommand( - QString("print %1").arg(expression_), + TQString("print %1").arg(expression_), this, &VarItem::handleCliPrint)); } @@ -1177,7 +1177,7 @@ void VarItem::createVarobj() { controller_->addCommand( new CliCommand( - QString("print /x &%1").arg(expression_), + TQString("print /x &%1").arg(expression_), this, &VarItem::handleCurrentAddress, true)); @@ -1185,7 +1185,7 @@ void VarItem::createVarobj() controller_->addCommand( // Need to quote expression, otherwise gdb won't like // spaces inside it. - new GDBCommand(QString("-var-create %1 * \"%2\"") + new GDBCommand(TQString("-var-create %1 * \"%2\"") .arg(varobjName_) .arg(expression_), this, @@ -1205,15 +1205,15 @@ void VarItem::varobjCreated(const GDBMI::ResultRecord& r) } setAliveRecursively(true); - QString oldType = originalValueType_; + TQString oldType = originalValueType_; originalValueType_ = r["type"].literal(); if (!oldType.isEmpty() && oldType != originalValueType_) { // Type changed, the children might be no longer valid, // so delete them. - for(QListViewItem* child = firstChild(); child; ) + for(TQListViewItem* child = firstChild(); child; ) { - QListViewItem* cur = child; + TQListViewItem* cur = child; child = child->nextSibling(); delete cur; } @@ -1228,7 +1228,7 @@ void VarItem::varobjCreated(const GDBMI::ResultRecord& r) setVarobjName(varobjName_); } -void VarItem::setVarobjName(const QString& name) +void VarItem::setVarobjName(const TQString& name) { if (varobjName_ != name) emit varobjNameChange(varobjName_, name); @@ -1238,7 +1238,7 @@ void VarItem::setVarobjName(const QString& name) if (format_ != natural) { controller_->addCommand( - new GDBCommand(QString("-var-set-format \"%1\" %2") + new GDBCommand(TQString("-var-set-format \"%1\" %2") .arg(varobjName_).arg(varobjFormatName()))); } @@ -1256,12 +1256,12 @@ void VarItem::valueDone(const GDBMI::ResultRecord& r) { if (r.reason == "done") { - QString s = GDBParser::getGDBParser()->undecorateValue( + TQString s = GDBParser::getGDBParser()->undecorateValue( r["value"].literal()); if (format_ == character) { - QString encoded = s; + TQString encoded = s; bool ok; int value = s.toInt(&ok); if (ok) @@ -1292,11 +1292,11 @@ void VarItem::valueDone(const GDBMI::ResultRecord& r) if (format_ == binary) { // For binary format, split the value at 4-bit boundaries - static QRegExp r("^[01]+$"); + static TQRegExp r("^[01]+$"); int i = r.search(s); if (i == 0) { - QString split; + TQString split; for(unsigned i = 0; i < s.length(); ++i) { // For string 11111, we should split it as @@ -1317,7 +1317,7 @@ void VarItem::valueDone(const GDBMI::ResultRecord& r) } else { - QString s = r["msg"].literal(); + TQString s = r["msg"].literal(); // Error response. if (s.startsWith("Cannot access memory")) { @@ -1344,7 +1344,7 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, bool structureType = false; if (!children_of_fake && children.size() > 0) { - QString exp = children[0]["exp"].literal(); + TQString exp = children[0]["exp"].literal(); bool ok = false; exp.toInt(&ok); if (!ok || exp[0] != '*') @@ -1355,12 +1355,12 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, for (unsigned i = 0; i < children.size(); ++i) { - QString exp = children[i]["exp"].literal(); + TQString exp = children[i]["exp"].literal(); // For artificial accessibility nodes, // fetch their children. if (exp == "public" || exp == "protected" || exp == "private") { - QString name = children[i]["name"].literal(); + TQString name = children[i]["name"].literal(); controller_->addCommand(new GDBCommand( "-var-list-children \"" + name + "\"", @@ -1374,7 +1374,7 @@ void VarItem::createChildren(const GDBMI::ResultRecord& r, bool baseObject = structureType; VarItem* existing = 0; - for(QListViewItem* child = firstChild(); + for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) { VarItem* v = static_cast<VarItem*>(child); @@ -1414,12 +1414,12 @@ void VarItem::childrenOfFakesDone(const GDBMI::ResultRecord& r) createChildren(r, true); } -void VarItem::handleCurrentAddress(const QValueVector<QString>& lines) +void VarItem::handleCurrentAddress(const TQValueVector<TQString>& lines) { lastObtainedAddress_ = ""; if (lines.count() > 1) { - static QRegExp r("\\$\\d+ = ([^\n]*)"); + static TQRegExp r("\\$\\d+ = ([^\n]*)"); int i = r.search(lines[1]); if (i == 0) { @@ -1429,7 +1429,7 @@ void VarItem::handleCurrentAddress(const QValueVector<QString>& lines) } } -void VarItem::handleType(const QValueVector<QString>& lines) +void VarItem::handleType(const TQValueVector<TQString>& lines) { bool recreate = false; @@ -1444,7 +1444,7 @@ void VarItem::handleType(const QValueVector<QString>& lines) // FIXME: add error diagnostic. if (lines.count() > 1) { - static QRegExp r("type = ([^\n]*)"); + static TQRegExp r("type = ([^\n]*)"); int i = r.search(lines[1]); if (i == 0) { @@ -1464,7 +1464,7 @@ void VarItem::handleType(const QValueVector<QString>& lines) } } -QString VarItem::displayName() const +TQString VarItem::displayName() const { if (expression_[0] != '*') return expression_; @@ -1485,7 +1485,7 @@ void VarItem::setAliveRecursively(bool enable) setEnabled(enable); alive_ = true; - for(QListViewItem* child = firstChild(); + for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->setAliveRecursively(enable); @@ -1498,7 +1498,7 @@ VarItem::~VarItem() unhookFromGdb(); } -QString VarItem::gdbExpression() const +TQString VarItem::gdbExpression() const { // The expression for this item can be either: // - number, for array element @@ -1550,26 +1550,26 @@ QString VarItem::gdbExpression() const // FIXME: we have two method to set VarItem: this one // and updateValue below. That's bad, must have just one. -void VarItem::setText(int column, const QString &data) +void VarItem::setText(int column, const TQString &data) { - QString strData=data; + TQString strData=data; if (column == ValueCol) { - QString oldValue(text(column)); + TQString oldValue(text(column)); if (!oldValue.isEmpty()) // Don't highlight new items { - highlight_ = (oldValue != QString(data)); + highlight_ = (oldValue != TQString(data)); } } - QListViewItem::setText(column, strData); + TQListViewItem::setText(column, strData); } void VarItem::clearHighlight() { highlight_ = false; - for(QListViewItem* child = firstChild(); + for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->clearHighlight(); @@ -1600,10 +1600,10 @@ void VarItem::updateValue() true /* handle error */)); } -void VarItem::setValue(const QString& new_value) +void VarItem::setValue(const TQString& new_value) { controller_->addCommand( - new GDBCommand(QString("-var-assign \"%1\" %2").arg(varobjName_) + new GDBCommand(TQString("-var-assign \"%1\" %2").arg(varobjName_) .arg(new_value))); // And immediately reload it from gdb, @@ -1614,9 +1614,9 @@ void VarItem::setValue(const QString& new_value) updateValue(); } -void VarItem::updateSpecialRepresentation(const QString& xs) +void VarItem::updateSpecialRepresentation(const TQString& xs) { - QString s(xs); + TQString s(xs); if (s[0] == '$') { int i = s.find('='); @@ -1624,7 +1624,7 @@ void VarItem::updateSpecialRepresentation(const QString& xs) s = s.mid(i+2); } - // A hack to nicely display QStrings. The content of QString is unicode + // A hack to nicely display QStrings. The content of TQString is unicode // for for ASCII only strings we get ascii character mixed with \000. // Remove those \000 now. @@ -1634,11 +1634,11 @@ void VarItem::updateSpecialRepresentation(const QString& xs) // the data sent by gdb might contain \000 that should not be translated. // // What's even worse, ideally we should convert the string data from - // gdb into a QString again, handling all other escapes and composing - // one QChar from two characters from gdb. But to do that, we *should* + // gdb into a TQString again, handling all other escapes and composing + // 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( QRegExp("\\\\000|\\\\0"), "" ); + s.replace( 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( - QString("print /x &%1").arg(expression_), + TQString("print /x &%1").arg(expression_), this, &VarItem::handleCurrentAddress, true)); controller_->addCommand( new CliCommand( - QString("whatis %1").arg(expression_), + TQString("whatis %1").arg(expression_), this, &VarItem::handleType)); } @@ -1686,7 +1686,7 @@ void VarItem::recreate() void VarItem::setOpen(bool open) { - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); if (open && !childrenFetched_) { @@ -1703,7 +1703,7 @@ bool VarItem::handleSpecialTypes() if (originalValueType_.isEmpty()) return false; - static QRegExp qstring("^(const)?[ ]*QString[ ]*&?$"); + static TQRegExp qstring("^(const)?[ ]*QString[ ]*&?$"); if (qstring.exactMatch(originalValueType_)) { @@ -1711,22 +1711,22 @@ bool VarItem::handleSpecialTypes() if( !varTree->controller() ) return false; varTree->controller()->addCommand( - new ResultlessCommand(QString("print $kdev_d=%1.d") + new ResultlessCommand(TQString("print $kdev_d=%1.d") .arg(gdbExpression()), true /* ignore error */)); if (varTree->controller()->qtVersion() >= 4) varTree->controller()->addCommand( - new ResultlessCommand(QString("print $kdev_s=$kdev_d.size"), + new ResultlessCommand(TQString("print $kdev_s=$kdev_d.size"), true)); else varTree->controller()->addCommand( - new ResultlessCommand(QString("print $kdev_s=$kdev_d.len"), + new ResultlessCommand(TQString("print $kdev_s=$kdev_d.len"), true)); varTree->controller()->addCommand( new ResultlessCommand( - QString("print $kdev_s= ($kdev_s > 0)? ($kdev_s > 100 ? 200 : 2*$kdev_s) : 0"), + TQString("print $kdev_s= ($kdev_s > 0)? ($kdev_s > 100 ? 200 : 2*$kdev_s) : 0"), true)); if (varTree->controller()->qtVersion() >= 4) @@ -1765,7 +1765,7 @@ void VarItem::setFormat(format_t f) // - for arrays, that's clearly right // - for pointers, this can be confusing, but nobody ever wants to // see the pointer in decimal! - for(QListViewItem* child = firstChild(); + for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->setFormat(f); @@ -1774,7 +1774,7 @@ void VarItem::setFormat(format_t f) else { controller_->addCommand( - new GDBCommand(QString("-var-set-format \"%1\" %2") + new GDBCommand(TQString("-var-set-format \"%1\" %2") .arg(varobjName_).arg(varobjFormatName()))); updateValue(); @@ -1802,7 +1802,7 @@ VarItem::format_t VarItem::formatFromGdbModifier(char c) const return nf; } -QString VarItem::varobjFormatName() const +TQString VarItem::varobjFormatName() const { switch(format_) { @@ -1836,7 +1836,7 @@ QString VarItem::varobjFormatName() const // ************************************************************************** // Overridden to highlight the changed items -void VarItem::paintCell(QPainter *p, const QColorGroup &cg, +void VarItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if ( !p ) @@ -1853,18 +1853,18 @@ void VarItem::paintCell(QPainter *p, const QColorGroup &cg, if (!alive_) { /* Draw this as disabled. */ - QListViewItem::paintCell(p, varTree()->QWidget::palette().disabled(), + TQListViewItem::paintCell(p, varTree()->TQWidget::palette().disabled(), column, width, align); } else { if (column == ValueCol && highlight_) { - QColorGroup hl_cg( cg.foreground(), cg.background(), cg.light(), + TQColorGroup hl_cg( cg.foreground(), cg.background(), cg.light(), cg.dark(), cg.mid(), red, cg.base()); - QListViewItem::paintCell( p, hl_cg, column, width, align ); + TQListViewItem::paintCell( p, hl_cg, column, width, align ); } else - QListViewItem::paintCell( p, cg, column, width, align ); + TQListViewItem::paintCell( p, cg, column, width, align ); } } @@ -1879,7 +1879,7 @@ void VarItem::unhookFromGdb() // Unhook children first, so that child varitems are deleted // before parent. Strictly speaking, we can avoid calling // -var-delete on child varitems, but that's a bit cheesy, - for(QListViewItem* child = firstChild(); + for(TQListViewItem* child = firstChild(); child; child = child->nextSibling()) { static_cast<VarItem*>(child)->unhookFromGdb(); @@ -1894,7 +1894,7 @@ void VarItem::unhookFromGdb() { controller_->addCommand( new GDBCommand( - QString("-var-delete \"%1\"").arg(varobjName_))); + TQString("-var-delete \"%1\"").arg(varobjName_))); } varobjName_ = ""; @@ -1902,10 +1902,10 @@ void VarItem::unhookFromGdb() // ************************************************************************** -QString VarItem::tipText() const +TQString VarItem::tipText() const { const unsigned int maxTooltipSize = 70; - QString tip = text( ValueCol ); + TQString tip = text( ValueCol ); if (tip.length() > maxTooltipSize) tip = tip.mid(0, maxTooltipSize - 1 ) + " [...]"; @@ -1951,7 +1951,7 @@ VarFrameRoot::~VarFrameRoot() void VarFrameRoot::setOpen(bool open) { bool frameOpened = ( isOpen()==false && open==true ); - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); if (frameOpened && needLocals_) { diff --git a/languages/cpp/debugger/variablewidget.h b/languages/cpp/debugger/variablewidget.h index 369f5748..5c77ea43 100644 --- a/languages/cpp/debugger/variablewidget.h +++ b/languages/cpp/debugger/variablewidget.h @@ -21,12 +21,12 @@ #include <klistview.h> #include <kcombobox.h> -#include <qwidget.h> -#include <qtooltip.h> -#include <qvaluevector.h> -#include <qdatetime.h> -#include <qguardedptr.h> -#include <qmap.h> +#include <tqwidget.h> +#include <tqtooltip.h> +#include <tqvaluevector.h> +#include <tqdatetime.h> +#include <tqguardedptr.h> +#include <tqmap.h> #include <vector> @@ -56,19 +56,19 @@ class VariableWidget : public QWidget public: VariableWidget( GDBController* controller, GDBBreakpointWidget* breakpointWidget, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); VariableTree *varTree() const { return varTree_; } -protected: // QWidget overrides - void focusInEvent(QFocusEvent *e); +protected: // TQWidget overrides + void focusInEvent(TQFocusEvent *e); public slots: void slotAddWatchVariable(); - void slotAddWatchVariable(const QString &ident); + void slotAddWatchVariable(const TQString &ident); void slotEvaluateExpression(); - void slotEvaluateExpression(const QString &ident); + void slotEvaluateExpression(const TQString &ident); private: VariableTree *varTree_; @@ -92,38 +92,38 @@ public: const char *name=0 ); virtual ~VariableTree(); - QListViewItem *lastChild() const; + TQListViewItem *lastChild() const; - QListViewItem *findRoot(QListViewItem *item) const; + TQListViewItem *findRoot(TQListViewItem *item) const; VarFrameRoot *findFrame(int frameNo, int threadNo) const; WatchRoot *findWatch(); - // (from QToolTip) Display a tooltip when the cursor is over an item - virtual void maybeTip(const QPoint &); + // (from TQToolTip) Display a tooltip when the cursor is over an item + virtual void maybeTip(const TQPoint &); GDBController* controller() const { return controller_; } signals: - void toggleWatchpoint(const QString &varName); + void toggleWatchpoint(const TQString &varName); public slots: - void slotAddWatchVariable(const QString& watchVar); - void slotEvaluateExpression(const QString& expression); + void slotAddWatchVariable(const TQString& watchVar); + void slotEvaluateExpression(const TQString& expression); void slotEvent(GDBController::event_t); - void slotItemRenamed(QListViewItem* item, int col, const QString& text); + void slotItemRenamed(TQListViewItem* item, int col, const TQString& text); private slots: - void slotContextMenu(KListView *, QListViewItem *item); - void slotVarobjNameChanged(const QString& from, const QString& to); + void slotContextMenu(KListView *, TQListViewItem *item); + void slotVarobjNameChanged(const TQString& from, const TQString& to); private: // Callbacks for gdb commands; void argumentsReady(const GDBMI::ResultRecord&); void localsReady(const GDBMI::ResultRecord&); - void frameIdReady(const QValueVector<QString>&); + void frameIdReady(const TQValueVector<TQString>&); void handleVarUpdate(const GDBMI::ResultRecord&); - void handleEvaluateExpression(const QValueVector<QString>&); + void handleEvaluateExpression(const TQValueVector<TQString>&); void variablesFetchDone(); void fetchSpecialValuesDone(); @@ -148,10 +148,10 @@ private: // helper functions /** Copies the value (second column) of the specified item to the clipboard. */ - void copyToClipboard(QListViewItem*); + void copyToClipboard(TQListViewItem*); -private: // QWidget overrides - void keyPressEvent(QKeyEvent* e); +private: // TQWidget overrides + void keyPressEvent(TQKeyEvent* e); private: GDBController* controller_; @@ -165,12 +165,12 @@ private: TrimmableItem* recentExpressions_; VarFrameRoot* currentFrameItem; - QTime fetch_time; + TQTime fetch_time; // Names of locals and arguments as reported by // gdb. - std::vector<QString> locals_and_arguments; + std::vector<TQString> locals_and_arguments; - QMap<QString, VarItem*> varobj2varitem; + TQMap<TQString, VarItem*> varobj2varitem; KPopupMenu* activePopup_; static const int idToggleWatch = 10; @@ -210,11 +210,11 @@ public: virtual ~TrimmableItem(); - QListViewItem *lastChild() const; + TQListViewItem *lastChild() const; protected: - void paintCell( QPainter *p, const QColorGroup &cg, + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); }; @@ -222,7 +222,7 @@ protected: /***************************************************************************/ /***************************************************************************/ -class VarItem : public QObject, +class VarItem : public TQObject, public TrimmableItem { Q_OBJECT @@ -233,7 +233,7 @@ public: Optionally, alternative display name can be provided. */ VarItem( TrimmableItem *parent, - const QString& expression, + const TQString& expression, bool frozen = false); VarItem( TrimmableItem *parent, const GDBMI::Value& varobj, @@ -242,7 +242,7 @@ public: virtual ~VarItem(); /// Returns the gdb expression for *this. - QString gdbExpression() const; + TQString gdbExpression() const; /** Returns true is this VarItem should be unconditionally updated on each step, not matter what's the result of @@ -251,7 +251,7 @@ public: bool updateUnconditionally() const; void updateValue(); - void updateSpecialRepresentation(const QString& s); + void updateSpecialRepresentation(const TQString& s); /** Creates a fresh gdbs "variable object", if needed. Preconditions: @@ -273,7 +273,7 @@ public: void recreate(); void setOpen(bool open); - void setText (int column, const QString& text); + void setText (int column, const TQString& text); /** Mark the variable as alive, or not alive. Variables that are not alive a shown as "gray", @@ -290,7 +290,7 @@ public: void unhookFromGdb(); // Returns the text to be displayed as tooltip (the value) - QString tipText() const; + TQString tipText() const; format_t format() const; void setFormat(format_t f); @@ -302,7 +302,7 @@ public: /** Sets new top-level textual value of this variable. */ - void setValue(const QString& new_value); + void setValue(const TQString& new_value); bool isAlive() const; @@ -314,7 +314,7 @@ signals: Either 'from' or 'to' can be empty string. */ - void varobjNameChange(const QString& from, const QString& to); + void varobjNameChange(const TQString& from, const TQString& to); private: @@ -332,29 +332,29 @@ private: - gets initial value - if item is open, gets children. */ - void setVarobjName(const QString& name); + void setVarobjName(const TQString& name); /** Handle types that require special dispay, such as - QString. Return true if this is such a type. + TQString. Return true if this is such a type. The 'originalValueType_' is already initialized by the time this method is called. */ bool handleSpecialTypes(); - void paintCell( QPainter *p, const QColorGroup &cg, + void paintCell( TQPainter *p, const TQColorGroup &cg, 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 handleCurrentAddress(const QValueVector<QString>& lines); - void handleType(const QValueVector<QString>& lines); + void handleCurrentAddress(const TQValueVector<TQString>& lines); + void handleType(const TQValueVector<TQString>& lines); void createChildren(const GDBMI::ResultRecord& r, bool children_of_fake); /** Called to handle the output of the cli print command. */ - void handleCliPrint(const QValueVector<QString>& lines); + void handleCliPrint(const TQValueVector<TQString>& lines); // Assuming 'expression_' is already set, returns the // displayName to use when showing this to the user. @@ -362,26 +362,26 @@ private: // gdb expression '$1' and displayName 'P4', we want the child // to show up as *P4, not as '*$1', so we can't uncondionally // use expression gdb reports to us. - QString displayName() const; + TQString displayName() const; VariableTree* varTree() const; - QString varobjFormatName() const; + TQString varobjFormatName() const; private: // The gdb expression for this varItem relatively to // parent VarItem. - QString expression_; + TQString expression_; bool highlight_; GDBController* controller_; - QString varobjName_; + TQString varobjName_; // the non-cast type of the variable - QString originalValueType_; + TQString originalValueType_; bool oldSpecialRepresentationSet_; - QString oldSpecialRepresentation_; + TQString oldSpecialRepresentation_; format_t format_; @@ -390,8 +390,8 @@ private: int numChildren_; bool childrenFetched_; - QString currentAddress_; - QString lastObtainedAddress_; + TQString currentAddress_; + TQString lastObtainedAddress_; bool updateUnconditionally_; bool frozen_; @@ -425,7 +425,7 @@ public: // this item, it will fetch new data. void setDirty(); - void setFrameName(const QString &frameName) + void setFrameName(const TQString &frameName) { setText(VarNameCol, frameName); setText(ValueCol, ""); } bool needLocals() const { return needLocals_; } |