add note why style plugins object name is set if empty

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-12-12 11:18:06 +00:00
parent 9cd0fceec3
commit d2a4590963

View file

@ -106,8 +106,8 @@ QStyle *QStyleFactory::create(const QString& key)
if (QStyleFactoryInterface *factory = qobject_cast<QStyleFactoryInterface*>(stylesloader()->instance(key))) {
QStyle *ret = factory->create(key);
if (ret) {
QString retObjName = ret->objectName();
if (retObjName.isEmpty()) {
// QApplicationPrivate::x11_apply_settings() relies on object name
if (ret->objectName().isEmpty()) {
ret->setObjectName(key);
}
return ret;