[vlc-commits] [Git][videolan/vlc][master] 3 commits: qt: fix not resetting explicit update check flag on update pane dismissal

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Nov 7 10:21:56 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
b676e94f by Fatih Uzunoglu at 2026-11-07T11:07:29+01:00
qt: fix not resetting explicit update check flag on update pane dismissal

- - - - -
a1e70a27 by Fatih Uzunoglu at 2026-11-07T11:07:29+01:00
qt: move last update status on dismissal to update model's context

This makes sense in itself, since the user may acknowledge the
update through either the modern update pane, or the legacy dialog.

At the same time, since the update pane belongs to `MainDisplay`,
switching interface modes (such as switching to player mode)
makes the update pane lose its last update status on dismissal
due to destruction, which leads to triggering the pane again.

The property is also renamed to `updateStatusOnAcknowledgment`,
since we want to also set it on showing the legacy update dialog
and not necessarily only when dismissed (unlike the update pane,
since legacy update dialog is an independent window). Any updates
reflected in the legacy dialog is treated to be acknowledged,
while in the modern update pane only dismissal (proceed to update
or clicking close button) means that the status is acknowledged.

- - - - -
9c100280 by Fatih Uzunoglu at 2026-11-07T11:07:29+01:00
qml: do not show modern update pane if the legacy dialog is visible

- - - - -


4 changed files:

- modules/gui/qt/dialogs/help/help.cpp
- modules/gui/qt/dialogs/help/help.hpp
- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/qml/MainDisplay.qml


Changes:

=====================================
modules/gui/qt/dialogs/help/help.cpp
=====================================
@@ -194,6 +194,7 @@ public:
 
     const update_release_t* m_release = nullptr;
     UpdateModel::Status m_status = UpdateModel::Unchecked;
+    UpdateModel::Status m_updateStatusOnAcknowledgment = UpdateModel::Unchecked;
     bool m_explicitCheck = false;
 
     UpdateModel* q_ptr = nullptr;
@@ -385,6 +386,23 @@ void UpdateModel::resetExplicitCheck()
     emit explicitCheckChanged();
 }
 
+UpdateModel::Status UpdateModel::updateStatusOnAcknowledgment() const
+{
+    Q_D(const UpdateModel);
+    return d->m_updateStatusOnAcknowledgment;
+}
+
+void UpdateModel::setUpdateStatusOnAcknowledgment(UpdateModel::Status status)
+{
+    Q_D(UpdateModel);
+
+    if (d->m_updateStatusOnAcknowledgment == status)
+        return;
+
+    d->m_updateStatusOnAcknowledgment = status;
+    emit updateStatusOnAcknowledgmentChanged(status);
+}
+
 /*****************************************************************************
  * UpdateDialog
  *****************************************************************************/
@@ -441,6 +459,7 @@ bool UpdateDialog::event(QEvent* event)
         case QEvent::Close:
         case QEvent::Destroy:
             m_model->resetExplicitCheck();
+            m_model->setUpdateStatusOnAcknowledgment(m_model->updateStatus());
             break;
         default:
             break;
@@ -534,6 +553,8 @@ void UpdateDialog::updateUI( )
 
     if (isVisible())
     {
+        m_model->setUpdateStatusOnAcknowledgment(m_model->updateStatus());
+
         if (const auto w = windowHandle())
         {
             w->alert(0);


=====================================
modules/gui/qt/dialogs/help/help.hpp
=====================================
@@ -88,6 +88,7 @@ public:
     Q_ENUM(Status)
 
     Q_PROPERTY(Status updateStatus READ updateStatus RESET resetStatus NOTIFY updateStatusChanged FINAL)
+    Q_PROPERTY(Status updateStatusOnAcknowledgment READ updateStatusOnAcknowledgment WRITE setUpdateStatusOnAcknowledgment NOTIFY updateStatusOnAcknowledgmentChanged FINAL)
     Q_PROPERTY(int major READ getMajor NOTIFY updateStatusChanged FINAL)
     Q_PROPERTY(int minor READ getMinor NOTIFY updateStatusChanged FINAL)
     Q_PROPERTY(int revision READ getRevision NOTIFY updateStatusChanged FINAL)
@@ -118,11 +119,14 @@ public:
     double getProgress() const;
     bool explicitCheck() const;
     void resetExplicitCheck();
+    Status updateStatusOnAcknowledgment() const;
+    void setUpdateStatusOnAcknowledgment(Status status);
 
 signals:
     void updateStatusChanged();
     void progressChanged();
     void explicitCheckChanged();
+    void updateStatusOnAcknowledgmentChanged(UpdateModel::Status);
 
 private:
     void _setExplicitCheck(bool) const


=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -1293,6 +1293,9 @@ UpdateModel* MainCtx::getUpdateModel() const
             }
             else
             {
+                if (m_updateModel->updateStatus() == m_updateModel->updateStatusOnAcknowledgment())
+                    return; // already dismissed with the same status
+
                 switch (m_updateModel->updateStatus())
                 {
                 case UpdateModel::UpToDate:


=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -870,16 +870,17 @@ FocusScope {
 
         focus: !!item
 
-        property int _updateStatusOnDismissal: -1
-
         readonly property bool shouldShow: {
             if (!updateModelIsAvailable)
                 return false
 
+            if (DialogsProvider.updateDialogVisible)
+                return false
+
             if (UpdateModel.explicitCheck) {
                 return (UpdateModel.updateStatus !== UpdateModel.Unchecked)
             } else {
-                if (UpdateModel.updateStatus === _updateStatusOnDismissal)
+                if (UpdateModel.updateStatus === UpdateModel.updateStatusOnAcknowledgment)
                     return false // already dismissed with the same status
 
                 switch (UpdateModel.updateStatus) {
@@ -898,8 +899,10 @@ FocusScope {
 
         function dismiss() {
             // This could be also be an assertion:
-            if (updateModelIsAvailable)
-                _updateStatusOnDismissal = UpdateModel.updateStatus
+            if (updateModelIsAvailable) {
+                UpdateModel.updateStatusOnAcknowledgment = UpdateModel.updateStatus
+                UpdateModel.explicitCheck = undefined // Resets the property
+            }
 
             height = 0.0
         }
@@ -909,12 +912,6 @@ FocusScope {
                 height = Qt.binding(() => { return implicitHeight })
         }
 
-        onActiveChanged: {
-            if (updateModelIsAvailable && !active) {
-                UpdateModel.explicitCheck = undefined // Resets the property
-            }
-        }
-
         clip: (height < implicitHeight)
 
         Behavior on height {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e892cb38b7a86b28f6e66d709d357bfd1f52e8ea...9c100280e9766787da4f2a1444bbd47e0eea4243

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e892cb38b7a86b28f6e66d709d357bfd1f52e8ea...9c100280e9766787da4f2a1444bbd47e0eea4243
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