Handle mixed case groups in group editor

This commit is contained in:
Thorvald Natvig 2010-03-12 15:58:08 +01:00
parent 710dfb7a59
commit b5b0a4d588

View File

@ -448,18 +448,22 @@ void ACLEditor::refillGroupNames() {
qcbGroupList->addItem(name);
}
int wantindex = qcbGroupList->findText(text, Qt::MatchExactly);
int wantindex = qcbGroupList->findText(text, Qt::MatchFixedString);
qcbGroupList->setCurrentIndex(wantindex);
}
ACLGroup *ACLEditor::currentGroup() {
QString group = qcbGroupList->currentText().toLower();
QString group = qcbGroupList->currentText();
foreach(ACLGroup *gp, qlGroups) {
if (gp->qsName == group) {
foreach(ACLGroup *gp, qlGroups)
if (gp->qsName == group)
return gp;
group = group.toLower();
foreach(ACLGroup *gp, qlGroups)
if (gp->qsName == group)
return gp;
}
}
return NULL;
}