fix: limit instance names to 128 chars

This commit is contained in:
Sefa Eyeoglu
2022-03-19 23:23:08 +01:00
parent 8225f1ac92
commit c311dba465
2 changed files with 7 additions and 1 deletions

View File

@ -405,6 +405,8 @@ void ListViewDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
QString text = realeditor->toPlainText();
text.replace(QChar('\n'), QChar(' '));
text = text.trimmed();
// Prevent instance names longer than 128 chars
text.truncate(128);
if(text.size() != 0)
{
model->setData(index, text);