QGIS/python/PyQt/PyQt/QtSql.py.in
Nyall Dawson 601854a790 Patch back in flags removed in PyQt6
PyQt6 explicitly removes QFlag types from Qt c++ classes whereas
these were exposed in PyQt5. Patch them back in for compatibility.
2024-01-27 20:39:48 +10:00

31 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
"""
***************************************************************************
QtSql.py
---------------------
Date : March 2016
Copyright : (C) 2016 by Juergen E. Fischer
Email : jef at norbit dot de
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Juergen E. Fischer'
__date__ = 'March 2016'
__copyright__ = '(C) 2016, Juergen E. Fischer'
from PyQt@QT_VERSION_MAJOR@.QtSql import *
if @QT_VERSION_MAJOR@ == 6:
# patch back in Qt flags removed in PyQt
QSql.ParamType = lambda flags=0: QSql.ParamTypeFlag(flags)