Re: how to fix this qt code for format-security flag FTBFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Software Engineer - KDE desktop team, Brno
KDE developer <lukas@xxxxxxx>
Red Hat Inc.                               http://cz.redhat.com
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux