Skip to content

Commit 17ca25f

Browse files
committed
[app] Use unique pointer for query builder
1 parent 5be5c1e commit 17ca25f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/app/qgisapp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8928,7 +8928,7 @@ void QgisApp::layerSubsetString()
89288928
}
89298929

89308930
// launch the query builder
8931-
QgsQueryBuilder *qb = new QgsQueryBuilder( vlayer, this );
8931+
std::unique_ptr<QgsQueryBuilder> qb( new QgsQueryBuilder( vlayer, this ) );
89328932
QString subsetBefore = vlayer->subsetString();
89338933

89348934
// Set the sql in the query builder to the same in the prop dialog
@@ -8947,8 +8947,6 @@ void QgisApp::layerSubsetString()
89478947
}
89488948
}
89498949

8950-
// delete the query builder object
8951-
delete qb;
89528950
}
89538951

89548952
void QgisApp::saveLastMousePosition( const QgsPointXY &p )

0 commit comments

Comments
 (0)