[neon/kf6/kf6-kio/Neon/release] debian/patches: previewjob_assert backport requested by nicofee https://invent.kde.org/frameworks/kio/-/merge_requests/1770

Carlos De Maine null at kde.org
Sun Dec 22 08:05:25 GMT 2024


Git commit cdfcfafdd5ecb6aa4b658d1f79f356f6e6da11a6 by Carlos De Maine.
Committed on 22/12/2024 at 08:05.
Pushed by carlosdem into branch 'Neon/release'.

previewjob_assert backport requested by nicofee https://invent.kde.org/frameworks/kio/-/merge_requests/1770

(cherry picked from commit c4bd8785e366df2f52d007112593d42d9d33c1e1)

Co-authored-by: Carlos De Maine <carlosd.kde at gmail.com>

A  +16   -0    debian/patches/previewjob_assert_debug.diff
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/kf6/kf6-kio/-/commit/cdfcfafdd5ecb6aa4b658d1f79f356f6e6da11a6

diff --git a/debian/patches/previewjob_assert_debug.diff b/debian/patches/previewjob_assert_debug.diff
new file mode 100644
index 0000000..5a0eac1
--- /dev/null
+++ b/debian/patches/previewjob_assert_debug.diff
@@ -0,0 +1,16 @@
+diff --git a/src/gui/previewjob.cpp b/src/gui/previewjob.cpp
+index 23ef5554b51946c6a43461591e98bb8b92355693..1613b6b6f4531bf8a1a9581b63d5e73b8ce03951 100644
+--- a/src/gui/previewjob.cpp
++++ b/src/gui/previewjob.cpp
+@@ -707,6 +707,11 @@ void PreviewJobPrivate::getOrCreateThumbnail()
+     const KFileItem &item = currentItem.item;
+     const QString localPath = item.localPath();
+     if (!localPath.isEmpty()) {
++        QFileInfo info(localPath);
++        Q_ASSERT_X(info.isAbsolute(),
++                   "PreviewJobPrivate::getOrCreateThumbnail",
++                   qPrintable(QLatin1String("Local path for url ") + item.url().toString() + QLatin1String(" is not absolute: ") + localPath));
++
+         createThumbnail(localPath);
+         return;
+     }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..081f262
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+previewjob_assert_debug.diff


More information about the Neon-commits mailing list