Skip to content

Commit

Permalink
strip trailing slash from the help path if necessary (fix #16156)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Feb 7, 2017
1 parent 0dc1257 commit 9bd0d7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gui/qgshelp.cpp
Expand Up @@ -53,7 +53,15 @@ QUrl QgsHelp::helpUrl( const QString& key )

Q_FOREACH ( const QString& path, paths )
{
fullPath = path;
if ( path.endsWith( "\\" ) || path.endsWith( "/" ) )
{
fullPath = path.left( path.size() - 1 );
}
else
{
fullPath = path;
}

Q_FOREACH ( const QString& var, scope->variableNames() )
{
QRegularExpression rx( QStringLiteral( "(<!\\$\\$)*(\\$%1)" ).arg( var ) );
Expand Down

0 comments on commit 9bd0d7a

Please sign in to comment.