[Merge] lp:~nikwen/webbrowser-app/open-in-new-background-tab into lp:webbrowser-app

Niklas Wenzel nikwen.developer at gmail.com
Wed Jan 28 21:57:44 UTC 2015


Yes, this is how it currently works.
Since C++ (as far as I know) doesn't allow undefined as a value for boolean variables, we need to have a variable with at least 3 different values, hence an enumaration (which will be troublesome in connection with QML), a numerical value (whose meaning won't be self-explaining when passing it to the QML property) or a string, which in this particular case is what was entered in the settings file.

We can't directly provide the "show option or not" value from the settings C++ class because we cannot easily get the form factor there.

This is why I decided to do it this way:

1) Pass the value from the settings.conf file directly to QML as a string.
2) Let QML decide whether to hide the option based on the settings vallue and the form factor.

These are the values the string can have:

  "formfactor_dependend": The default value if the setting isn't set, i.e. decide based on form factor.
  "true": If the option should be shown.
  "false" or anything else: If the option should not be shown.

I do, however, agree that we can rename the settings entry. I'll do that tomorrow and use the suggestion from your last post. ;)

What do you think?
-- 
https://code.launchpad.net/~nikwen/webbrowser-app/open-in-new-background-tab/+merge/245372
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.



More information about the Ubuntu-reviews mailing list