This allows PythonQt to be compiled under OS/X 10.9 and Xcode 5.1 as part of a large Qt 5.3 project. Without this change there are numerous errors like:
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtAPIPlugin.cpp:23:
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtManager.h:27:
In file included from ../src/plugins/thirdParty/PythonQtAPI/PythonQt/src/PythonQt.h:58:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:436:15: error: C++ requires a type specifier for all
declarations
char_type toupper(char_type __c) const
^~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
^~~~~
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtAPIPlugin.cpp:23:
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtManager.h:27:
In file included from ../src/plugins/thirdParty/PythonQtAPI/PythonQt/src/PythonQt.h:58:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:442:48: error: too many arguments provided to
function-like macro invocation
const char_type* toupper(char_type* __low, const char_type* __high) const
^
/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
^
This allows PythonQt to be compiled under OS/X 10.9 and Xcode 5.1 as part of a large Qt 5.3 project. Without this change there are numerous errors like: