Magically reduce memory use.

square-messages
Black Hat 2018-11-18 14:29:09 +08:00
parent dd6c10e382
commit 9ec02e0fce
3 changed files with 5 additions and 5 deletions

View File

@ -710,7 +710,7 @@ Rectangle {
Rectangle {
anchors.fill: parent
visible: highlightCount > 0 || currentRoom === enteredRoom
visible: currentRoom === enteredRoom
color: Material.accent
opacity: 0.1
}

View File

@ -19,11 +19,11 @@ class RoomPaintable : public Paintable {
}
QImage image(int dimension) override {
if (!m_room) return QImage();
if (!m_room) return {};
return m_room->avatar(dimension);
}
QImage image(int width, int height) override {
if (!m_room) return QImage();
if (!m_room) return {};
return m_room->avatar(width, height);
}

View File

@ -16,11 +16,11 @@ class UserPaintable : public Paintable {
UserPaintable(User* parent) : Paintable(parent), m_user(parent) {}
QImage image(int dimension) override {
if (!m_user) return QImage();
if (!m_user) return {};
return m_user->avatar(dimension);
}
QImage image(int width, int height) override {
if (!m_user) return QImage();
if (!m_user) return {};
return m_user->avatar(width, height);
}