Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/iokit/cfhelper.cpp
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 88 | if (CFNumberIsFloatType(num)) { | |||
---|---|---|---|---|---|
89 | return qVariantFromValue(convertCFNumber<double>(num, kCFNumberDoubleType)); | 89 | return qVariantFromValue(convertCFNumber<double>(num, kCFNumberDoubleType)); | ||
90 | } | 90 | } | ||
91 | return qVariantFromValue(convertCFNumber<quint64>(num, kCFNumberLongLongType)); | 91 | return qVariantFromValue(convertCFNumber<quint64>(num, kCFNumberLongLongType)); | ||
92 | } | 92 | } | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | if (typeId == CFDateGetTypeID()) { | 95 | if (typeId == CFDateGetTypeID()) { | ||
96 | QDateTime dt; | 96 | QDateTime dt; | ||
97 | dt.setTime_t(uint(kCFAbsoluteTimeIntervalSince1970)); | 97 | dt.setSecsSinceEpoch(qint64(kCFAbsoluteTimeIntervalSince1970)); | ||
98 | return dt.addSecs(int(CFDateGetAbsoluteTime(static_cast<const CFDateRef>(obj)))); | 98 | return dt.addSecs(int(CFDateGetAbsoluteTime(static_cast<const CFDateRef>(obj)))); | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | if (typeId == CFDataGetTypeID()) { | 101 | if (typeId == CFDataGetTypeID()) { | ||
102 | const CFDataRef cfdata = static_cast<const CFDataRef>(obj); | 102 | const CFDataRef cfdata = static_cast<const CFDataRef>(obj); | ||
103 | return QByteArray(reinterpret_cast<const char *>(CFDataGetBytePtr(cfdata)), | 103 | return QByteArray(reinterpret_cast<const char *>(CFDataGetBytePtr(cfdata)), | ||
104 | CFDataGetLength(cfdata)); | 104 | CFDataGetLength(cfdata)); | ||
105 | } | 105 | } | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |