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
1a13d25811
commit
e62b91ada4
@@ -31,7 +31,6 @@
|
||||
#include <App/Application.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Parameter.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include <Mod/TechDraw/App/Preferences.h>
|
||||
|
||||
@@ -208,7 +207,7 @@ void QGISectionLine::makeSymbols()
|
||||
void QGISectionLine::makeSymbolsTrad()
|
||||
{
|
||||
prepareGeometryChange();
|
||||
int fontSize = QGIView::exactFontSize(Base::Tools::toStdString(m_symFont.family()), m_symSize);
|
||||
int fontSize = QGIView::exactFontSize(m_symFont.family().toStdString(), m_symSize);
|
||||
m_symFont.setPixelSize(fontSize);
|
||||
m_symbol1->setFont(m_symFont);
|
||||
m_symbol1->setPlainText(QString::fromUtf8(m_symbol));
|
||||
@@ -238,7 +237,7 @@ void QGISectionLine::makeSymbolsTrad()
|
||||
void QGISectionLine::makeSymbolsISO()
|
||||
{
|
||||
prepareGeometryChange();
|
||||
int fontSize = QGIView::exactFontSize(Base::Tools::toStdString(m_symFont.family()), m_symSize);
|
||||
int fontSize = QGIView::exactFontSize(m_symFont.family().toStdString(), m_symSize);
|
||||
m_symFont.setPixelSize(fontSize);
|
||||
m_symbol1->setFont(m_symFont);
|
||||
m_symbol1->setPlainText(QString::fromUtf8(m_symbol));
|
||||
|
||||
Reference in New Issue
Block a user