Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
b50ab4c33b
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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 );