Run startup.py only once

Fix #15189
This commit is contained in:
Matthias Kuhn 2016-07-02 17:15:31 +02:00
parent 459fa8c0c5
commit f54d845d41
2 changed files with 0 additions and 12 deletions

View File

@ -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();
}

View File

@ -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();