rem: return Invalid;
add: return Intermediate;
context:     virtual State validate(QString& str, int& /*cursorPos*/) const    {        int length = str.length();        // empty string is intermediate so one can clear the edit line and start from scratch        if ( length <= 0 )             return Intermediate;                bool ok = false;        /*QTime time =*/ KGlobal::locale()->readTime(str, KLocale::WithoutSeconds, &ok);        if ( ok )            return Acceptable;//         kdDebug(5300)<<"Time "<<str<<" not directly acceptable, trying military format "<<endl;        // Also try to accept times in "military format", i.e. no delimiter, like 1200        int tm = str.toInt( &ok );        if ( ok && ( 0 <= tm ) ) {          if ( ( tm < 2400 ) && ( tm%100 < 60 ) )            return Acceptable;          else             return Intermediate;        }//         kdDebug(5300)<<str<<" not acceptable or intermediate for military format, either "<<str<<endl;                // readTime doesn't help knowing when the string is "Intermediate".        // HACK. Not fully locale aware etc. (esp. the separator is '.' in sv_SE...)        QChar sep = ':';        // I want to allow "HH:", ":MM" and ":" to make editing easier        if ( str[0] == sep )        {            if ( length == 1 ) // just ":"                return Intermediate;            QString minutes = str.mid(1);            int m = minutes.toInt(&ok);            if ( ok && m >= 0 && m < 60 )                return Intermediate;        } else if ( str[str.length()-1] == sep )        {            QString hours = str.left(length-1);            int h = hours.toInt(&ok);            if ( ok && h >= 0 && h < 24 )                return Intermediate;        }        return Invalid;    }