Commit b9e9ee49 authored by Johnny Jazeix's avatar Johnny Jazeix

core, fix deprecated warning

parent 7a3bb049
......@@ -282,7 +282,11 @@ void ActivityInfoTree::filterBySearch(const QString& text)
m_menuTree.clear();
if(!text.trimmed().isEmpty()) {
// perform search on each word entered in the searchField
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
const QStringList wordsList = text.split(' ', Qt::SkipEmptyParts);
#else
const QStringList wordsList = text.split(' ', QString::SkipEmptyParts);
#endif
for(const QString &searchTerm: wordsList) {
const QString trimmedText = searchTerm.trimmed();
const auto &constMenuTreeFull = m_menuTreeFull;
......
......@@ -129,7 +129,11 @@ inline QString DownloadManager::getAbsoluteResourcePath(const QString& path) con
// @FIXME should support a variable subpath length like data2/full.rcc"
inline QString DownloadManager::getRelativeResourcePath(const QString& path) const
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
QStringList parts = path.split('/', Qt::SkipEmptyParts);
#else
QStringList parts = path.split('/', QString::SkipEmptyParts);
#endif
if (parts.size() < 3)
return QString();
return QString(parts[parts.size()-3] + '/' + parts[parts.size()-2]
......@@ -352,7 +356,11 @@ bool DownloadManager::parseContents(DownloadJob *job)
QTextStream in(&job->file);
while (!in.atEnd()) {
QString line = in.readLine();
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
QStringList parts = line.split(' ', Qt::SkipEmptyParts);
#else
QStringList parts = line.split(' ', QString::SkipEmptyParts);
#endif
if (parts.size() != 2) {
qWarning() << "Invalid format of Contents file!";
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment