From 9104fa924859f4a865016f2138c06ec856f449d4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 12 Jul 2012 17:19:45 -0400 Subject: [PATCH 1/9] Display message when wrap option is forced to True because of PythonQt_Wrap_QtAll --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e356304e..633cd9ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,10 @@ endforeach() if(PythonQt_Wrap_QtAll) list(REMOVE_ITEM qtlibs xmlpatterns) # xmlpatterns wrapper does *NOT* build at all :( foreach(qtlib ${qtlibs}) - set(PythonQt_Wrap_Qt${qtlib} ON CACHE BOOL "Make all of Qt${qtlib} available in python" FORCE) + if(NOT ${PythonQt_Wrap_Qt${qtlib}}) + set(PythonQt_Wrap_Qt${qtlib} ON CACHE BOOL "Make all of Qt${qtlib} available in python" FORCE) + message(STATUS "Enabling [PythonQt_Wrap_Qt${qtlib}] because of [PythonQt_Wrap_QtAll] evaluates to True") + endif() endforeach() endif() From 47738f9c8c5d3ffa77c8f2e1844f899e5b548f0c Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 12 Jul 2012 18:28:12 -0400 Subject: [PATCH 2/9] Add fix for mac build error related C standard lib macros to main header By updating PythonQtPythonIncludes.h which is included in all PythonQt headers, it is ensured the fix will be applied consistently. --- src/PythonQtInstanceWrapper.h | 22 ---------------------- src/PythonQtPythonInclude.h | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/PythonQtInstanceWrapper.h b/src/PythonQtInstanceWrapper.h index 7b06e7c6..f71f6a04 100644 --- a/src/PythonQtInstanceWrapper.h +++ b/src/PythonQtInstanceWrapper.h @@ -46,28 +46,6 @@ #include "PythonQtSystem.h" -/* - * The following undefs for C standard library macros prevent - * build errors of the following type on mac ox 10.7.4 and XCode 4.3.3 - * -/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation - isspace(_CharT, const locale&); - ^ -/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions - inline bool - ^ -/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template - isspace(_CharT, const locale&); - ^ -*/ -#undef isspace -#undef isupper -#undef islower -#undef isalpha -#undef isalnum -#undef toupper -#undef tolower - #include #include "structmember.h" diff --git a/src/PythonQtPythonInclude.h b/src/PythonQtPythonInclude.h index 0dfb3618..b04443cb 100644 --- a/src/PythonQtPythonInclude.h +++ b/src/PythonQtPythonInclude.h @@ -92,4 +92,27 @@ # include #endif +/* + * The following undefs for C standard library macros prevent + * build errors of the following type on mac ox 10.7.4 and XCode 4.3.3 + * +/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation + isspace(_CharT, const locale&); + ^ +/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions + inline bool + ^ +/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template + isspace(_CharT, const locale&); + ^ +*/ +#undef isspace +#undef isupper +#undef islower +#undef isalpha +#undef isalnum +#undef toupper +#undef tolower + #endif + From 6366f002a93aa238c55f58de949d09c552cda5a9 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 18 Jul 2012 17:10:06 -0400 Subject: [PATCH 3/9] Fix windows build issue when PythonQt Debug build against python Release Seems "_STL_NOFORCE_MANIFEST" is now used instead of "_CRT_NOFORCE_MANIFEST" --- src/PythonQtPythonInclude.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PythonQtPythonInclude.h b/src/PythonQtPythonInclude.h index b04443cb..1c5d7b05 100644 --- a/src/PythonQtPythonInclude.h +++ b/src/PythonQtPythonInclude.h @@ -85,6 +85,7 @@ # include # if defined(_MSC_VER) && _MSC_VER >= 1400 # define _CRT_NOFORCE_MANIFEST 1 +# define _STL_NOFORCE_MANIFEST 1 # endif # include # define _DEBUG From 2114405a47836b3fb16a3f66fec6a02184f32e71 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 4 Oct 2012 16:29:21 -0400 Subject: [PATCH 4/9] COMP: Optionally include CTestUseLaunchers Doing so will allow error/warning to be properly reported in a Superbuild context when doing parallel build with CTEST_USE_LAUNCHERS enabled. --- CMakeLists.txt | 2 ++ generator/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 633cd9ec..4976d40a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.8) project(PythonQt) #----------------------------------------------------------------------------- +include(CTestUseLaunchers OPTIONAL) + #----------------------------------------------------------------------------- # Python libraries diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index 4f495bc4..1d659dd8 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.8) project(PythonQtGenerator) #----------------------------------------------------------------------------- +include(CTestUseLaunchers OPTIONAL) + #----------------------------------------------------------------------------- # Setup Qt From a386dc60f71c15e67c611bc31b26cee756ed833a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 17 Oct 2012 17:28:34 -0400 Subject: [PATCH 5/9] Add method resetErrorFlag This method should be called before any piece of code where handleError is called in case of error. It will ensure the _ErrorOccured is reset to false. --- src/PythonQt.cpp | 16 +++++++++++++++- src/PythonQt.h | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/PythonQt.cpp b/src/PythonQt.cpp index 7bb87d3a..a01e7746 100644 --- a/src/PythonQt.cpp +++ b/src/PythonQt.cpp @@ -675,6 +675,7 @@ PythonQtObjectPtr PythonQt::importModule(const QString& name) QVariant PythonQt::evalCode(PyObject* object, PyObject* pycode) { QVariant result; + this->resetErrorFlag(); if (pycode) { PyObject* dict = NULL; if (PyModule_Check(object)) { @@ -703,6 +704,7 @@ QVariant PythonQt::evalScript(PyObject* object, const QString& script, int start QVariant result; PythonQtObjectPtr p; PyObject* dict = NULL; + this->resetErrorFlag(); if (PyModule_Check(object)) { dict = PyModule_GetDict(object); } else if (PyDict_Check(object)) { @@ -722,6 +724,7 @@ QVariant PythonQt::evalScript(PyObject* object, const QString& script, int start void PythonQt::evalFile(PyObject* module, const QString& filename) { PythonQtObjectPtr code = parseFile(filename); + this->resetErrorFlag(); if (code) { evalCode(module, code); } else { @@ -733,6 +736,7 @@ PythonQtObjectPtr PythonQt::parseFile(const QString& filename) { PythonQtObjectPtr p; p.setNewRef(PythonQtImport::getCodeFromPyc(filename)); + this->resetErrorFlag(); if (!p) { handleError(); } @@ -1022,6 +1026,7 @@ QVariant PythonQt::call(PyObject* callable, const QVariantList& args) QVariant r; PythonQtObjectPtr result; result.setNewRef(callAndReturnPyObject(callable, args)); + this->resetErrorFlag(); if (result) { r = PythonQtConv::PyObjToQVariant(result); } else { @@ -1243,6 +1248,14 @@ bool PythonQt::errorOccured()const return PythonQt::priv()->_ErrorOccured; } +void PythonQt::resetErrorFlag() +{ + if (PythonQt::self()) + { + PythonQt::priv()->_ErrorOccured = false; + } +} + void PythonQt::addSysPath(const QString& path) { PythonQtObjectPtr sys; @@ -1568,6 +1581,7 @@ PythonQtInstanceWrapper* PythonQtPrivate::findWrapperAndRemoveUnused(void* obj) PythonQtObjectPtr PythonQtPrivate::createModule(const QString& name, PyObject* pycode) { PythonQtObjectPtr result; + PythonQt::self()->resetErrorFlag(); if (pycode) { result.setNewRef(PyImport_ExecCodeModule((char*)name.toLatin1().data(), pycode)); } else { @@ -1747,4 +1761,4 @@ void PythonQtPrivate::shellClassDeleted( void* shellClass ) // if the wrapper is a QObject, we do not handle this here, // it will be handled by the QPointer<> to the QObject, which becomes NULL // via the QObject destructor. -} \ No newline at end of file +} diff --git a/src/PythonQt.h b/src/PythonQt.h index 4134fb64..b5f6bc48 100644 --- a/src/PythonQt.h +++ b/src/PythonQt.h @@ -484,6 +484,10 @@ class PYTHONQT_EXPORT PythonQt : public QObject { //! return \a True if \a handleError() has been called and an error occured. bool errorOccured()const; + //! reset error flag. After calling this, errorOccured() will return False. + //! \sa PythonQt::errorOccured() + void resetErrorFlag(); + //! set a callback that is called when a QObject with parent == NULL is wrapped by pythonqt void setQObjectWrappedCallback(PythonQtQObjectWrappedCB* cb); //! set a callback that is called when a QObject with parent == NULL is no longer wrapped by pythonqt From 3c84463d3fc4a99c94207c1116ba33d7a412a95f Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 8 Nov 2012 17:28:47 -0500 Subject: [PATCH 6/9] Add SystemExit exception handler If enabled, the signal "systemExitExceptionRaised" will be emitted. It gives application the opportunity to cleanup and terminate nicely. --- src/PythonQt.cpp | 114 ++++++++++++++++++++++++++++++++++++++++------- src/PythonQt.h | 15 +++++++ 2 files changed, 114 insertions(+), 15 deletions(-) diff --git a/src/PythonQt.cpp b/src/PythonQt.cpp index a01e7746..1ecdff75 100644 --- a/src/PythonQt.cpp +++ b/src/PythonQt.cpp @@ -1121,6 +1121,7 @@ PythonQtPrivate::PythonQtPrivate() _currentClassInfoForClassWrapperCreation = NULL; _profilingCB = NULL; _ErrorOccured = false; + _SystemExitExceptionHandlerEnabled = false; } void PythonQtPrivate::setupSharedLibrarySuffixes() @@ -1217,26 +1218,93 @@ void PythonQtPrivate::removeSignalEmitter(QObject* obj) _signalReceivers.remove(obj); } +namespace +{ +//! adapted from python source file "pythonrun.c", function "handle_system_exit" +//! return the exitcode instead of calling "Py_Exit". +//! it gives the application an opportunity to properly terminate. +int custom_system_exit_exception_handler() +{ + PyObject *exception, *value, *tb; + int exitcode = 0; + +// if (Py_InspectFlag) +// /* Don't exit if -i flag was given. This flag is set to 0 +// * when entering interactive mode for inspecting. */ +// return exitcode; + + PyErr_Fetch(&exception, &value, &tb); + if (Py_FlushLine()) + PyErr_Clear(); + fflush(stdout); + if (value == NULL || value == Py_None) + goto done; + if (PyExceptionInstance_Check(value)) { + /* The error code should be in the `code' attribute. */ + PyObject *code = PyObject_GetAttrString(value, "code"); + if (code) { + Py_DECREF(value); + value = code; + if (value == Py_None) + goto done; + } + /* If we failed to dig out the 'code' attribute, + just let the else clause below print the error. */ + } + if (PyInt_Check(value)) + exitcode = (int)PyInt_AsLong(value); + else { + PyObject *sys_stderr = PySys_GetObject(const_cast("stderr")); + if (sys_stderr != NULL && sys_stderr != Py_None) { + PyFile_WriteObject(value, sys_stderr, Py_PRINT_RAW); + } else { + PyObject_Print(value, stderr, Py_PRINT_RAW); + fflush(stderr); + } + PySys_WriteStderr("\n"); + exitcode = 1; + } + done: + /* Restore and clear the exception info, in order to properly decref + * the exception, value, and traceback. If we just exit instead, + * these leak, which confuses PYTHONDUMPREFS output, and may prevent + * some finalizers from running. + */ + PyErr_Restore(exception, value, tb); + PyErr_Clear(); + return exitcode; + //Py_Exit(exitcode); +} +} + bool PythonQt::handleError() { bool flag = false; if (PyErr_Occurred()) { - // currently we just print the error and the stderr handler parses the errors - PyErr_Print(); - - /* - // EXTRA: the format of the ptype and ptraceback is not really documented, so I use PyErr_Print() above - PyObject *ptype; - PyObject *pvalue; - PyObject *ptraceback; - PyErr_Fetch( &ptype, &pvalue, &ptraceback); - - Py_XDECREF(ptype); - Py_XDECREF(pvalue); - Py_XDECREF(ptraceback); - */ - PyErr_Clear(); + if (PythonQt::priv()->_SystemExitExceptionHandlerEnabled && + PyErr_ExceptionMatches(PyExc_SystemExit)) { + int exitcode = custom_system_exit_exception_handler(); + emit PythonQt::self()->systemExitExceptionRaised(exitcode); + } + else + { + // currently we just print the error and the stderr handler parses the errors + PyErr_Print(); + + /* + // EXTRA: the format of the ptype and ptraceback is not really documented, so I use PyErr_Print() above + PyObject *ptype; + PyObject *pvalue; + PyObject *ptraceback; + PyErr_Fetch( &ptype, &pvalue, &ptraceback); + + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + */ + PyErr_Clear(); + } flag = true; } PythonQt::priv()->_ErrorOccured = flag; @@ -1256,6 +1324,22 @@ void PythonQt::resetErrorFlag() } } +void PythonQt::setSystemExitExceptionHandlerEnabled(bool value) +{ + if (PythonQt::self()) + { + PythonQt::priv()->_SystemExitExceptionHandlerEnabled = value; + } +} + +bool PythonQt::systemExitExceptionHandlerEnabled()const +{ + if (PythonQt::self()) + { + return PythonQt::priv()->_SystemExitExceptionHandlerEnabled; + } +} + void PythonQt::addSysPath(const QString& path) { PythonQtObjectPtr sys; diff --git a/src/PythonQt.h b/src/PythonQt.h index b5f6bc48..43a317f6 100644 --- a/src/PythonQt.h +++ b/src/PythonQt.h @@ -488,6 +488,15 @@ class PYTHONQT_EXPORT PythonQt : public QObject { //! \sa PythonQt::errorOccured() void resetErrorFlag(); + //! if set to True, signal will be emitted if exception SystemExit is caught + //! \sa PythonQt::handleError(), PythonQt:: + void setSystemExitExceptionHandlerEnabled(bool value); + + //! return \a True if SystemExit exception is handled by PythonQt + //! \sa setSystemExitExceptionHandlerEnabled() + bool systemExitExceptionHandlerEnabled()const; + + //! set a callback that is called when a QObject with parent == NULL is wrapped by pythonqt void setQObjectWrappedCallback(PythonQtQObjectWrappedCB* cb); //! set a callback that is called when a QObject with parent == NULL is no longer wrapped by pythonqt @@ -517,6 +526,11 @@ class PYTHONQT_EXPORT PythonQt : public QObject { //! emitted when help() is called on a PythonQt object and \c ExternalHelp is enabled void pythonHelpRequest(const QByteArray& cppClassName); + //! emitted when both custom SystemExit exception handler is enabled and a SystemExit + //! exception is raised. + //! \sa setSystemExitExceptionHandlerEnabled(bool) + void systemExitExceptionRaised(int exitCode); + private: void initPythonQtModule(bool redirectStdOut, const QByteArray& pythonQtModuleName); @@ -716,6 +730,7 @@ class PYTHONQT_EXPORT PythonQtPrivate : public QObject { int _PythonQtObjectPtr_metaId; bool _ErrorOccured; + bool _SystemExitExceptionHandlerEnabled; friend class PythonQt; }; From 7132dba93064c2a02591b42305fecdd5d59702d3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 8 Nov 2012 17:29:24 -0500 Subject: [PATCH 7/9] Add "isatty" function to StdOutRedirect. Needed by some logging framework --- src/PythonQtStdOut.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/PythonQtStdOut.cpp b/src/PythonQtStdOut.cpp index 8bdcff09..0b0098aa 100644 --- a/src/PythonQtStdOut.cpp +++ b/src/PythonQtStdOut.cpp @@ -91,7 +91,11 @@ static PyObject *PythonQtStdOutRedirect_flush(PyObject * /*self*/, PyObject * /* return Py_BuildValue(""); } - +static PyObject *PythonQtStdOutRedirect_isatty(PyObject * /*self*/, PyObject * /*args*/) +{ + long res = 0; + return PyBool_FromLong(res); +} static PyMethodDef PythonQtStdOutRedirect_methods[] = { {"write", (PyCFunction)PythonQtStdOutRedirect_write, METH_VARARGS, @@ -99,6 +103,9 @@ static PyMethodDef PythonQtStdOutRedirect_methods[] = { {"flush", (PyCFunction)PythonQtStdOutRedirect_flush, METH_VARARGS, "flush the output, currently not implemented but needed for logging framework" }, + {"isatty", (PyCFunction)PythonQtStdOutRedirect_isatty, METH_NOARGS, + "return False since this object is not a tty-like device. Needed for logging framework" + }, {NULL, NULL, 0 , NULL} /* sentinel */ }; From 26f338be03d93af931307bee29d03df3b6007f0a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 9 Jan 2013 17:33:22 -0500 Subject: [PATCH 8/9] Update list of features associated with patched-2 branch --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index adb8fe90..5416af0e 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,15 @@ This repository contains three branches: * List of features: * At configuration time, detect the Qt version used and seamlessly compile the appropriate wrappers (Qt 4.8, 4.7 or 4.6). * Add method allowing to know if a python error occurred: [5935f29](https://github.com/commontk/PythonQt/commit/5935f29978deed892a13ddef02cb14c205c6124d) + * Also add associated method "resetErrorFlag": [a386dc60](https://github.com/commontk/PythonQt/commit/a386dc60f71c15e67c611bc31b26cee756ed833a) * Fix compilation issue on VS2010 when PythonQt Debug build against python Release: [7e1e07f](https://github.com/commontk/PythonQt/commit/7e1e07f34b2420e420e2858e5ea9a49fe1e0d235) + * Add option Add PythonQt_Wrap_QtAll: [97df3b0](https://github.com/commontk/PythonQt/commit/97df3b0845b3f5c987d3141a9e651436882f5913) and [9104fa9](https://github.com/commontk/PythonQt/commit/9104fa924859f4a865016f2138c06ec856f449d4) + * Ensure all 4.8 generated wrappers are considered: [654f324](https://github.com/commontk/PythonQt/commit/654f3249d1cf3f3ff674b2ff6cca7a2ef3517f60) + * Update "PythonQtPythonInclude.h" to avoid build error on recent MacOSX: [7b8ee130](https://github.com/commontk/PythonQt/commit/7b8ee13058bc0b366983ce8228612e75f8dd9ca8) and [47738f9c](https://github.com/commontk/PythonQt/commit/47738f9c8c5d3ffa77c8f2e1844f899e5b548f0c) + * Update "PythonQtPythonInclude.h" to fix windows build issue when PythonQt Debug build against python Release[6366f00](https://github.com/commontk/PythonQt/commit/6366f002a93aa238c55f58de949d09c552cda5a9) + * Optionally include CTestUseLaunchers: [211440](https://github.com/commontk/PythonQt/commit/2114405a47836b3fb16a3f66fec6a02184f32e71) + * Add SystemExit exception handler. If enabled, the signal "systemExitExceptionRaised" will be emitted. It gives application the opportunity to cleanup and terminate nicely: [3c84463d](https://github.com/commontk/PythonQt/commit/3c84463d3fc4a99c94207c1116ba33d7a412a95f) + * Add "isatty" function to StdOutRedirect. Needed by some logging frame: [7132dba9](https://github.com/commontk/PythonQt/commit/7132dba93064c2a02591b42305fecdd5d59702d3) * Backported: * Most of the [change specific to](https://github.com/commontk/PythonQt/compare/svn-mirror...patched) `patched` branch have been backported upstream: [r200](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=200), [r201](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=201), [r202](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=202), [r203](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=203), [r204](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=204) * CMake option `PYTHONQT_USE_VTK` has been removed ([r205](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=205)), the foreign wrapper mechanism should be used: [r206](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=206) From 51491d7362d4f73afd61595a4ce4f27309819777 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 7 Aug 2017 23:54:38 -0400 Subject: [PATCH 9/9] Remove README.md now available on welcome branch --- README.md | 117 ------------------------------------------------------ 1 file changed, 117 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 5416af0e..00000000 --- a/README.md +++ /dev/null @@ -1,117 +0,0 @@ -PythonQt -======== - -Overview --------- - -PythonQt is a dynamic [Python](http://www.python.org) binding for [Qt](http://qt.nokia.com). -It offers an easy way to embed the Python scripting language into -your Qt applications. It makes heavy use of the QMetaObject system and thus requires Qt4.x. - -This project is a fork of the [official PythonQt](http://pythonqt.sourceforge.net/) repository -hosted on sourceforge. - -It serves as *staging area* to contain patches that will then be contributed back to the -official repository. - -Prerequisites -------------- - -* CMake 2.8.x -* Qt 4.6.2 or above - -Build instructions ------------------- - -By default, the `patched-2` version will be checked out. - -``` -git clone git://github.com/commontk/PythonQt.git -mkdir PythonQt-build -cd PythonQt-build -cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/path/to/qmake ../PythonQt -make -``` - -Additional configure options are: - -* `CMAKE_BUILD_TYPE`: Debug, Release, RelWithDebInfo or MinSizeRel -* `PythonQt_DEBUG`: Enable/Disable PythonQt debug output -* `PythonQt_Wrap_Qt`: Build PythonQt wrapper associated with ``. Possible `` are `gui`, `network`, `opengl`, `sql`, `uitools`, `webkit`, `xml`, `xmlpatterns`. - -Available branches ------------------- - -This repository contains three branches: - -### patched-2 - -* Based on [r228](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=228) -* List of features: - * At configuration time, detect the Qt version used and seamlessly compile the appropriate wrappers (Qt 4.8, 4.7 or 4.6). - * Add method allowing to know if a python error occurred: [5935f29](https://github.com/commontk/PythonQt/commit/5935f29978deed892a13ddef02cb14c205c6124d) - * Also add associated method "resetErrorFlag": [a386dc60](https://github.com/commontk/PythonQt/commit/a386dc60f71c15e67c611bc31b26cee756ed833a) - * Fix compilation issue on VS2010 when PythonQt Debug build against python Release: [7e1e07f](https://github.com/commontk/PythonQt/commit/7e1e07f34b2420e420e2858e5ea9a49fe1e0d235) - * Add option Add PythonQt_Wrap_QtAll: [97df3b0](https://github.com/commontk/PythonQt/commit/97df3b0845b3f5c987d3141a9e651436882f5913) and [9104fa9](https://github.com/commontk/PythonQt/commit/9104fa924859f4a865016f2138c06ec856f449d4) - * Ensure all 4.8 generated wrappers are considered: [654f324](https://github.com/commontk/PythonQt/commit/654f3249d1cf3f3ff674b2ff6cca7a2ef3517f60) - * Update "PythonQtPythonInclude.h" to avoid build error on recent MacOSX: [7b8ee130](https://github.com/commontk/PythonQt/commit/7b8ee13058bc0b366983ce8228612e75f8dd9ca8) and [47738f9c](https://github.com/commontk/PythonQt/commit/47738f9c8c5d3ffa77c8f2e1844f899e5b548f0c) - * Update "PythonQtPythonInclude.h" to fix windows build issue when PythonQt Debug build against python Release[6366f00](https://github.com/commontk/PythonQt/commit/6366f002a93aa238c55f58de949d09c552cda5a9) - * Optionally include CTestUseLaunchers: [211440](https://github.com/commontk/PythonQt/commit/2114405a47836b3fb16a3f66fec6a02184f32e71) - * Add SystemExit exception handler. If enabled, the signal "systemExitExceptionRaised" will be emitted. It gives application the opportunity to cleanup and terminate nicely: [3c84463d](https://github.com/commontk/PythonQt/commit/3c84463d3fc4a99c94207c1116ba33d7a412a95f) - * Add "isatty" function to StdOutRedirect. Needed by some logging frame: [7132dba9](https://github.com/commontk/PythonQt/commit/7132dba93064c2a02591b42305fecdd5d59702d3) -* Backported: - * Most of the [change specific to](https://github.com/commontk/PythonQt/compare/svn-mirror...patched) `patched` branch have been backported upstream: [r200](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=200), [r201](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=201), [r202](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=202), [r203](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=203), [r204](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=204) - * CMake option `PYTHONQT_USE_VTK` has been removed ([r205](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=205)), the foreign wrapper mechanism should be used: [r206](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=206) - -### patched - -* Based on [r193](http://pythonqt.svn.sourceforge.net/viewvc/pythonqt?view=revision&revision=193) -* List of features: - * CMake'ified PythonQt project - * CMake'ified PythonQt/generator project - * Add `dPython.h` file, it provides the ability to link against release python with a debug build of your project. - * Option `PYTHONQT_USE_VTK` CMake option allowing to teach PythonQt how to deal with `vtkObject` - * Stdin can optionally be redirected to a custom callback - * [More details](https://github.com/commontk/PythonQt/compare/svn-mirror...patched) - -### svn-mirror - -* SVN history imported using `git-svn` - -Contributing ------------- - -Once you've made your great commits: - -1. [Fork][fk] PythonQt -2. Create a topic branch - `git checkout -b my_branch` -3. Push to your branch - `git push origin my_branch` -4. Create an [Issue][is] with a link to your branch -5. That's it! - - -Meta ----- - -* Code: `git clone git://github.com/commontk/PythonQt.git` -* Home: -* Bugs: - -License -------- - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -[fk]: http://help.github.com/forking/ -[is]: http://github.com/jcfr/qJobManager/issues -