bool ExpressionValue::isCompatibleWidth(ExpressionValue& other) const { if(!matchesType(other._isPrimitive)) { return false; } else if(!matchesDimensions(other._dimensions)) { return false; } else if(!matchesPrimitiveType(other._primitiveType)) { return false; } return true; }
bool ExpressionValue::isCompatibleWidth(SymbolType& other) const { if(!matchesType(other.isPrimitive())) { return false; } else if(!matchesDimensions(other.dimensions())) { return false; } else if(!matchesPrimitiveType(other.primitiveType())) { return false; } return true; }
bool KFileItemModelFilter::matches(const KFileItem& item) const { const bool hasPatternFilter = !m_pattern.isEmpty(); const bool hasMimeTypesFilter = !m_mimeTypes.isEmpty(); // If no filter is set, return true. if (!hasPatternFilter && !hasMimeTypesFilter) { return true; } // If both filters are set, return true when both filters are matched if (hasPatternFilter && hasMimeTypesFilter) { return (matchesPattern(item) && matchesType(item)); } // If only one filter is set, return true when that filter is matched if (hasPatternFilter) { return matchesPattern(item); } return matchesType(item); }