OSDN Git Service

use QByteArray::constData() in QMetaObject::connectSlotsByName()
authorIvailo Monev <xakepa10@gmail.com>
Wed, 3 Feb 2021 06:48:41 +0000 (08:48 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 3 Feb 2021 06:48:41 +0000 (08:48 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/kernel/qobject.cpp

index 497e2d0..3ef0090 100644 (file)
@@ -2757,7 +2757,7 @@ void QMetaObject::connectSlotsByName(QObject *o)
             const QObject *co = list.at(j);
             QByteArray objName = co->objectName().toAscii();
             int len = objName.length();
-            if (!len || qstrncmp(slot + 3, objName.data(), len) || slot[len+3] != '_')
+            if (!len || qstrncmp(slot + 3, objName.constData(), len) || slot[len+3] != '_')
                 continue;
             int sigIndex = co->d_func()->signalIndex(slot + len + 4);
             if (sigIndex < 0) { // search for compatible signals