@@ -281,7 +281,6 @@ bool QgsStyle::openDatabase( const QString &filename )
281
281
if ( rc )
282
282
{
283
283
mErrorString = QStringLiteral ( " Couldn't open the style database: %1" ).arg ( mCurrentDB .errorMessage () );
284
- mCurrentDB .release ();
285
284
return false ;
286
285
}
287
286
@@ -614,7 +613,6 @@ int QgsStyle::addTag( const QString &tagname )
614
613
statement = mCurrentDB .prepare ( query, nErr );
615
614
if ( nErr == SQLITE_OK )
616
615
( void )sqlite3_step ( statement.get () );
617
- statement.release ();
618
616
619
617
QgsSettings settings;
620
618
settings.setValue ( QStringLiteral ( " qgis/symbolsListGroupsIndex" ), 0 );
@@ -641,8 +639,6 @@ QStringList QgsStyle::tags() const
641
639
tagList << QString::fromUtf8 ( reinterpret_cast < const char * >( sqlite3_column_text ( statement.get (), 0 ) ) );
642
640
}
643
641
644
- statement.release ();
645
-
646
642
return tagList;
647
643
}
648
644
@@ -820,9 +816,6 @@ QStringList QgsStyle::findSymbols( StyleEntity type, const QString &qword )
820
816
tagids << QString::fromUtf8 ( ( const char * ) sqlite3_column_text ( statement.get (), 0 ) );
821
817
}
822
818
823
- statement.release ();
824
-
825
-
826
819
QString dummy = tagids.join ( QStringLiteral ( " , " ) );
827
820
828
821
if ( type == SymbolEntity )
@@ -892,8 +885,6 @@ bool QgsStyle::tagSymbol( StyleEntity type, const QString &symbol, const QString
892
885
tagid = addTag ( tag );
893
886
}
894
887
895
- statement.release ();
896
-
897
888
// Now map the tag to the symbol if it's not already tagged
898
889
if ( !symbolHasTag ( type, symbol, tag ) )
899
890
{
@@ -938,8 +929,6 @@ bool QgsStyle::detagSymbol( StyleEntity type, const QString &symbol, const QStri
938
929
return false ;
939
930
}
940
931
941
- statement.release ();
942
-
943
932
Q_FOREACH ( const QString &tag, tags )
944
933
{
945
934
query = sqlite3_mprintf ( " SELECT id FROM tag WHERE name='%q'" , tag.toUtf8 ().constData () );
@@ -1040,8 +1029,6 @@ QStringList QgsStyle::tagsOfSymbol( StyleEntity type, const QString &symbol )
1040
1029
}
1041
1030
}
1042
1031
1043
- statement.release ();
1044
-
1045
1032
return tagList;
1046
1033
}
1047
1034
@@ -1092,8 +1079,6 @@ QString QgsStyle::tag( int id ) const
1092
1079
tag = QString::fromUtf8 ( reinterpret_cast < const char * >( sqlite3_column_text ( statement.get (), 0 ) ) );
1093
1080
}
1094
1081
1095
- statement.release ();
1096
-
1097
1082
return tag;
1098
1083
}
1099
1084
@@ -1110,8 +1095,6 @@ int QgsStyle::getId( const QString &table, const QString &name )
1110
1095
id = sqlite3_column_int ( statement.get (), 0 );
1111
1096
}
1112
1097
1113
- statement.release ();
1114
-
1115
1098
return id;
1116
1099
}
1117
1100
@@ -1128,8 +1111,6 @@ QString QgsStyle::getName( const QString &table, int id ) const
1128
1111
name = QString::fromUtf8 ( reinterpret_cast < const char * >( sqlite3_column_text ( statement.get (), 0 ) ) );
1129
1112
}
1130
1113
1131
- statement.release ();
1132
-
1133
1114
return name;
1134
1115
}
1135
1116
@@ -1219,8 +1200,6 @@ QgsSymbolGroupMap QgsStyle::smartgroupsListMap()
1219
1200
groupNames.insert ( sqlite3_column_int ( statement.get (), SmartgroupId ), group );
1220
1201
}
1221
1202
1222
- statement.release ();
1223
-
1224
1203
return groupNames;
1225
1204
}
1226
1205
@@ -1245,8 +1224,6 @@ QStringList QgsStyle::smartgroupNames()
1245
1224
groups << QString::fromUtf8 ( reinterpret_cast < const char * >( sqlite3_column_text ( statement.get (), 0 ) ) );
1246
1225
}
1247
1226
1248
- statement.release ();
1249
-
1250
1227
return groups;
1251
1228
}
1252
1229
@@ -1260,7 +1237,6 @@ QStringList QgsStyle::symbolsOfSmartgroup( StyleEntity type, int id )
1260
1237
int nErr; statement = mCurrentDB .prepare ( query, nErr );
1261
1238
if ( !( nErr == SQLITE_OK && sqlite3_step ( statement.get () ) == SQLITE_ROW ) )
1262
1239
{
1263
- statement.release ();
1264
1240
return QStringList ();
1265
1241
}
1266
1242
else
@@ -1384,8 +1360,6 @@ QgsSmartConditionMap QgsStyle::smartgroup( int id )
1384
1360
}
1385
1361
}
1386
1362
1387
- statement.release ();
1388
-
1389
1363
return condition;
1390
1364
}
1391
1365
@@ -1416,8 +1390,6 @@ QString QgsStyle::smartgroupOperator( int id )
1416
1390
op = smartEl.attribute ( QStringLiteral ( " operator" ) );
1417
1391
}
1418
1392
1419
- statement.release ();
1420
-
1421
1393
return op;
1422
1394
}
1423
1395
0 commit comments