mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 12:26:58 +03:00
Merge pull request #306 from Scrumplex/limit-instance-lengths
Limit instance names to 128 chars
This commit is contained in:
parent
8b46658b05
commit
58957122b9
2 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue