diff options
Diffstat (limited to 'kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp')
-rw-r--r-- | kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp index a301aa8a..a757c143 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp @@ -23,7 +23,7 @@ #include <libxml/valid.h> /* needed for xmlSplitQName2 */ #include <libxml/xpathInternals.h> /* needed for xmlNSLookup */ #include <libxml/uri.h> /* needed for xmlURIEscapeStr */ -#include "xsldbgthread.h" /* for getThreadtqStatus() */ +#include "xsldbgthread.h" /* for getThreadStatus() */ #include "xsldbgmsg.h" #include "options.h" @@ -95,7 +95,7 @@ xslDbgShellFrameBreak(xmlChar * arg, int stepup) if (!filesGetStylesheet() || !filesGetMainDoc()) { xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n")); - xsldbgGenericErrorFunc(TQString("Error: %1.\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1.\n").arg(i18n(errorPrompt))); return result; } @@ -104,13 +104,13 @@ xslDbgShellFrameBreak(xmlChar * arg, int stepup) xsltGenericError(xsltGenericErrorContext, "Error: NULL argument provided\n"); #endif - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } if (xmlStrLen(arg) > 0) { if (!sscanf((char *) arg, "%d", &noOfFrames)) { - xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a number of frames.\n").tqarg((char*)arg)); + xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a number of frames.\n").arg((char*)arg)); noOfFrames = -1; } } else { @@ -126,7 +126,7 @@ xslDbgShellFrameBreak(xmlChar * arg, int stepup) } if (!result) - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -188,7 +188,7 @@ validateSource(xmlChar ** url, long *lineNo) walkChildNodes((xmlHashScanner) scanForNode, searchInf, searchData->node); if (!searchInf->found) { - xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").tqarg(xsldbgUrl(*url)).tqarg(*lineNo)); + xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").arg(xsldbgUrl(*url)).arg(*lineNo)); } *lineNo = searchData->lineNo; @@ -210,9 +210,9 @@ validateSource(xmlChar ** url, long *lineNo) result = 1; } } else{ - xsldbgGenericErrorFunc(i18n("Error: Unable to find a stylesheet file whose name contains %1.\n").tqarg(xsldbgUrl(*url))); + xsldbgGenericErrorFunc(i18n("Error: Unable to find a stylesheet file whose name contains %1.\n").arg(xsldbgUrl(*url))); if (lineNo){ - xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").tqarg(xsldbgUrl(*url)).tqarg(*lineNo)); + xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").arg(xsldbgUrl(*url)).arg(*lineNo)); } } } @@ -299,9 +299,9 @@ validateData(xmlChar ** url, long *lineNo) if (!searchInf->found) { if (lineNo){ - xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").tqarg(xsldbgUrl(*url)).tqarg(*lineNo)); + xsldbgGenericErrorFunc(i18n("Warning: Breakpoint for file \"%1\" at line %2 does not seem to be valid.\n").arg(xsldbgUrl(*url)).arg(*lineNo)); } else{ - xsldbgGenericErrorFunc(i18n("Error: Unable to find a data file whose name contains %1.\n").tqarg(xsldbgUrl(*url))); + xsldbgGenericErrorFunc(i18n("Error: Unable to find a data file whose name contains %1.\n").arg(xsldbgUrl(*url))); } result = 1; } else { @@ -350,7 +350,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, if (!style || !filesGetMainDoc()) { if (!optionsGetIntOption(OPTIONS_GDB)){ xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n")); - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; }else{ orphanedBreakPoint = 1; @@ -372,8 +372,8 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, if (splitString(&arg[2], 2, opts) == 2) { if ((xmlStrlen(opts[1]) == 0) || !sscanf((char *) opts[1], "%ld", &lineNo)) { - xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").tqarg((char*)opts[1])); - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg((char*)opts[1])); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } else { /* try to guess whether we are looking for source or data @@ -422,7 +422,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, } } } else - xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to command %1.\n").tqarg("break")); + xsldbgGenericErrorFunc(i18n("Error: Invalid arguments to command %1.\n").arg("break")); } } else { /* add breakpoint at specified template names */ @@ -524,7 +524,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, break; default: - xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").tqarg("break")); + xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").arg("break")); return 0; } @@ -593,14 +593,14 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, searchPtr->id = lastId; result = 1; breakPointCounter = lastCounter; - xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused breakpoint %1 to be re-created.\n").tqarg(searchPtr->id)); + xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused breakpoint %1 to be re-created.\n").arg(searchPtr->id)); validatedBreakPoints++; } } } }else{ if (xsldbgValidateBreakpoints != BREAKPOINTS_BEING_VALIDATED){ - xsldbgGenericErrorFunc(i18n("Warning: Breakpoint exits for file \"%1\" at line %2.\n").tqarg(xsldbgUrl(tempUrl)).tqarg(templateLineNo)); + xsldbgGenericErrorFunc(i18n("Warning: Breakpoint exits for file \"%1\" at line %2.\n").arg(xsldbgUrl(tempUrl)).arg(templateLineNo)); } validatedBreakPoints++; } @@ -648,7 +648,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, if (!result) { if (url) - xsldbgGenericErrorFunc(i18n("Error: Failed to add breakpoint for file \"%1\" at line %2.\n").tqarg(xsldbgUrl(url)).tqarg(lineNo)); + xsldbgGenericErrorFunc(i18n("Error: Failed to add breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(url)).arg(lineNo)); else xsldbgGenericErrorFunc(i18n("Error: Failed to add breakpoint.\n")); } @@ -681,7 +681,7 @@ xslDbgShellDelete(xmlChar * arg) xsltGenericError(xsltGenericErrorContext, "Error: NULL argument provided\n"); #endif - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -692,7 +692,7 @@ xslDbgShellDelete(xmlChar * arg) if (splitString(&arg[2], 2, opts) == 2) { if ((xmlStrlen(opts[1]) == 0) || !sscanf((char *) opts[1], "%ld", &lineNo)) { - xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").tqarg((char*)opts[1])); + xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg((char*)opts[1])); } else { xmlChar *escapedURI; trimString(opts[0]); @@ -711,7 +711,7 @@ xslDbgShellDelete(xmlChar * arg) } else if (validateData(&url, &lineNo)) breakPtr = breakPointGet(url, lineNo); if (!breakPtr || !breakPointDelete(breakPtr)){ - xsldbgGenericErrorFunc(i18n("Error: Breakpoint does not exist for file \"%1\" at line %2.\n").tqarg(xsldbgUrl(url)).tqarg(lineNo)); + xsldbgGenericErrorFunc(i18n("Error: Breakpoint does not exist for file \"%1\" at line %2.\n").arg(xsldbgUrl(url)).arg(lineNo)); }else{ result = 1; } @@ -719,7 +719,7 @@ xslDbgShellDelete(xmlChar * arg) } } } else{ - xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").tqarg("delete")); + xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").arg("delete")); } } } else if (xmlStrEqual((xmlChar*)"*", arg)) { @@ -732,24 +732,24 @@ xslDbgShellDelete(xmlChar * arg) if (breakPtr) { result = breakPointDelete(breakPtr); if (!result) { - xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint %1.\n").tqarg(breakPointId)); + xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint %1.\n").arg(breakPointId)); } } else { - xsldbgGenericErrorFunc(i18n("Error: Breakpoint %1 does not exist.\n").tqarg(breakPointId)); + xsldbgGenericErrorFunc(i18n("Error: Breakpoint %1 does not exist.\n").arg(breakPointId)); } } else { breakPtr = findBreakPointByName(arg); if (breakPtr) { result = breakPointDelete(breakPtr); if (!result) { - xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint at template %1.\n").tqarg(xsldbgText(arg))); + xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint at template %1.\n").arg(xsldbgText(arg))); } } else{ - xsldbgGenericErrorFunc(i18n("Error: Breakpoint at template \"%1\" does not exist.\n").tqarg(xsldbgText(arg))); + xsldbgGenericErrorFunc(i18n("Error: Breakpoint at template \"%1\" does not exist.\n").arg(xsldbgText(arg))); } } if (!result) - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -798,7 +798,7 @@ xslDbgShellEnable(xmlChar * arg, int enableType) if (!filesGetStylesheet() || !filesGetMainDoc()) { xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n")); - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -807,7 +807,7 @@ xslDbgShellEnable(xmlChar * arg, int enableType) xsltGenericError(xsltGenericErrorContext, "Error: NULL argument provided\n"); #endif - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -818,7 +818,7 @@ xslDbgShellEnable(xmlChar * arg, int enableType) if (splitString(&arg[2], 2, opts) == 2) { if ((xmlStrlen(opts[1]) == 0) || !sscanf((char *) opts[1], "%ld", &lineNo)) { - xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").tqarg((char*)opts[1])); + xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a line number.\n").arg((char*)opts[1])); } else { xmlChar *escapedURI; trimString(opts[0]); @@ -839,13 +839,13 @@ xslDbgShellEnable(xmlChar * arg, int enableType) if (breakPtr){ result = breakPointEnable(breakPtr, enableType); }else{ - xsldbgGenericErrorFunc(i18n("Error: Breakpoint does not exist for file \"%1\" at line %2.\n").tqarg(xsldbgUrl(url)).tqarg(lineNo)); + xsldbgGenericErrorFunc(i18n("Error: Breakpoint does not exist for file \"%1\" at line %2.\n").arg(xsldbgUrl(url)).arg(lineNo)); } xmlFree(url); } } } else - xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").tqarg("enable")); + xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for command %1.\n").arg("enable")); } } else if (xmlStrEqual((xmlChar*)"*", arg)) { result = 1; @@ -858,21 +858,21 @@ xslDbgShellEnable(xmlChar * arg, int enableType) if (breakPtr) { result = breakPointEnable(breakPtr, enableType); if (!result) { - xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint %1.\n").tqarg(breakPointId)); + xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint %1.\n").arg(breakPointId)); } } else { - xsldbgGenericErrorFunc(i18n("Error: Breakpoint %1 does not exist.\n").tqarg(breakPointId)); + xsldbgGenericErrorFunc(i18n("Error: Breakpoint %1 does not exist.\n").arg(breakPointId)); } } else { breakPtr = findBreakPointByName(arg); if (breakPtr) { result = breakPointEnable(breakPtr, enableType); } else - xsldbgGenericErrorFunc(i18n("Error: Breakpoint at template \"%1\" does not exist.\n").tqarg(xsldbgText(arg))); + xsldbgGenericErrorFunc(i18n("Error: Breakpoint at template \"%1\" does not exist.\n").arg(xsldbgText(arg))); } if (!result) - xsldbgGenericErrorFunc(TQString("Error: %1\n").tqarg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -893,7 +893,7 @@ xslDbgShellPrintBreakPoint(void *payload, void *data, Q_UNUSED(name); if (payload) { - if (getThreadtqStatus() == XSLDBG_MSG_THREAD_RUN) { + if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) { notifyListQueue(payload); } else { printCount++; @@ -931,7 +931,7 @@ static int validateBreakPoint(breakPointPtr breakPtr, breakPointPtr copy) breakPtr->flags |= BREAKPOINT_ORPHANED; if ( breakPtr->flags & BREAKPOINT_ORPHANED){ - xsldbgGenericErrorFunc(TQString("Warning: Breakpoint %1 is orphaned. Result: %2. Old flags: %3. New flags: %4.\n").tqarg(breakPtr->id).tqarg(result).tqarg(copy->flags).tqarg(breakPtr->flags)); + xsldbgGenericErrorFunc(TQString("Warning: Breakpoint %1 is orphaned. Result: %2. Old flags: %3. New flags: %4.\n").arg(breakPtr->id).arg(result).arg(copy->flags).arg(breakPtr->flags)); } if (!(breakPtr->flags & BREAKPOINT_ORPHANED) && ((copy->lineNo != breakPtr->lineNo ) || @@ -949,11 +949,11 @@ static int validateBreakPoint(breakPointPtr breakPtr, breakPointPtr copy) breakPointCounter = lastCounter; /* compensate for breakPointAdd which always increments the breakPoint counter */ result = 1; - xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused breakpoint %1 to be re-created.\n").tqarg(breakPtr->id)); + xsldbgGenericErrorFunc(i18n("Information: Breakpoint validation has caused breakpoint %1 to be re-created.\n").arg(breakPtr->id)); } } if (!result){ - xsldbgGenericErrorFunc(i18n("Warning: Validation of breakpoint %1 failed.\n").tqarg(copy->id)); + xsldbgGenericErrorFunc(i18n("Warning: Validation of breakpoint %1 failed.\n").arg(copy->id)); } } } @@ -992,7 +992,7 @@ static int validateTemplateBreakPoint(breakPointPtr breakPtr, breakPointPtr copy } xmlFree(copy->templateName); if (!result){ - xsldbgGenericErrorFunc(i18n("Warning: Validation of breakpoint %1 failed.\n").tqarg(copy->id)); + xsldbgGenericErrorFunc(i18n("Warning: Validation of breakpoint %1 failed.\n").arg(copy->id)); } return result; } |