}
_listItemFormats = parser.listItemFormats();
- qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
+ styleSheet = styleSheet.trimmed();
+ if(!styleSheet.isEmpty())
+ qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
}
emit changed();
// URL
if(ftype & Url)
- mergeSubElementFormat(fmt, ftype & Url, label);
+ mergeSubElementFormat(fmt, ftype & (Url | 0x000000ff), label);
}
// Merge a subelement format into an existing message format
QString nick = nickFromMask(sender()).toLower();
if(!nick.isEmpty()) {
int chopCount = 0;
- while(nick.at(nick.count() - 1 - chopCount) == '_')
+ while(chopCount < nick.size() && nick.at(nick.count() - 1 - chopCount) == '_')
chopCount++;
- nick.chop(chopCount);
+ if(chopCount < nick.size())
+ nick.chop(chopCount);
}
quint16 hash = qChecksum(nick.toAscii().data(), nick.toAscii().size());
return (_senderHash = (hash & 0xf) + 1);