MEONMedical / Log4Qt

Log4Qt - Logging for the Qt cross-platform application framework
Apache License 2.0
589 stars 235 forks source link

How do you handle Obsolete Qt Calls #43

Closed Light-Wizzard closed 4 years ago

Light-Wizzard commented 4 years ago

For example, in file systemlogappender.cpp line 163, you have for (const auto &line : message.split('\n', QString::SkipEmptyParts)), QString::SkipEmptyParts is Obsoleted as of 5.15 at least, and replaced with Qt::SkipEmptyParts, normally I would handle it like:

#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) // Set to lowest version required
    for (const auto &line : message.split('\n', Qt::SkipEmptyParts))
#else
    for (const auto &line : message.split('\n', QString::SkipEmptyParts))
#endif

Thanks, Flesh