diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kxsldbg/kxsldbgpart/xsldbgoutputview.cpp | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxsldbg/kxsldbgpart/xsldbgoutputview.cpp')
-rw-r--r-- | kxsldbg/kxsldbgpart/xsldbgoutputview.cpp | 59 |
1 files changed, 16 insertions, 43 deletions
diff --git a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp index 72e25fb3..0292e282 100644 --- a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp @@ -27,21 +27,13 @@ #include <tqpushbutton.h> #include <tqlabel.h> -#if QT_VERSION >= 300 #include "xsldbgmsgdialogimpl.h" -#else -#include "xsldbgmsgdialogimpl2.h" -#endif -XsldbgMsgDialogImpl::XsldbgMsgDialogImpl(TQWidget *parent, +XsldbgMsgDialogImpl::XsldbgMsgDialogImpl(TQWidget *tqparent, TQMessageBox::Icon icon, const TQString &title, const TQString &msg) -#if QT_VERSION >= 300 - : XsldbgMsgDialog(parent, "XsldbgMsgDialogImpl" , TRUE ) -#else - : XsldbgMsgDialog2(parent, "XsldbgMsgDialogImpl" , TRUE ) -#endif + : XsldbgMsgDialog(tqparent, "XsldbgMsgDialogImpl" , TRUE ) { setCaption(title); @@ -58,15 +50,13 @@ void XsldbgMsgDialogImpl::append(const TQString &text) -#if QT_VERSION >= 300 - #include "xsldbgoutputview.h" -XsldbgOutputView::XsldbgOutputView(TQWidget * parent) - : TQTextEdit(parent, "outputview") +XsldbgOutputView::XsldbgOutputView(TQWidget * tqparent) + : TQTextEdit(tqparent, "outputview") { new TQBoxLayout(this, TQBoxLayout::TopToBottom); - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); setMinimumSize(TQSize(500, 80)); setCaption(i18n("xsldbg Output")); setText(i18n("\t\txsldbg output capture ready\n\n")); @@ -75,48 +65,31 @@ XsldbgOutputView::XsldbgOutputView(TQWidget * parent) setReadOnly(TRUE); } -#else - -#include "xsldbgoutputview2.h" - -XsldbgOutputView::XsldbgOutputView(TQWidget * parent) - : TQTextView(parent, "outputview") -{ - new TQBoxLayout(this, TQBoxLayout::TopToBottom); - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); - setMinimumSize(TQSize(500,80)); - setCaption(i18n("xsldbg Output")); - setText(i18n("\t\txsldbg output capture ready\n\n")); - dlg = 0L; - show(); -} -#endif // QT_VERSION - void XsldbgOutputView::slotProcShowMessage(TQString msg) { bool processed = FALSE; // Is this a result of an evaluate command if ((msg[0] == TQChar('=')) && (msg[1] == TQChar(' '))){ - int endPosition = msg.find(TQChar('\n')); + int endPosition = msg.tqfind(TQChar('\n')); if (endPosition >= 0){ processed = TRUE; showDialog(TQMessageBox::Information, i18n("Result of evaluation"), msg.mid(endPosition + 1)); } }else /* Is there some sort of error message in msg */ - if ((msg.find("Error:") != -1) || - (msg.find("Warning:") != -1) || - (msg.find("Request to xsldbg failed") != -1) || + if ((msg.tqfind("Error:") != -1) || + (msg.tqfind("Warning:") != -1) || + (msg.tqfind("Request to xsldbg failed") != -1) || /* the following errors are libxml or libxslt generated */ - (msg.find("error:") != -1) || - (msg.find("xmlXPathEval:") != -1) || - (msg.find("runtime error") != -1)) { + (msg.tqfind("error:") != -1) || + (msg.tqfind("xmlXPathEval:") != -1) || + (msg.tqfind("runtime error") != -1)) { /* OK we've found an error but ingore any errors about data or source files */ - if ((msg.find("Error: No XSL source file supplied") == -1) && - (msg.find("Error: No XML data file supplied") == -1) && - (msg.find("Load of source deferred") == -1) && - (msg.find("Load of data deferred") == -1) ) + if ((msg.tqfind("Error: No XSL source file supplied") == -1) && + (msg.tqfind("Error: No XML data file supplied") == -1) && + (msg.tqfind("Load of source deferred") == -1) && + (msg.tqfind("Load of data deferred") == -1) ) showDialog(TQMessageBox::Warning, i18n("Request Failed "), msg); processed = TRUE; |