remove pyqtconfig usage (#831)

This commit is contained in:
Damien Elmes 2013-05-17 15:17:04 +09:00
parent dd4bae6e8d
commit a492e95aed
4 changed files with 3 additions and 9 deletions

View file

@ -6,7 +6,6 @@ import os, sys, re, traceback, signal
import zipfile
from aqt.qt import *
QtConfig = pyqtconfig.Configuration()
from anki import Collection
from anki.utils import isWin, isMac, intTime

View file

@ -11,7 +11,6 @@ from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings
from PyQt4.QtNetwork import QLocalServer, QLocalSocket
from PyQt4 import pyqtconfig
def debug():
from PyQt4.QtCore import pyqtRemoveInputHook
@ -30,9 +29,8 @@ if os.environ.get("DEBUG"):
pm()
sys.excepthook = info
qtconf = pyqtconfig.Configuration()
qtmajor = (qtconf.qt_version & 0xff0000) >> 16
qtminor = (qtconf.qt_version & 0x00ff00) >> 8
qtmajor = (QT_VERSION & 0xff0000) >> 16
qtminor = (QT_VERSION & 0x00ff00) >> 8
# qt4.6 doesn't support ruby tags
if qtmajor <= 4 and qtminor <= 6:

View file

@ -282,9 +282,7 @@ def restoreGeom(widget, key, offset=None):
if aqt.mw.pm.profile.get(key):
widget.restoreGeometry(aqt.mw.pm.profile[key])
if isMac and offset:
from aqt.main import QtConfig as q
minor = (q.qt_version & 0x00ff00) >> 8
if minor > 6:
if qtminor > 6:
# bug in osx toolkit
s = widget.size()
widget.resize(s.width(), s.height()+offset*2)

View file

@ -7,7 +7,6 @@ from aqt.qt import *
from aqt.utils import openLink
from anki.utils import isMac, isWin
import anki.js
QtConfig = pyqtconfig.Configuration()
# Bridge for Qt<->JS
##########################################################################