On November 7, 2015 08:07:11 PM David Faure wrote: > KTar's unittests detected a behavior change in Qt. > Thiago, is it intentional, or should it be fixed in Qt ? > > KTar does > > QString name = QFile::decodeName(QByteArray(buffer, 100)); > > where buffer is e.g. "filename\0\0\0\0\0\0[...]" > > With Qt < 5.6 this would lead to name being equal to "filename". > > With Qt 5.6 from git, it leads to name being equal to > "filename\0\0\0\0\0etc.". > > It appears that QUtfCodec doesn't stop at the first null byte anymore. > > This appears to fix it: > - name = QFile::decodeName(QByteArray(buffer, 100)); > + name = QFile::decodeName(QByteArray(buffer, qstrnlen(buffer, > 100))); > > but I have to find the other places in there, some more unittests still > fail. It appears this was a deliberate change, see https://codereview.qt-project.org/#/c/106473/ . It affects KConfig as well, and I've posted a patch for its autotests. -- Matthew
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel