[plasma/plasma-workspace/Plasma/6.6] klipper: klipper: Preserve encoded PNG when restoring history entries

Noah Davis <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 99ca1c774140ac32b14a0e1841c00243e57e571f by Noah Davis.
Committed on 14/08/2026 at 17:19.
Pushed by ngraham into branch 'Plasma/6.6'.

klipper: Preserve encoded PNG when restoring history entries


(cherry picked from commit 9350813c55f533b64c98bf18df56aedea29cf8bc)

Co-authored-by: Жора Змейкин <[email protected]>

M  +1    -2    klipper/systemclipboard.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/99ca1c774140ac32b14a0e1841c00243e57e571f

diff --git a/klipper/systemclipboard.cpp b/klipper/systemclipboard.cpp
index e158a2561b..7cb64ba03a 100644
--- a/klipper/systemclipboard.cpp
+++ b/klipper/systemclipboard.cpp
@@ -152,10 +152,9 @@ QMimeData *DatabaseRecordToMimeDataJob::mimeData() const
 {
     auto mimeData = new QMimeData;
     for (auto &[format, data] : m_mimeDataList) {
+        mimeData->setData(format, data);
         if (format == s_imageFormat) {
             mimeData->setImageData(QImage::fromData(data, "PNG"));
-        } else {
-            mimeData->setData(format, data);
         }
     }
     return mimeData;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.