cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/2] git commit: ubuntu: support qt 5.2
Date Tue, 05 Aug 2014 22:11:45 GMT
Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master 8cb876c63 -> 0900f5cc6


ubuntu: support qt 5.2


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/f620b640
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/f620b640
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/f620b640

Branch: refs/heads/master
Commit: f620b6403599e3a073a5c88cb4479b8317bf98bb
Parents: 61239c1
Author: Maxim Ermilov <maxim.ermilov@canonical.com>
Authored: Sun Jul 27 01:37:17 2014 +0400
Committer: Maxim Ermilov <maxim.ermilov@canonical.com>
Committed: Sun Jul 27 01:37:17 2014 +0400

----------------------------------------------------------------------
 src/ubuntu/inappbrowser.cpp | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/f620b640/src/ubuntu/inappbrowser.cpp
----------------------------------------------------------------------
diff --git a/src/ubuntu/inappbrowser.cpp b/src/ubuntu/inappbrowser.cpp
index d172bab..7a0538f 100644
--- a/src/ubuntu/inappbrowser.cpp
+++ b/src/ubuntu/inappbrowser.cpp
@@ -31,7 +31,7 @@ Inappbrowser::Inappbrowser(Cordova *cordova): CPlugin(cordova), _eventCb(0)
{
 }
 
 const char code[] = "\
-var component, object;                                                  \
+var component;                                                          \
 function createObject() {                                               \
     component = Qt.createComponent(%1);                                 \
     if (component.status == Component.Ready)                            \
@@ -40,7 +40,7 @@ function createObject() {                                              
\
         component.statusChanged.connect(finishCreation);                \
 }                                                                       \
 function finishCreation() {                                             \
-    CordovaWrapper.object = component.createObject(root,                \
+    CordovaWrapper.global.inappbrowser = component.createObject(root,   \
         {root: root, cordova: cordova, url1: %2});                      \
 }                                                                       \
 createObject()";
@@ -50,45 +50,43 @@ const char LOADSTART_EVENT[] = "'loadstart'";
 const char LOADSTOP_EVENT[] = "'loadstop'";
 const char LOADERROR_EVENT[] = "'loaderror'";
 
-void Inappbrowser::open(int cb, int, const QString &url, const QString &windowName,
const QString &windowFeatures) {
+void Inappbrowser::open(int cb, int, const QString &url, const QString &, const QString
&) {
     assert(_eventCb == 0);
 
     _eventCb = cb;
 
     QString path = m_cordova->get_app_dir() + "/../qml/InAppBrowser.qml";
-
-    // TODO: relative url
     QString qml = QString(code)
       .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(url));
     m_cordova->execQML(qml);
 }
 
 void Inappbrowser::show(int, int) {
-    m_cordova->execQML("CordovaWrapper.object.visible = true");
+    m_cordova->execQML("CordovaWrapper.global.inappbrowser.visible = true");
 }
 
 void Inappbrowser::close(int, int) {
-    m_cordova->execQML("CordovaWrapper.object.destroy()");
+    m_cordova->execQML("CordovaWrapper.global.inappbrowser.destroy()");
     this->callbackWithoutRemove(_eventCb, EXIT_EVENT);
     _eventCb = 0;
 }
 
-void Inappbrowser::injectStyleFile(int cb, int, const QString&, bool) {
+void Inappbrowser::injectStyleFile(int, int, const QString&, bool) {
     // TODO:
     qCritical() << "unimplemented " << __PRETTY_FUNCTION__;
 }
 
-void Inappbrowser::injectStyleCode(int cb, int, const QString&, bool) {
+void Inappbrowser::injectStyleCode(int, int, const QString&, bool) {
     // TODO:
     qCritical() << "unimplemented " << __PRETTY_FUNCTION__;
 }
 
-void Inappbrowser::injectScriptFile(int cb, int, const QString&, bool) {
+void Inappbrowser::injectScriptFile(int, int, const QString&, bool) {
     // TODO:
     qCritical() << "unimplemented " << __PRETTY_FUNCTION__;
 }
 
-void Inappbrowser::injectScriptCode(int cb, int, const QString&, bool) {
+void Inappbrowser::injectScriptCode(int, int, const QString&, bool) {
     // TODO:
     qCritical() << "unimplemented " << __PRETTY_FUNCTION__;
 }


Mime
View raw message