diff --git a/kdecore/services/kservice.cpp b/kdecore/services/kservice.cpp index bf7a5cd0..7ccc7526 100644 --- a/kdecore/services/kservice.cpp +++ b/kdecore/services/kservice.cpp @@ -633,9 +633,6 @@ KService::Ptr KService::serviceByStorageId( const QString& _storageId ) if (tmp.endsWith(QLatin1String(".desktop"))) tmp.truncate(tmp.length()-8); - if (tmp.endsWith(QLatin1String(".kdelnk"))) - tmp.truncate(tmp.length()-7); - service = KService::serviceByDesktopName(tmp); return service; diff --git a/kdecore/tests/kmimetypetest.cpp b/kdecore/tests/kmimetypetest.cpp index b4ee58ef..4e7ed98e 100644 --- a/kdecore/tests/kmimetypetest.cpp +++ b/kdecore/tests/kmimetypetest.cpp @@ -236,7 +236,6 @@ void KMimeTypeTest::testFindByPathUsingFileName_data() QTest::newRow("case-sensitive-only match") << "Core" << "application/octet-stream"; // #198477 QTest::newRow("desktop file") << "foo.desktop" << "application/x-desktop"; - QTest::newRow("old kdelnk file is x-desktop too") << "foo.kdelnk" << "application/x-desktop"; QTest::newRow("double-extension file") << "foo.tar.bz2" << "application/x-bzip-compressed-tar"; QTest::newRow("single-extension file") << "foo.bz2" << "application/x-bzip"; QTest::newRow(".doc should assume msword") << "somefile.doc" << "application/msword"; // #204139 diff --git a/kfile/knewfilemenu.cpp b/kfile/knewfilemenu.cpp index 8f81938e..92304c9b 100644 --- a/kfile/knewfilemenu.cpp +++ b/kfile/knewfilemenu.cpp @@ -596,11 +596,8 @@ void KNewFileMenuPrivate::fillMenu() { KNewFileMenuSingleton::Entry& entry = *templ; if (entry.entryType != KNewFileMenuSingleton::Separator) { - // There might be a .desktop for that one already, if it's a kdelnk - // This assumes we read .desktop files before .kdelnk files ... - - // In fact, we skip any second item that has the same text as another one. - // Duplicates in a menu look bad in any case. + // There might be a .desktop for that one already. In fact, we skip any second item + // that has the same text as another one. Duplicates in a menu look bad in any case. const bool bSkip = seenTexts.contains(entry.text); if (bSkip) { diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index e84234ee..e74781ee 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -140,11 +140,8 @@ static QString nameFromFileName(QString nameStr) { if ( nameStr.endsWith(QLatin1String(".desktop")) ) nameStr.truncate( nameStr.length() - 8 ); - if ( nameStr.endsWith(QLatin1String(".kdelnk")) ) - nameStr.truncate( nameStr.length() - 7 ); // Make it human-readable (%2F => '/', ...) - nameStr = KIO::decodeFileName( nameStr ); - return nameStr; + return KIO::decodeFileName( nameStr ); } mode_t KFilePermissionsPropsPlugin::fperm[3][4] = { @@ -1282,8 +1279,7 @@ void KFilePropsPlugin::applyChanges() KUrl oldurl = properties->kurl(); QString newFileName = KIO::encodeFileName(n); - if (d->bDesktopFile && !newFileName.endsWith(QLatin1String(".desktop")) && - !newFileName.endsWith(QLatin1String(".kdelnk"))) + if (d->bDesktopFile && !newFileName.endsWith(QLatin1String(".desktop"))) newFileName += ".desktop"; // Tell properties. Warning, this changes the result of properties->kurl() !