From 40420b140dae57640a553643766112af9902b7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 1 Sep 2020 12:36:09 +0200 Subject: Added controlled conversions to char* instead of automatic ascii conversions. Removed unnecessary conversions to char*. The definition of -UTQT_NO_ASCII_CAST is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kpacman/status.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'kpacman/status.cpp') diff --git a/kpacman/status.cpp b/kpacman/status.cpp index b89e49d..12f01b7 100644 --- a/kpacman/status.cpp +++ b/kpacman/status.cpp @@ -42,8 +42,7 @@ TQPtrList *Status::loadPixmap(TQWidget *parent, TQString pixmapName, "The file '@PIXMAPNAME@' does not exist,\n" "or is of an unknown format."); msg.replace(TQRegExp("@PIXMAPNAME@"), pixmapName); - TQMessageBox::information(parent, i18n("Initialization Error"), - (const char *) msg); + TQMessageBox::information(parent, i18n("Initialization Error"), msg); return 0; } @@ -122,7 +121,7 @@ TQString Status::decodeHexOctString(TQString s) c = '\0'; len = 0; value = s.mid(pos+leadin, 3); - ptr = (const char *) value; + ptr = value.latin1(); while (*ptr != '\0' && (v = valids.find(*ptr++, 0, FALSE)) != -1) { c = (c * valids.length()) + v; @@ -179,7 +178,7 @@ void Status::fillStrList(TQStrList &list, TQString values, int max) } if (!value.isEmpty()) last = decodeHexOctString(value); - list.append(last); + list.append(last.latin1()); } } @@ -203,8 +202,8 @@ void Status::fillPixmapName(TQStrList &pixmapName) fileInfo.setFile(pixmap); if (!fileInfo.isReadable() || !fileInfo.isFile()) pixmap = ""; - - pixmapName.append(pixmap); + + pixmapName.append(pixmap.utf8()); } } -- cgit v1.2.1