From 22c6643ef5395c1e7536c55e963590f01a744a0f Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 23 Sep 2016 02:49:18 +0100 Subject: [PATCH 1/2] Fix method that calls itself recursively Test Plan: Read the code. Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D2843 --- wallpapers/image/image.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp index 0ec62bb2d..493bb84a3 100644 --- a/wallpapers/image/image.cpp +++ b/wallpapers/image/image.cpp @@ -118,8 +118,12 @@ void Image::addUrl(const QString &url) void Image::addUrls(const QStringList &urls) { - addUrls(urls); -} + bool first = true; + for (const QString &url: urls) { + // set the first drop as the current paper, just add the rest to the roll + addUrl(QUrl(url), first); + first = false; + }} Image::RenderingMode Image::renderingMode() const { From 5f1b9d5e33d0381c51f84b63b3543674ad1a8f05 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sat, 24 Sep 2016 13:25:58 +0100 Subject: [PATCH 2/2] Fix whitespace --- wallpapers/image/image.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp index 493bb84a3..3101b5678 100644 --- a/wallpapers/image/image.cpp +++ b/wallpapers/image/image.cpp @@ -123,7 +123,8 @@ void Image::addUrls(const QStringList &urls) // set the first drop as the current paper, just add the rest to the roll addUrl(QUrl(url), first); first = false; - }} + } +} Image::RenderingMode Image::renderingMode() const {