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
@@ -25,7 +25,6 @@
|
||||
#endif // #ifndef _PreComp_
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Command.h>
|
||||
@@ -79,7 +78,7 @@ TaskLineDecor::~TaskLineDecor()
|
||||
void TaskLineDecor::initUi()
|
||||
{
|
||||
std::string viewName = m_partFeat->getNameInDocument();
|
||||
ui->le_View->setText(Base::Tools::fromStdString(viewName));
|
||||
ui->le_View->setText(QString::fromStdString(viewName));
|
||||
|
||||
std::stringstream ss;
|
||||
for (auto& e: m_edges) {
|
||||
@@ -90,7 +89,7 @@ void TaskLineDecor::initUi()
|
||||
if (!temp.empty()) {
|
||||
temp.resize(temp.length() - 2);
|
||||
}
|
||||
ui->le_Lines->setText(Base::Tools::fromStdString(temp));
|
||||
ui->le_Lines->setText(QString::fromStdString(temp));
|
||||
|
||||
ui->cc_Color->setColor(m_color.asValue<QColor>());
|
||||
ui->dsb_Weight->setValue(m_weight);
|
||||
|
||||
Reference in New Issue
Block a user