mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-07-21 21:16:20 +02:00
fix: remove deprecated methods
This commit is contained in:
@@ -8,10 +8,8 @@ from warnings import catch_warnings
|
||||
import structlog
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtWidgets import QMessageBox, QWidget
|
||||
from typing_extensions import deprecated
|
||||
|
||||
from tagstudio.core.constants import RESERVED_TAG_END, RESERVED_TAG_START
|
||||
from tagstudio.core.library.alchemy.enums import BrowsingState
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Tag
|
||||
from tagstudio.qt.controllers.modal import Modal
|
||||
@@ -193,17 +191,6 @@ class TagSearchPanel(SearchPanel[Tag]):
|
||||
)
|
||||
self.update_items(self.layout().search_field.text())
|
||||
|
||||
@deprecated("Put this callback in the driver!")
|
||||
def _search_for_tag_callback(self, tag_id: int) -> None:
|
||||
if self._driver is None:
|
||||
return
|
||||
|
||||
# TODO: This should be a callback, the driver does not need to be passed for this.
|
||||
self._driver.main_window.search_field.setText(f"tag_id:{tag_id}")
|
||||
self._driver.update_browsing_state(
|
||||
BrowsingState.from_tag_id(tag_id, self._driver.browsing_history.current)
|
||||
)
|
||||
|
||||
@override
|
||||
def get_item_widget(self, index: int, library: Library | None) -> TagWidget:
|
||||
"""Gets the item widget at a specific index."""
|
||||
|
||||
@@ -9,7 +9,6 @@ import structlog
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtGui import QAction, Qt
|
||||
from PySide6.QtWidgets import QGraphicsOpacityEffect, QWidget
|
||||
from typing_extensions import deprecated
|
||||
|
||||
from tagstudio.core.library.alchemy.library import Library
|
||||
from tagstudio.core.library.alchemy.models import Tag
|
||||
@@ -46,15 +45,6 @@ class TagSuggestBox(SuggestBox[Tag]):
|
||||
lambda checked: self.toggle_edit_on_tag_create(checked)
|
||||
)
|
||||
|
||||
@deprecated("Put this callback in the driver!")
|
||||
def _search_for_tag_callback(self, tag_id: int) -> None:
|
||||
# TODO: This should be a callback, the driver does not need to be passed for this.
|
||||
# self._driver.main_window.search_field.setText(f"tag_id:{tag_id}")
|
||||
# self._driver.update_browsing_state(
|
||||
# BrowsingState.from_tag_id(tag_id, self._driver.browsing_history.current)
|
||||
# )
|
||||
pass
|
||||
|
||||
def toggle_edit_on_tag_create(self, checked: bool) -> None:
|
||||
"""Toggle the setting for opening the edit window after creating a tag."""
|
||||
self._settings.edit_tag_on_create = checked
|
||||
|
||||
Reference in New Issue
Block a user