[mythtv-users] Extra long epg data prevents access to recording

Torsten Schenkel torsten.schenkel at web.de
Thu Nov 20 18:07:38 EST 2003


On Thu, 2003-11-20 at 18:06, Torsten Schenkel wrote:

OK, so I'm trying to do it right.

QLabel *descriptionfield = new QLabel(QString::fromLatin1(description,
120), parent);
     
is most probably not the most elegant solution, since the utf8
translation is done here:

 proginfo->description = QString::fromUtf8(query.value(5).toString());

but strangely changing this to:

 proginfo->description = QString::fromUtf8(query.value(5).toString(),
120);

doesn't do the trick.


But the following patch cuts the description after the first 120 chars.
This will fit into the three lines that are there for the description.

There definitely is a better solution out there.



--- programinfo.cpp.orig        2003-11-20 23:57:04.000000000 +0100
+++ programinfo.cpp     2003-11-20 23:55:50.000000000 +0100
@@ -1487,7 +1487,7 @@
     subtitlefield->setAlignment(Qt::AlignLeft | Qt::AlignTop);
     QLabel *descriptionlabel = new QLabel(QObject::tr("Description:"),
parent);
     descriptionlabel->setBackgroundOrigin(QWidget::WindowOrigin);
-    QLabel *descriptionfield = new QLabel(description, parent);
+    QLabel *descriptionfield = new
QLabel(QString::fromLatin1(description, 120), parent);
     descriptionfield->setBackgroundOrigin(QWidget::WindowOrigin);
     descriptionfield->setAlignment(Qt::WordBreak | Qt::AlignLeft |
                                    Qt::AlignTop);
 



Torsten
-- 
Config files for PVR350 TV-Out:
http://www-isl.mach.uni-karlsruhe.de/~hi93/ivtv-pvr-350-conf.tgz



More information about the mythtv-users mailing list