From 0195f717c3548c5888daf76fd738bda50eb031b6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 14 Oct 2017 12:11:41 +0200 Subject: [PATCH] Move QOpenGL imports to the top We don't support Qt < 5.4 anymore anyways. --- qutebrowser/utils/version.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 0f1b2233d..7ce4bfefc 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -32,6 +32,8 @@ import pkg_resources import attr from PyQt5.QtCore import PYQT_VERSION_STR, QLibraryInfo from PyQt5.QtNetwork import QSslSocket +from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile, + QOffscreenSurface) from PyQt5.QtWidgets import QApplication try: @@ -392,10 +394,6 @@ def opengl_vendor(): # pragma: no cover 'Intel Open Source Technology Center'; or None if the vendor can't be determined. """ - # We're doing those imports here because this is only available with Qt 5.4 - # or newer. - from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile, - QOffscreenSurface) assert QApplication.instance() old_context = QOpenGLContext.currentContext()