Commit 4f0f245b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile against qt5.15

parent 0e915ed1
......@@ -549,7 +549,11 @@ QStringList FeedListManagementImpl::feeds(const QString &catId) const
return QStringList();
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const uint lastcatid = catId.split(QLatin1Char('/'), QString::SkipEmptyParts).last().toUInt();
#else
const uint lastcatid = catId.split(QLatin1Char('/'), Qt::SkipEmptyParts).last().toUInt();
#endif
QSet<QString> urls;
const auto feeds = m_feedList->feeds();
......@@ -568,7 +572,11 @@ void FeedListManagementImpl::addFeed(const QString &url, const QString &catId)
}
qCDebug(AKREGATOR_LOG) << "Name:" << url.left(20) << "Cat:" << catId;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const uint folder_id = catId.split(QLatin1Char('/'), QString::SkipEmptyParts).last().toUInt();
#else
const uint folder_id = catId.split(QLatin1Char('/'), Qt::SkipEmptyParts).last().toUInt();
#endif
// Get the folder
Folder *m_folder = nullptr;
......@@ -598,7 +606,11 @@ void FeedListManagementImpl::removeFeed(const QString &url, const QString &catId
{
qCDebug(AKREGATOR_LOG) << "Name:" << url.left(20) << "Cat:" << catId;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
uint lastcatid = catId.split(QLatin1Char('/'), QString::SkipEmptyParts).last().toUInt();
#else
uint lastcatid = catId.split(QLatin1Char('/'), Qt::SkipEmptyParts).last().toUInt();
#endif
const auto feeds = m_feedList->feeds();
for (const Feed *const i : feeds) {
......@@ -621,7 +633,11 @@ QString FeedListManagementImpl::getCategoryName(const QString &catId) const
return catname;
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList list = catId.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
const QStringList list = catId.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
for (int i = 0; i < list.size(); ++i) {
int index = list.at(i).toInt();
catname += m_feedList->findByID(index)->title() + QLatin1Char('/');
......
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