Skip to content

Commit b65ee54

Browse files
committedJun 4, 2018
Fix incorrectly capitalized accented menu entries
Fixes #19102
1 parent 36712b9 commit b65ee54

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎src/core/qgsstringutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ QString QgsStringUtils::capitalize( const QString &string, QgsStringUtils::Capit
6868
{
6969
smallWords = QObject::tr( "a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|s|the|to|vs.|vs|via" ).split( '|' );
7070
newPhraseSeparators = QObject::tr( ".|:" ).split( '|' );
71-
splitWords = QRegularExpression( QStringLiteral( "\\b" ) );
71+
splitWords = QRegularExpression( QStringLiteral( "\\b" ), QRegularExpression::UseUnicodePropertiesOption );
7272
}
7373

7474
const QStringList parts = string.split( splitWords, QString::SkipEmptyParts );

‎tests/src/core/testqgsstringutils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ void TestQgsStringUtils::titleCase_data()
176176
QTest::newRow( "last word2" ) << "Ends with small word of" << "Ends With Small Word Of";
177177
QTest::newRow( "string 6" ) << "Merge VRT(s)" << "Merge VRT(s)";
178178
QTest::newRow( "string 6" ) << "multiple sentences. more than one." << "Multiple Sentences. More Than One.";
179+
QTest::newRow( "accented" ) << "extraer vértices" << "Extraer Vértices";
179180
}
180181

181182
void TestQgsStringUtils::titleCase()

0 commit comments

Comments
 (0)
Please sign in to comment.