Open the Application Launcher, right click any app -> Add to Panel (Widget),
then click the icon on the panel, it should launch.
Details
- Reviewers
broulik dfaure - Group Reviewers
Plasma - Commits
- R120:e3b251fd5b06: [IconApplet] Port KRun to ApplicationLauncherJob
Diff Detail
- Repository
- R120 Plasma Workspace
- Branch
- l-krun-port (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 27007 Build 27025: arc lint + arc unit
I forgot to submit my reply to your inline comment....
applets/icon/iconapplet.cpp | ||
---|---|---|
434–436 | I tried that first, and it doesn't work; those .desktop files are in a ~/.local/share/plasma_icons, ksycoca doesn't know about that location. |
applets/icon/iconapplet.cpp | ||
---|---|---|
434–436 | But why would serviceByStorageId work then? |
applets/icon/iconapplet.cpp | ||
---|---|---|
434–436 | According to the kservice docs KService::serviceByStorageId() param is "the storage id or desktop-file path of the service", so I guess that's why it works. |
applets/icon/iconapplet.cpp | ||
---|---|---|
434–436 | but "desktop file path" is what we're doing. what I believe is happening that you're actually launching the original file, not the one the icon uses. |
applets/icon/iconapplet.cpp | ||
---|---|---|
434–436 | I tried with: KService::Ptr service = KService::serviceByStorageId(m_localPath); qDebug() << "entryPath" << service->entryPath(); KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(service); and got: |
KServiceFactory::findServiceByStorageId falls back to "new KService" if it can't find the storageId in ksycoca. So yes it worked, but it's kind of pointless (and confusing) to call it just to go to the new KService fallback, better do that directly.
applets/icon/iconapplet.cpp | ||
---|---|---|
52 ↗ | (On Diff #82943) | You're not using that class, are you? |