Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_object.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | { | 45 | { | ||
46 | m_propsNames = std::move(vector); | 46 | m_propsNames = std::move(vector); | ||
47 | m_props.fill(nullptr, m_propsNames.size()); | 47 | m_props.fill(nullptr, m_propsNames.size()); | ||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | void DrmObject::initProp(int n, drmModeObjectProperties *properties, QVector<QByteArray> enumNames) | 50 | void DrmObject::initProp(int n, drmModeObjectProperties *properties, QVector<QByteArray> enumNames) | ||
51 | { | 51 | { | ||
52 | for (unsigned int i = 0; i < properties->count_props; ++i) { | 52 | for (unsigned int i = 0; i < properties->count_props; ++i) { | ||
53 | ScopedDrmPointer<drmModePropertyRes, drmModeFreeProperty> prop( | 53 | DrmScopedPointer<drmModePropertyRes> prop( | ||
54 | drmModeGetProperty(fd(), properties->props[i])); | 54 | drmModeGetProperty(fd(), properties->props[i])); | ||
55 | if (!prop) { | 55 | if (!prop) { | ||
56 | continue; | 56 | continue; | ||
57 | } | 57 | } | ||
58 | if (prop->name == m_propsNames[n]) { | 58 | if (prop->name == m_propsNames[n]) { | ||
59 | qCDebug(KWIN_DRM).nospace() << m_id << ": " << prop->name << "' (id " << prop->prop_id | 59 | qCDebug(KWIN_DRM).nospace() << m_id << ": " << prop->name << "' (id " << prop->prop_id | ||
60 | << "): " << properties->prop_values[i]; | 60 | << "): " << properties->prop_values[i]; | ||
61 | m_props[n] = new Property(prop.data(), properties->prop_values[i], enumNames); | 61 | m_props[n] = new Property(prop.data(), properties->prop_values[i], enumNames); | ||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |