cordova-commits mailing list archives

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


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/68d1cd91
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/68d1cd91
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/68d1cd91

Branch: refs/heads/master
Commit: 68d1cd91f25560de8642aa3386e126045e1f3784
Parents: 2e2083f
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 Jun 10 15:34:16 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/68d1cd91/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