strip trailing slash from the help path if necessary (fix #16156)

This commit is contained in:
Alexander Bruy 2017-02-07 16:22:42 +02:00
parent 0dc1257701
commit 9bd0d7a7bb

View File

@ -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 ) );