Remove commented code and extra debug statements
Merge branch 'remove-debug-statement-in-ctkVTK-views'

* remove-debug-statement-in-ctkVTK-views:
  Remove commented code and extra debug statements
Use vtkNew instead of deprecated macro VTK_CREATE

* Use of vtkNew is a clean and cpp implementation of
a VTK "scoped" pointer, it avoids to duplicate the macro
VTK_CREATE.

See http://www.vtk.org/doc/nightly/html/classvtkNew.html
Merge branch 'remove-deprecated-vtk-create-macro'

* remove-deprecated-vtk-create-macro:
  Use vtkNew instead of deprecated macro VTK_CREATE
Extend PythonManager API with method returning if python error occurred
Fix line number handling in doxygen output.

This is a copy of saschazelzer/CMakeDoxygenFilter f5d30e4.
Ensure module located where python script is executed can be imported

* This is done by "prepending" the script file path to sys.path
when executeString() is called.
"Pimpl-ify" ctkAbstractPythonManager - Implementation moved to cpp file
Merge branch 'know-if-python-error-occured'

* know-if-python-error-occured:
  Extend PythonManager API with method returning if python error occurred
Merge branch 'pimplify-ctkAbstractPythonManager'

* pimplify-ctkAbstractPythonManager:
  "Pimpl-ify" ctkAbstractPythonManager - Implementation moved to cpp file
Merge branch 'ensure-python-script-local-import'

* ensure-python-script-local-import:
  Ensure module located where python script is executed can be imported
ctkCheckablePushButton emits toggled signal when set uncheckable

QAbtractButton::setCheckable doesn't emit signal when it is set to
uncheckable and if it was checked.
Merge branch 'ctkcheckablepushbutton-emit-toggled'

* ctkcheckablepushbutton-emit-toggled:
  ctkCheckablePushButton emits toggled signal when set uncheckable
BUG: avoid deadlock on mac on file import

On mac, bringing up the progress dialog on top of the
file dialog leads to a deadlock where the
dialogs go away but the underlying widget is not
responsive and the application requires a Force Quit.
Avoid this by making the progress dialog non-modal.
Unfortunately it remains behind the file dialog but this
is better than hanging.
Set sys.path with vtk package path independently of VTK build tree location
Memory leaks associated with ctkSimplePythonShell tests are failure
Fix memory leaks associated with ctkSimplePythonShell tests

* Calling "sys.exit()" within a python script ends up calling the
 function "std::exit()" [1] which terminate the application without calling
the destructor of variables with "automatic storage durations".

Considering the description of such variables [2], calling either
"std::exit()", "exit()" or "sys.exit(0)" from within python will prevent
the destruction of the QApplication singleton hence the proper destruction
of the object where the vtkObject have been instantiated (i.e. ctkTestWrappedVTKSlot and
ctkTestWrappedVTKQInvokable)


[1] http://en.cppreference.com/w/cpp/utility/program/exit
[2] http://en.cppreference.com/w/cpp/language/storage_duration


* To properly terminate the application, the solution consisted in
both running the test script after the event loop has been initiated and
calling "qt.QApplication.exit()" instead of "sys.exit()'. That said,
note that calling "sys.exit()"  in a pure python script is valid since
the implementation of "sys.exit()" takes care of doing the appropriate
cleaning before calling "exit()". [See Py_Finalize(), Py_Exit(), handle_system_exit]
in "pythonrun.c"

* An alternate solution could consist in using the "atexit" python module
and register a cleanup function. [3]

[3] http://docs.python.org/library/atexit.html
Fix segfaults associated with ctkSimplePythonShell tests

* In both "wrappedVTKQInvokableTest.py" and "wrappedVTKSlotTest.py",
a vtkTable was instantiated within python and set to wrapped cpp
instance of either (a) "ctkTestWrappedVTKQInvokable" or (b) "ctkTestWrappedVTKSlot".

Within each on of these classes (a and b), the "Delete" function
was called unconditionally on the MyTable private member. Two problems
were happening:

 - the first instance of vtkTable initially created within the constructor
of classes a and b was leaked.

 - the vtkTable instantiated within python referenced with the "t2"
variable was set to the classes a and b. Then, when python was finalized
it was deleting the object allocated within python. Next, in addition the
Delete function was also called within the destructor of classes a and b.
The pointer being invalid, a seg fault occurred. Using vtkSmartPointer
help us to elegantly address this issue.
Fix segfault when vtkObject observed in python is deleted after interpreter is "ended"

* Added a regression test to illustrate the problem

* The solution consisted in using "Py_Finalize" instead of "Py_EndInterpreter".
This is required because within the method vtkPythonCommand::Execute, the method
is a no-op if "Py_IsInitialized" returns 0.
Merge branch 'ensure-python-is-finalized'

* ensure-python-is-finalized:
  Fix segfault when vtkObject observed in python is deleted after interpreter is "ended"
  Fix segfaults associated with ctkSimplePythonShell tests
  Fix memory leaks associated with ctkSimplePythonShell tests
  Memory leaks associated with ctkSimplePythonShell tests are failure
  Set sys.path with vtk package path independently of VTK build tree location