[mythtv-users] Extra long epg data prevents access to recording
Torsten Schenkel
torsten.schenkel at web.de
Thu Nov 20 19:19:16 EST 2003
On Fri, 2003-11-21 at 00:07, Torsten Schenkel wrote:
The patch was with an undesirable line break, so again as attachment.
> 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.
--
Config files for PVR350 TV-Out:
http://www-isl.mach.uni-karlsruhe.de/~hi93/ivtv-pvr-350-conf.tgz
-------------- next part --------------
--- 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);
More information about the mythtv-users
mailing list