Use strlen to determine length of returned path

Change-Id: I8603f032bacdbb060be043f8720bd2b8c34d7ec6
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
João Abecasis 2012-03-14 16:11:27 +01:00 committed by Qt by Nokia
parent aac68052af
commit 0147ee75dd

View File

@ -97,7 +97,7 @@ static QString getFullPath(const FSRef &ref)
{
QByteArray ba(2048, 0);
if (FSRefMakePath(&ref, reinterpret_cast<UInt8 *>(ba.data()), ba.size()) == noErr)
return QString::fromUtf8(ba).normalized(QString::NormalizationForm_C);
return QString::fromUtf8(ba.constData()).normalized(QString::NormalizationForm_C);
return QString();
}