diff --git a/aqt/main.py b/aqt/main.py index b3677dc48..a0d86e8bd 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -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 diff --git a/aqt/qt.py b/aqt/qt.py index ee103235d..fabc13fa9 100644 --- a/aqt/qt.py +++ b/aqt/qt.py @@ -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: diff --git a/aqt/utils.py b/aqt/utils.py index 2868440c8..f046d209f 100644 --- a/aqt/utils.py +++ b/aqt/utils.py @@ -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) diff --git a/aqt/webview.py b/aqt/webview.py index 0b852f4c8..365f37733 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -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 ##########################################################################