Fix Qt 5.15 deprecation warnings for QString::SkipEmptyParts

Task-number: QTCREATORBUG-24098
Change-Id: I03ee6811df4346754bbd652f2c3c97477f9cdb7e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-06-16 16:32:50 +02:00
parent 592e20cf0f
commit 8a697cde64
3 changed files with 10 additions and 2 deletions

View File

@@ -36,6 +36,12 @@ QT_END_NAMESPACE
namespace Utils {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
constexpr QString::SplitBehavior SkipEmptyParts = QString::SkipEmptyParts;
#else
constexpr Qt::SplitBehaviorFlags SkipEmptyParts = Qt::SkipEmptyParts;
#endif
// Create a usable settings key from a category,
// for example Editor|C++ -> Editor_C__
QTCREATOR_UTILS_EXPORT QString settingsKey(const QString &category);