File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -588,12 +588,11 @@ void TestQgsExpressionContext::globalScope()
588588
589589 // test removeGlobalVariables
590590 QgsExpressionContextUtils::setGlobalVariable ( QStringLiteral ( " key" ), " value" );
591- QgsExpressionContextScope * globalScope3 = QgsExpressionContextUtils::globalScope ();
591+ std::unique_ptr< QgsExpressionContextScope > globalScope3 ( QgsExpressionContextUtils::globalScope () );
592592 QVERIFY ( globalScope3->hasVariable ( " key" ) );
593593 QgsExpressionContextUtils::removeGlobalVariable ( QStringLiteral ( " key" ) );
594- globalScope3 = QgsExpressionContextUtils::globalScope ();
594+ globalScope3. reset ( QgsExpressionContextUtils::globalScope () );
595595 QVERIFY ( !globalScope3->hasVariable ( " key" ) );
596- delete globalScope3;
597596}
598597
599598void TestQgsExpressionContext::projectScope ()
You can’t perform that action at this time.
0 commit comments