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

use isEmpty()

parent 11eea119
......@@ -682,7 +682,7 @@ void LDAPProtocol::put(const QUrl &_url, int, KIO::JobFlags flags)
break;
}
case Ldif::Entry_Add:
if (ldif.value().size() > 0) {
if (!ldif.value().isEmpty()) {
addObject.addValue(ldif.attr(), ldif.value());
}
break;
......
......@@ -79,7 +79,7 @@ QByteArray Ldif::assembleLine(const QString &fieldname, const QByteArray &value,
} else {
isDn = fieldname.toLower() == QLatin1String("dn");
//SAFE-INIT-CHAR
if (value.size() > 0 && value[0] > 0 && value[0] != '\n'
if (!value.isEmpty() && value[0] > 0 && value[0] != '\n'
&& value[0] != '\r' && value[0] != ':' && value[0] != '<') {
safe = true;
}
......@@ -242,7 +242,7 @@ Ldif::ParseValue Ldif::processLine()
} else if (attrLower == QLatin1String("control")) {
d->mUrl = splitControl(d->mValue, d->mOid, d->mCritical, d->mValue);
retval = Control;
} else if (!d->mAttr.isEmpty() && d->mValue.size() > 0) {
} else if (!d->mAttr.isEmpty() && !d->mValue.isEmpty()) {
d->mEntryType = Entry_Add;
retval = Item;
}
......
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