Commit d9d1c68d authored by Laurent Montel's avatar Laurent Montel 😁

Convert some Q_FOREACH

parent a169fe38
......@@ -179,7 +179,7 @@ BlogsList Blog::fromJSONFeed(const QByteArray &rawData)
BlogsList items;
const QVariantList blogs = map[QStringLiteral("items")].toList();
items.reserve(blogs.size());
Q_FOREACH (const QVariant &blog, blogs) {
for (const QVariant &blog : blogs) {
items << Blog::Private::fromJSON(blog);
}
return items;
......
......@@ -240,7 +240,7 @@ ObjectsList Comment::fromJSONFeed(const QByteArray &rawData, FeedData &feedData)
}
const QVariantList variantList = map[QStringLiteral("items")].toList();
items.reserve(variantList.size());
Q_FOREACH (const QVariant &v, variantList) {
for (const QVariant &v : variantList) {
items << Comment::Private::fromJSON(v);
}
......
......@@ -264,7 +264,7 @@ ObjectsList Page::fromJSONFeed(const QByteArray &rawData)
ObjectsList list;
const QVariantList variantList = map[QStringLiteral("items")].toList();
list.reserve(variantList.size());
Q_FOREACH (const QVariant &item, variantList) {
for (const QVariant &item : variantList) {
list << Private::fromJSON(item);
}
return list;
......
......@@ -259,7 +259,7 @@ PostPtr Post::Private::fromJSON(const QVariant &json)
post->d->longitude = location[QStringLiteral("lng")].toDouble();
const QVariantList variantList = map[QStringLiteral("images")].toList();
Q_FOREACH (const QVariant &url, variantList) {
for (const QVariant &url : variantList) {
post->d->images << url.toMap()[QStringLiteral("url")].toUrl();
}
post->d->status = map[QStringLiteral("status")].toString();
......@@ -353,7 +353,7 @@ ObjectsList Post::fromJSONFeed(const QByteArray &rawData, FeedData &feedData)
ObjectsList list;
const QVariantList variantList = map[QStringLiteral("items")].toList();
list.reserve(variantList.size());
Q_FOREACH (const QVariant &item, variantList) {
for (const QVariant &item : variantList) {
list << Private::fromJSON(item);
}
return list;
......
......@@ -80,7 +80,7 @@ void CalendarCreateJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -48,7 +48,7 @@ CalendarDeleteJob::CalendarDeleteJob(const CalendarsList& calendars, const Accou
DeleteJob(account, parent),
d(new Private)
{
Q_FOREACH(const CalendarPtr &calendar, calendars) {
for (const CalendarPtr &calendar : calendars) {
d->calendarsIds << calendar->uid();
}
}
......@@ -89,7 +89,7 @@ void CalendarDeleteJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -62,7 +62,7 @@ QNetworkRequest CalendarFetchJob::Private::createRequest(const QUrl& url)
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -82,7 +82,7 @@ void EventCreateJob::start()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -94,7 +94,7 @@ void EventDeleteJob::start()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -70,7 +70,7 @@ QNetworkRequest EventFetchJob::Private::createRequest(const QUrl& url)
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -81,7 +81,7 @@ void EventModifyJob::start()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -70,7 +70,7 @@ void EventMoveJob::Private::processNextEvent()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -77,7 +77,7 @@ void ContactCreateJob::Private::processNextContact()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -65,7 +65,7 @@ void ContactDeleteJob::Private::processNextContact()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -66,7 +66,7 @@ QNetworkRequest ContactFetchJob::Private::createRequest(const QUrl& url)
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -76,7 +76,7 @@ void ContactModifyJob::Private::processNextContact()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -84,7 +84,7 @@ void ContactsGroupCreateJob::start()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -59,7 +59,7 @@ QNetworkRequest ContactsGroupDeleteJob::Private::createRequest(const QUrl& url)
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -60,7 +60,7 @@ QNetworkRequest ContactsGroupFetchJob::Private::createRequest(const QUrl& url)
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -86,7 +86,7 @@ void ContactsGroupModifyJob::start()
QStringList headers;
auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -174,7 +174,7 @@ AppPtr App::Private::fromJSON(const QVariantMap &map)
app->d->secondaryFileExtensions = map[QStringLiteral("secondaryFileExtensions")].toStringList();
const QVariantList icons = map[QStringLiteral("icons")].toList();
Q_FOREACH(const QVariant & i, icons) {
for (const QVariant & i : icons) {
const QVariantMap &iconData = i.toMap();
IconPtr icon(new Icon());
......@@ -301,7 +301,7 @@ AppsList App::fromJSONFeed(const QByteArray &jsonData)
AppsList list;
const QVariantList items = map[QStringLiteral("items")].toList();
Q_FOREACH(const QVariant & item, items) {
for (const QVariant & item : items) {
const AppPtr app = Private::fromJSON(item.toMap());
if (!app.isNull()) {
......
......@@ -147,7 +147,7 @@ ChangesList Change::fromJSONFeed(const QByteArray &jsonData, FeedData &feedData)
ChangesList list;
const QVariantList items = map[QStringLiteral("items")].toList();
Q_FOREACH(const QVariant & item, items) {
for (const QVariant & item : items) {
const ChangePtr change = Private::fromJSON(item.toMap());
if (!change.isNull()) {
......
......@@ -125,7 +125,7 @@ ChildReferencesList ChildReference::fromJSONFeed(const QByteArray &jsonData,
ChildReferencesList list;
const QVariantList items = map[QStringLiteral("items")].toList();
Q_FOREACH(const QVariant & item, items) {
for (const QVariant & item : items) {
ChildReferencePtr reference = Private::fromJSON(item.toMap());
if (!reference.isNull()) {
......
......@@ -88,7 +88,7 @@ ChildReferenceCreateJob::ChildReferenceCreateJob(const QString &folderId,
d(new Private(this))
{
d->folderId = folderId;
Q_FOREACH(const QString & childId, childrenIds) {
for (const QString & childId : qAsConst(childrenIds)) {
d->references << ChildReferencePtr(new ChildReference(childId));
}
}
......
......@@ -597,7 +597,7 @@ FilePtr File::Private::fromJSON(const QVariantMap &map)
file->d->sharedWithMeDate = QDateTime::fromString(map[QStringLiteral("sharedWithMeDate")].toString(), Qt::ISODate);
const QVariantList parents = map[QStringLiteral("parents")].toList();
Q_FOREACH (const QVariant &parent, parents)
for (const QVariant &parent : parents)
{
file->d->parents << ParentReference::Private::fromJSON(parent.toMap());
}
......@@ -923,7 +923,7 @@ FilesList File::fromJSONFeed(const QByteArray &jsonData, FeedData &feedData)
FilesList list;
const QVariantList items = map[QStringLiteral("items")].toList();
Q_FOREACH (const QVariant &item, items) {
for (const QVariant &item : items) {
const FilePtr file = Private::fromJSON(item.toMap());
if (!file.isNull()) {
......@@ -992,7 +992,7 @@ QByteArray File::toJSON(const FilePtr &file, SerializationOptions options)
QVariantList parents;
const auto parentReferences = file->parents();
parents.reserve(parentReferences.size());
Q_FOREACH (const ParentReferencePtr &parent, parentReferences) {
for (const ParentReferencePtr &parent : parentReferences) {
parents << ParentReference::Private::toJSON(parent);
}
if (!parents.isEmpty()) {
......
......@@ -101,7 +101,7 @@ FileAbstractModifyJob::FileAbstractModifyJob(const FilesList &files,
ModifyJob(account, parent),
d(new Private(this))
{
Q_FOREACH(const FilePtr & file, files) {
for (const FilePtr & file : qAsConst(files)) {
d->filesIds << file->id();
}
}
......
......@@ -69,7 +69,7 @@ FileDeleteJob::FileDeleteJob(const FilesList &files,
DeleteJob(account, parent),
d(new Private)
{
Q_FOREACH(const FilePtr & file, files) {
for (const FilePtr & file : qAsConst(files)) {
d->filesIDs << file->id();
}
}
......
......@@ -139,7 +139,7 @@ ParentReferencesList ParentReference::fromJSONFeed(const QByteArray &jsonData)
ParentReferencesList list;
const QVariantList items = map[QStringLiteral("items")].toList();
Q_FOREACH(const QVariant & item, items) {
for (const QVariant & item : items) {
const ParentReferencePtr reference = Private::fromJSON(item.toMap());
if (!reference.isNull()) {
......
......@@ -88,7 +88,7 @@ ParentReferenceCreateJob::ParentReferenceCreateJob(const QString &fileId,
d(new Private(this))
{
d->fileId = fileId;
Q_FOREACH(const QString & parentId, parentsIds) {
for (const QString & parentId : qAsConst(parentsIds)) {
d->references << ParentReferencePtr(new ParentReference(parentId));
}
}
......
......@@ -68,7 +68,7 @@ PermissionDeleteJob::PermissionDeleteJob(const QString &fileId,
d(new Private)
{
d->fileId = fileId;
Q_FOREACH(const PermissionPtr & permission, permissions) {
for (const PermissionPtr & permission : qAsConst(permissions)) {
d->permissionsIds << permission->id();
}
}
......
......@@ -262,7 +262,7 @@ RevisionsList Revision::fromJSONFeed(const QByteArray &jsonData)
RevisionsList list;
const QVariantList items = map[QStringLiteral("items")].toList();
Q_FOREACH (const QVariant &item, items) {
for (const QVariant &item : qAsConst(items)) {
const RevisionPtr revision = Private::fromJSON(item.toMap());
if (!revision.isNull()) {
......
......@@ -78,7 +78,7 @@ RevisionDeleteJob::RevisionDeleteJob(const QString &fileId,
d(new Private)
{
d->fileId = fileId;
Q_FOREACH(const RevisionPtr & revision, revisions) {
for (const RevisionPtr &revision : qAsConst(revisions)) {
d->revisionsIds << revision->id();
}
}
......
......@@ -79,7 +79,7 @@ void LocationCreateJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -95,7 +95,7 @@ void LocationDeleteJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -279,19 +279,19 @@ QString StaticMapMarker::toString() const
if (d->locationType == String) {
Q_FOREACH(const QString & addr, d->locationsString) {
for (const QString & addr : qAsConst(d->locationsString)) {
ret += addr + QLatin1String("|");
}
} else if (d->locationType == KABCAddress) {
Q_FOREACH(const KContacts::Address & addr, d->locationsAddress) {
for (const KContacts::Address & addr : qAsConst(d->locationsAddress)) {
ret += addr.formattedAddress() + QLatin1String("|");
}
} else if (d->locationType == KABCGeo) {
Q_FOREACH(const KContacts::Geo & addr, d->locationsGeo) {
for (const KContacts::Geo & addr : qAsConst(d->locationsGeo)) {
ret += QString::number(addr.latitude()) + QLatin1String(",") +
QString::number(addr.longitude()) + QLatin1String("|");
}
......
......@@ -195,19 +195,19 @@ QString StaticMapPath::toString() const
if (locationType() == String) {
Q_FOREACH(const QString & addr, d->locationsString) {
for (const QString & addr : qAsConst(d->locationsString)) {
ret += addr + QLatin1String("|");
}
} else if (locationType() == KABCAddress) {
Q_FOREACH(const KContacts::Address & addr, d->locationsAddress) {
for (const KContacts::Address & addr : qAsConst(d->locationsAddress)) {
ret += addr.formattedAddress() + QLatin1String("|");
}
} else if (locationType() == KABCGeo) {
Q_FOREACH(const KContacts::Geo & addr, d->locationsGeo) {
for (const KContacts::Geo & addr : qAsConst(d->locationsGeo)) {
ret += QString::number(addr.latitude()) + QLatin1String(",") +
QString::number(addr.longitude()) + QLatin1String("|");
}
......
......@@ -165,13 +165,13 @@ bool StaticMapUrl::isValid() const
bool maOrPa = true;
if (d->markers.isEmpty()) {
Q_FOREACH(const StaticMapPath & path, d->paths) {
for (const StaticMapPath & path : qAsConst(d->paths)) {
if (!path.isValid())
maOrPa = false;
}
} else {
Q_FOREACH(const StaticMapMarker & marker, d->markers) {
for (const StaticMapMarker & marker : qAsConst(d->markers)) {
if (!marker.isValid())
maOrPa = false;
}
......@@ -444,13 +444,13 @@ QUrl StaticMapUrl::url() const
url.addQueryItem(QStringLiteral("maptype"), maptype);
}
Q_FOREACH(const StaticMapMarker & marker, d->markers) {
for (const StaticMapMarker & marker : qAsConst(d->markers)) {
if (marker.isValid())
url.addQueryItem(QStringLiteral("markers"), marker.toString());
}
Q_FOREACH(const StaticMapPath & path, d->paths) {
for (const StaticMapPath & path : qAsConst(d->paths)) {
if (path.isValid())
url.addQueryItem(QStringLiteral("path"), path.toString());
......
......@@ -102,7 +102,7 @@ void TaskCreateJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -66,7 +66,7 @@ void TaskDeleteJob::Private::processNextTask()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......@@ -89,7 +89,7 @@ TaskDeleteJob::TaskDeleteJob(const TasksList& tasks, const QString& tasklistId,
d(new Private(this))
{
d->tasksIds.reserve(tasks.size());
Q_FOREACH(const TaskPtr &task, tasks) {
for (const TaskPtr &task : qAsConst(tasks)) {
d->tasksIds << task->uid();
}
d->taskListId = tasklistId;
......
......@@ -74,7 +74,7 @@ QNetworkRequest TaskFetchJob::Private::createRequest(const QUrl& url)
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -79,7 +79,7 @@ void TaskListCreateJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -63,7 +63,7 @@ void TaskListDeleteJob::Private::processNextTaskList()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -56,7 +56,7 @@ QNetworkRequest TaskListFetchJob::Private::createRequest(const QUrl& url)
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -81,7 +81,7 @@ void TaskListModifyJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -82,7 +82,7 @@ void TaskModifyJob::start()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
......@@ -67,7 +67,7 @@ void TaskMoveJob::Private::processNextTask()
QStringList headers;
const auto rawHeaderList = request.rawHeaderList();
headers.reserve(rawHeaderList.size());
Q_FOREACH(const QByteArray &str, rawHeaderList) {
for (const QByteArray &str : qAsConst(rawHeaderList)) {
headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str));
}
qCDebug(KGAPIRaw) << headers;
......
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