Merge lp:~abreu-alexandre/ubuntu-html5-theme/oxide-backport-14.04 into lp:ubuntu-html5-theme/14.04

Proposed by Alexandre Abreu
Status: Merged
Merged at revision: 177
Proposed branch: lp:~abreu-alexandre/ubuntu-html5-theme/oxide-backport-14.04
Merge into: lp:ubuntu-html5-theme/14.04
Diff against target: 162 lines (+37/-27)
5 files modified
CMakeLists.txt (+4/-0)
src/plugin/Ubuntu/WebApps/CordovaLoader.qml (+5/-0)
src/plugin/Ubuntu/WebApps/UbuntuJavascriptBindings.qml (+5/-1)
src/plugin/Ubuntu/WebApps/WebAppContainer.qml (+14/-17)
src/ubuntu-html5-app-launcher/main.cpp (+9/-9)
To merge this branch: bzr merge lp:~abreu-alexandre/ubuntu-html5-theme/oxide-backport-14.04
Reviewer Review Type Date Requested Status
Ubuntu HTML5 Theme Developers Pending
Review via email: mp+243287@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-02-06 22:51:33 +0000
3+++ CMakeLists.txt 2014-12-01 14:06:45 +0000
4@@ -2,6 +2,10 @@
5 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
6
7
8+# make non compiled files (QML, JS, images, etc.) visible in QtCreator
9+file(GLOB_RECURSE NON_COMPILED_FILES *.qml *.js *.png *.py *.pot *.po *.qdoc *.qdocconf *.css *.html)
10+
11+add_custom_target(NON_COMPILED_TARGET ALL SOURCES ${NON_COMPILED_FILES})
12 # Standard install paths
13 include(GNUInstallDirs)
14
15
16=== modified file 'src/plugin/Ubuntu/WebApps/CordovaLoader.qml'
17--- src/plugin/Ubuntu/WebApps/CordovaLoader.qml 2014-02-10 16:15:29 +0000
18+++ src/plugin/Ubuntu/WebApps/CordovaLoader.qml 2014-12-01 14:06:45 +0000
19@@ -23,6 +23,11 @@
20
21 property string htmlIndexDirectory
22
23+ // Remote Inspector Properties
24+ property string remoteInspectorEnabled
25+ property string remoteInspectorPort
26+ property string remoteInspectorHost
27+
28 // Cordova plugin instance
29 property var cordovaInstance: null
30
31
32=== modified file 'src/plugin/Ubuntu/WebApps/UbuntuJavascriptBindings.qml'
33--- src/plugin/Ubuntu/WebApps/UbuntuJavascriptBindings.qml 2014-02-10 17:58:49 +0000
34+++ src/plugin/Ubuntu/WebApps/UbuntuJavascriptBindings.qml 2014-12-01 14:06:45 +0000
35@@ -25,11 +25,13 @@
36
37 property var bindingMainWebview: null
38
39+ signal ready()
40+
41 /*!
42 \internal
43 */
44 function getUnityWebappsProxies() {
45- return UnityWebAppsUtils.makeProxiesForQtWebViewBindee(bindingMainWebview);
46+ return UnityWebAppsUtils.makeProxiesForWebViewBindee(bindingMainWebview);
47 }
48
49 /*!
50@@ -53,6 +55,8 @@
51 bindee: root
52 injectExtraUbuntuApis: true
53 requiresInit: false
54+
55+ onUserScriptsInjected: root.ready()
56 }
57 }
58 }
59
60=== modified file 'src/plugin/Ubuntu/WebApps/WebAppContainer.qml'
61--- src/plugin/Ubuntu/WebApps/WebAppContainer.qml 2014-03-29 15:04:02 +0000
62+++ src/plugin/Ubuntu/WebApps/WebAppContainer.qml 2014-12-01 14:06:45 +0000
63@@ -18,7 +18,7 @@
64
65 import QtQuick 2.0
66 import Ubuntu.Components 0.1
67-import Ubuntu.Components.Extras.Browser 0.1
68+import Ubuntu.Components.Extras.Browser 0.2
69
70
71 /*!
72@@ -35,6 +35,16 @@
73
74 /*!
75 \preliminary
76+ The properties hold whether the remote debugging interface should be enabled for the
77+ Web View. The host ip and port for accessing the remote interface should be provided.
78+ */
79+
80+ property alias remoteInspectorEnabled: cordovaWebviewProvider.remoteInspectorEnabled
81+ property alias remoteInspectorHost: cordovaWebviewProvider.remoteInspectorHost
82+ property alias remoteInspectorPort: cordovaWebviewProvider.remoteInspectorPort
83+
84+ /*!
85+ \preliminary
86 The property holds the path to the filesystem location where the 'index.html'
87 file can be found (root of the HTML5 application).
88
89@@ -107,22 +117,9 @@
90 UbuntuWebView {
91 url: mainPage._getAppStartupIndexFileUri()
92
93- experimental.preferences.localStorageEnabled: true
94- experimental.preferences.offlineWebApplicationCacheEnabled: true
95- experimental.preferences.universalAccessFromFileURLsAllowed: true
96- experimental.preferences.webGLEnabled: true
97-
98- experimental.databaseQuotaDialog: Item {
99- Timer {
100- interval: 1
101- running: true
102- onTriggered: {
103- model.accept(model.expectedUsage)
104- }
105- }
106- }
107- // port in QTWEBKIT_INSPECTOR_SERVER enviroment variable
108- experimental.preferences.developerExtrasEnabled: true
109+ preferences.localStorageEnabled: true
110+ preferences.allowUniversalAccessFromFileUrls: true
111+ preferences.appCacheEnabled: true
112 }
113 }
114
115
116=== modified file 'src/ubuntu-html5-app-launcher/main.cpp'
117--- src/ubuntu-html5-app-launcher/main.cpp 2014-04-03 13:57:30 +0000
118+++ src/ubuntu-html5-app-launcher/main.cpp 2014-12-01 14:06:45 +0000
119@@ -142,6 +142,10 @@
120 QString wwwfolderArg;
121 bool maximized = false;
122
123+ QString remoteInspectorHost = "";
124+ QString remoteInspectorPort = QString::number(REMOTE_INSPECTOR_PORT);
125+ bool remoteInspectorEnabled = false;
126+
127 QStringList arguments = app.arguments();
128 arguments.pop_front();
129
130@@ -159,20 +163,13 @@
131 else
132 if (argument.contains(INSPECTOR))
133 {
134- QString host;
135+ remoteInspectorEnabled = true;
136 Q_FOREACH(QHostAddress address, QNetworkInterface::allAddresses()) {
137 if (!address.isLoopback() && (address.protocol() == QAbstractSocket::IPv4Protocol)) {
138- host = address.toString();
139+ remoteInspectorHost = address.toString();
140 break;
141 }
142 }
143- QString server;
144- if (host.isEmpty()) {
145- server = QString::number(REMOTE_INSPECTOR_PORT);
146- } else {
147- server = QString("%1:%2").arg(host, QString::number(REMOTE_INSPECTOR_PORT));
148- }
149- qputenv("QTWEBKIT_INSPECTOR_SERVER", server.toUtf8());
150 }
151 else
152 {
153@@ -226,6 +223,9 @@
154 return EXIT_FAILURE;
155 }
156 view.rootObject()->setProperty("htmlIndexDirectory", wwwFolder.canonicalFilePath());
157+ view.rootObject()->setProperty("remoteInspectorEnabled", remoteInspectorEnabled);
158+ view.rootObject()->setProperty("remoteInspectorHost", remoteInspectorHost);
159+ view.rootObject()->setProperty("remoteInspectorPort", remoteInspectorPort);
160
161 view.setTitle(QCoreApplication::applicationName());
162 view.setResizeMode(QQuickView::SizeRootObjectToView);

Subscribers

People subscribed via source and target branches