scripts: Upgrade to Qt 6
Using qutebrowser.qt where we import from qutebrowser already anyways
This commit is contained in:
parent
29dffd782d
commit
0e9f5e7e4f
|
|
@ -291,7 +291,6 @@ def check_pyqt_imports(args: argparse.Namespace) -> Optional[bool]:
|
|||
"""Check for direct PyQt imports."""
|
||||
ignored = [
|
||||
pathlib.Path("qutebrowser", "qt"),
|
||||
# FIXME:qt6 fix those too?
|
||||
pathlib.Path("misc", "userscripts"),
|
||||
pathlib.Path("scripts"),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from PyQt5.QtCore import (QT_VERSION_STR, PYQT_VERSION_STR, qVersion,
|
||||
from PyQt6.QtCore import (QT_VERSION_STR, PYQT_VERSION_STR, qVersion,
|
||||
QStandardPaths, QCoreApplication)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@
|
|||
Use python3 -m scripts.keytester to launch it.
|
||||
"""
|
||||
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
|
||||
from qutebrowser.qt.widgets import QApplication
|
||||
from qutebrowser.misc import miscwidgets
|
||||
|
||||
app = QApplication([])
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
"""Show information about the OpenGL setup."""
|
||||
|
||||
from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile,
|
||||
QOffscreenSurface, QGuiApplication)
|
||||
from PyQt6.QtGui import QOpenGLContext, QOffscreenSurface, QGuiApplication
|
||||
from PyQt6.QtOpenGL import QOpenGLVersionProfile, QOpenGLVersionFunctionsFactory
|
||||
|
||||
app = QGuiApplication([])
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ print(f"GLES: {ctx.isOpenGLES()}")
|
|||
vp = QOpenGLVersionProfile()
|
||||
vp.setVersion(2, 0)
|
||||
|
||||
vf = ctx.versionFunctions(vp)
|
||||
vf = QOpenGLVersionFunctionsFactory.get(vp, ctx)
|
||||
print(f"Vendor: {vf.glGetString(vf.GL_VENDOR)}")
|
||||
print(f"Renderer: {vf.glGetString(vf.GL_RENDERER)}")
|
||||
print(f"Version: {vf.glGetString(vf.GL_VERSION)}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue