Support for Qt5
This commit is contained in:
committed by
craig.p.drummond
parent
4e48b6b9ff
commit
cb1d5b4b26
@@ -90,7 +90,11 @@ bool UDevManager::Private::isOfInterest(const UdevQt::Device &device)
|
||||
QString path = device.deviceProperty("DEVPATH").toString();
|
||||
|
||||
int lastSlash = path.length() - path.lastIndexOf(QLatin1String("/")) -1;
|
||||
#if QT_VERSION < 0x050000
|
||||
QByteArray lastElement = path.right(lastSlash).toAscii();
|
||||
#else
|
||||
QByteArray lastElement = path.right(lastSlash).toLatin1();
|
||||
#endif
|
||||
|
||||
if (lastElement.startsWith("tty") && !path.startsWith("/devices/virtual")) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user