#if defined(Q_OS_UNIX)
setlocale(LC_ALL, "");
#if QT_VERSION >= 0x050000 && !defined(__EXTENSIVE_WKHTMLTOPDF_QT_HACK__)
setenv("QT_QPA_PLATFORM", "offscreen", 0);
#endif
#endif
QString tmpArg = QString::fromLocal8Bit(argv[i]);
#if defined(Q_OS_UNIX)
setlocale(LC_ALL, "");
#if QT_VERSION >= 0x050000 && !defined(__EXTENSIVE_WKHTMLTOPDF_QT_HACK__)
setenv("QT_QPA_PLATFORM", "offscreen", 0);
#endif
#endif
QString tmpArg = QString::fromLocal8Bit(argv[i]);