diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /kxsldbg/kxsldbgpart/xsldbgdebugger.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxsldbg/kxsldbgpart/xsldbgdebugger.cpp')
-rw-r--r-- | kxsldbg/kxsldbgpart/xsldbgdebugger.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp b/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp index 69fcaeec..deead4fa 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp @@ -31,7 +31,7 @@ extern int xsldbgStop; #include "xsldbgwalkspeedimpl.h" -#include <qmessagebox.h> +#include <tqmessagebox.h> #include <kdebug.h> XsldbgDebugger::XsldbgDebugger() @@ -67,13 +67,13 @@ void XsldbgDebugger::setInspector(XsldbgInspector *inspector) this->inspector = inspector; } -bool XsldbgDebugger::event(QEvent *e) +bool XsldbgDebugger::event(TQEvent *e) { if (e == 0L) return false; - if (e->type() != QEvent::User) - return QObject::event(e); + if (e->type() != TQEvent::User) + return TQObject::event(e); else{ static bool waitingFirstmessage = true; if (waitingFirstmessage){ @@ -91,7 +91,7 @@ bool XsldbgDebugger::event(QEvent *e) } -void XsldbgDebugger::timerEvent(QTimerEvent *e) +void XsldbgDebugger::timerEvent(TQTimerEvent *e) { /* This function runs in the application's thread */ @@ -100,14 +100,14 @@ void XsldbgDebugger::timerEvent(QTimerEvent *e) if ((getInputReady() == 0) && (getInputStatus() == XSLDBG_MSG_AWAITING_INPUT) && (commandQue.count() > 0)){ - QString msg = commandQue.first(); + TQString msg = commandQue.first(); commandQue.remove(msg); ::fakeInput((const char*)msg.utf8()); } if ((!updateText.isEmpty()) && (getInputStatus() == XSLDBG_MSG_AWAITING_INPUT)){ /* flush remainding text to message window */ - QString msgCopy = updateText; + TQString msgCopy = updateText; updateText = ""; emit showMessage(msgCopy); lastType = XSLDBG_MSG_AWAITING_INPUT; @@ -116,13 +116,13 @@ void XsldbgDebugger::timerEvent(QTimerEvent *e) } -QString XsldbgDebugger::fixLocalPaths(QString & file) +TQString XsldbgDebugger::fixLocalPaths(TQString & file) { - QString result = file; + TQString result = file; if (file.left(6) == "file:/"){ xmlChar * tempResult = filesExpandName((xmlChar *)file.utf8().data()); - result = QString::fromUtf8((char*)tempResult); + result = TQString::fromUtf8((char*)tempResult); xmlFree(tempResult); } @@ -130,37 +130,37 @@ QString XsldbgDebugger::fixLocalPaths(QString & file) } -QString XsldbgDebugger::sourceFileName() +TQString XsldbgDebugger::sourceFileName() { - QString fileName; + TQString fileName; if (optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) != 0L) - fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)); + fileName = TQString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)); return fileName; } -QString XsldbgDebugger::dataFileName() +TQString XsldbgDebugger::dataFileName() { - QString fileName; + TQString fileName; if (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) != 0L) - fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME)); + fileName = TQString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME)); return fileName; } -QString XsldbgDebugger::outputFileName() +TQString XsldbgDebugger::outputFileName() { - QString fileName; + TQString fileName; if (optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) != 0L) - fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)); + fileName = TQString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)); return fileName; } -void XsldbgDebugger::gotoLine(QString fileName, int lineNo, bool breakpoint /*= false*/) +void XsldbgDebugger::gotoLine(TQString fileName, int lineNo, bool breakpoint /*= false*/) { emit lineNoChanged(fileName, lineNo, breakpoint); } @@ -168,12 +168,12 @@ void XsldbgDebugger::gotoLine(QString fileName, int lineNo, bool breakpoint /*= void XsldbgDebugger::setOption(const char* name, bool value) { - QString msg = "setoption "; - msg.append(name).append(" ").append(QString::number(value)); + TQString msg = "setoption "; + msg.append(name).append(" ").append(TQString::number(value)); fakeInput(msg, true); } -void XsldbgDebugger::fakeInput(QString text, bool wait) +void XsldbgDebugger::fakeInput(TQString text, bool wait) { Q_UNUSED(wait); commandQue.append(text); @@ -213,7 +213,7 @@ void XsldbgDebugger::slotConfigure() if(inspector == 0L ){ inspector = new XsldbgInspector(this); - connect(inspector, SIGNAL(closedWindow()), this, SLOT(slotConfigClosed())); + connect(inspector, TQT_SIGNAL(closedWindow()), this, TQT_SLOT(slotConfigClosed())); } } @@ -258,8 +258,8 @@ void XsldbgDebugger::slotWalkSpeed(int speed) if (start()){ if (optionsGetIntOption(OPTIONS_WALK_SPEED) == WALKSPEED_STOP){ // start walking at speed requested - QString msg("walk "); - msg.append(QString::number(speed)); + TQString msg("walk "); + msg.append(TQString::number(speed)); fakeInput(msg, true); } else // This will take effect imediately @@ -291,17 +291,17 @@ void XsldbgDebugger::slotTraceCmd() fakeInput("trace", false); } -void XsldbgDebugger::slotBreakCmd(QString fileName, int lineNumber) +void XsldbgDebugger::slotBreakCmd(TQString fileName, int lineNumber) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("break -l \""); - msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber)); + TQString msg("break -l \""); + msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(TQString::number(lineNumber)); if (start()) fakeInput(msg, true); @@ -310,16 +310,16 @@ void XsldbgDebugger::slotBreakCmd(QString fileName, int lineNumber) inspector->refreshBreakpoints(); } -void XsldbgDebugger::slotBreakCmd(QString templateName, QString modeName) +void XsldbgDebugger::slotBreakCmd(TQString templateName, TQString modeName) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("break \""); + TQString msg("break \""); msg.append(templateName).append("\" \"").append(modeName).append("\""); if (start()) fakeInput(msg, true); @@ -328,18 +328,18 @@ void XsldbgDebugger::slotBreakCmd(QString templateName, QString modeName) inspector->refreshBreakpoints(); } -void XsldbgDebugger::slotEnableCmd(QString fileName, int lineNumber) +void XsldbgDebugger::slotEnableCmd(TQString fileName, int lineNumber) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("enable -l \""); - msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber)); + TQString msg("enable -l \""); + msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(TQString::number(lineNumber)); if (start()) fakeInput(msg, true); @@ -352,14 +352,14 @@ void XsldbgDebugger::slotEnableCmd(int id) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("enable "); - msg.append(QString::number(id)); + TQString msg("enable "); + msg.append(TQString::number(id)); if (start()) fakeInput(msg, true); @@ -368,18 +368,18 @@ void XsldbgDebugger::slotEnableCmd(int id) } -void XsldbgDebugger::slotDeleteCmd(QString fileName, int lineNumber) +void XsldbgDebugger::slotDeleteCmd(TQString fileName, int lineNumber) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("delete -l \""); - msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber)); + TQString msg("delete -l \""); + msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(TQString::number(lineNumber)); if (start()) fakeInput(msg, true); if (inspector != 0L) @@ -391,13 +391,13 @@ void XsldbgDebugger::slotDeleteCmd(int id) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("delete "); - msg.append(QString::number(id)); + TQString msg("delete "); + msg.append(TQString::number(id)); if (start()) fakeInput(msg, true); if (inspector != 0L) @@ -439,8 +439,8 @@ void XsldbgDebugger::slotExitCmd() } -void XsldbgDebugger::slotCatCmd(QString xPathExpression){ - QString msg("cat "); +void XsldbgDebugger::slotCatCmd(TQString xPathExpression){ + TQString msg("cat "); msg.append(xPathExpression); if (start()) @@ -449,17 +449,17 @@ void XsldbgDebugger::slotCatCmd(QString xPathExpression){ } -void XsldbgDebugger::slotCdCmd(QString xPathExpression){ - QString msg("cd "); +void XsldbgDebugger::slotCdCmd(TQString xPathExpression){ + TQString msg("cd "); msg.append(xPathExpression); if (start()) fakeInput(msg, true); } -void XsldbgDebugger::slotSetVariableCmd(QString variableName, QString xPathExpression) +void XsldbgDebugger::slotSetVariableCmd(TQString variableName, TQString xPathExpression) { if (!variableName.isEmpty() && !xPathExpression.isEmpty()){ - QString msg("set "); + TQString msg("set "); msg.append(variableName); msg.append(" \""); msg.append(xPathExpression); |