https://bugs.kde.org/show_bug.cgi?id=421201

--- Comment #1 from Urs Fleisch <uflei...@users.sourceforge.net> ---
Thanks for the report. Are you sure that it is really "QM2DP2000004" which is
not accepted as an ISRC? I cannot reproduce it. The code which checks ISRC code
is simple (see below), it basically checks if

- the length is 12,
- the first five characters are letters or numbers,
- the last seven characters are numbers.

All this is true for "QM2DP2000004" and therefore I do not see any red
highlight.

~~~
bool isIsrc(const QString& str)
{
  if (str.length() != 12)
    return false;

  for (int i = 0; i < 5; ++i) {
    if (!str.at(i).isLetterOrNumber()) {
      return false;
    }
  }
  for (int i = 5; i < 12; ++i) {
    if (!str.at(i).isDigit()) {
      return false;
    }
  }
  return true;
}
~~~

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to