Skip to content
Permalink
Browse files
Set sip api in __init__.py
  • Loading branch information
NathanW2 committed Jul 17, 2013
1 parent 35f9886 commit c612ef3fd3fb0ff9525029b7ab575b6282f399d2
Showing with 12 additions and 0 deletions.
  1. +10 −0 python/__init__.py
  2. +2 −0 src/core/qgsproject.cpp
@@ -23,6 +23,16 @@
# 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 );

0 comments on commit c612ef3

Please sign in to comment.