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
Mathias Hasselmann 2015-02-09 10:10:14 +01:00 committed by Andreas Hartmetz
parent 63e017ee77
commit e300efe6ee
1 changed files with 1 additions and 1 deletions

View File

@ -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;