summary refs log tree commit diff
path: root/src/RoomInfoListItem.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2019-07-04 21:20:19 -0400
committerJoseph Donofry <joedonofry@gmail.com>2019-07-04 21:20:19 -0400
commitc0a010acbb7f0045aa1ce33f82b0d537a715a886 (patch)
treeb3c28203235e32e8e4551fc9948f3b42fbaa3ae1 /src/RoomInfoListItem.cpp
parentFix some linting issues (diff)
downloadnheko-c0a010acbb7f0045aa1ce33f82b0d537a715a886.tar.xz
Fix deprecated function call issues with Qt 5.13
Update to mtxclient 0.3.0
Diffstat (limited to 'src/RoomInfoListItem.cpp')
-rw-r--r--src/RoomInfoListItem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp
index f17b383c..d6a4f78f 100644
--- a/src/RoomInfoListItem.cpp
+++ b/src/RoomInfoListItem.cpp
@@ -182,7 +182,7 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
 
                 QFont tsFont;
                 tsFont.setPointSizeF(tsFont.pointSizeF() * 0.9);
-                const int msgStampWidth = QFontMetrics(tsFont).width(lastMsgInfo_.timestamp) + 4;
+                const int msgStampWidth = QFontMetrics(tsFont).horizontalAdvance(lastMsgInfo_.timestamp) + 4;
 
                 // We use the full width of the widget if there is no unread msg bubble.
                 const int bottomLineWidthLimit = (unreadMsgCount_ > 0) ? msgStampWidth : 0;
@@ -211,7 +211,7 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
                         p.setFont(QFont{});
                         p.drawText(QPoint(2 * wm.padding + wm.iconSize, bottom_y), userName);
 
-                        int nameWidth = QFontMetrics(QFont{}).width(userName);
+                        int nameWidth = QFontMetrics(QFont{}).horizontalAdvance(userName);
 
                         p.setFont(QFont{});