[vlc-commits] [Git][videolan/vlc][master] qt: fix property `UpdateModel::explicitCheck` can not be reset from QML
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Jul 27 12:22:28 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a3bec70d by Fatih Uzunoglu at 2026-07-27T11:46:01+00:00
qt: fix property `UpdateModel::explicitCheck` can not be reset from QML
By adding a workaround for QML engine bug where it prints the
error:
TypeError: Cannot assign to read-only property "explicitCheck"
This error is not correct, because although the property does
not have WRITE method, it has the RESET method. The docs state
that assigning a property `undefined` would call the RESET
method, but it does not happen if the property also does not
have WRITE method.
- - - - -
1 changed file:
- modules/gui/qt/dialogs/help/help.hpp
Changes:
=====================================
modules/gui/qt/dialogs/help/help.hpp
=====================================
@@ -95,7 +95,7 @@ public:
Q_PROPERTY(QString description READ getDescription NOTIFY updateStatusChanged FINAL)
Q_PROPERTY(QString url READ getUrl NOTIFY updateStatusChanged FINAL)
Q_PROPERTY(double progress READ getProgress NOTIFY progressChanged FINAL) // TODO
- Q_PROPERTY(bool explicitCheck READ explicitCheck RESET resetExplicitCheck NOTIFY explicitCheckChanged FINAL)
+ Q_PROPERTY(bool explicitCheck READ explicitCheck WRITE _setExplicitCheck RESET resetExplicitCheck NOTIFY explicitCheckChanged FINAL)
public:
explicit UpdateModel(qt_intf_t * p_intf);
@@ -125,6 +125,14 @@ signals:
void explicitCheckChanged();
private:
+ void _setExplicitCheck(bool) const
+ {
+ // This method is added as a workaround for QML engine bug
+ // where the property can't be reset, if it does not have
+ // WRITE method. Do not use it.
+ assert(false);
+ }
+
Q_DECLARE_PRIVATE(UpdateModel)
QScopedPointer<UpdateModelPrivate> d_ptr;
};
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a3bec70d2550dcfe4cdeb1b0a5bc8533b3967621
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a3bec70d2550dcfe4cdeb1b0a5bc8533b3967621
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list