Review Request 120029: introduce the concept of package fallback

Marco Martin notmart at gmail.com
Wed Sep 3 08:34:16 UTC 2014



> On Set. 1, 2014, 4:53 p.m., David Edmundson wrote:
> > I need some the concept explaining, why would a developer set a fallbackpackage?
> > Is it not always org.kde.breeze.desktop?
> 
> Marco Martin wrote:
>     It would usually be the packagestructure setting it, in initPackage(), so setFallbackPackage follows the same pattern as addFileDefinition(), setRequired() and the likes.
>     
>     so, for the packages of type Plasma/LookAndFeel it would be org.kde.breeze.desktop
>     for packages of types Plasma/Shell, it would be org.kde.desktop
>     
>     even tough at some point it will probably have to be something more complicated, like the default lookandfeel one depending from  the current shell, if ever needed, will be feasible.
> 
> David Edmundson wrote:
>     Ah, makes sense. Thanks.
>     
>     Do you really expect a linked link big enough to cycle? I can't really see it going 3 deep. The cycle check is call cool though :)
>     
>     Could you add a warning in setFallbackPackage() if it finds a cycle and no-ops. Could be confusing to debug otherwise.
> 
> Marco Martin wrote:
>     added warning..
>     i see it very unlikely that it's going to go deep, but better safe than sorry :p
> 
> Aaron J. Seigo wrote:
>     "Is it not always org.kde.breeze.desktop?"
>     
>     No, because of third party developers. Not every project targets the desktop.
>     
>     That said, this applies to any use of Plasma::Package, which is meant to be a generic concept not something just for the limited set of package types plasmashell uses. It is helpful to think of it as a concept on its own rather than in the context of Plasma Desktop. Other Frameworks using applications really ought to be able to use Plasma::Package for their "bundles of data" needs.
>     
>     "It would usually be the packagestructure setting it, in initPackage()"
>     
>     In the case of Shell and Look & Feel packages I would caution against doing this, as it biases them to Plasma Desktop. The tablet interface in Plasma Active will need its own "root" L&F; falling back to components from breeze.desktop will likely be both an oversight and create undesirable results. It also would mean that every time someone touches a component in breeze.desktop that is used by the tablet UX, they will be required to ensure it remains appropriate on touch. For devices even further afield from desktop than tablets this becomes even more of an issue, and those devices may not want to ship breeze.desktop at all. Of course, there is the alternative which is to just tell system integrators to call their root package "org.kde.breeze.desktop" but I'm not sure that would be desirable.
>     
>     While setting this in initPackage is a reasonable stop-gap for now, this really ought to be something that gets defined in e.g. the shell package and set in plasmashell so that it can be tied to the shell. If no fallback is defined in the shell package, fair enough -> no fallback :)

"While setting this in initPackage is a reasonable stop-gap for now"
for now it does that, I think it's fine for a first step to get rid of lookandfeelaccess. I would advise to provide a full complete package anyways, soat start wouldn't matter much.

Then, after this, how to make it depend from the shell? it may depend on the shell kded, but it would depend from quite a lot of boilerplate, also it should stay possible to configure it, so in the config file it would end up with pairs shell/l&f packages i guess.

Or, to make it a bit more primitive, but still functional for the scope, the fallback could be from a configuration file as well, so integrators could just ship such fine.
For the shell package instead, the fallback *may* be defined in its metadata desktop file? (not sure this could really work for the l&f one)


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120029/#review65648
-----------------------------------------------------------


On Set. 1, 2014, 7:04 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120029/
> -----------------------------------------------------------
> 
> (Updated Set. 1, 2014, 7:04 p.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> introduces the concept of fallback for packages.
> this will replace the private statically linked class LookAndFeelAccess in workspace and desktop, but be more generic so will be usable for things like the shell package as well.
> The feature has an autotest as well to check it's actually working and doesn't break other stuff.
> 
> the package structures that will use this, will just set a package in their structure::initPackage()
> tough for the user of Package in c++ is possible as well to set the fallback package outside the structure if custm things are neede (it's guarded that cycles don't occur in the fallback chain)
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 4e64f38 
>   autotests/data/testfallbackpackage/contents/ui/main.qml PRE-CREATION 
>   autotests/data/testfallbackpackage/metadata.desktop PRE-CREATION 
>   autotests/data/testpackage/contents/ui/otherfile.qml PRE-CREATION 
>   autotests/fallbackpackagetest.h PRE-CREATION 
>   autotests/fallbackpackagetest.cpp PRE-CREATION 
>   src/plasma/data/servicetypes/plasma-shell.desktop e2c83ba 
>   src/plasma/package.h 2c686d7 
>   src/plasma/package.cpp 6ad3321 
>   src/plasma/private/package_p.h d902eb1 
> 
> Diff: https://git.reviewboard.kde.org/r/120029/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140903/fcf5d0ef/attachment.html>


More information about the Plasma-devel mailing list