| 54 | } |
| 55 | |
| 56 | void PropertyWidget::setObjectBaseName(const QString &baseName) |
| 57 | { |
| 58 | Q_ASSERT(m_objectBaseName.isEmpty()); // ideally the object base name would be a ctor argument, but then this doesn't work in Designer anymore |
| 59 | m_objectBaseName = baseName; |
| 60 | |
| 61 | if (Endpoint::instance()->objectAddress(baseName + ".controller") |
| 62 | == Protocol::InvalidObjectAddress) |
| 63 | return; // unknown property controller, likely disabled/not supported on the server |
| 64 | |
| 65 | if (m_controller) |
| 66 | disconnect(m_controller, &PropertyControllerInterface::availableExtensionsChanged, this, |
| 67 | &PropertyWidget::updateShownTabs); |
| 68 | m_controller = ObjectBroker::object<PropertyControllerInterface *>( |
| 69 | m_objectBaseName + ".controller"); |
| 70 | connect(m_controller, &PropertyControllerInterface::availableExtensionsChanged, this, &PropertyWidget::updateShownTabs); |
| 71 | |
| 72 | updateShownTabs(); |
| 73 | } |
| 74 | |
| 75 | static void propertyWidgetCleanup() |
| 76 | { |
nothing calls this directly
no test coverage detected