Support for Qt5

This commit is contained in:
craig.p.drummond
2013-02-08 17:57:02 +00:00
committed by craig.p.drummond
parent 4e48b6b9ff
commit cb1d5b4b26
42 changed files with 594 additions and 128 deletions

View File

@@ -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;