Merge lp://staging/~abreu-alexandre/unity-webapps-qml/location-specific-homepage into lp://staging/unity-webapps-qml
Proposed by
Alexandre Abreu
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~abreu-alexandre/unity-webapps-qml/location-specific-homepage |
Merge into: | lp://staging/unity-webapps-qml |
Diff against target: |
400 lines (+194/-39) 9 files modified
src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-manifest-parser.cpp (+49/-10) src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-manifest-parser.h (+22/-6) src/Ubuntu/UnityWebApps/plugin/unity-webapps-app-model.cpp (+14/-2) tests/unit/test_plugin/data/installed-webapps/unity-webapps-valid/manifest.json (+29/-9) tests/unit/test_plugin/data/installed-webapps/unity-webapps-with-requires-valid/manifest.json (+29/-9) tests/unit/test_plugin/data/manifests/valid-manifest-per-country-homepage.json (+17/-0) tests/unit/test_plugin/test_plugin.pro (+4/-0) tests/unit/test_plugin/tst_webappsAppModel.cpp (+28/-2) tests/unit/test_plugin/tst_webappsAppModel.h (+2/-1) |
To merge this branch: | bzr merge lp://staging/~abreu-alexandre/unity-webapps-qml/location-specific-homepage |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
WebApps | Pending | ||
Review via email: mp+284918@code.staging.launchpad.net |
Commit message
Homepage as a URL or a per-country url object
Description of the change
Homepage as a URL or a per-country url object
To post a comment you must log in.
Unmerged revisions
- 155. By Alexandre Abreu
-
Homepage as a URL or a per-country url object
Hmm, I don't get where you choose between countries in that change
On Wed, Feb 3, 2016 at 4:37 PM, Alexandre Abreu <
<email address hidden>> wrote:
> Alexandre Abreu has proposed merging /bugs.launchpad .net/webapp- container/ +bug/1523464 /code.launchpad .net/~abreu- alexandre/ unity-webapps- qml/location- specific- homepage/ +merge/ 284918 UnityWebApps/ plugin/ unity-webapps- app-manifest- parser. cpp' UnityWebApps/ plugin/ unity-webapps- app-manifest- parser. cpp UnityWebApps/ plugin/ unity-webapps- app-manifest- parser. cpp www.gnu. org/licenses/>. QJsonDocument> QJsonObject> QTextStream> QVariantMap> webapps- app-manifest- parser. h" oOption( infos); ManifestParser: :extractHomepag e( homepageURI = QUrl::fromUserI nput(o. toString( )); ).toMap( ); canConvert( QVariant: :String) ) homepagePerCoun try[k.toLower( )] = nput(vm[ k].toString( )); ManifestParser: :parseWebappDec laration( const QLatin1String( property) ) \ QLatin1String( property) ).predicate( )) \
> lp:~abreu-alexandre/unity-webapps-qml/location-specific-homepage into
> lp:unity-webapps-qml.
>
> Commit message:
> Homepage as a URL or a per-country url object
>
> Requested reviews:
> WebApps (webapps)
> Related bugs:
> Bug #1523464 in webapp-container: "Amazon web app on the launcher in
> 16.04 sends me to .COM instead of .co.uk"
> https:/
>
> For more details, see:
>
> https:/
>
> Homepage as a URL or a per-country url object
> --
> Your team WebApps is requested to review the proposed merge of
> lp:~abreu-alexandre/unity-webapps-qml/location-specific-homepage into
> lp:unity-webapps-qml.
>
> === modified file
> 'src/Ubuntu/
> --- src/Ubuntu/
> 2014-05-14 01:41:14 +0000
> +++ src/Ubuntu/
> 2016-02-03 15:36:20 +0000
> @@ -1,5 +1,5 @@
> /*
> - * Copyright 2013 Canonical Ltd.
> + * Copyright 2013-2016 Canonical Ltd.
> *
> * This file is part of unity-webapps-qml.
> *
> @@ -16,12 +16,13 @@
> * along with this program. If not, see <http://
> */
>
> -#include <QTextStream>
> -#include <QJsonDocument>
> -#include <QJsonObject>
> -#include <QJsonArray>
> -#include <QJsonValue>
> -#include <QDebug>
> +#include <QtCore/QDebug>
> +#include <QtCore/
> +#include <QtCore/
> +#include <QtCore/QJsonArray>
> +#include <QtCore/QJsonValue>
> +#include <QtCore/
> +#include <QtCore/
>
> #include "unity-
>
> @@ -62,6 +63,33 @@
> return ManifestFileInf
> }
>
> +WebappHomepage UnityWebappsApp
> + const QJsonValue& o)
> +{
> + WebappHomepage homepage;
> + if (o.isString())
> + {
> + homepage.
> + return homepage;
> + }
> +
> + if (o.isObject())
> + {
> + QVariantMap vm = o.toVariant(
> + Q_FOREACH(const QString& k, vm.keys())
> + {
> + if (vm[k].
> + {
> + homepage.
> + QUrl::fromUserI
> + }
> + }
> + return homepage;
> + }
> +
> + return homepage;
> +}
> +
> bool UnityWebappsApp
> QJsonObject& json,
>
> ManifestFileInfo * infos)
> {
> @@ -70,20 +98,31 @@
> if ( !json.contains(
> || !json.value(
> { \
> - qDebug() << "Invalid webapp webapp definition:" << property
> << "not found or fails predicate" << #predicate; \
> + qDebu...