Someone
public text v1 · immutablestatic int qVersionInt()
{
static int out = -1;
if(out == -1) {
QString str = QString::fromLatin1(qVersion());
QStringList parts = str.split('.', QString::KeepEmptyParts);
Q_ASSERT(parts.count() == 3);
out = 0;
for(int n = 0; n < 3; ++n) {
bool ok;
int x = parts[n].toInt(&ok);
Q_ASSERT(ok);
Q_ASSERT(x > 0 && x <= 0xff);
out <<= x;
}
}
return out;
}