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
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/Document.h>
|
||||
@@ -364,8 +363,8 @@ void ViewProviderDrawingView::onProgressMessage(const TechDraw::DrawView* dv,
|
||||
void ViewProviderDrawingView::showProgressMessage(const std::string featureName, const std::string text) const
|
||||
{
|
||||
QString msg = QString::fromUtf8("%1 %2")
|
||||
.arg(Base::Tools::fromStdString(featureName),
|
||||
Base::Tools::fromStdString(text));
|
||||
.arg(QString::fromStdString(featureName),
|
||||
QString::fromStdString(text));
|
||||
if (Gui::getMainWindow()) {
|
||||
//neither of these work! Base::Console().Message() output preempts these messages??
|
||||
// Gui::getMainWindow()->showMessage(msg, 3000);
|
||||
|
||||
Reference in New Issue
Block a user