mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
remove pyqtconfig usage (#831)
This commit is contained in:
parent
dd4bae6e8d
commit
a492e95aed
4 changed files with 3 additions and 9 deletions
|
@ -6,7 +6,6 @@ import os, sys, re, traceback, signal
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
QtConfig = pyqtconfig.Configuration()
|
|
||||||
|
|
||||||
from anki import Collection
|
from anki import Collection
|
||||||
from anki.utils import isWin, isMac, intTime
|
from anki.utils import isWin, isMac, intTime
|
||||||
|
|
|
@ -11,7 +11,6 @@ from PyQt4.QtCore import *
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings
|
from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings
|
||||||
from PyQt4.QtNetwork import QLocalServer, QLocalSocket
|
from PyQt4.QtNetwork import QLocalServer, QLocalSocket
|
||||||
from PyQt4 import pyqtconfig
|
|
||||||
|
|
||||||
def debug():
|
def debug():
|
||||||
from PyQt4.QtCore import pyqtRemoveInputHook
|
from PyQt4.QtCore import pyqtRemoveInputHook
|
||||||
|
@ -30,9 +29,8 @@ if os.environ.get("DEBUG"):
|
||||||
pm()
|
pm()
|
||||||
sys.excepthook = info
|
sys.excepthook = info
|
||||||
|
|
||||||
qtconf = pyqtconfig.Configuration()
|
qtmajor = (QT_VERSION & 0xff0000) >> 16
|
||||||
qtmajor = (qtconf.qt_version & 0xff0000) >> 16
|
qtminor = (QT_VERSION & 0x00ff00) >> 8
|
||||||
qtminor = (qtconf.qt_version & 0x00ff00) >> 8
|
|
||||||
|
|
||||||
# qt4.6 doesn't support ruby tags
|
# qt4.6 doesn't support ruby tags
|
||||||
if qtmajor <= 4 and qtminor <= 6:
|
if qtmajor <= 4 and qtminor <= 6:
|
||||||
|
|
|
@ -282,9 +282,7 @@ def restoreGeom(widget, key, offset=None):
|
||||||
if aqt.mw.pm.profile.get(key):
|
if aqt.mw.pm.profile.get(key):
|
||||||
widget.restoreGeometry(aqt.mw.pm.profile[key])
|
widget.restoreGeometry(aqt.mw.pm.profile[key])
|
||||||
if isMac and offset:
|
if isMac and offset:
|
||||||
from aqt.main import QtConfig as q
|
if qtminor > 6:
|
||||||
minor = (q.qt_version & 0x00ff00) >> 8
|
|
||||||
if minor > 6:
|
|
||||||
# bug in osx toolkit
|
# bug in osx toolkit
|
||||||
s = widget.size()
|
s = widget.size()
|
||||||
widget.resize(s.width(), s.height()+offset*2)
|
widget.resize(s.width(), s.height()+offset*2)
|
||||||
|
|
|
@ -7,7 +7,6 @@ from aqt.qt import *
|
||||||
from aqt.utils import openLink
|
from aqt.utils import openLink
|
||||||
from anki.utils import isMac, isWin
|
from anki.utils import isMac, isWin
|
||||||
import anki.js
|
import anki.js
|
||||||
QtConfig = pyqtconfig.Configuration()
|
|
||||||
|
|
||||||
# Bridge for Qt<->JS
|
# Bridge for Qt<->JS
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in a new issue