[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-devel-list
Subject:    Re: how to fix this qt code for format-security flag FTBFS
From:       Lukáš Tinkl <ltinkl () redhat ! com>
Date:       2013-12-04 14:53:32
Message-ID: 529F41EC.7090803 () redhat ! com
[Download RAW message or body]

Dne 4.12.2013 15:47, Florian Weimer napsal(a):
> On 12/04/2013 03:26 PM, Parag N(पराग़) wrote:
>
>>    I got a format-security flag FTBFS bug[1] for fontmatrix package
>> which I maintain in Fedora. I am confused on how to fix line 86 qDebug()
>> from http://fpaste.org/58952/13861663/ to fix this FTBFS.
>>    Can someone help to fix this?
>
> This should do it:
>
>    qDebug("%s", ds.arg(glyph)
>                 .arg(log)
>                 .arg(xadvance)
>                 .arg(yadvance)
>                 .arg(xoffset)
>                 .arg(yoffset)
>                 .arg(QChar(lChar))
>                 .arg(hyphen.first.count())
>                 .toLocal8Bit().data());
>
> The original version relied on the operator char *() overload of
> QByteArray, but that isn't applied in a vararg context.
>

An even better and easier way is to

#include <QDebug>

and use sth like:

qDebug() << glyph << log << xadvance << etc etc;

-- 
Lukáš Tinkl <ltinkl@redhat.com>
Software Engineer - KDE desktop team, Brno
KDE developer <lukas@kde.org>
Red Hat Inc.                               http://cz.redhat.com
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic