diff --git a/app/components/search_line_edit.py b/app/components/search_line_edit.py index df881c30..13db7009 100644 --- a/app/components/search_line_edit.py +++ b/app/components/search_line_edit.py @@ -59,7 +59,6 @@ def __init__(self, parent=None): completer = QCompleter([], self) completer.setCaseSensitivity(Qt.CaseInsensitive) completer.setMaxVisibleItems(10) - completer.setFilterMode(Qt.MatchFlag.MatchFixedString) completer.setCompletionRole(Qt.DisplayRole) completer.setCompletionMode(QCompleter.UnfilteredPopupCompletion) self.setCompleter(completer) diff --git a/app/lol/connector.py b/app/lol/connector.py index c2e05e9a..f256c690 100644 --- a/app/lol/connector.py +++ b/app/lol/connector.py @@ -38,18 +38,20 @@ def wrapper(*args, **kwargs): def retry(count=5, retry_sep=0.5): def decorator(func): def wrapper(*args, **kwargs): + exce = None for _ in range(count): try: res = func(*args, **kwargs) - except Exception as e: + except BaseException as e: time.sleep(retry_sep) + exce = e continue else: break else: - # FIXME 任何异常都将以 timeout 抛出 connector.timeoutApi = func.__name__ - raise Exception("Exceeded maximum retry attempts.") + raise exce + # raise Exception("Exceeded maximum retry attempts.") return res diff --git a/app/resource/icons/Update_black.svg b/app/resource/icons/Update_black.svg new file mode 100644 index 00000000..6575c949 --- /dev/null +++ b/app/resource/icons/Update_black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/resource/icons/Update_white.svg b/app/resource/icons/Update_white.svg new file mode 100644 index 00000000..f8bb92d3 --- /dev/null +++ b/app/resource/icons/Update_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/view/main_window.py b/app/view/main_window.py index c0c559e2..6913803c 100644 --- a/app/view/main_window.py +++ b/app/view/main_window.py @@ -79,7 +79,7 @@ def __init__(self): self.splashScreen.finish() threading.Thread(target=self.checkUpdate).start() - threading.Thread(target=self.pollingConnectTimeout).start() + threading.Thread(target=self.pollingConnectTimeout, daemon=True).start() def __initInterface(self): self.__lockInterface() diff --git a/app/view/search_interface.py b/app/view/search_interface.py index a360cf13..d282987d 100644 --- a/app/view/search_interface.py +++ b/app/view/search_interface.py @@ -1101,7 +1101,9 @@ def loadGames(self, puuid): return if not games["games"]: # 所有对局都在一年内, 查完了 - self.gamesNotFound.emit() + if not self.games: # 未能查到任何一盘对局, 提示一下 + self.gamesNotFound.emit() + return for game in games["games"]: