From 34c07ffc41a924f593c25542d5f4271f33cd16b8 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 26 Apr 2025 17:18:15 -0400 Subject: [PATCH] 2025-04-26 Fred Gleason * Cleaned up compiler warnings in 'rdlogin/'. Signed-off-by: Fred Gleason --- ChangeLog | 2 ++ rdlogin/rdlogin.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 89ac89f1..10bb117b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24996,3 +24996,5 @@ * Cleaned up compiler warnings in 'rdlibrary/'. 2025-04-26 Fred Gleason * Cleaned up compiler warnings in 'rdlogedit/'. +2025-04-26 Fred Gleason + * Cleaned up compiler warnings in 'rdlogin/'. diff --git a/rdlogin/rdlogin.cpp b/rdlogin/rdlogin.cpp index cda59b3f..f89e59b8 100644 --- a/rdlogin/rdlogin.cpp +++ b/rdlogin/rdlogin.cpp @@ -2,7 +2,7 @@ // // The User Login/Logout Utility for Rivendell. // -// (C) Copyright 2002-2023 Fred Gleason +// (C) Copyright 2002-2025 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -100,8 +100,8 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent) "order by `LOGIN_NAME`"; q=new RDSqlQuery(sql); while(q->next()) { - if((20+fm.width(q->value(0).toString()))>login_user_width) { - login_user_width=20+fm.width(q->value(0).toString()); + if((20+fm.horizontalAdvance(q->value(0).toString()))>login_user_width) { + login_user_width=20+fm.horizontalAdvance(q->value(0).toString()); } } delete q;