Fix compile error under Qt 5.0

QStringRef::toInt() and QStringRef::toDouble() are introduced in Qt 5.1