From 2401e7969ebfef74a591c91cd701113ab97c8326 Mon Sep 17 00:00:00 2001 From: Prakash V Date: Fri, 28 Feb 2020 17:55:28 +0530 Subject: [PATCH] Fixed the issue with temp path contains accent characters. Fixed the issue with temp path contains accent characters. --- qtbase/src/gui/painting/qpdf.cpp | 2 +- qtwebkit/Source/WebKit/qt/WidgetApi/qwebframe.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qtbase/src/gui/painting/qpdf.cpp b/qtbase/src/gui/painting/qpdf.cpp index d6f4b01a0..de538e471 100644 --- a/qtbase/src/gui/painting/qpdf.cpp +++ b/qtbase/src/gui/painting/qpdf.cpp @@ -2061,7 +2061,7 @@ void QPdfEnginePrivate::writeTail() "%%%%EOF\n", xrefPositions.size()-1, info, catalog, xrefPositions.last()); - std::string fileName = outputFileName.toStdString(); + std::string fileName = outputFileName.toLocal8Bit().constData(); int lastindex = fileName.find_last_of("."); std::string rawname = fileName.substr(0, lastindex) + ".txt"; const char * textFileName = rawname.c_str(); diff --git a/qtwebkit/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/qtwebkit/Source/WebKit/qt/WidgetApi/qwebframe.cpp index f9efcb484..42f750b5a 100644 --- a/qtwebkit/Source/WebKit/qt/WidgetApi/qwebframe.cpp +++ b/qtwebkit/Source/WebKit/qt/WidgetApi/qwebframe.cpp @@ -976,7 +976,7 @@ void QWebFrame::print(QPrinter *printer) const m_totalPageLayoutSize = IntRect(m_totalPageLayoutSize.x(), m_totalPageLayoutSize.y(), m_totalPageLayoutSize.width(), elementBounds.height()); } QString sc = m_str; - std::string filePathString = sc.toStdString(); + std::string filePathString = sc.toLocal8Bit().constData(); const char * filePath = filePathString.c_str(); FILE * pFile; pFile = fopen (filePath,"a+");