Permalink
Browse files

COMP: Fix build error occurring when disabling QtTesting

See http://www.na-mic.org/Bug/view.php?id=2760

Fixes #2760

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21419 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
1 parent d6fcb5a commit 08b184263fc14e96084c6641996fa3582688af55 @jcfr committed Nov 15, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 Base/QTGUI/qSlicerBaseQTGUIPythonQtDecorators.h
@@ -16,10 +16,14 @@
// PythonQt includes
#include <PythonQt.h>
-// CTK QtTesting includes
-#include <ctkQtTestingUtility.h>
+#include "vtkSlicerConfigure.h" // For Slicer_USE_QtTesting
-// SlicerQt includes
+// CTK includes
+#ifdef Slicer_USE_QtTesting
+# include <ctkQtTestingUtility.h>
+#endif
+
+// Slicer includes
#include "qSlicerAbstractModuleRepresentation.h"
#include "qSlicerAbstractModuleWidget.h"
#include "qSlicerAbstractModule.h"
@@ -47,7 +51,9 @@ class qSlicerBaseQTGUIPythonQtDecorators : public QObject
PythonQt::self()->registerClass(&qSlicerAbstractModuleWidget::staticMetaObject);
PythonQt::self()->registerClass(&qSlicerPythonManager::staticMetaObject);
PythonQt::self()->registerClass(&qSlicerCommandOptions::staticMetaObject);
+#ifdef Slicer_USE_QtTesting
PythonQt::self()->registerClass(&ctkQtTestingUtility::staticMetaObject);
+#endif
// Note: Use registerCPPClassForPythonQt to register pure Cpp classes
}

0 comments on commit 08b1842

Please sign in to comment.