# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only


from PySide6.QtWidgets import QPushButton
from typing_extensions import deprecated


@deprecated("Use QPushButton with 'catch warnings' to silence disconnect warnings instead.")
class QPushButtonWrapper(QPushButton):
    """Custom QPushButton wrapper.

    This is a customized implementation of the PySide6 QPushButton that allows to suppress
    the warning that is triggered by disconnecting a signal that is not currently connected.
    """

    is_connected: bool

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.is_connected = False
