mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Set sip api in __init__.py
This commit is contained in:
parent
35f9886df5
commit
c612ef3fd3
@ -23,6 +23,16 @@ __copyright__ = '(C) 2007, Martin Dobias'
|
||||
# This will get replaced with a git SHA1 when you do a git archive
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import sip
|
||||
|
||||
try:
|
||||
apis = ["QDate", "QDateTime", "QString", "QTextStream", "QTime", "QUrl", "QVariant"]
|
||||
for api in apis:
|
||||
sip.setapi(api, 2)
|
||||
except ValueError:
|
||||
# API has already been set so we can't set it again.
|
||||
pass
|
||||
|
||||
try:
|
||||
# Add a __nonzero__ method onto QPyNullVariant so we can check for null values easier.
|
||||
# >>> value = QPyNullVariant("int")
|
||||
|
@ -958,6 +958,8 @@ bool QgsProject::write()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QDomImplementation DomImplementation;
|
||||
DomImplementation.setInvalidDataPolicy( QDomImplementation::DropInvalidChars );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user