Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 9750633

Browse files
committed
Fix Qt 5.12 compatibility (for ubuntu LTS)
1 parent c7de60e commit 9750633

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/duqf-utils/stringutils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
QString StringUtils::toTitleCase(const QString &str) {
44
QLocale locale;
55

6+
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
67
QStringList parts = str.split(QRegularExpression("[_ ]+"), Qt::SkipEmptyParts);
8+
#else
9+
QStringList parts = str.split(QRegularExpression("[_ ]+"), QString::SkipEmptyParts);
10+
#endif
711
for (int i = 0; i < parts.size(); ++i)
812
parts[i].replace(0, 1, locale.toUpper(parts[i].at(0)) );
913

0 commit comments

Comments
 (0)