[Panel-devel] Service Runner Patch

Aaron J. Seigo aseigo at kde.org
Mon Feb 26 00:38:47 CET 2007


On February 25, 2007, fonz2591 wrote:
> Here is a patch to allow KRunner to run programs based on the "Name=" tag
> in their .desktop files.
>
> I also included a .desktop file to test this feature.
> Place it in KDE4 Directory/share/applications/kde4/ .
> Test it by typing Test App into KRunner.  It should launch konsole.

+#include <iostream>
+using namespace std;

woops =) some debug stuff left ... btw, KDebug is often easier to use with 
Qt/KDE objects.

+    // i reccomend not trying 'service != 0' (its not worth the errors)
+    return (service && service->name() == term);

i just looked and kserviceptr does actually have a converstion to bool.

so "return service;" should workd, though "return !service.isNull()" might be 
more readable.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070225/bd9e2bcf/attachment.pgp 


More information about the Panel-devel mailing list