diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-07-03 02:22:47 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-07-03 02:22:47 +0200 |
commit | 9dab0e253ecf583a2cc6ca22e068d4f4022ca4d3 (patch) | |
tree | 63c2afb5cbab9420e0d43683e09ddb0092663d49 /kdbg/ttywnd.cpp | |
parent | 1ace27a9852850ad348dd28679c2fe2b7d2ddc73 (diff) | |
download | kdbg-9dab0e253ecf583a2cc6ca22e068d4f4022ca4d3.tar.gz kdbg-9dab0e253ecf583a2cc6ca22e068d4f4022ca4d3.zip |
Initial TQt conversion
Diffstat (limited to 'kdbg/ttywnd.cpp')
-rw-r--r-- | kdbg/ttywnd.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kdbg/ttywnd.cpp b/kdbg/ttywnd.cpp index b23f2f4..9ed911c 100644 --- a/kdbg/ttywnd.cpp +++ b/kdbg/ttywnd.cpp @@ -4,8 +4,8 @@ * See the file COPYING in the toplevel directory of the source directory. */ -#include <qsocketnotifier.h> -#include <qpopupmenu.h> +#include <ntqsocketnotifier.h> +#include <ntqpopupmenu.h> #include "ttywnd.h" #include <kglobalsettings.h> #include <klocale.h> @@ -38,7 +38,7 @@ STTY::STTY() : - QObject(), + TQObject(), m_masterfd(-1), m_slavefd(-1), m_outNotifier(0) @@ -46,10 +46,10 @@ STTY::STTY() : if (findTTY()) { ::fcntl(m_masterfd, F_SETFL, O_NDELAY); - m_outNotifier = new QSocketNotifier(m_masterfd, QSocketNotifier::Read); + m_outNotifier = new TQSocketNotifier(m_masterfd, TQSocketNotifier::Read); connect(m_outNotifier, SIGNAL(activated(int)), SLOT(outReceived(int))); } else { - m_slavetty = QString(); + m_slavetty = TQString(); } } @@ -138,8 +138,8 @@ void STTY::outReceived(int f) -TTYWindow::TTYWindow(QWidget* parent, const char* name) : - QTextEdit(parent, name), +TTYWindow::TTYWindow(TQWidget* parent, const char* name) : + TQTextEdit(parent, name), m_tty(0), m_hPos(0) { @@ -157,17 +157,17 @@ TTYWindow::~TTYWindow() } -QString TTYWindow::activate() +TQString TTYWindow::activate() { // allocate a pseudo terminal m_tty = new STTY; - QString ttyName = m_tty->slaveTTY(); + TQString ttyName = m_tty->slaveTTY(); if (ttyName.isEmpty()) { // failed to allocate terminal delete m_tty; m_tty = 0; - return QString(); + return TQString(); } else { connect(m_tty, SIGNAL(output(char*,int)), SLOT(slotAppend(char*,int))); return ttyName; @@ -196,7 +196,7 @@ void TTYWindow::slotAppend(char* buffer, int count) ++len; } if (len > 0) { - QString str = QString::fromLatin1(start, len); + TQString str = TQString::fromLatin1(start, len); // replace text in the last line int para = paragraphs()-1; // this selection is non-empty only after a '\r' that was not @@ -216,15 +216,15 @@ void TTYWindow::slotAppend(char* buffer, int count) if (count > 0 && *start == '\n') { ++start; --count; - append(QString()); + append(TQString()); m_hPos = 0; } } } -QPopupMenu* TTYWindow::createPopupMenu(const QPoint& pos) +TQPopupMenu* TTYWindow::createPopupMenu(const TQPoint& pos) { - QPopupMenu* menu = QTextEdit::createPopupMenu(pos); + TQPopupMenu* menu = TQTextEdit::createPopupMenu(pos); menu->insertSeparator(); menu->insertItem(i18n("&Clear"), this, SLOT(slotClear())); return menu; |