Преглед на файлове

getMatchedObjectClasses does not collect class names

Bug that prevent to collect "objectclass" values because if the result of compare is 0, 0 is interpreted as "false". The result is that all fields value that does not correspond to objectclass are inserted. This is the inverse of what we want.
Yann Zimmermann преди 7 години
родител
ревизия
b50ab4c33b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Libs/PluginFramework/ctkLDAPExpr.cpp

+ 1 - 1
Libs/PluginFramework/ctkLDAPExpr.cpp

@@ -189,7 +189,7 @@ bool ctkLDAPExpr::getMatchedObjectClasses(QSet<QString>& objClasses) const
 {
   if (d->m_operator == EQ)
   {
-    if (d->m_attrName.compare(ctkPluginConstants::OBJECTCLASS, Qt::CaseInsensitive) &&
+    if (d->m_attrName.compare(ctkPluginConstants::OBJECTCLASS, Qt::CaseInsensitive) == 0 &&
       d->m_attrValue.indexOf(WILDCARD) < 0) 
     {
       objClasses.insert( d->m_attrValue );