Evil bug in KDE's mimetype/applnk handling
david at mandrakesoft.com
Mon Dec 2 01:47:36 GMT 2002
-----BEGIN PGP SIGNED MESSAGE-----
On Saturday 30 November 2002 11:20, Matthias Welwarsky wrote:
> Just stumbled over an ugly bug in KDE's application launcher.
In which version of KDE exactly?
> Now, unfortunately, by assigning konqueror to application/x-zip, you created a
With kopenwith.cpp version 1.66 (which is in KDE-3.1), it should instead create
// Check if there's already a service by that name, with the same Exec line
KService::Ptr serv = KService::serviceByDesktopName( serviceName );
bool ok = !serv; // ok if no such service yet
// also ok if we find the exact same service (well, "kwrite" == "kwrite %U"
if ( serv && (
serv->exec() == fullExec ||
serv->exec() == fullExec + " %u" ||
serv->exec() == fullExec + " %U" ||
serv->exec() == fullExec + " %f" ||
serv->exec() == fullExec + " %F"
ok = true;
m_pService = serv;
if (!ok) // service was found, but it was different -> keep looking
serviceName = initialServiceName + "-" + QString::number(i);
Unless I'm missing something, I believe I have already fixed the bug you're
> Others may say the the applnk concept
> is wrong and that mimetype->application links should be stored in the
> mimetype files...
Surely not! What would happen when the application is deinstalled?
How would 3rd-party apps install themselves?
This was the KDE-1 mis-design, let's not go back there....
David FAURE, david at mandrakesoft.com, faure at kde.org
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the kde-core-devel