Removing untrusted .desktop custom icons
Michael Pyne
mpyne at purinchu.net
Sat Feb 28 05:30:19 GMT 2009
Seems to me the easiest way to implement not showing custom icons for
untrusted .desktop application launchers is to tweak KFileItem with the
following patch:
Index: kio/kio/kfileitem.cpp
===================================================================
--- kio/kio/kfileitem.cpp (revision 932617)
+++ kio/kio/kfileitem.cpp (working copy)
@@ -749,6 +749,8 @@
}
}
}
+ } else if ( cfg.hasApplicationType() &&
!KDesktopFile::isAuthorizedDesktopFile( path ) ) {
+ return QString("application-x-desktop");
}
return icon;
}
I just use KDesktopFile::hasApplicationType() to see if I need to dig further,
are there any other weird application launcher types that don't return true
for hasApplicationType that I need to worry about?
Regards,
- Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090228/3307030b/attachment.sig>
More information about the kde-core-devel
mailing list