File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ FloatingWindow {
2323 CheckBox {
2424 text: " Software"
2525 checked: Network .wifi .enabled
26- onClicked: Network .wifi .setEnabled ( ! Network .wifi .enabled )
26+ onClicked: Network .wifi .enabled = ! Network .wifi .enabled
2727 }
2828 CheckBox {
2929 enabled: false
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class Wifi: public QObject {
114114 Q_PROPERTY (UntypedObjectModel* devices READ devices CONSTANT);
115115 QSDOC_TYPE_OVERRIDE (ObjectModel<qs::network::WifiDevice>*);
116116 // / True when the wifi software switch is enabled.
117- Q_PROPERTY (bool enabled READ enabled NOTIFY enabledChanged BINDABLE bindableEnabled );
117+ Q_PROPERTY (bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged );
118118 // / True when the wifi hardware switch is enabled.
119119 Q_PROPERTY (bool hardwareEnabled READ hardwareEnabled NOTIFY hardwareEnabledChanged BINDABLE bindableHardwareEnabled);
120120 // clang-format on
@@ -132,11 +132,9 @@ public slots:
132132public:
133133 explicit Wifi (QObject* parent = nullptr );
134134
135- // / Set the state of the wifi software switch.
136- Q_INVOKABLE void setEnabled (bool enabled);
137-
138135 [[nodiscard]] ObjectModel<WifiDevice>* devices () { return &this ->mDevices ; };
139136 [[nodiscard]] bool enabled () const { return this ->bEnabled ; };
137+ void setEnabled (bool enabled);
140138 [[nodiscard]] bool hardwareEnabled () const { return this ->bHardwareEnabled ; };
141139 QBindable<bool > bindableEnabled () { return &this ->bEnabled ; };
142140 QBindable<bool > bindableHardwareEnabled () { return &this ->bHardwareEnabled ; };
You can’t perform that action at this time.
0 commit comments