Commit 78fffa88 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use isEmpty

parent 0d6e7b8f
...@@ -255,7 +255,7 @@ void LdapClient::Private::finishCurrentObject() ...@@ -255,7 +255,7 @@ void LdapClient::Private::finishCurrentObject()
void LdapClient::Private::parseLDIF(const QByteArray &data) void LdapClient::Private::parseLDIF(const QByteArray &data)
{ {
//qCDebug(LDAPCLIENT_LOG) <<"LdapClient::parseLDIF(" << QCString(data.data(), data.size()+1) <<" )"; //qCDebug(LDAPCLIENT_LOG) <<"LdapClient::parseLDIF(" << QCString(data.data(), data.size()+1) <<" )";
if (data.size()) { if (!data.isEmpty()) {
mLdif.setLdif(data); mLdif.setLdif(data);
} else { } else {
mLdif.endLdif(); mLdif.endLdif();
......
...@@ -189,7 +189,7 @@ MailList MailList::decode(const QByteArray &payload) ...@@ -189,7 +189,7 @@ MailList MailList::decode(const QByteArray &payload)
MailList mailList; MailList mailList;
// A read-only data stream // A read-only data stream
QDataStream stream(payload); QDataStream stream(payload);
if (payload.size()) { if (!payload.isEmpty()) {
stream >> mailList; stream >> mailList;
} }
return mailList; return mailList;
...@@ -198,7 +198,7 @@ MailList MailList::decode(const QByteArray &payload) ...@@ -198,7 +198,7 @@ MailList MailList::decode(const QByteArray &payload)
QByteArray MailList::serialsFromMimeData(const QMimeData *md) QByteArray MailList::serialsFromMimeData(const QMimeData *md)
{ {
MailList mailList = fromMimeData(md); MailList mailList = fromMimeData(md);
if (mailList.count()) { if (!mailList.isEmpty()) {
MailList::const_iterator it; MailList::const_iterator it;
QByteArray a; QByteArray a;
QBuffer buffer(&a); QBuffer buffer(&a);
......
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