Skip to content

Commit

Permalink
Merge pull request #79 from Hpero4/main
Browse files Browse the repository at this point in the history
已知BUG修复
  • Loading branch information
Zzaphkiel authored Sep 24, 2023
2 parents 823e97d + b00d18e commit cae3ffe
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion app/components/search_line_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions app/lol/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions app/resource/icons/Update_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/resource/icons/Update_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion app/view/search_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit cae3ffe

Please sign in to comment.