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
@@ -164,7 +164,7 @@ void DrawGuiUtil::loadLineStandardsChoices(QComboBox* combo)
|
||||
combo->clear();
|
||||
std::vector<std::string> choices = LineGenerator::getAvailableLineStandards();
|
||||
for (auto& entry : choices) {
|
||||
QString qentry = Base::Tools::fromStdString(entry);
|
||||
QString qentry = QString::fromStdString(entry);
|
||||
combo->addItem(qentry);
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ void DrawGuiUtil::loadLineGroupChoices(QComboBox* combo)
|
||||
std::stringstream ss(lgRecord);
|
||||
std::vector<QString> lgNames;
|
||||
while (std::getline(ss, lgRecord, ',')) {
|
||||
lgNames.push_back(Base::Tools::fromStdString(lgRecord));
|
||||
lgNames.push_back(QString::fromStdString(lgRecord));
|
||||
}
|
||||
// fill the combobox with the found names
|
||||
for (auto& name : lgNames) {
|
||||
|
||||
Reference in New Issue
Block a user