App: remove some more deprecated Py2 code

and remove deprecated void from function signature and replace 0 or NULL with nullptr
This commit is contained in:
wmayer
2021-04-26 10:55:56 +02:00
parent af16ab02a0
commit 44e82ac3c4
5 changed files with 75 additions and 293 deletions

View File

@@ -249,15 +249,7 @@ int main( int argc, char ** argv )
"Python is searching for its files in the following directories:\n%3\n\n"
"Python version information:\n%4\n")
.arg(appName, QString::fromUtf8(e.what()),
#if PY_MAJOR_VERSION >= 3
#if PY_MINOR_VERSION >= 5
QString::fromUtf8(Py_EncodeLocale(Py_GetPath(),NULL)), QString::fromLatin1(Py_GetVersion()));
#else
QString::fromUtf8(_Py_wchar2char(Py_GetPath(),NULL)), QString::fromLatin1(Py_GetVersion()));
#endif
#else
QString::fromUtf8(Py_GetPath()), QString::fromLatin1(Py_GetVersion()));
#endif
const char* pythonhome = getenv("PYTHONHOME");
if (pythonhome) {
msg += QObject::tr("\nThe environment variable PYTHONHOME is set to '%1'.")