eglfs: obey QT_NO_REGULAREXPRESSION define

Not all platforms do have QRegularExpression as it is based on
pcre.

Change-Id: I6b8e701ff7cf30e776ee34e5dc836cd24c9543b5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Pasi Petäjäjärvi 2014-10-08 15:11:31 +03:00
parent 30d9498329
commit 79f832594d

View File

@ -63,11 +63,13 @@ QByteArray QEglFSHooks::fbDeviceName() const
int QEglFSHooks::framebufferIndex() const
{
int fbIndex = 0;
#ifndef QT_NO_REGULAREXPRESSION
QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)"));
QRegularExpressionMatch match = fbIndexRx.match(fbDeviceName());
if (match.hasMatch())
fbIndex = match.captured(1).toInt();
#endif
return fbIndex;
}