[kcmkwin/kwindesktop] Fix KPluginInfo(KService::Ptr) deprecation warning
AbandonedPublic

Authored by zzag on Jul 2 2018, 11:40 AM.

Details

Reviewers
mart
davidedmundson
Group Reviewers
KWin
Test Plan
  • Go to System Settins -> Desktop Behavior > Virtual Desktops
  • Open Switching tab
  • Select Fade desktop
  • Click the info button

Diff Detail

Repository
R108 KWin
Branch
fix-plugininfo-kservice-deprecation-warning
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 555
Build 567: arc lint + arc unit
zzag created this revision.Jul 2 2018, 11:40 AM
Restricted Application added a project: KWin. · View Herald TranscriptJul 2 2018, 11:40 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 2 2018, 11:40 AM
zzag added a comment.Jul 2 2018, 11:40 AM

FWIW, with this change, KWin compiles without any warnings \o/. (well, at least with GCC)

mart accepted this revision.Jul 2 2018, 1:12 PM
This revision is now accepted and ready to land.Jul 2 2018, 1:12 PM
davidedmundson requested changes to this revision.Jul 2 2018, 1:13 PM
davidedmundson added a subscriber: davidedmundson.

This doesn't seem right. You're still using a mixture of KService and KPluginInfo just avoiding the warning by parsing everything twice, but not really the point of the warning.

This revision now requires changes to proceed.Jul 2 2018, 1:13 PM
zzag added a comment.Jul 2 2018, 1:19 PM

This doesn't seem right. You're still using a mixture of KService and KPluginInfo just avoiding the warning by parsing everything twice, but not really the point of the warning.

That's what compositing KCM is doing.

So, what should I do?

apol added a subscriber: apol.Jul 2 2018, 2:01 PM

I'd say this new code makes some assumptions we don't want the KService user code to be doing. Here's some ideas:

  • we introduce a KPluginMetaData KService::metaData() const method.
  • we un-deprecate the KPluginInfo constructor.
kcmkwin/kwindesktop/main.cpp
576

Why did you change how the string is constructed?

zzag abandoned this revision.EditedJul 2 2018, 2:09 PM
In D13846#286121, @apol wrote:

I'd say this new code makes some assumptions we don't want the KService user code to be doing. Here's some ideas:

  • we introduce a KPluginMetaData KService::metaData() const method.
  • we un-deprecate the KPluginInfo constructor.

Why had the KPluginInfo(KService) constructor been deprecated? (please ignore it)

kcmkwin/kwindesktop/main.cpp
576

IMHO, that's more cleaner. But, yeah, that's most likely unrelated change.

zzag added a comment.Jul 2 2018, 3:02 PM

Superseded by D13851