-
Martin Flöser authored
The Xcb::Property can wrap the xcb_get_property call and provides convenient access methods to read the value of the reply with checks applied. For this it provides a templated ::value method for reading a single value or reading an array. There's also a ::toBool and ::toByteArray which performs the conversion directly with default values for the type and format checks. Xcb::TransientFor is changed to be derived from Property instead of Wrapper directly, so that the reading of the property value can be shared. Xcb::StringProperty is a convenient wrapper derived from Property to handle the reading of a string property providing a cast to QByteArray operator. This replaces the ::getStringProperty from utils. Though the separator functionality from ::getStringProperty is not provided as that is only used in one function and handled there. All the custom usages of xcb_get_property or getStringProperty are replaced to use this new wrapper. That simplifies the code and ensures that all properties are read in the same way. REVIEW: 117574
b45eeae3