From kde-bugs-dist Fri Jun 30 21:12:58 2006 From: Aurelien Gateau Date: Fri, 30 Jun 2006 21:12:58 +0000 To: kde-bugs-dist Subject: [Bug 120974] WISH: archives handling please Message-Id: <20060630211258.7056.qmail () ktown ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=115170199021314 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. http://bugs.kde.org/show_bug.cgi?id=120974 aurelien.gateau free fr changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From aurelien.gateau free fr 2006-06-30 23:12 ------- SVN commit 556603 by gateau: List of supported archive formats is no longer hard coded, so you can for example add support for rar archives by installing kio_rar. BUG:120974 M +2 -0 NEWS M +10 -4 gvcore/archive.cpp --- trunk/extragear/graphics/gwenview/NEWS #556602:556603 @ -10,6 +10,8 @ files whose resolution is unknown. - Correct of by one error in selection after files have been removed (Bug 111240). + - List of supported archive formats is no longer hard coded, so you can for + example add support for rar archives by installing kio_rar (Bug 120974). 2006.06.24 - v1.3.91 - New features: --- trunk/extragear/graphics/gwenview/gvcore/archive.cpp #556602:556603 @ -31,13 +31,19 @ typedef QMap MimeTypeProtocols; +static const char* KDE_PROTOCOL = "X-KDE-LocalProtocol"; + static const MimeTypeProtocols& mimeTypeProtocols() { static MimeTypeProtocols map; if (map.isEmpty()) { - map["application/x-tar"]="tar"; - map["application/x-tgz"]="tar"; - map["application/x-tbz"]="tar"; - map["application/x-zip"]="zip"; + KMimeType::List list = KMimeType::allMimeTypes(); + KMimeType::List::Iterator it=list.begin(), end=list.end(); + for (; it!=end; ++it) { + if ( (*it)->propertyNames().findIndex(KDE_PROTOCOL)!= -1 ) { + QString protocol = (*it)->property(KDE_PROTOCOL).toString(); + map[(*it)->name()] = protocol; + } + } } return map; }