From c85d8789fc4b0e73962f016eff6b5a3a006d14ec Mon Sep 17 00:00:00 2001
From: Casey Goodlett <casey.goodlett@kitware.com>
Date: Tue, 1 Nov 2011 16:03:02 -0400
Subject: [PATCH 1/3] COMP: Fix build against Qt 4.8

This failed to compile in the precompiled file:
moc_PythonQtStdDecorators.cpp.  This function seems to be only a stub
so removing it completely.  This also seems to be reflected in the
current head of PythonQt
---
 src/PythonQtStdDecorators.cpp | 9 ---------
 src/PythonQtStdDecorators.h   | 5 -----
 2 files changed, 14 deletions(-)

diff --git a/src/PythonQtStdDecorators.cpp b/src/PythonQtStdDecorators.cpp
index 1a42d516..6996bef6 100644
--- a/src/PythonQtStdDecorators.cpp
+++ b/src/PythonQtStdDecorators.cpp
@@ -126,15 +126,6 @@ bool PythonQtStdDecorators::disconnect(QObject* sender, const QByteArray& signal
   return r;
 }
 
-#undef emit
-void PythonQtStdDecorators::emit(QObject* sender, const QByteArray& signal, PyObject* arg1 ,PyObject* arg2 ,
-          PyObject* arg3 ,PyObject* arg4 ,PyObject* arg5 ,PyObject* arg6 ,PyObject* arg7 )
-{
-  // TODO xxx
-  // use normal PythonQtSlot calling code, add "allowSignal" to member lookup?!
-}
-#define emit
-
 QObject* PythonQtStdDecorators::parent(QObject* o) {
   return o->parent();
 }
diff --git a/src/PythonQtStdDecorators.h b/src/PythonQtStdDecorators.h
index 7fcbc832..30799456 100644
--- a/src/PythonQtStdDecorators.h
+++ b/src/PythonQtStdDecorators.h
@@ -61,11 +61,6 @@ public slots:
   bool connect(QObject* sender, const QByteArray& signal, QObject* receiver, const QByteArray& slot);
   bool disconnect(QObject* sender, const QByteArray& signal, PyObject* callable);
   bool disconnect(QObject* sender, const QByteArray& signal, QObject* receiver, const QByteArray& slot);
-
-#undef emit
-  void emit(QObject* sender, const QByteArray& signal, PyObject* arg1 = NULL,PyObject* arg2 = NULL,
-            PyObject* arg3 = NULL,PyObject* arg4 = NULL,PyObject* arg5 = NULL,PyObject* arg6 = NULL,PyObject* arg7 = NULL);
-#define emit
   
   QObject* parent(QObject* o);
   void setParent(QObject* o, QObject* parent);

From e690f3ab34d0aa9dbf80a33386c0b04930c4c8c7 Mon Sep 17 00:00:00 2001
From: Casey Goodlett <casey.goodlett@kitware.com>
Date: Wed, 26 Jun 2013 10:16:56 -0400
Subject: [PATCH 2/3] COMP: Fix build against VTK 6

---
 CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 24f5939f..1d668c35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,9 @@ if(PythonQt_USE_VTK)
   find_package(VTK REQUIRED)
   include(${VTK_USE_FILE})
   add_definitions(-DPYTHONQT_USE_VTK)
-  if(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_GREATER 5.6)
+  if(${VTK_VERSION_MAJOR} EQUAL 6)
+    set(VTK_LIBRARIES vtkCommonCorePython)
+  elseif(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_GREATER 5.6)
     set(VTK_LIBRARIES vtkPythonCore)
   else()
     set(VTK_LIBRARIES vtkCommonPythonD)

From 2f3d5ad1f1443a9cd4580a9368c4d74abaadea4c Mon Sep 17 00:00:00 2001
From: Casey Goodlett <casey.goodlett@kitware.com>
Date: Fri, 28 Jun 2013 09:49:48 -0400
Subject: [PATCH 3/3] COMP: In case this still works for VTK > 6

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d668c35..4f2a4a1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,7 @@ if(PythonQt_USE_VTK)
   find_package(VTK REQUIRED)
   include(${VTK_USE_FILE})
   add_definitions(-DPYTHONQT_USE_VTK)
-  if(${VTK_VERSION_MAJOR} EQUAL 6)
+  if(${VTK_VERSION_MAJOR} GREATER 5)
     set(VTK_LIBRARIES vtkCommonCorePython)
   elseif(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_GREATER 5.6)
     set(VTK_LIBRARIES vtkPythonCore)