From dfa5438a65510bb4bcf8afbe2df7b96e268739af Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 2 Aug 2018 16:37:58 -0400 Subject: [PATCH] 2018-08-02 Fred Gleason * Modified reports in rdadmin(1) to display UTF-8 strings correctly. --- ChangeLog | 3 +++ rdadmin/list_groups.cpp | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca6384fc..7c899a1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17296,3 +17296,6 @@ 2018-08-02 Fred Gleason * Modified reports in rdlibrary(1) to display UTF-8 strings correctly. +2018-08-02 Fred Gleason + * Modified reports in rdadmin(1) to display UTF-8 strings + correctly. diff --git a/rdadmin/list_groups.cpp b/rdadmin/list_groups.cpp index 234121fe..ee36658b 100644 --- a/rdadmin/list_groups.cpp +++ b/rdadmin/list_groups.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include "add_group.h" @@ -304,7 +305,7 @@ void ListGroups::reportData() // // Generate Header // - report=" Rivendell Group Report\n"; + report=RDReport::center("Rivendell Group Report",94)+"\n"; report+=QString("Generated: ")+ QDateTime::currentDateTime().toString("MM/dd/yyyy - hh:mm:ss")+"\n"; report+="\n"; @@ -329,12 +330,12 @@ void ListGroups::reportData() // // Group Name // - report+=QString().sprintf("%-10s ",(const char *)q->value(0).toString()); + report+=RDReport::leftJustify(q->value(0).toString(),10)+" "; // // Group Description // - report+=QString().sprintf("%-44s ",(const char *)q->value(1).toString()); + report+=RDReport::leftJustify(q->value(1).toString(),44)+" "; // // Cart Range @@ -350,7 +351,7 @@ void ListGroups::reportData() // // Enforce Range // - report+=QString().sprintf(" %s ",(const char *)q->value(4).toString()); + report+=QString(" ")+q->value(4).toString()+" "; // // Default Cart Type @@ -372,17 +373,17 @@ void ListGroups::reportData() // // Music Reports // - report+=QString().sprintf(" %s ",(const char *)q->value(6).toString()); + report+=QString(" ")+q->value(6).toString()+" "; // // Traffic Reports // - report+=QString().sprintf(" %s ",(const char *)q->value(7).toString()); + report+=QString(" ")+q->value(7).toString()+" "; // // Now & Next // - report+=QString().sprintf(" %s",(const char *)q->value(8).toString()); + report+=QString(" ")+q->value(8).toString(); // // End of Line