summaryrefslogtreecommitdiffstats
path: root/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kxsldbg/kxsldbgpart/xsldbgoutputview.cpp')
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgoutputview.cpp59
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;