mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
avoid popups for some non-serious warnings
This commit is contained in:
parent
478ee66d0e
commit
df4aad50e1
2 changed files with 2 additions and 2 deletions
|
@ -292,7 +292,7 @@ close the profile or restart Anki."""))
|
||||||
if getattr(w, "silentlyClose", None):
|
if getattr(w, "silentlyClose", None):
|
||||||
w.close()
|
w.close()
|
||||||
else:
|
else:
|
||||||
showWarning("Window should have been closed: {}".format(w))
|
print("Window should have been closed: {}".format(w))
|
||||||
|
|
||||||
def unloadProfileAndExit(self):
|
def unloadProfileAndExit(self):
|
||||||
self.unloadProfile(self.cleanupAndExit)
|
self.unloadProfile(self.cleanupAndExit)
|
||||||
|
|
|
@ -75,7 +75,7 @@ class AnkiWebPage(QWebEnginePage):
|
||||||
# catch buggy <a href='#' onclick='func()'> links
|
# catch buggy <a href='#' onclick='func()'> links
|
||||||
from aqt import mw
|
from aqt import mw
|
||||||
if url.matches(QUrl(mw.serverURL()), QUrl.RemoveFragment):
|
if url.matches(QUrl(mw.serverURL()), QUrl.RemoveFragment):
|
||||||
sys.stderr.write("onclick handler needs to return false\n")
|
print("onclick handler needs to return false")
|
||||||
return False
|
return False
|
||||||
# load all other links in browser
|
# load all other links in browser
|
||||||
openLink(url)
|
openLink(url)
|
||||||
|
|
Loading…
Reference in a new issue