Loading...
Searching...
No Matches
JS::GlobalDeviceEnumerator Class Reference
Inheritance diagram for JS::GlobalDeviceEnumerator:

Detailed Description

QML writes enumerate and the filter in an order the author cannot choose: literals before script bindings, and two literals in reverse source order (qqmlirbuilder.cpp, QmlIR::Object::appendBinding prepends). Enumerating unfiltered is expensive and on Windows deadlocks, so the walk waits for componentComplete(), after finalize() has converged every binding. Only QML object creation defers; Score.enumerateDevices() still walks on the write.

Public Member Functions

 GlobalDeviceEnumerator ()
 
void classBegin () override
 
void componentComplete () override
 
void setContext (const score::DocumentContext *doc)
 
void deviceAdded (Device::ProtocolFactory *factory, const QString &category, const QString &name, Device::DeviceSettings settings)
 
void deviceRemoved (Device::ProtocolFactory *factory, const QString &name)
 
QQmlListProperty< JS::DeviceIdentifier > devices ()
 
bool enumerate ()
 
void setEnumerate (bool b)
 
void enumerateChanged (bool b)
 
QString deviceType () const
 
void setDeviceType (const QString &b)
 
void deviceTypeChanged (const QString &b)
 
QStringList deviceTypes () const
 
void setDeviceTypes (const QStringList &b)
 
void deviceTypesChanged (const QStringList &b)
 

Friends

constexpr auto w_state (w_internal::Index< w_internal::stateCount< __COUNTER__, w_internal::InterfaceStateTag, W_ThisType ** > >, w_internal::InterfaceStateTag, W_ThisType **) -> decltype((static_cast< QQmlParserStatus * >(nullptr)))
 
constexpr auto w_state (w_internal::Index< w_internal::stateCount< __COUNTER__, w_internal::PropertyStateTag, W_ThisType ** > >, w_internal::PropertyStateTag, W_ThisType **) -> decltype((w_internal::makeMetaPropertyInfo< QQmlListProperty< JS::DeviceIdentifier > >(w_internal::viewLiteral("devices"), w_internal::viewLiteral("QQmlListProperty<JS::DeviceIdentifier>"), &W_ThisType::devices)))
 
constexpr auto w_state (w_internal::Index< w_internal::stateCount< __COUNTER__, w_internal::PropertyStateTag, W_ThisType ** > >, w_internal::PropertyStateTag, W_ThisType **) -> decltype((w_internal::makeMetaPropertyInfo< bool >(w_internal::viewLiteral("enumerate"), w_internal::viewLiteral("bool"), &W_ThisType::enumerate, &W_ThisType::setEnumerate, W_Notify, &W_ThisType::enumerateChanged)))
 
constexpr auto w_state (w_internal::Index< w_internal::stateCount< __COUNTER__, w_internal::PropertyStateTag, W_ThisType ** > >, w_internal::PropertyStateTag, W_ThisType **) -> decltype((w_internal::makeMetaPropertyInfo< QString >(w_internal::viewLiteral("deviceType"), w_internal::viewLiteral("QString"), &W_ThisType::deviceType, &W_ThisType::setDeviceType, W_Notify, &W_ThisType::deviceTypeChanged)))
 
constexpr auto w_state (w_internal::Index< w_internal::stateCount< __COUNTER__, w_internal::PropertyStateTag, W_ThisType ** > >, w_internal::PropertyStateTag, W_ThisType **) -> decltype((w_internal::makeMetaPropertyInfo< QStringList >(w_internal::viewLiteral("deviceTypes"), w_internal::viewLiteral("QStringList"), &W_ThisType::deviceTypes, &W_ThisType::setDeviceTypes, W_Notify, &W_ThisType::deviceTypesChanged)))
 

Constructor & Destructor Documentation

◆ GlobalDeviceEnumerator()

JS::GlobalDeviceEnumerator::GlobalDeviceEnumerator ( )
explicit

var e = Score.enumerateDevices(); e.enumerate = true; console.log(e.devices);


The documentation for this class was generated from the following files: