mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix #3782
git-svn-id: http://svn.osgeo.org/qgis/trunk@15847 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
2f1cf5b396
commit
5160fefdc1
@ -3366,12 +3366,8 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
|
||||
else if ( type == QVariant::String )
|
||||
{
|
||||
// binding a TEXT value
|
||||
QString txt = it->toString();
|
||||
int len = txt.toUtf8().length() + 1;
|
||||
char *vl = new char [len];
|
||||
strcpy( vl, txt.toUtf8().constData() );
|
||||
sqlite3_bind_text( stmt, ++ia, vl, len, SQLITE_TRANSIENT );
|
||||
delete [] vl;
|
||||
QByteArray ba = it->toString().toUtf8();
|
||||
sqlite3_bind_text( stmt, ++ia, ba.constData(), ba.size(), SQLITE_TRANSIENT );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user