Simpler check for flatpak
Needs ReviewPublic

Authored by apol on Thu, Apr 25, 11:47 PM.

Details

Reviewers
None
Group Reviewers
Frameworks
Summary

I saw it being checked like that, I think it reads a bit cleaner.

Diff Detail

Repository
R289 KNotifications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11244
Build 11262: arc lint + arc unit
apol created this revision.Thu, Apr 25, 11:47 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Apr 25, 11:47 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
apol requested review of this revision.Thu, Apr 25, 11:47 PM
broulik added inline comments.
src/knotificationmanager.cpp
94–95

Do you need this check now, even, since you're not using it anymore?

apol added a comment.Fri, Apr 26, 11:17 AM

We still use it to check whether to initialise portalDBusServiceExists. I'll simplify it a bit.

apol updated this revision to Diff 57023.Fri, Apr 26, 11:18 AM

No need for inSandbox to be a class member

Lookgs good to me, I'll wait for Kai to approve this since he is the maintainer. One thing to consider maybe, did /.flatpak-info always exist or is it something new? I always assumed there is just one flatpak-info file in $XDG_RUNTIME_DIR. Just to be sure it will work for older Flatpak versions.

src/knotificationmanager.cpp
94–95

I think Kai is right, since there is /.flatpak-info (which I didn't know about until now), you don't need to check $XDG_RUNTIME_DIR.