Use unicode option when replacing non-words

Fixes #513
This commit is contained in:
Jonas Kvinge 2020-08-15 11:43:14 +02:00
parent 2a809f96c4
commit 414a4a97fb
3 changed files with 3 additions and 3 deletions

View File

@ -1442,7 +1442,7 @@ QString CollectionModel::SortText(QString text) {
else {
text = text.toLower();
}
text = text.remove(QRegularExpression("[^\\w ]"));
text = text.remove(QRegularExpression("[^\\w ]", QRegularExpression::UseUnicodePropertiesOption));
return text;

View File

@ -367,7 +367,7 @@ QString ContextAlbumsModel::SortText(QString text) {
else {
text = text.toLower();
}
text = text.remove(QRegularExpression("[^\\w ]"));
text = text.remove(QRegularExpression("[^\\w ]", QRegularExpression::UseUnicodePropertiesOption));
return text;

View File

@ -234,7 +234,7 @@ void PlaylistManager::SaveWithUI(int id, const QString &playlist_name) {
QString filter = settings.value("last_save_filter", parser()->default_filter()).toString();
QString suggested_filename = playlist_name;
suggested_filename.replace(QRegularExpression("\\W"), "");
suggested_filename.replace(QRegularExpression("\\W", QRegularExpression::UseUnicodePropertiesOption), "");
qLog(Debug) << "Using extension:" << extension;