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
@@ -31,7 +31,6 @@
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include "CompassDialWidget.h"
|
||||
|
||||
@@ -151,7 +150,7 @@ void CompassDialWidget::drawMarkings(QPainter& painter)
|
||||
if (iDegree % 45 == 0) {
|
||||
//Named direction (every 45°)
|
||||
painter.drawLine(0, -40, 0, -50); //this has to depend on m_rect or size?
|
||||
QString qPointText = Base::Tools::fromStdString(CompassPointText.at(iDegree));
|
||||
QString qPointText = QString::fromStdString(CompassPointText.at(iDegree));
|
||||
painter.drawText(-metrics.boundingRect(qPointText).width() / 2.0, -52, qPointText);
|
||||
// what is -52? line end point y = -50 + 2 for margin?
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user