Check empty string using .isEmpty() instead of == ""

This commit is contained in:
Simon Redman 2019-04-30 10:11:42 -06:00
parent c9d85107e6
commit 459a1992e5
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ void ConversationListModel::setDeviceId(const QString& deviceId)
return;
}
if (deviceId == "") {
if (deviceId.isEmpty()) {
return;
}

View file

@ -52,7 +52,7 @@ void ConversationModel::setThreadId(const qint64& threadId)
m_threadId = threadId;
clear();
knownMessageIDs.clear();
if (m_threadId != INVALID_THREAD_ID && m_deviceId != "") {
if (m_threadId != INVALID_THREAD_ID && !m_deviceId.isEmpty()) {
requestMoreMessages();
}
}