Modeling: Avoid more QStringList slicing when creating QList<QString>

Change-Id: I067d187b83e4f810c17ac1636e72f0d914d1ea35
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-04-29 09:49:40 +02:00
parent 26b409c610
commit 3d674f7c22
4 changed files with 8 additions and 8 deletions

View File

@@ -1119,11 +1119,11 @@ void ModelEditor::initToolbars()
if (!tool.m_stereotype.isEmpty() && stereotypeIconElement != qmt::StereotypeIcon::ElementAny) {
const qmt::Style *style = documentController->styleController()->adaptStyle(styleEngineElementType);
icon = stereotypeController->createIcon(
stereotypeIconElement, QStringList() << tool.m_stereotype,
stereotypeIconElement, {tool.m_stereotype},
QString(), style, QSize(128, 128), QMarginsF(6.0, 4.0, 6.0, 8.0), 8.0);
if (!icon.isNull()) {
QString stereotypeIconId = stereotypeController->findStereotypeIconId(
stereotypeIconElement, QStringList() << tool.m_stereotype);
stereotypeIconElement, {tool.m_stereotype});
qmt::StereotypeIcon stereotypeIcon = stereotypeController->findStereotypeIcon(stereotypeIconId);
if (stereotypeIcon.hasName())
newElementName = stereotypeIcon.name();