From bba659b852ded2b2e026eb0be58c67b0862cda6f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 9 Jul 2013 14:53:40 +0530 Subject: [PATCH] Add a check for modern WebKit --- src/calibre/constants.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/constants.py b/src/calibre/constants.py index 99146e206c..5c9ecbc832 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -282,3 +282,8 @@ def get_windows_user_locale_name(): return None return u'_'.join(buf.value.split(u'-')[:2]) +def is_modern_webkit(): + # Check if we are using QtWebKit >= 2.3 + from PyQt4.QtWebKit import qWebKitMajorVersion + return qWebKitMajorVersion() >= 537 +