diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index c6c139757d..32720506d7 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -624,7 +624,11 @@ void Command::_doCommand(const char *file, int line, DoCmd_Type eType, const cha va_list ap; va_start(ap, sCmd); QString s; +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) const QString cmd = s.vsprintf(sCmd, ap); +#else + const QString cmd = s.vasprintf(sCmd, ap); +#endif va_end(ap); // 'vsprintf' expects a utf-8 string for '%s' diff --git a/src/Mod/TechDraw/Gui/QGVPage.cpp b/src/Mod/TechDraw/Gui/QGVPage.cpp index 15fe50760d..822a81230e 100644 --- a/src/Mod/TechDraw/Gui/QGVPage.cpp +++ b/src/Mod/TechDraw/Gui/QGVPage.cpp @@ -923,8 +923,13 @@ void QGVPage::postProcessXml(QTemporaryFile& temporaryFile, QString fileName, QS QString::fromUtf8("stroke: none;")); // Scale the template group correctly +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) templateGroup.setAttribute(QString::fromUtf8("transform"), QString().sprintf("scale(%f, %f)", Rez::guiX(1.0), Rez::guiX(1.0))); +#else + templateGroup.setAttribute(QString::fromUtf8("transform"), + QString::fromLatin1("scale(%1, %2)").arg(Rez::guiX(1.0), 0, 'f').arg(Rez::guiX(1.0), 0, 'f')); +#endif // Finally, transfer all template document child nodes under the template group while (!templateDocElem.firstChild().isNull()) {