Pārlūkot izejas kodu

Update PythonManager to use recent PythonQt version

The "patched-3" branch is rebased against r244 of PythonQt, it integrates
all backported changes specific to "patched-2" and also
include improvements by the upstream team. For a detailed list,
see https://github.com/commontk/PythonQt/compare/e2dce4...0a2486
Jean-Christophe Fillion-Robin 12 gadi atpakaļ
vecāks
revīzija
b1d76dfd08

+ 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 - 2
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();
 }
 
 //-----------------------------------------------------------------------------

+ 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: