Skip to content
Permalink
Browse files

Use windows path format for project_path/project_folder variables on …

…windows

(cherry-picked from 2745797)
  • Loading branch information
nyalldawson committed Jul 11, 2017
1 parent e6dc103 commit ff5181c2e90c1b1124e5927fc52e6cfda3e07acf
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsexpressioncontext.cpp
@@ -631,8 +631,8 @@ QgsExpressionContextScope* QgsExpressionContextUtils::projectScope()

//add other known project variables
scope->addVariable( QgsExpressionContextScope::StaticVariable( "project_title", project->title(), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( "project_path", project->fileInfo().filePath(), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( "project_folder", project->fileInfo().dir().path(), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( "project_path", QDir::toNativeSeparators( project->fileInfo().filePath() ), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( "project_folder", QDir::toNativeSeparators( project->fileInfo().dir().path() ), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( "project_filename", project->fileInfo().fileName(), true ) );

scope->addFunction( "project_color", new GetNamedProjectColor() );

0 comments on commit ff5181c

Please sign in to comment.
You can’t perform that action at this time.