case Qt::EditRole:
{
QString newName = value.toString();
+
+ // Sanity check - buffer names must not contain newlines!
+ int nlpos = newName.indexOf('\n');
+ if (nlpos >= 0)
+ newName = newName.left(nlpos);
+
if (!newName.isEmpty()) {
Client::renameBuffer(bufferId(), newName);
return true;
QHash<UserCategoryItem *, QList<IrcUser *> >::const_iterator catIter = categories.constBegin();
while (catIter != categories.constEnd()) {
catIter.key()->addUsers(catIter.value());
- catIter++;
+ ++catIter;
}
}