<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>512559</bug_id>
          
          <creation_ts>2025-11-24 14:46:15 +0000</creation_ts>
          <short_desc>Slideshow (Non Random) does not remember the last shown picture</short_desc>
          <delta_ts>2026-06-11 16:59:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Image &amp; Slideshow wallpaper plugins</component>
          <version>6.5.3</version>
          <rep_platform>CachyOS</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>IT-KB</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>kde-bugtracking</cc>
    
    <cc>nate</cc>
    
    <cc>notmart</cc>
    
    <cc>qydwhotmail</cc>
    
    <cc>tobias.fella</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/-/commit/39244fbe255eabc00c19d88ef05e1dd9fb216878</cf_commitlink>
          <cf_versionfixedin>6.7.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2472559</commentid>
    <comment_count>0</comment_count>
    <who name="">IT-KB</who>
    <bug_when>2025-11-24 14:46:15 +0000</bug_when>
    <thetext>Slideshow (Set to &quot;A-Z&quot;) restarts from first picture after reboot/shutdown or logout. From my understanding it should remember the last shown picture and continue from there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2472909</commentid>
    <comment_count>1</comment_count>
    <who name="">IT-KB</who>
    <bug_when>2025-11-26 10:33:02 +0000</bug_when>
    <thetext>this did not happen on plasma 6.3.6 and 6.4.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473315</commentid>
    <comment_count>2</comment_count>
    <who name="">IT-KB</who>
    <bug_when>2025-11-28 10:31:13 +0000</bug_when>
    <thetext>STEPS TO REPRODUCE
1. Select Folder trough GUI to run as slideshow (A-Z)
2. Select &quot;Next Wallaper&quot; from desktop or wait.
3. restart/logoff
4. Slideshow starts from first picture in selected folder

OBSERVED RESULT
Slideshow restarts at first picture of selected folder

EXPECTED RESULT
Slideshow should show the last picture shown, before logoff/shutdow/restart

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.5.3

ADDITIONAL INFORMATION
i tested other versions of KDE (6.3.6, 6.4.5). The Expected result is given there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2474982</commentid>
    <comment_count>3</comment_count>
    <who name="">kde-bugtracking</who>
    <bug_when>2025-12-07 13:50:07 +0000</bug_when>
    <thetext>I can confirm the behavior for sorting order &quot;A to Z&quot; and also for &quot;Z to A&quot;, &quot;Date modified (newest first)&quot;, and &quot;Date modified (oldest first)&quot;.
In addition to the behavior occuring on restart and logoff, it also happens after the screen was locked and the displays turned off for a while (due to powersaving options).

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521194</commentid>
    <comment_count>4</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2026-06-07 06:35:42 +0000</bug_when>
    <thetext>The bug was introduced in commit 471c56e1f9 (&quot;wallpapers/image: Port image model to QUrl&quot;). When a slideshow wallpaper saves its state, the image URL is stored as &quot;file:///path/to/image.jpg&quot;. QUrl::fromLocalFile() incorrectly treated this URL string as a local file path, creating a malformed URL &quot;file:file:///path/to/image.jpg&quot;, causing the image lookup to fail and the slideshow to restart from the first image</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521202</commentid>
    <comment_count>5</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-06-07 08:17:32 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6690</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521786</commentid>
    <comment_count>6</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-06-09 14:21:59 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6709</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521973</commentid>
    <comment_count>7</comment_count>
    <who name="Tobias Fella">tobias.fella</who>
    <bug_when>2026-06-10 09:24:13 +0000</bug_when>
    <thetext>Git commit 39244fbe255eabc00c19d88ef05e1dd9fb216878 by Tobias Fella, on behalf of Fushan Wen.
Committed on 10/06/2026 at 09:24.
Pushed by tfella into branch &apos;Plasma/6.7&apos;.

wallpapers/image: Fix slideshow not remembering the last shown picture

When a slideshow wallpaper is saved, the image URL is stored as a string
like &quot;file:///path/to/image.jpg&quot;. When Plasma restarts, this URL string
is passed to SlideModel::indexOf().

The previous code used QUrl::fromLocalFile(packagePath) which incorrectly
treats the URL string as a local file path, creating a malformed URL like
&quot;file:file:///path/to/image.jpg&quot;. This caused the image lookup to fail
(indexOf() returned -1), making the slideshow restart from the first image
instead of the last shown one.

Fix this by using QUrl::fromUserInput(packagePath) which correctly handles
both local file paths and URL strings.

Also add a unit test to verify indexOf() works correctly with URL strings.
Assisted-by: Kilo Code: glm-5
(cherry picked from commit e21f6d5c79ef018ff6bab3eafd1cb1491d47391e)

M  +21   -0    wallpapers/image/plugin/autotests/test_slidemodel.cpp
M  +1    -1    wallpapers/image/plugin/slidemodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/39244fbe255eabc00c19d88ef05e1dd9fb216878</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>