Skip to content

Commit 2e08ca1

Browse files
committed
Let python utils manage all python cleanup
1 parent 74651b0 commit 2e08ca1

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

src/app/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ INCLUDE_DIRECTORIES(
407407
${QWT_INCLUDE_DIR}
408408
${QT_QTUITOOLS_INCLUDE_DIR}
409409
${QEXTSERIALPORT_INCLUDE_DIR}
410-
${PYTHON_INCLUDE_PATH}
411410
../analysis/raster ../analysis/openstreetmap
412411
../core
413412
../core/gps
@@ -459,7 +458,6 @@ TARGET_LINK_LIBRARIES(${QGIS_APP_NAME}
459458
${QT_QTMAIN_LIBRARY}
460459
${QWTPOLAR_LIBRARY}
461460
${GDAL_LIBRARY}
462-
${PYTHON_LIBRARY}
463461
qgis_core
464462
qgis_gui
465463
qgis_analysis

src/app/qgisapp.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
* *
1818
***************************************************************************/
1919

20-
//
21-
// Include, so we can check for the sip version
22-
//
23-
#include <sip.h>
24-
2520
//
2621
// QT4 includes make sure to use the new <CamelCase> style!
2722
//
@@ -805,11 +800,7 @@ QgisApp::~QgisApp()
805800

806801
delete QgsProject::instance();
807802

808-
#if SIP_VERSION >= 0x40e06
809-
if ( mPythonUtils )
810-
mPythonUtils->exitPython();
811803
delete mPythonUtils;
812-
#endif
813804
}
814805

815806
void QgisApp::dragEnterEvent( QDragEnterEvent *event )

src/python/qgspythonutilsimpl.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ QgsPythonUtilsImpl::QgsPythonUtilsImpl()
4343

4444
QgsPythonUtilsImpl::~QgsPythonUtilsImpl()
4545
{
46+
#if SIP_VERSION >= 0x40e06
47+
exitPython();
48+
#endif
4649
}
4750

4851
void QgsPythonUtilsImpl::initPython( QgisInterface* interface )

0 commit comments

Comments
 (0)