summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/EventStore.h6
-rw-r--r--src/timeline/TimelineModel.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/timeline/EventStore.h b/src/timeline/EventStore.h

index 2d5fb1be..a71e95d5 100644 --- a/src/timeline/EventStore.h +++ b/src/timeline/EventStore.h
@@ -29,7 +29,7 @@ public: friend uint qHash(const Index &i, uint seed = 0) noexcept { QtPrivate::QHashCombine hash; - seed = hash(seed, QByteArray::fromRawData(i.room.data(), i.room.size())); + seed = hash(seed, QByteArray::fromRawData(i.room.data(), (int)i.room.size())); seed = hash(seed, i.idx); return seed; } @@ -46,8 +46,8 @@ public: friend uint qHash(const IdIndex &i, uint seed = 0) noexcept { QtPrivate::QHashCombine hash; - seed = hash(seed, QByteArray::fromRawData(i.room.data(), i.room.size())); - seed = hash(seed, QByteArray::fromRawData(i.id.data(), i.id.size())); + seed = hash(seed, QByteArray::fromRawData(i.room.data(), (int)i.room.size())); + seed = hash(seed, QByteArray::fromRawData(i.id.data(), (int)i.id.size())); return seed; } diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 11fa60c0..adef886d 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -28,7 +28,7 @@ namespace std { inline uint qHash(const std::string &key, uint seed = 0) { - return qHash(QByteArray::fromRawData(key.data(), key.length()), seed); + return qHash(QByteArray::fromRawData(key.data(), (int)key.length()), seed); } } @@ -1208,7 +1208,7 @@ TimelineModel::cacheMedia(QString eventId) if (!file.open(QIODevice::WriteOnly)) return; - file.write(QByteArray(temp.data(), temp.size())); + file.write(QByteArray(temp.data(), (int)temp.size())); file.close(); } catch (const std::exception &e) { nhlog::ui()->warn("Error while saving file to: {}", e.what()); @@ -1227,7 +1227,7 @@ TimelineModel::formatTypingUsers(const std::vector<QString> &users, QColor bg) "multiple users. Second argument is the last user of that list. (If only one user is " "typing, %1 is empty. You should still use it in your string though to silence Qt " "warnings.)", - users.size()); + (int)users.size()); if (users.empty()) { return "";