About Domain Specific Settings

Koos Vriezen koos.vriezen at xs4all.nl
Wed Feb 11 19:31:14 GMT 2004


Hi,

Why is $SUBJECT implemented as a match on .site.com (and not site.com) in case
of a partial match. In khtml_settings.cc matching is done like:

  QString host_part = hostname;
  int dot_idx = -1;
  while( (dot_idx = host_part.find(QChar('.'))) >= 0 ) {
    host_part.remove(0,dot_idx);
    it = d->domainPolicy.find(host_part);
    ...
    host_part.remove(0,1); // Chop off the dot.
  }

For me it would be more clear if it was

  QString host_part = hostname;
  int dot_idx = -1;
  while( (dot_idx = host_part.find(QChar('.'))) >= 0 ) {
    host_part.remove(0,dot_idx+1);
    it = d->domainPolicy.find(host_part);
    ...
  }

Ok, now I know I should enter .site.com after looking in the source :), but
is that for everyone the most obvious?

Koos




More information about the kfm-devel mailing list