Bladeren bron

Merge branch 'update-pythonqt-to-patched3-branch'

* update-pythonqt-to-patched3-branch:
  Fix unused variable warnings in ctkAbstractPythonManager
  Update PythonManager to use recent PythonQt version
Jean-Christophe Fillion-Robin 12 jaren geleden
bovenliggende
commit
587c5f323a

+ 1 - 1
CMakeExternals/PythonQt.cmake

@@ -53,7 +53,7 @@ if(${add_project})
         message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}")
       endif()
 
-      set(revision_tag 7132dba93064c2a02591b42305fecdd5d59702d3)
+      set(revision_tag 15839e05924fa300ffc976e577b50c9b56644f12)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()

+ 2 - 4
Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

@@ -186,13 +186,13 @@ bool ctkAbstractPythonManager::isPythonInitialized()const
 //-----------------------------------------------------------------------------
 bool ctkAbstractPythonManager::pythonErrorOccured()const
 {
-  return PythonQt::self()->errorOccured();
+  return PythonQt::self()->hadError();
 }
 
 //-----------------------------------------------------------------------------
 void ctkAbstractPythonManager::resetErrorFlag()
 {
-  PythonQt::self()->resetErrorFlag();
+  PythonQt::self()->clearError();
 }
 
 //-----------------------------------------------------------------------------
@@ -232,14 +232,12 @@ void ctkAbstractPythonManager::registerCPPClassForPythonQt(const char* name)
 //-----------------------------------------------------------------------------
 bool ctkAbstractPythonManager::systemExitExceptionHandlerEnabled()const
 {
-  Q_D(const ctkAbstractPythonManager);
   return PythonQt::self()->systemExitExceptionHandlerEnabled();
 }
 
 //-----------------------------------------------------------------------------
 void ctkAbstractPythonManager::setSystemExitExceptionHandlerEnabled(bool value)
 {
-  Q_D(ctkAbstractPythonManager);
   PythonQt::self()->setSystemExitExceptionHandlerEnabled(value);
 }
 

+ 2 - 2
Libs/Scripting/Python/Core/ctkAbstractPythonManager.h

@@ -113,11 +113,11 @@ public:
   bool isPythonInitialized()const;
 
   /// Returns True if a python error occured.
-  /// \sa PythonQt::errorOccured()
+  /// \sa PythonQt::hadError()
   bool pythonErrorOccured()const;
 
   /// Reset error flag
-  /// \sa PythonQt::resetErrorFlag()
+  /// \sa PythonQt::clearError()
   void resetErrorFlag();
 
 Q_SIGNALS: