Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F16569123
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
35 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/kded/tests/kmimeassociationstest.cpp b/kded/tests/kmimeassociationstest.cpp
index d2ba2141fd..9058525a69 100644
--- a/kded/tests/kmimeassociationstest.cpp
+++ b/kded/tests/kmimeassociationstest.cpp
@@ -1,466 +1,467 @@
/* This file is part of the KDE libraries
Copyright (c) 2008 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License or ( at
your option ) version 3 or, at the discretion of KDE e.V. ( which shall
act as a proxy as in section 14 of the GPLv3 ), any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include <kprocess.h>
#include <kconfiggroup.h>
#include <kdesktopfile.h>
#include <kmimetypetrader.h>
#include <kdebug.h>
#include <kservicefactory.h>
#include <ktemporaryfile.h>
#include <qtest_kde.h>
#include "kmimeassociations.h"
#include <ksycoca.h>
#include <kstandarddirs.h>
// We need a factory that returns the same KService::Ptr every time it's asked for a given service.
// Otherwise the changes to the service's serviceTypes by KMimeAssociationsTest have no effect
class FakeServiceFactory : public KServiceFactory
{
public:
FakeServiceFactory() : KServiceFactory() {}
virtual KService::Ptr findServiceByMenuId(const QString &name) {
//kDebug() << name;
KService::Ptr result = m_cache.value(name);
if (!result) {
result = KServiceFactory::findServiceByMenuId(name);
m_cache.insert(name, result);
}
//kDebug() << name << result.data();
return result;
}
virtual KService::Ptr findServiceByDesktopPath(const QString &name)
{
KService::Ptr result = m_cache.value(name); // yeah, same cache, I don't care :)
if (!result) {
result = KServiceFactory::findServiceByDesktopPath(name);
m_cache.insert(name, result);
}
return result;
}
private:
QMap<QString, KService::Ptr> m_cache;
};
// Helper method for all the trader tests, comes from kmimetypetest.cpp
static bool offerListHasService( const KService::List& offers,
const QString& entryPath,
bool expected /* if set, show error if not found */ )
{
bool found = false;
Q_FOREACH(const KService::Ptr &serv, offers) {
if ( serv->entryPath() == entryPath ) {
if( found ) { // should be there only once
qWarning( "ERROR: %s was found twice in the list", qPrintable( entryPath ) );
return false; // make test fail
}
found = true;
}
}
if (!found && expected) {
kWarning() << "ERROR:" << entryPath << "not found in offer list. Here's the full list:";
Q_FOREACH(const KService::Ptr &serv, offers) {
kDebug() << serv->entryPath();
}
}
return found;
}
static void writeAppDesktopFile(const QString& path, const QStringList& mimeTypes)
{
KDesktopFile file(path);
KConfigGroup group = file.desktopGroup();
group.writeEntry("Name", "FakeApplication");
group.writeEntry("Type", "Application");
group.writeEntry("Exec", "ls");
group.writeXdgListEntry("MimeType", mimeTypes);
}
/**
* This unit test verifies the parsing of mimeapps.list files, both directly
* and via kbuildsycoca (and making trader queries).
*/
class KMimeAssociationsTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void initTestCase()
{
QString kdehome = QDir::home().canonicalPath() + "/.kde-unit-test";
m_localApps = KStandardDirs::locateLocal("xdgdata-apps", "");
QVERIFY(m_localApps.startsWith(kdehome));
// Create factory on the heap and don't delete it.
// It registers to KSycoca, which deletes it at end of program execution.
KServiceFactory* factory = new FakeServiceFactory;
QCOMPARE(KServiceFactory::self(), factory); // ctor sets s_self
bool mustUpdateKSycoca = false;
if ( !KSycoca::isAvailable() ) {
mustUpdateKSycoca = true;
}
if (QFile::exists(m_localApps + "/mimeapps.list")) {
QFile::remove(m_localApps + "/mimeapps.list");
mustUpdateKSycoca = true;
}
// Create fake application for some tests below.
fakeTextApplication = m_localApps + "faketextapplication.desktop";
if (!QFile::exists(fakeTextApplication)) {
mustUpdateKSycoca = true;
writeAppDesktopFile(fakeTextApplication, QStringList() << "text/plain");
}
fakeJpegApplication = m_localApps + "fakejpegapplication.desktop";
if (!QFile::exists(fakeJpegApplication)) {
mustUpdateKSycoca = true;
writeAppDesktopFile(fakeJpegApplication, QStringList() << "image/jpeg");
}
fakeArkApplication = m_localApps + "fakearkapplication.desktop";
if (!QFile::exists(fakeArkApplication)) {
mustUpdateKSycoca = true;
writeAppDesktopFile(fakeArkApplication, QStringList() << "application/zip");
}
if ( mustUpdateKSycoca ) {
// Update ksycoca in ~/.kde-unit-test after creating the above
runKBuildSycoca();
}
// For debugging: print all services and their storageId
#if 0
const KService::List lst = KService::allServices();
QVERIFY( !lst.isEmpty() );
Q_FOREACH(const KService::Ptr& serv, lst) {
qDebug() << serv->entryPath() << serv->storageId() /*<< serv->desktopEntryName()*/;
}
#endif
KService::Ptr fakeApplicationService = KService::serviceByStorageId("faketextapplication.desktop");
QVERIFY(fakeApplicationService);
m_mimeAppsFileContents = "[Added Associations]\n"
"image/jpeg=fakejpegapplication.desktop;\n"
"text/html=kde4-kfmclient_html.desktop;\n"
// konsole.desktop is without kde4- to test fallback lookup
"text/plain=kde4-kate.desktop;kde4-kwrite.desktop;konsole.desktop;idontexist.desktop;\n"
// test alias resolution
"application/x-pdf=fakejpegapplication.desktop;\n"
"[Added KParts/ReadOnlyPart Associations]\n"
"text/plain=katepart.desktop;\n"
"[Removed Associations]\n"
"image/jpeg=firefox.desktop;\n"
"text/html=kde4-dolphin.desktop;kde4-kwrite.desktop;\n";
// Expected results
preferredApps["image/jpeg"] << "fakejpegapplication.desktop";
preferredApps["application/pdf"] << "fakejpegapplication.desktop";
preferredApps["text/plain"] << "kde4-kate.desktop" << "kde4-kwrite.desktop";
preferredApps["text/html"] << "kde4-kfmclient_html.desktop";
removedApps["image/jpeg"] << "firefox.desktop";
removedApps["text/html"] << "kde4-dolphin.desktop" << "kde4-kwrite.desktop";
// Clean-up non-existing apps
removeNonExisting(preferredApps);
removeNonExisting(removedApps);
}
void cleanupTestCase()
{
QFile::remove(m_localApps + "/mimeapps.list");
runKBuildSycoca();
}
void testParseSingleFile()
{
KOfferHash offerHash;
KMimeAssociations parser(offerHash);
KTemporaryFile tempFile;
QVERIFY(tempFile.open());
tempFile.write(m_mimeAppsFileContents);
const QString fileName = tempFile.fileName();
tempFile.close();
//QTest::ignoreMessage(QtDebugMsg, "findServiceByDesktopPath: idontexist.desktop not found");
parser.parseMimeAppsList(fileName, 100);
for (ExpectedResultsMap::const_iterator it = preferredApps.constBegin(),
end = preferredApps.constEnd() ; it != end ; ++it) {
const QString mime = it.key();
const QList<KServiceOffer> offers = offerHash.offersFor(mime);
Q_FOREACH(const QString& service, it.value()) {
KService::Ptr serv = KService::serviceByStorageId(service);
if (serv && !offersContains(offers, serv)) {
kDebug() << serv.data() << serv->entryPath() << "does not have" << mime;
QFAIL("offer does not have servicetype");
}
}
}
for (ExpectedResultsMap::const_iterator it = removedApps.constBegin(),
end = removedApps.constEnd() ; it != end ; ++it) {
const QString mime = it.key();
const QList<KServiceOffer> offers = offerHash.offersFor(mime);
Q_FOREACH(const QString& service, it.value()) {
KService::Ptr serv = KService::serviceByStorageId(service);
if (serv && offersContains(offers, serv)) {
kDebug() << serv.data() << serv->entryPath() << "does not have" << mime;
QFAIL("offer should not have servicetype");
}
}
}
}
void testGlobalAndLocalFiles()
{
KOfferHash offerHash;
KMimeAssociations parser(offerHash);
// Write global file
KTemporaryFile tempFileGlobal;
QVERIFY(tempFileGlobal.open());
QByteArray globalAppsFileContents = "[Added Associations]\n"
"image/jpeg=firefox.desktop;\n" // removed by local config
"text/html=firefox.desktop;\n" // mdv
"image/png=fakejpegapplication.desktop;\n";
tempFileGlobal.write(globalAppsFileContents);
const QString globalFileName = tempFileGlobal.fileName();
tempFileGlobal.close();
// We didn't keep it, so we need to write the local file again
KTemporaryFile tempFile;
QVERIFY(tempFile.open());
tempFile.write(m_mimeAppsFileContents);
const QString fileName = tempFile.fileName();
tempFile.close();
parser.parseMimeAppsList(globalFileName, 1000);
parser.parseMimeAppsList(fileName, 1050); // += 50 is correct.
QList<KServiceOffer> offers = offerHash.offersFor("image/jpeg");
qStableSort(offers); // like kbuildservicefactory.cpp does
const QStringList expectedJpegApps = preferredApps["image/jpeg"];
QCOMPARE(assembleOffers(offers), expectedJpegApps);
offers = offerHash.offersFor("text/html");
qStableSort(offers);
QStringList textHtmlApps = preferredApps["text/html"];
if (KService::serviceByStorageId("firefox.desktop"))
textHtmlApps.append("firefox.desktop");
qDebug() << assembleOffers(offers);
QCOMPARE(assembleOffers(offers), textHtmlApps);
offers = offerHash.offersFor("image/png");
qStableSort(offers);
QCOMPARE(assembleOffers(offers), QStringList() << "fakejpegapplication.desktop");
}
void testSetupRealFile()
{
writeToMimeApps(m_mimeAppsFileContents);
// Test a trader query
KService::List offers = KMimeTypeTrader::self()->query("image/jpeg");
//kDebug() << m_mimeAppsFileContents;
//kDebug() << "preferred apps for jpeg: " << preferredApps.value("image/jpeg");
//for (int i = 0; i < offers.count(); ++i) {
// kDebug() << "offers for" << "image/jpeg" << ":" << i << offers[i]->storageId();
//}
QCOMPARE(offers.first()->storageId(), QString("fakejpegapplication.desktop"));
// Now the generic variant of the above test:
// for each mimetype, check that the preferred apps are as specified
for (ExpectedResultsMap::const_iterator it = preferredApps.constBegin(), end = preferredApps.constEnd() ; it != end ; ++it) {
const QString mime = it.key();
const KService::List offers = KMimeTypeTrader::self()->query(mime);
for (int i = 0; i < offers.count(); ++i) {
kDebug() << "offers for" << mime << ":" << i << offers[i]->storageId();
}
QStringList offerIds = assembleServices(offers, it.value().count());
QCOMPARE(offerIds, it.value());
//const QStringList expectedPreferredServices = it.value();
//for (int i = 0; i < expectedPreferredServices.count(); ++i) {
//kDebug() << mime << i << expectedPreferredServices[i];
// QCOMPARE(expectedPreferredServices[i], offers[i]->storageId());
//}
}
}
void testMultipleInheritance()
{
// application/x-shellscript inherits from both text/plain and application/x-executable
KService::List offers = KMimeTypeTrader::self()->query("application/x-shellscript");
QVERIFY(offerListHasService(offers, fakeTextApplication, true));
}
void testRemoveAssociationFromParent()
{
// I removed kate from text/plain, and it would still appear in text/x-java.
// First, let's check our fake app is associated with text/plain
KService::List offers = KMimeTypeTrader::self()->query("text/plain");
QVERIFY(offerListHasService(offers, fakeTextApplication, true));
writeToMimeApps(QByteArray("[Removed Associations]\n"
"text/plain=faketextapplication.desktop;\n"));
offers = KMimeTypeTrader::self()->query("text/plain");
QVERIFY(!offerListHasService(offers, fakeTextApplication, false));
offers = KMimeTypeTrader::self()->query("text/x-java");
QVERIFY(!offerListHasService(offers, fakeTextApplication, false));
}
void testRemovedImplicitAssociation() // remove (implicit) assoc from derived mimetype
{
// #164584: Removing ark from opendocument.text didn't work
const QString opendocument = "application/vnd.oasis.opendocument.text";
KService::List offers = KMimeTypeTrader::self()->query(opendocument);
QVERIFY(offerListHasService(offers, fakeArkApplication, true));
writeToMimeApps(QByteArray("[Removed Associations]\n"
"application/vnd.oasis.opendocument.text=fakearkapplication.desktop;\n"));
offers = KMimeTypeTrader::self()->query(opendocument);
QVERIFY(!offerListHasService(offers, fakeArkApplication, false));
offers = KMimeTypeTrader::self()->query("application/zip");
QVERIFY(offerListHasService(offers, fakeArkApplication, true));
}
void testRemovedImplicitAssociation178560()
{
// #178560: Removing ark from interface/x-winamp-skin didn't work
- const QString mime = "interface/x-winamp-skin";
+ // Using application/x-kns (another zip-derived mimetype) nowadays.
+ const QString mime = "application/x-kns";
KService::List offers = KMimeTypeTrader::self()->query(mime);
QVERIFY(offerListHasService(offers, fakeArkApplication, true));
writeToMimeApps(QByteArray("[Removed Associations]\n"
- "interface/x-winamp-skin=fakearkapplication.desktop;\n"));
+ "application/x-kns=fakearkapplication.desktop;\n"));
offers = KMimeTypeTrader::self()->query(mime);
QVERIFY(!offerListHasService(offers, fakeArkApplication, false));
offers = KMimeTypeTrader::self()->query("application/zip");
QVERIFY(offerListHasService(offers, fakeArkApplication, true));
}
// remove assoc from a mime which is both a parent and a derived mimetype
void testRemovedMiddleAssociation()
{
// More tricky: x-theme inherits x-desktop inherits text/plain,
// if we remove an association for x-desktop then x-theme shouldn't
// get it from text/plain...
KService::List offers;
writeToMimeApps(QByteArray("[Removed Associations]\n"
"application/x-desktop=faketextapplication.desktop;\n"));
offers = KMimeTypeTrader::self()->query("text/plain");
QVERIFY(offerListHasService(offers, fakeTextApplication, true));
offers = KMimeTypeTrader::self()->query("application/x-desktop");
QVERIFY(!offerListHasService(offers, fakeTextApplication, false));
offers = KMimeTypeTrader::self()->query("application/x-theme");
QVERIFY(!offerListHasService(offers, fakeTextApplication, false));
}
private:
typedef QMap<QString /*mimetype*/, QStringList> ExpectedResultsMap;
void runKBuildSycoca()
{
//kDebug();
// Wait for notifyDatabaseChanged DBus signal
// (The real KCM code simply does the refresh in a slot, asynchronously)
QEventLoop loop;
QObject::connect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), &loop, SLOT(quit()));
KProcess proc;
const QString kbuildsycoca = KStandardDirs::findExe(KBUILDSYCOCA_EXENAME);
QVERIFY(!kbuildsycoca.isEmpty());
proc << kbuildsycoca;
proc.setOutputChannelMode(KProcess::MergedChannels); // silence kbuildsycoca output
proc.execute();
loop.exec();
}
void writeToMimeApps(const QByteArray& contents)
{
QString mimeAppsPath = m_localApps + "/mimeapps.list";
QFile mimeAppsFile(mimeAppsPath);
QVERIFY(mimeAppsFile.open(QIODevice::WriteOnly));
mimeAppsFile.write(contents);
mimeAppsFile.close();
runKBuildSycoca();
}
static bool offersContains(const QList<KServiceOffer>& offers, KService::Ptr serv)
{
Q_FOREACH(const KServiceOffer& offer, offers) {
if (offer.service()->storageId() == serv->storageId())
return true;
}
return false;
}
static QStringList assembleOffers(const QList<KServiceOffer>& offers) {
QStringList lst;
Q_FOREACH(const KServiceOffer& offer, offers) {
lst.append(offer.service()->storageId());
}
return lst;
}
static QStringList assembleServices(const QList<KService::Ptr>& services, int maxCount = -1) {
QStringList lst;
Q_FOREACH(const KService::Ptr& service, services) {
lst.append(service->storageId());
if (maxCount > -1 && lst.count() == maxCount)
break;
}
return lst;
}
void removeNonExisting(ExpectedResultsMap& erm) {
for (ExpectedResultsMap::iterator it = erm.begin(), end = erm.end() ; it != end ; ++it) {
QMutableStringListIterator serv_it( it.value() );
while (serv_it.hasNext()) {
if (!KService::serviceByStorageId(serv_it.next())) {
kDebug() << "removing non-existing entry" << serv_it.value();
serv_it.remove();
}
}
}
}
QString m_localApps;
QByteArray m_mimeAppsFileContents;
QString fakeTextApplication;
QString fakeJpegApplication;
QString fakeArkApplication;
ExpectedResultsMap preferredApps;
ExpectedResultsMap removedApps;
};
QTEST_KDEMAIN_CORE( KMimeAssociationsTest )
#include "kmimeassociationstest.moc"
diff --git a/mimetypes/kde.xml b/mimetypes/kde.xml
index ace019606d..a82b87c327 100644
--- a/mimetypes/kde.xml
+++ b/mimetypes/kde.xml
@@ -1,428 +1,422 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
It comes with ABSOLUTELY NO WARRANTY, to the extent permitted by law. You may
redistribute copies of update-mime-database under the terms of the GNU General
Public License. For more information about these matters, see the file named
COPYING.
-->
<!--
Notes:
- the mime types in this file are valid with the version 0.30 of the
shared-mime-info package.
- the "fdo #xxxxx" are the wish in the freedesktop.org bug database to include
the mime type there.
-->
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/metalink+xml">
<sub-class-of type="application/xml"/>
<comment>Metalink download</comment>
<glob pattern="*.metalink"/>
</mime-type>
<mime-type type="application/relaxng">
<sub-class-of type="application/xml"/>
<comment>RELAX NG</comment>
<glob pattern="*.rng"/>
</mime-type>
<mime-type type="application/x-cda">
<comment>CD audio</comment>
<glob pattern="*.cda"/>
</mime-type>
<mime-type type="application/x-font-snf">
<comment>SNF bitmap font</comment>
<glob pattern="*.snf"/>
<glob pattern="*.snf.Z"/>
<glob pattern="*.snf.gz"/>
</mime-type>
<mime-type type="application/x-java-applet">
<comment>Java applet</comment>
</mime-type>
<mime-type type="application/x-khtml-adaptor">
<comment>KHTML Extension Adaptor</comment>
</mime-type>
<mime-type type="application/x-kcsrc">
<comment>KDE color scheme</comment>
<acronym>KDE</acronym>
<expanded-acronym>K Desktop Environment</expanded-acronym>
<glob pattern="*.kcsrc"/>
</mime-type>
<mime-type type="application/x-kns">
<sub-class-of type="application/zip"/>
<comment>KNewStuff package</comment>
<glob pattern="*.kns"/>
</mime-type>
<mime-type type="application/x-kwallet"> <!-- fdo #6326 rejected, will stay KDE-specific -->
<comment>KWallet wallet</comment>
<magic priority="80">
<match type="string" value="KWALLET" offset="0"/>
</magic>
<glob pattern="*.kwl"/>
</mime-type>
<mime-type type="application/x-kudesigner">
<comment>Kugar report template</comment>
<glob pattern="*.kut"/>
</mime-type>
<mime-type type="application/x-mimearchive">
<comment>mime encapsulated web archive</comment>
<glob pattern="*.mhtml"/>
<glob pattern="*.mht"/>
</mime-type>
<mime-type type="application/x-nzb"> <!-- fdo #10029 -->
<comment>NewzBin usenet index</comment>
<sub-class-of type="application/xml"/>
<magic priority="80">
<match type="string" value="<nzb" offset="0:256"/>
</magic>
<glob pattern="*.nzb"/>
</mime-type>
<mime-type type="application/x-plasma">
<sub-class-of type="application/zip"/>
<comment>plasmoid</comment>
<glob pattern="*.plasmoid"/>
</mime-type>
<mime-type type="application/x-superkaramba">
<sub-class-of type="application/zip"/>
<comment>SuperKaramba theme</comment>
<glob pattern="*.skz"/>
</mime-type>
<mime-type type="application/x-vnd.kde.kexi"> <!-- FIXED 0.70 -->
<comment>Kexi project file</comment>
<glob pattern="*.kexi"/>
</mime-type>
<mime-type type="application/x-vnd.kde.plan">
<comment>Calligra Plan project management document</comment>
<glob pattern="*.plan"/>
</mime-type>
<mime-type type="application/x-vnd.kde.plan.work">
<comment>Calligra Plan work package document</comment>
<glob pattern="*.planwork"/>
</mime-type>
<mime-type type="application/x-vnd.kde.kplato">
<comment>KPlato project management document</comment>
<glob pattern="*.kplato"/>
</mime-type>
<mime-type type="application/x-vnd.kde.kplato.work">
<comment>KPlato project management work package</comment>
<glob pattern="*.kplatowork"/>
</mime-type>
<mime-type type="application/x-vnd.kde.kugar.mixed">
<comment>Kugar archive</comment>
<glob pattern="*.kug"/>
</mime-type>
<mime-type type="application/x-webarchive">
<sub-class-of type="application/x-compressed-tar"/>
<sub-class-of type="application/x-gzip"/> <!-- only necessary because x-compressed-tar is not specifying this sub-class-of (shared-mime-info 0.8) -->
<comment>web archive</comment>
<glob pattern="*.war"/>
</mime-type>
<mime-type type="application/xsd">
<sub-class-of type="application/xml"/>
<comment>W3C XML schema</comment>
<glob pattern="*.xsd"/>
</mime-type>
<mime-type type="audio/aac">
<comment>AAC sound</comment>
<glob pattern="*.aac"/>
</mime-type>
<mime-type type="audio/x-pn-realaudio-plugin"> <!-- Not a type of file, so will not go to shared-mime-info -->
<comment>RealAudio plugin file</comment>
</mime-type>
<mime-type type="application/vnd.kde.kphotoalbum-import"> <!-- fdo #12732 rejected, will stay KDE-specific -->
<comment>KPhotoAlbum import</comment>
<glob pattern="*.kim"/>
</mime-type>
<mime-type type="image/x-hdr"> <!-- TODO fdo report -->
<comment>HDR image</comment>
<acronym>HDR</acronym>
<expanded-acronym>High Dynamic Range</expanded-acronym>
<glob pattern="*.hdr"/>
<glob pattern="*.pic"/>
</mime-type>
<mime-type type="image/x-kde-raw">
<sub-class-of type="image/x-dcraw"/>
<comment>KDE raw image formats</comment>
<glob pattern="*.bay"/>
<glob pattern="*.bmq"/>
<glob pattern="*.cs1"/>
<glob pattern="*.cs2"/>
<glob pattern="*.erf"/>
<glob pattern="*.fff"/>
<glob pattern="*.hrd"/>
<glob pattern="*.mdc"/>
<glob pattern="*.mos"/>
<glob pattern="*.pnx"/>
<glob pattern="*.rdc"/>
</mime-type>
<mime-type type="text/plain"> <!-- As discussed on xdg list, *.doc is needed here for disambiguation -->
<glob pattern="*.doc"/>
</mime-type>
<mime-type type="text/x-hex">
<sub-class-of type="text/plain"/>
<comment>Intel® hexadecimal object file</comment>
<glob pattern="*.hex"/>
</mime-type>
<mime-type type="text/x-katefilelist">
<sub-class-of type="text/plain"/>
<comment>Kate file list loader plugin list</comment>
<glob pattern="*.katefl"/>
</mime-type>
<mime-type type="text/x-objchdr"> <!-- ??? Useless, without glob or magic. Remove? -->
<sub-class-of type="text/x-csrc"/>
<comment>Objective-C header</comment>
</mime-type>
<mime-type type="text/vnd.abc"> <!-- fdo #6578 -->
<sub-class-of type="text/plain"/>
<comment>abc musical notation file</comment>
<magic priority="80">
<match type="string" value="%abc" offset="0"/>
</magic>
<glob pattern="*.abc"/>
</mime-type>
<!-- all/ fake mime types -->
<mime-type type="all/all">
<comment>all files and folders</comment>
</mime-type>
<mime-type type="all/allfiles">
<comment>all files</comment>
</mime-type>
<!-- uri/ fake mime types -->
<mime-type type="uri/mms">
<comment>mms: URIs</comment>
</mime-type>
<mime-type type="uri/mmst">
<comment>mmst: URIs</comment>
</mime-type>
<mime-type type="uri/mmsu">
<comment>mmsu: URIs</comment>
</mime-type>
<mime-type type="uri/pnm">
<comment>pnm: URIs</comment>
</mime-type>
<mime-type type="uri/rtspt">
<comment>rtspt: URIs</comment>
</mime-type>
<mime-type type="uri/rtspu">
<comment>rtspu: URIs</comment>
</mime-type>
<mime-type type="application/vnd.kde.fontspackage">
<sub-class-of type="application/zip"/>
<comment>fonts package</comment>
<glob pattern="*.fonts.zip"/>
</mime-type>
<mime-type type="application/x-konsole">
<comment>file to open a shell</comment>
<glob pattern="*.shell"/>
</mime-type>
<mime-type type="application/x-smb-server"> <!-- KDE-specific -->
<sub-class-of type="inode/directory"/>
<comment>Windows server</comment>
</mime-type>
<mime-type type="application/x-smb-workgroup"> <!-- KDE-specific -->
<sub-class-of type="inode/directory"/>
<comment>Windows workgroup</comment>
</mime-type>
<mime-type type="application/x-ksysguard">
<!-- <sub-class-of type="application/xml"/> -->
<comment>KDE system monitor</comment>
<glob pattern="*.sgrd"/>
</mime-type>
<mime-type type="application/x-ktheme">
<sub-class-of type="application/zip"/>
<comment>KDE theme</comment>
<glob pattern="*.kth"/>
</mime-type>
<mime-type type="application/x-quanta">
<sub-class-of type="text/plain"/>
<comment>Quanta project</comment>
<glob pattern="*.quanta"/>
</mime-type>
<mime-type type="application/x-kommander">
<sub-class-of type="text/plain"/>
<comment>Kommander file</comment>
<glob pattern="*.kmdr"/>
</mime-type>
<mime-type type="application/x-tuberling">
<comment>potato</comment>
<glob pattern="*.tuberling"/>
</mime-type>
<mime-type type="application/x-kolf">
<comment>Kolf saved game</comment>
<magic priority="80">
<match offset="0" type="string" value="[0 Saved Game]" />
</magic>
<glob pattern="*.kolfgame"/>
</mime-type>
<mime-type type="application/x-kourse">
<comment>Kolf course</comment>
<magic priority="80">
<match offset="0" type="string" value="[0-course@-50,-50]" />
</magic>
<glob pattern="*.kolf"/>
<glob pattern="*.course"/>
<glob pattern="*.kourse"/>
</mime-type>
<mime-type type="application/vnd.kde.okular-archive">
<comment>Okular document archive</comment>
<glob pattern="*.okular"/>
</mime-type>
<mime-type type="application/x-cabri">
<comment>Cabri figure</comment>
<magic priority="80">
<match offset="0" type="string" value="FIGURE CabriII vers. " /> <!-- Cabri 1.0 -->
<match offset="0" type="string" value="Figure Cabri II " /> <!-- Cabri 1.2 -->
</magic>
<glob pattern="*.fig"/>
</mime-type>
<mime-type type="application/x-drgeo">
<comment>Dr. Geo figure</comment>
<magic priority="80">
<match offset="0" type="string" value="<?xml version="1.0"?>\n<drgenius>" />
</magic>
<glob pattern="*.fgeo"/>
</mime-type>
<mime-type type="application/x-kgeo">
<comment>KGeo figure</comment>
<glob pattern="*.kgeo"/>
</mime-type>
<mime-type type="application/x-kig">
<comment>Kig figure</comment>
<glob pattern="*.kig"/>
<glob pattern="*.kigz"/>
</mime-type>
<mime-type type="application/x-kseg">
<comment>KSeg document</comment>
<glob pattern="*.seg"/>
</mime-type>
<mime-type type="application/x-kvtml">
<sub-class-of type="application/xml"/>
<comment>vocabulary trainer document</comment>
<glob pattern="*.kvtml"/>
</mime-type>
<mime-type type="application/x-kmplot">
<comment>KmPlot file</comment>
<glob pattern="*.fkt"/>
</mime-type>
<mime-type type="application/x-kwordquiz">
<comment>KWordQuiz vocabulary</comment>
<glob pattern="*.wql"/>
</mime-type>
<mime-type type="application/x-kcachegrind">
<comment>Cachegrind/Callgrind profile dump</comment>
<glob pattern="cachegrind.out*"/>
<glob pattern="callgrind.out*"/>
</mime-type>
<mime-type type="application/x-uml">
<comment>Umbrello UML Modeller file</comment>
<glob pattern="*.xmi"/>
<glob pattern="*.xmi.tgz"/>
<glob pattern="*.xmi.tar.bz2"/>
</mime-type>
<mime-type type="application/x-ms-shortcut">
<comment>Windows link</comment>
<alias type="application/x-win-lnk"/>
<glob pattern="*.lnk"/>
</mime-type>
<mime-type type="application/x-kgetlist">
<sub-class-of type="application/xml"/>
<comment>KGet download list</comment>
<glob pattern="*.kgt"/>
</mime-type>
<mime-type type="application/x-kopete-emoticons">
<comment>Kopete emoticons archive</comment>
<glob pattern="*.kopete-emoticons"/>
</mime-type>
<mime-type type="application/x-icq">
<comment>ICQ contact</comment>
<glob pattern="*.uin"/>
<glob pattern="*.icq"/>
</mime-type>
- <mime-type type="interface/x-winamp-skin">
- <sub-class-of type="application/zip"/>
- <comment>compressed Winamp skin</comment>
- <glob pattern="*.wsz"/>
- </mime-type>
-
<mime-type type="video/x-ms-wmp"> <!-- fdo #19671, rejected because "not a file type, only a plugin type" -->
<comment>Microsoft Media Format</comment>
<sub-class-of type="video/x-ms-wmv"/>
<alias type="video/mediaplayer"/>
<alias type="application/x-mplayer2"/>
<glob pattern="*.wmp"/>
</mime-type>
<mime-type type="application/x-kexiproject-shortcut"> <!-- FIXED 0.70 -->
<comment>shortcut to Kexi project on database server</comment>
<glob pattern="*.kexis"/>
</mime-type>
<mime-type type="application/x-kexiproject-sqlite"> <!-- FIXED 0.70 -->
<comment>Kexi database file-based project</comment>
<glob pattern="*.kexi"/>
</mime-type>
<mime-type type="application/x-kexiproject-sqlite2"> <!-- FIXED 0.70 -->
<sub-class-of type="application/x-sqlite2"/>
<comment>Kexi database file-based project</comment>
<glob pattern="*.kexi"/>
</mime-type>
<mime-type type="application/x-kexiproject-sqlite3"> <!-- FIXED 0.70 -->
<sub-class-of type="application/x-sqlite3"/>
<comment>Kexi database file-based project</comment>
<glob pattern="*.kexi"/>
</mime-type>
<mime-type type="application/x-kexi-connectiondata"> <!-- FIXED 0.70 -->
<comment>data for database server connection</comment>
<glob pattern="*.kexic"/>
</mime-type>
<!-- http://www4.wiwiss.fu-berlin.de/bizer/TriG/ -->
<!-- Used in Nepomuk to encode almost all ontologies -->
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-trig"> <!-- fdo #18089 -->
<comment>TriG RDF document</comment>
<sub-class-of type="text/plain" />
<glob pattern="*.trig" />
</mime-type>
<!-- http://www.dajobe.org/2004/01/turtle/#sec-mime -->
<!-- Important: the SPARQL RDF query lanaguge uses turtle encoding for graph patterns. -->
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-turtle"> <!-- fdo #18089 -->
<comment>Turtle RDF document</comment>
<sub-class-of type="text/plain" />
</mime-type>
<mime-type type="image/x-pic"> <!-- fdo #26038 -->
<comment>Softimage PIC image</comment>
<magic priority="80">
<match value="0x5380f634" type="big32" offset="0"/>
</magic>
<glob pattern="*.pic"/>
</mime-type>
<mime-type type="text/x-qml"> <!-- in fdo smi > 0.90 -->
<comment>Qt Markup Language file</comment>
<magic priority="80">
<match type="string" value="import Qt " offset="0:256"/>
</magic>
<glob pattern="*.qml"/>
</mime-type>
<mime-type type="application/x-mobipocket-ebook">
<comment>Mobipocket e-book</comment>
<sub-class-of type="application/x-palm-database"/>
<generic-icon name="x-office-document"/>
<glob pattern="*.mobi"/>
<glob pattern="*.prc" />
<magic priority="30">
<!-- This also matches AportisDoc, so lower the priority and prefer extension -->
<match type="string" offset="60" value="TEXtREAd" />
</magic>
<magic priority="80">
<match type="string" offset="60" value="BOOKMOBI" />
</magic>
</mime-type>
</mime-info>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 1, 8:13 AM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10074822
Default Alt Text
(35 KB)
Attached To
Mode
rKL kdelibs
Attached
Detach File
Event Timeline
Log In to Comment