From 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:51:43 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp | 46 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp') diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp index 241d9730..1b1a6407 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp @@ -42,7 +42,7 @@ #include #include "xsldbgmsg.h" -#include "xsldbgthread.h" /* for getThreadtqStatus */ +#include "xsldbgthread.h" /* for getThreadStatus */ #ifdef HAVE_READLINE # include # ifdef HAVE_HISTORY @@ -267,7 +267,7 @@ endTimer(const TQString& message) #error "endTimer required stdarg functions" #endif /* Display the time taken to complete this task */ - xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n").tqarg(message).tqarg(msec)); + xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n").arg(message).arg(msec)); } #elif defined(HAVE_TIME_H) @@ -295,7 +295,7 @@ endTimer(const TQString& message) #error "endTimer required stdarg functions" #endif /* Display the time taken to complete this task */ - xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n").tqarg(message).tqarg(msec)); + xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n").arg(message).arg(msec)); } #else @@ -317,7 +317,7 @@ endTimer(const TQString& message) */ #ifdef HAVE_STDARG_H /* Display the time taken to complete this task */ - xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n"),arg(message).tqarg(msec)); + xsldbgGenericErrorFunc(i18n("%1 took %2 ms to complete.\n"),arg(message).arg(msec)); #else /* We don't have gettimeofday, time or stdarg.h, what crazy world is * this ?! @@ -358,7 +358,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) xmlXIncludeProcess(doc); if (optionsGetIntOption(OPTIONS_TIMING)) { /* Display the time taken to do XInclude processing */ - endTimer(i18n("XInclude processing %1.").tqarg((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME))); + endTimer(i18n("XInclude processing %1.").arg((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME))); } } #endif @@ -380,7 +380,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) if (terminalIO != NULL) res = xsltProfileStylesheet(cur, doc, params, terminalIO); else if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) == - NULL) || (getThreadtqStatus() != XSLDBG_MSG_THREAD_RUN) + NULL) || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) || (filesTempFileName(1) == NULL)) res = xsltProfileStylesheet(cur, doc, params, stderr); else { @@ -396,7 +396,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) notifyXsldbgApp(XSLDBG_MSG_FILEOUT, filesTempFileName(1)); } else { - xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").tqarg(filesTempFileName(1))); + xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1))); res = xsltProfileStylesheet(cur, doc, params, stderr); } } @@ -429,7 +429,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) if (terminalIO != NULL) xmlDebugDumpDocument(terminalIO, res); else if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) == - NULL) || (getThreadtqStatus() != XSLDBG_MSG_THREAD_RUN) + NULL) || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) || (filesTempFileName(1) == NULL)) xmlDebugDumpDocument(stdout, res); else { @@ -443,7 +443,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) notifyXsldbgApp(XSLDBG_MSG_FILEOUT, filesTempFileName(1)); } else { - xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").tqarg(filesTempFileName(1))); + xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1))); xmlDebugDumpDocument(stdout, res); } @@ -490,7 +490,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) /* Indicate how long it took to save to file */ endTimer(i18n("Saving result")); } else { - xsldbgGenericErrorFunc(i18n("Warning: Unsupported, non-standard output method %1.\n").tqarg(xsldbgText(cur->method))); + xsldbgGenericErrorFunc(i18n("Warning: Unsupported, non-standard output method %1.\n").arg(xsldbgText(cur->method))); } } } @@ -513,7 +513,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur) } } if ((xslDebugStatus != DEBUG_RUN_RESTART) && (bytesWritten == -1)) - xsldbgGenericErrorFunc(i18n("Error: Unable to save results of transformation to file %1.\n").tqarg(xsldbgText(optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)))); + xsldbgGenericErrorFunc(i18n("Error: Unable to save results of transformation to file %1.\n").arg(xsldbgText(optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)))); } int @@ -532,7 +532,7 @@ xsldbgMain(int argc, char **argv) xmlDocPtr doc; KCmdLineArgs *args = 0; - if (getThreadtqStatus() == XSLDBG_MSG_THREAD_NOTUSED) + if (getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED) args = KCmdLineArgs::parsedArgs(); errorFile = stderr; @@ -619,7 +619,7 @@ xsldbgMain(int argc, char **argv) } } - if (getThreadtqStatus() != XSLDBG_MSG_THREAD_NOTUSED){ + if (getThreadStatus() != XSLDBG_MSG_THREAD_NOTUSED){ result = optionsSetIntOption(OPTIONS_SHELL, 1); } /* copy the volitile options over to xsldbg */ @@ -689,7 +689,7 @@ xsldbgMain(int argc, char **argv) paramOK = false; } if (!paramOK) - xsldbgGenericErrorFunc(i18n("Error: Argument \"%1\" to --param is not in the format :.\n").tqarg(param.data())); + xsldbgGenericErrorFunc(i18n("Error: Argument \"%1\" to --param is not in the format :.\n").arg(param.data())); } TQCString cdPath = args->getOption("cd"); @@ -911,9 +911,9 @@ xsldbgLoadStylesheet() startTimer(); style = xmlParseFile((const char *) optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)); if (optionsGetIntOption(OPTIONS_TIMING)) - endTimer(i18n("Parsing stylesheet %1").tqarg((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME))); + endTimer(i18n("Parsing stylesheet %1").arg((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME))); if (style == NULL) { - xsldbgGenericErrorFunc(i18n("Error: Cannot parse file %1.\n").tqarg(xsldbgUrl(optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)))); + xsldbgGenericErrorFunc(i18n("Error: Cannot parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)))); cur = NULL; if (!optionsGetIntOption(OPTIONS_SHELL)) { xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n")); @@ -988,7 +988,7 @@ xsldbgLoadXmlData(void) doc = xmlParseFile((char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME)); #endif if (doc == NULL) { - xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").tqarg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME)))); + xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME)))); if (!optionsGetIntOption(OPTIONS_SHELL)) { xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n")); xslDebugStatus = DEBUG_TQUIT; @@ -997,7 +997,7 @@ xsldbgLoadXmlData(void) xslDebugStatus = DEBUG_STOP; } } else if (optionsGetIntOption(OPTIONS_TIMING)) - endTimer(TQString("Parsing document %1").tqarg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))).utf8().data()); + endTimer(TQString("Parsing document %1").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))).utf8().data()); return doc; } @@ -1032,12 +1032,12 @@ xsldbgLoadXmlTemporary(const xmlChar * path) #endif doc = xmlSAXParseFile(&mySAXhdlr, (char *) path, 0); if (doc == NULL) { - xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").tqarg(xsldbgUrl(path))); + xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(path))); } if (optionsGetIntOption(OPTIONS_TIMING) && (xslDebugStatus != DEBUG_TQUIT)) { - endTimer(TQString("Parsing document %1").tqarg(xsldbgUrl(path))); + endTimer(TQString("Parsing document %1").arg(xsldbgUrl(path))); } return doc; } @@ -1097,7 +1097,7 @@ handler_routine(DWORD dwCtrlType) void xsldbgStructErrorHandler(void * userData, xmlErrorPtr error) { if (error && error->message && (error->level >= 0) && (error->level <= 4)){ - if (getThreadtqStatus() != XSLDBG_MSG_THREAD_RUN){ + if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN){ static const char *msgPrefix[4 + 1] = {"", "warning :", "error:", "fatal:"}; if (error->file) xsltGenericError(xsltGenericErrorContext, "%s%s in file \"%s\" line %d", msgPrefix[error->level], error->message, error->file, error->line); @@ -1240,7 +1240,7 @@ xsldbgInit() xmlDefaultSAXHandlerInit(); xmlDefaultSAXHandler.cdataBlock = NULL; - if (getThreadtqStatus() != XSLDBG_MSG_THREAD_NOTUSED) { + if (getThreadStatus() != XSLDBG_MSG_THREAD_NOTUSED) { initialized = 1; return 1; /* this is all we need to do when running as a thread */ } @@ -1310,7 +1310,7 @@ xsldbgGenericErrorFunc(void *ctx, const char *msg, ...) Q_UNUSED(ctx); va_start(args, msg); - if (getThreadtqStatus() == XSLDBG_MSG_THREAD_RUN) { + if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) { vsnprintf(msgBuffer, sizeof(msgBuffer), msg, args); notifyTextXsldbgApp(XSLDBG_MSG_TEXTOUT, msgBuffer); -- cgit v1.2.3