int QEglFSHooks::framebufferIndex() const { int fbIndex = 0; QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)")); QRegularExpressionMatch match = fbIndexRx.match(fbDeviceName()); if (match.hasMatch()) fbIndex = match.captured(1).toInt(); return fbIndex; }
int QEGLDeviceIntegration::framebufferIndex() const { int fbIndex = 0; #ifndef QT_NO_REGULAREXPRESSION QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)")); QRegularExpressionMatch match = fbIndexRx.match(QString::fromLocal8Bit(fbDeviceName())); if (match.hasMatch()) fbIndex = match.captured(1).toInt(); #endif return fbIndex; }