Skip to content
Permalink
Browse files

Run startup.py only once

Fix #15189
  • Loading branch information
m-kuhn committed Jul 2, 2016
1 parent 459fa8c commit f54d845d41bfbf36180821648b7367696c779656
Showing with 0 additions and 12 deletions.
  1. +0 −9 src/python/qgspythonutilsimpl.cpp
  2. +0 −3 src/python/qgspythonutilsimpl.h
@@ -209,13 +209,6 @@ bool QgsPythonUtilsImpl::checkQgisUser()
return true;
}

void QgsPythonUtilsImpl::doUserImports()
{

QString startuppath = homePythonPath() + " + \"/startup.py\"";
runString( "if os.path.exists(" + startuppath + "): from startup import *\n" );
}

void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
{
init();
@@ -231,7 +224,6 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
exitPython();
return;
}
doUserImports();
finish();
}

@@ -257,7 +249,6 @@ void QgsPythonUtilsImpl::initServerPython( QgsServerInterface* interface )
// This is the other main difference with initInterface() for desktop plugins
runString( "qgis.utils.initServerInterface(" + QString::number(( unsigned long ) interface ) + ')' );

doUserImports();
finish();
}

@@ -126,9 +126,6 @@ class QgsPythonUtilsImpl : public QgsPythonUtils
//@return true if qgis.user could be imported
bool checkQgisUser();

//! import user defined Python code
void doUserImports();

//! cleanup Python context
void finish();

0 comments on commit f54d845

Please sign in to comment.
You can’t perform that action at this time.