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()
588
588
589
589
// test removeGlobalVariables
590
590
QgsExpressionContextUtils::setGlobalVariable ( QStringLiteral ( " key" ), " value" );
591
- QgsExpressionContextScope * globalScope3 = QgsExpressionContextUtils::globalScope ();
591
+ std::unique_ptr< QgsExpressionContextScope > globalScope3 ( QgsExpressionContextUtils::globalScope () );
592
592
QVERIFY ( globalScope3->hasVariable ( " key" ) );
593
593
QgsExpressionContextUtils::removeGlobalVariable ( QStringLiteral ( " key" ) );
594
- globalScope3 = QgsExpressionContextUtils::globalScope ();
594
+ globalScope3. reset ( QgsExpressionContextUtils::globalScope () );
595
595
QVERIFY ( !globalScope3->hasVariable ( " key" ) );
596
- delete globalScope3;
597
596
}
598
597
599
598
void TestQgsExpressionContext::projectScope ()
You can’t perform that action at this time.
0 commit comments