summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/gdboutputwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/debugger/gdboutputwidget.cpp')
-rw-r--r--languages/cpp/debugger/gdboutputwidget.cpp100
1 files changed, 50 insertions, 50 deletions
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("<", "&lt;");
r.replace(">", "&gt;");
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()