diff --git a/generators/dvi/dviRenderer_prescan.cpp b/generators/dvi/dviRenderer_prescan.cpp index 783c7273c..bce2185e9 100644 --- a/generators/dvi/dviRenderer_prescan.cpp +++ b/generators/dvi/dviRenderer_prescan.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -44,7 +45,7 @@ void dviRenderer::prescan_embedPS(char *cp, quint8 *beginningOfSpecialCommand) #endif // Encapsulated Postscript File - if (strncasecmp(cp, "PSfile=", 7) != 0) + if (qstrnicmp(cp, "PSfile=", 7) != 0) return; QString command(cp+7); @@ -230,7 +231,7 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, quint8 *beginningOfSpecia #endif // Encapsulated Postscript File - if (strncasecmp(cp, "papersize=", 10) != 0) + if (qstrnicmp(cp, "papersize=", 10) != 0) return; for (quint8 *ptr=beginningOfSpecialCommand; ptr", 9) == 0) { + if (qstrnicmp(cp, "html:", 9) == 0) { html_anchor_end(); return; } diff --git a/generators/dvi/psgs.cpp b/generators/dvi/psgs.cpp index b1eedc428..466e642ca 100644 --- a/generators/dvi/psgs.cpp +++ b/generators/dvi/psgs.cpp @@ -255,7 +255,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co while(proc.canReadLine()) { GSoutput = QString::fromLocal8Bit(proc.readLine()); if (GSoutput.contains(QStringLiteral("Unknown device"))) { - qCDebug(OkularDviDebug) << QStringLiteral("The version of ghostview installed on this computer does not support " + qCDebug(OkularDviDebug) << QString::fromLatin1("The version of ghostview installed on this computer does not support " "the '%1' ghostview device driver.").arg(*gsDevice) << endl; knownDevices.erase(gsDevice); gsDevice = knownDevices.begin(); diff --git a/generators/dvi/special.cpp b/generators/dvi/special.cpp index 6a9fe69b2..522c017f6 100644 --- a/generators/dvi/special.cpp +++ b/generators/dvi/special.cpp @@ -20,13 +20,13 @@ #include #include +#include #include #include #include #include #include "debug_dvi.h" - void dviRenderer::printErrorMsgForSpecials(const QString& msg) { if (dviFile->errorCounter < 25) { @@ -517,45 +517,45 @@ void dviRenderer::applicationDoSpecial(char *cp) // and NOT during the prescan phase // font color specials - if (strncasecmp(cp, "color", 5) == 0) { + if (qstrnicmp(cp, "color", 5) == 0) { color_special(special_command.mid(5)); return; } // HTML reference - if (strncasecmp(cp, "html:", 9) == 0) { + if (qstrnicmp(cp, "html:", 9) == 0) { html_anchor_end(); return; } // TPIC specials - if (strncasecmp(cp, "pn", 2) == 0) { + if (qstrnicmp(cp, "pn", 2) == 0) { TPIC_setPen_special(special_command.mid(2)); return; } - if (strncasecmp(cp, "pa ", 3) == 0) { + if (qstrnicmp(cp, "pa ", 3) == 0) { TPIC_addPath_special(special_command.mid(3)); return; } - if (strncasecmp(cp, "fp", 2) == 0) { + if (qstrnicmp(cp, "fp", 2) == 0) { TPIC_flushPath_special(); return; } // Encapsulated Postscript File - if (strncasecmp(cp, "PSfile=", 7) == 0) { + if (qstrnicmp(cp, "PSfile=", 7) == 0) { epsf_special(special_command.mid(7)); return; } // source special - if (strncasecmp(cp, "src:", 4) == 0) { + if (qstrnicmp(cp, "src:", 4) == 0) { source_special(special_command.mid(4)); return; } @@ -694,11 +694,11 @@ void dviRenderer::applicationDoSpecial(char *cp) // unrecognized special commands. if ((cp[0] == '!') || (cp[0] == '"') || - (strncasecmp(cp, "html:" + const QString preHtml = QString::fromLatin1("" "" "" "
").arg(mTextDocument->padding); diff --git a/ui/latexrenderer.cpp b/ui/latexrenderer.cpp index 8e42a9f88..fbc93b6f7 100644 --- a/ui/latexrenderer.cpp +++ b/ui/latexrenderer.cpp @@ -191,7 +191,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin bool LatexRenderer::securityCheck( const QString &latexFormula ) { - return !latexFormula.contains(QRegExp(QStringLiteral("\\\\(def|let|futurelet|newcommand|renewcommand|else|fi|write|input|include" + return !latexFormula.contains(QRegExp(QString::fromLatin1("\\\\(def|let|futurelet|newcommand|renewcommand|else|fi|write|input|include" "|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode" "|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks" "|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]"))); diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 13727e464..ee7aad1b6 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -2893,7 +2893,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e ) xs.append(1.0); ys.prepend(0.0); ys.append(1.0); - selHtml = QStringLiteral("" + selHtml = QString::fromLatin1("" "" ""); for (int r=0; r+1