cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dba...@apache.org
Subject [1/5] cordova-ubuntu git commit: initPlugins only once; See CB-11355; Thanks to Pat Deegan for pointing that out
Date Fri, 02 Sep 2016 13:57:13 GMT
Repository: cordova-ubuntu
Updated Branches:
  refs/heads/4.3.x a12a3d13d -> 5cc933504


initPlugins only once; See CB-11355; Thanks to Pat Deegan for pointing that out


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

Branch: refs/heads/4.3.x
Commit: cc9f2b03b7b64cf89561321c970cfa620640ce3a
Parents: a12a3d1
Author: David Barth <david.barth@canonical.com>
Authored: Fri Jun 10 15:34:16 2016 +0200
Committer: David Barth <david.barth@canonical.com>
Committed: Fri Sep 2 15:55:28 2016 +0200

----------------------------------------------------------------------
 src/cordova.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/cc9f2b03/src/cordova.cpp
----------------------------------------------------------------------
diff --git a/src/cordova.cpp b/src/cordova.cpp
index 152baa7..2f41ab6 100644
--- a/src/cordova.cpp
+++ b/src/cordova.cpp
@@ -88,6 +88,11 @@ const CordovaInternal::Config& Cordova::config() const {
 
 
 void Cordova::initPlugins() {
+    static bool alreadyLoaded = false;
+
+    if (alreadyLoaded)
+      return;
+    
     QList<QDir> searchPath = {get_app_dir()};
 
     _plugins.clear();
@@ -114,6 +119,8 @@ void Cordova::initPlugins() {
             _plugins += plugins;
         }
     }
+
+    alreadyLoaded = true;
 }
 
 void Cordova::loadFinished(bool ok) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message