diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 2176a148b0..4f611bddbc 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2955,7 +2955,7 @@ namespace { // depending on the return type static inline Q_DECL_UNUSED QString fromstrerror_helper(int, const QByteArray &buf) { - return QString::fromLocal8Bit(buf); + return QString::fromLocal8Bit(buf.constData()); } static inline Q_DECL_UNUSED QString fromstrerror_helper(const char *str, const QByteArray &) {