Base: Drop QString-std::string conversion functions from Tools
Convenience helpers function Tools::toStdString and Tools::fromStdString were implemented for Qt4 or older to perform utf8 aware conversion as QString::toStdString/QString::fromStdString were using toAscii/fromAscii internally (see https://dreamswork.github.io/qt4/classQString.html). Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
This commit is contained in:
committed by
Chris Hennes
parent
f9d1391588
commit
0ee3c9f8e6
@@ -348,7 +348,7 @@ void PagePrinter::printPdf(ViewProviderPage* vpPage, const std::string& file)
|
||||
filespec = DU::cleanFilespecBackslash(filespec);
|
||||
|
||||
// set up the pdfwriter
|
||||
QString outputFile = Base::Tools::fromStdString(filespec);
|
||||
QString outputFile = QString::fromStdString(filespec);
|
||||
QPdfWriter pdfWriter(outputFile);
|
||||
QPageLayout pageLayout = pdfWriter.pageLayout();
|
||||
auto marginsdb = pageLayout.margins(QPageLayout::Millimeter);
|
||||
@@ -396,7 +396,7 @@ void PagePrinter::saveSVG(ViewProviderPage* vpPage, const std::string& file)
|
||||
}
|
||||
auto filespec = Base::Tools::escapeEncodeFilename(file);
|
||||
filespec = DU::cleanFilespecBackslash(file);
|
||||
QString filename = Base::Tools::fromStdString(filespec);
|
||||
QString filename = QString::fromStdString(filespec);
|
||||
|
||||
auto ourScene = vpPage->getQGSPage();
|
||||
ourScene->setExportingSvg(true);
|
||||
|
||||
Reference in New Issue
Block a user