src/messagelog.cpp

changeset 250
2837b549e616
parent 236
1fa0e1de9f0a
child 264
76a025db4948
--- a/src/messagelog.cpp	Wed Jun 22 16:13:15 2022 +0300
+++ b/src/messagelog.cpp	Wed Jun 22 16:53:35 2022 +0300
@@ -9,7 +9,8 @@
 
 void MessageLog::addMessage(const Message& message)
 {
-	this->beginInsertRows({}, this->messages.size(), this->messages.size());
+	const int row = static_cast<int>(this->messages.size());
+	this->beginInsertRows({}, row, row);
 	this->messages.push_back(message);
 	this->endInsertRows();
 }
@@ -32,7 +33,7 @@
 
 int MessageLog::rowCount(const QModelIndex&) const
 {
-	return signed_cast(this->messages.size());
+	return narrow<int>(signed_cast(this->messages.size()));
 }
 
 int MessageLog::columnCount(const QModelIndex&) const

mercurial