Check empty string using .isEmpty() instead of == ""
This commit is contained in:
parent
c9d85107e6
commit
459a1992e5
2 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ void ConversationListModel::setDeviceId(const QString& deviceId)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deviceId == "") {
|
if (deviceId.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ void ConversationModel::setThreadId(const qint64& threadId)
|
||||||
m_threadId = threadId;
|
m_threadId = threadId;
|
||||||
clear();
|
clear();
|
||||||
knownMessageIDs.clear();
|
knownMessageIDs.clear();
|
||||||
if (m_threadId != INVALID_THREAD_ID && m_deviceId != "") {
|
if (m_threadId != INVALID_THREAD_ID && !m_deviceId.isEmpty()) {
|
||||||
requestMoreMessages();
|
requestMoreMessages();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue