fix: Correct window flag type for close button hint in update dialogs
This commit is contained in:
parent
41549848ed
commit
50311139bf
2 changed files with 5 additions and 4 deletions
|
|
@ -13,6 +13,7 @@ import logging
|
|||
from pathlib import Path
|
||||
|
||||
from PySide6.QtCore import Qt, Signal
|
||||
from PySide6.QtGui import QIcon
|
||||
from PySide6.QtWidgets import (
|
||||
QDialog,
|
||||
QHBoxLayout,
|
||||
|
|
@ -43,7 +44,7 @@ class CheckingDialog(QDialog):
|
|||
self.setWindowTitle("Checking for Updates")
|
||||
self.setModal(True)
|
||||
self.setMinimumWidth(300)
|
||||
self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint)
|
||||
self.setWindowFlags(self.windowFlags() & ~Qt.WindowType.WindowCloseButtonHint)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
|
||||
|
|
@ -165,7 +166,7 @@ class DownloadingDialog(QDialog):
|
|||
self.setWindowTitle("Downloading Update")
|
||||
self.setModal(True)
|
||||
self.setMinimumWidth(350)
|
||||
self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint)
|
||||
self.setWindowFlags(self.windowFlags() & ~Qt.WindowType.WindowCloseButtonHint)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class TestCheckingDialog:
|
|||
"""Test dialog has no close button."""
|
||||
dialog = CheckingDialog()
|
||||
# WindowCloseButtonHint should be removed
|
||||
assert not (dialog.windowFlags() & Qt.WindowCloseButtonHint)
|
||||
assert not (dialog.windowFlags() & Qt.WindowType.WindowCloseButtonHint)
|
||||
|
||||
|
||||
class TestUpdateAvailableDialog:
|
||||
|
|
@ -141,7 +141,7 @@ class TestDownloadingDialog:
|
|||
def test_no_close_button(self, qapp):
|
||||
"""Test dialog has no close button."""
|
||||
dialog = DownloadingDialog()
|
||||
assert not (dialog.windowFlags() & Qt.WindowCloseButtonHint)
|
||||
assert not (dialog.windowFlags() & Qt.WindowType.WindowCloseButtonHint)
|
||||
|
||||
|
||||
class TestInstallDialog:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue