Преглед изворни кода

Merge topic 'bug-ctkSimplePythonShell-header-include'

* bug-ctkSimplePythonShell-header-include:
  ctkSimplePythonQtDecorator - Conditionally include dependent decorators
Jean-Christophe Fillion-Robin пре 14 година
родитељ
комит
3eaeee1706
1 измењених фајлова са 11 додато и 2 уклоњено
  1. 11 2
      Applications/ctkSimplePythonShell/ctkSimplePythonQtDecorators.h

+ 11 - 2
Applications/ctkSimplePythonShell/ctkSimplePythonQtDecorators.h

@@ -3,9 +3,14 @@
 #define __ctkSimplePythonQtDecorators_h
 
 // CTK includes
+#include "ctkSimplePythonShellConfigure.h" // For CTK_WRAP_PYTHONQT_LIGHT
 #include <ctkAbstractPythonManager.h>
-#include <ctkCorePythonQtDecorators.h>
-#include <ctkWidgetsPythonQtDecorators.h>
+#ifdef CTK_WRAP_PYTHONQT_LIGHT
+# include <ctkCorePythonQtDecorators.h>
+# include <ctkWidgetsPythonQtDecorators.h>
+#endif
+
+// PythonQt includes
 #include <PythonQt.h>
 
 // NOTE:
@@ -24,8 +29,12 @@ public:
   ctkSimplePythonQtDecorators(ctkAbstractPythonManager* pythonManager)
     {
     Q_ASSERT(pythonManager);
+#ifdef CTK_WRAP_PYTHONQT_LIGHT
     pythonManager->registerPythonQtDecorator(new ctkCorePythonQtDecorators);
     pythonManager->registerPythonQtDecorator(new ctkWidgetsPythonQtDecorators);
+#else
+    Q_UNUSED(pythonManager);
+#endif
     }
 
 public slots: