From c0a010acbb7f0045aa1ce33f82b0d537a715a886 Mon Sep 17 00:00:00 2001 From: Joseph Donofry Date: Thu, 4 Jul 2019 21:20:19 -0400 Subject: Fix deprecated function call issues with Qt 5.13 Update to mtxclient 0.3.0 --- src/RoomInfoListItem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/RoomInfoListItem.cpp') 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{}); -- cgit 1.5.1