]> cloud.milkyroute.net Git - dolphin.git/commit
dolphinview: Update thumbnail on filename change
authorAkseli Lahtinen <akselmo@akselmo.dev>
Thu, 19 Dec 2024 10:04:16 +0000 (10:04 +0000)
committerMéven Car <meven@kde.org>
Thu, 19 Dec 2024 10:04:16 +0000 (10:04 +0000)
commiteca160ae5a2dbd5590e4bae22cddde488dbacf74
treefca5a83742c53cdaba71f24f9dfea5a3b7024f25
parente977737a182c5787d91d18f2d267027ba4f9dc24
dolphinview: Update thumbnail on filename change

If filename of an item was updated previously, it would modify the model
before the file was actually changed. This led to the model calling
a signal that would try to run a previewjob, but since the filename
is not actually changed yet on disk, it would fail.

This patch moves the model updating after copyjob. Copyjob
will take care of the file renaming if there is already existing file.
We just need to update the model correctly after the job has succeeded.

BUG:497555
src/kitemviews/kfileitemlistview.h
src/kitemviews/kfileitemmodelrolesupdater.cpp
src/kitemviews/kfileitemmodelrolesupdater.h
src/tests/dolphinmainwindowtest.cpp
src/views/dolphinview.cpp