OSX: Avoid !strcmp() anti pattern
People often complain that strcmp() like functions are confusing because they return false on equality and true on difference. Rightfully, because strcmp() like functions return three distinct values, not a boolean value. But I guess dear reviewer, you already know that story... Change-Id: Ie69093f61b55448010dc324d14c62faa27214238 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>bb10
parent
63e017ee77
commit
e300efe6ee
|
|
@ -53,7 +53,7 @@ QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, co
|
|||
Q_UNUSED(paramList);
|
||||
|
||||
QCocoaAutoReleasePool pool;
|
||||
if (!system.compare(QLatin1String("cocoa"), Qt::CaseInsensitive))
|
||||
if (system.compare(QLatin1String("cocoa"), Qt::CaseInsensitive) == 0)
|
||||
return new QCocoaIntegration;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue