avoid multiple spaces in property name
This commit is contained in:
@@ -373,8 +373,11 @@ void PropertyItem::setPropertyName(const QString& name)
|
||||
for (int i=0; i<name.length(); i++) {
|
||||
if (name[i].isUpper() && !display.isEmpty()) {
|
||||
// if there is a sequence of capital letters do not insert spaces
|
||||
if (!upper)
|
||||
display += QLatin1String(" ");
|
||||
if (!upper) {
|
||||
QChar last = display.at(display.length()-1);
|
||||
if (!last.isSpace())
|
||||
display += QLatin1String(" ");
|
||||
}
|
||||
}
|
||||
upper = name[i].isUpper();
|
||||
display += name[i];
|
||||
|
||||
Reference in New Issue
Block a user