Qt5->Qt6: Replace QT_ENUMS with pyqtEnum.

part of CURA-8591
This commit is contained in:
Remco Burema 2021-12-28 14:59:25 +01:00
parent 32b52c6166
commit 7021ff0b67
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
3 changed files with 10 additions and 10 deletions

View file

@ -1,8 +1,8 @@
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import enum
from datetime import datetime
from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, Q_ENUMS
from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, pyqtEnum
from typing import Any, Optional, Dict, TYPE_CHECKING, Callable
from UM.Logger import Logger
@ -18,7 +18,7 @@ if TYPE_CHECKING:
i18n_catalog = i18nCatalog("cura")
class SyncState:
class SyncState(enum.IntEnum):
"""QML: Cura.AccountSyncState"""
SYNCING = 0
SUCCESS = 1
@ -41,7 +41,7 @@ class Account(QObject):
# The interval in which sync services are automatically triggered
SYNC_INTERVAL = 60.0 # seconds
Q_ENUMS(SyncState)
pyqtEnum(SyncState)
loginStateChanged = pyqtSignal(bool)
"""Signal emitted when user logged in or out"""