Rename 'DB_MSG_QUERY_LIMIT' to 'DB_QUERY_LIMIT_MESSAGES'

This is done in preparation for the upcoming group chat implementation which introduces a limit for group chat users.
master
Melvin Keskin 2021-04-23 13:19:03 +02:00 committed by Linus Jahn
parent 3f528b1d87
commit a10ec3a3bc
3 changed files with 3 additions and 3 deletions

View File

@ -59,10 +59,10 @@ constexpr auto MESSAGE_MAX_CHARS = 1e4;
// SQL
#define DB_CONNECTION "kaidan-messages"
#define DB_FILENAME "messages.sqlite3"
#define DB_MSG_QUERY_LIMIT 20
#define DB_TABLE_INFO "dbinfo"
#define DB_TABLE_ROSTER "Roster"
#define DB_TABLE_MESSAGES "Messages"
#define DB_QUERY_LIMIT_MESSAGES 20
//
// Credential generation

View File

@ -197,7 +197,7 @@ void MessageDb::fetchMessages(const QString &user1, const QString &user2, int in
bindValues[":user1"] = user1;
bindValues[":user2"] = user2;
bindValues[":index"] = index;
bindValues[":limit"] = DB_MSG_QUERY_LIMIT;
bindValues[":limit"] = DB_QUERY_LIMIT_MESSAGES;
Utils::execQuery(
query,

View File

@ -348,7 +348,7 @@ bool MessageModel::canCorrectMessage(int index) const
void MessageModel::handleMessagesFetched(const QVector<Message> &msgs)
{
if (msgs.length() < DB_MSG_QUERY_LIMIT)
if (msgs.length() < DB_QUERY_LIMIT_MESSAGES)
m_fetchedAllFromDb = true;
if (msgs.empty())