make Qt 5.12 compatible.

This commit is contained in:
Weng Xuetian 2021-02-26 19:05:24 -08:00
parent 921901a122
commit 2f6db731cc
No known key found for this signature in database
GPG Key ID: 8E8B898CBF2412F9
1 changed files with 4 additions and 0 deletions

View File

@ -8,7 +8,11 @@
#include <QMap>
QFont fcitx::parseFont(const QString &string) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
auto list = string.split(" ", QString::SkipEmptyParts);
#else
auto list = string.split(" ", Qt::SkipEmptyParts);
#endif
int size = 9; // Default size.
if (!list.empty()) {
bool ok = false;