for (int v = 0; v < ct->count(); ++v) {
const QCustomTypeInfo &customInfo = ct->at(v);
if ((length == customInfo.typeName.size())
- && !strcmp(typeName, customInfo.typeName.constData())) {
+ && strcmp(typeName, customInfo.typeName.constData()) == 0) {
if (customInfo.alias >= 0)
return customInfo.alias;
return v + QMetaType::User;
class QString;
-#define Q_MOC_OUTPUT_REVISION 65
+#define Q_MOC_OUTPUT_REVISION 66
// The following macros are our "extensions" to C++
// They are used, strictly speaking, only by the moc.
void *QDBusAdaptorConnector::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
- if (!strcmp(_clname, qt_meta_stringdata_QDBusAdaptorConnector))
+ if (strcmp(_clname, qt_meta_stringdata_QDBusAdaptorConnector) == 0)
return static_cast<void*>(const_cast< QDBusAdaptorConnector*>(this));
return QObject::qt_metacast(_clname);
}
void *QDBusInterface::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
- if (!strcmp(_clname, "QDBusInterface"))
+ if (strcmp(_clname, "QDBusInterface") == 0)
return static_cast<void*>(this);
if (d_func()->interface.toLatin1() == _clname)
return static_cast<void*>(this);
void *QScript::QObjectConnectionManager::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
- if (!strcmp(_clname, qt_meta_stringdata_QScript__QObjectConnectionManager))
+ if (strcmp(_clname, qt_meta_stringdata_QScript__QObjectConnectionManager) == 0)
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
if (resultAttr) {
const char* oldResult = resultAttr->value();
bool overwrite = false;
- if (!strcmp(oldResult, "pass")) {
+ if (strcmp(oldResult, "pass") == 0) {
overwrite = true;
- }
- else if (!strcmp(oldResult, "xfail")) {
+ } else if (strcmp(oldResult, "xfail") == 0) {
overwrite = (type == QAbstractTestLogger::XPass || type == QAbstractTestLogger::Fail);
- }
- else if (!strcmp(oldResult, "xpass")) {
+ } else if (strcmp(oldResult, "xpass") == 0) {
overwrite = (type == QAbstractTestLogger::Fail);
}
if (overwrite) {
resultAttr->setPair(QTest::AI_Result, typeBuf);
}
- }
- else {
+ } else {
currentLogElement->addAttribute(QTest::AI_Result, typeBuf);
}
if (element->elementType() == QTest::LET_TestCase) {
bool failed = false;
for (QTestElement* child = element->childElements(); child; child = child->nextElement()) {
- if ( child->elementType() == QTest::LET_Failure
+ if (child->elementType() == QTest::LET_Failure
&& child->attribute(QTest::AI_Result)
- && ( !strcmp(child->attributeValue(QTest::AI_Result), "fail")
- || !strcmp(child->attributeValue(QTest::AI_Result), "xpass"))
+ && (strcmp(child->attributeValue(QTest::AI_Result), "fail") == 0
+ || strcmp(child->attributeValue(QTest::AI_Result), "xpass") == 0)
)
{
failed = true;
return (dest-begin);
}
- if (!strncmp(src, CDATA_END, sizeof(CDATA_END)-1)) {
+ if (strncmp(src, CDATA_END, sizeof(CDATA_END)-1) == 0) {
if (dest + sizeof(CDATA_END_ESCAPED) < end) {
strcpy(dest, CDATA_END_ESCAPED);
src += sizeof(CDATA_END)-1;
//
fprintf(out, "\nvoid *%s::qt_metacast(const char *_clname)\n{\n", cdef->qualified.constData());
fprintf(out, " if (!_clname) return nullptr;\n");
- fprintf(out, " if (!strcmp(_clname, qt_meta_stringdata_%s))\n"
+ fprintf(out, " if (strcmp(_clname, qt_meta_stringdata_%s) == 0)\n"
" return static_cast<void*>(this);\n",
qualifiedClassNameIdentifier.constData());
for (int i = 1; i < cdef->superclassList.size(); ++i) { // for all superclasses but the first one
if (cdef->superclassList.at(i).second == FunctionDef::Private)
continue;
const char *cname = cdef->superclassList.at(i).first.constData();
- fprintf(out, " if (!strcmp(_clname, \"%s\"))\n return static_cast<%s*>(const_cast<%s*>(this));\n",
+ fprintf(out, " if (strcmp(_clname, \"%s\") == 0)\n return static_cast<%s*>(const_cast<%s*>(this));\n",
cname, cname, cdef->classname.constData());
}
for (int i = 0; i < cdef->interfaceList.size(); ++i) {
const QList<ClassDef::Interface> &iface = cdef->interfaceList.at(i);
for (int j = 0; j < iface.size(); ++j) {
- fprintf(out, " if (!strcmp(_clname, %s))\n return ", iface.at(j).interfaceId.constData());
+ fprintf(out, " if (strcmp(_clname, %s) == 0)\n return ", iface.at(j).interfaceId.constData());
for (int k = j; k >= 0; --k)
fprintf(out, "static_cast<%s*>(", iface.at(k).className.constData());
fprintf(out, "const_cast<%s*>(this)%s;\n",