Commit fcaff662 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use truncate here

parent 8e2c180d
......@@ -215,7 +215,7 @@ void LDAPProtocol::LDAPEntry2UDSEntry(const LdapDN &dn, UDSEntry &entry,
entry.clear();
QString name = dn.toString();
if ((pos = name.indexOf(QLatin1Char(','))) > 0) {
name = name.left(pos);
name.truncate(pos);
}
if ((pos = name.indexOf(QLatin1Char('='))) > 0) {
name.remove(0, pos + 1);
......
......@@ -154,7 +154,7 @@ QString LdapDN::toString(int depth) const
dn += rdns.at(rdns.size() - 1 - i) + QLatin1Char(',');
qCDebug(LDAP_LOG) << "dn =" << dn;
}
dn = dn.left(dn.length() - 1); // Strip off the extraneous comma
dn.truncate(dn.length() - 1); // Strip off the extraneous comma
return dn;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment