Skip to content
Permalink
Browse files

support escape syntax. $$qgis_version will be kept and $qgis_version

will be replaced with value
  • Loading branch information
alexbruy committed Jan 10, 2017
1 parent f77e677 commit c5b3b1ac0d9ceae7e8a232fa354f198a46b559cc
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/qgshelp.cpp
@@ -20,6 +20,7 @@
#include <QFileInfo>
#include <QTcpSocket>
#include <QDesktopServices>
#include <QRegularExpression>
#include <QNetworkProxy>
#include <QNetworkProxyFactory>

@@ -54,7 +55,8 @@ QUrl QgsHelp::helpUrl( const QString& key )
fullPath = path;
Q_FOREACH ( const QString& var, scope->variableNames() )
{
fullPath.replace( QStringLiteral( "$%1" ).arg( var ), scope->variable( var ).toString() );
QRegularExpression rx( QStringLiteral( "(?<!\\$)\\$%1" ).arg( var ) );
fullPath.replace( rx, scope->variable( var ).toString() );
}

helpPath = QStringLiteral( "%1/%2" ).arg( fullPath ).arg( key );

0 comments on commit c5b3b1a

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