From 53b76e66f5527a5f9442173279b0a01f1f07da46 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 29 Mar 2018 21:01:47 +0200 Subject: Avoid build errors --- examples/carddavresource/tests/carddavtest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/carddavresource/tests/carddavtest.cpp b/examples/carddavresource/tests/carddavtest.cpp index 4fb6bad..6e7cf01 100644 --- a/examples/carddavresource/tests/carddavtest.cpp +++ b/examples/carddavresource/tests/carddavtest.cpp @@ -48,8 +48,8 @@ class CardDavTest : public QObject job->exec(); const auto collectionUrl = [&] { - for(const auto collection : job->collections()) { - return collection.url().url(); + if (!job->collections().isEmpty()) { + return job->collections().first().url().url(); } return QUrl{}; }(); -- cgit v1.2.3