Commit 9aa93206 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It compiles fine without foreach

parent 4bc30fa7
......@@ -42,6 +42,10 @@ find_package(KF5Syndication ${SYNDICATION_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5XmlRpcClient ${XMLRPCCLIENT_LIB_VERSION} CONFIG REQUIRED)
add_definitions(-DTRANSLATION_DOMAIN=\"libkblog5\")
if (${KF5Config_VERSION} STRGREATER "5.56.0")
add_definitions(-DQT_NO_FOREACH)
MESSAGE(STATUS "compile without foreach")
endif()
########### Targets ###########
add_subdirectory(src)
......
......@@ -230,7 +230,8 @@ void GData::modifyPost(KBlog::BlogPost *post)
atomMarkup += QStringLiteral("<div xmlns='http://www.w3.org/1999/xhtml'>");
atomMarkup += post->content();
atomMarkup += QStringLiteral("</div></content>");
foreach (const QString &tag, post->tags()) {
const auto tags = post->tags();
for (const QString &tag : tags) {
atomMarkup += QStringLiteral("<category scheme='http://www.blogger.com/atom/ns#' term='") + tag + QStringLiteral("' />");
}
atomMarkup += QStringLiteral("<author>");
......
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