qt 5.15 compatibility (#4027)

This commit is contained in:
ebbit1q 2020-06-19 16:50:09 +02:00 committed by GitHub
parent 0f0e0193c1
commit 7fa1936d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 101 additions and 39 deletions

View file

@ -146,7 +146,11 @@ bool Servatrice_DatabaseInterface::usernameIsValid(const QString &user, QString
bool allowPunctuationPrefix = settingsCache->value("users/allowpunctuationprefix", false).toBool();
QString allowedPunctuation = settingsCache->value("users/allowedpunctuation", "_").toString();
QString disallowedWordsStr = settingsCache->value("users/disallowedwords", "").toString();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QStringList disallowedWords = disallowedWordsStr.split(",", Qt::SkipEmptyParts);
#else
QStringList disallowedWords = disallowedWordsStr.split(",", QString::SkipEmptyParts);
#endif
disallowedWords.removeDuplicates();
QString disallowedRegExpStr = settingsCache->value("users/disallowedregexp", "").toString();