From f7b200c20499b3ea30fe0e60b338de5d9ccb4728 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 14 Jun 2012 15:03:21 +0200 Subject: [PATCH] Copy version numbers of libraries in About dialog --- src/Gui/Splashscreen.cpp | 11 +++++++++++ src/Mod/Part/App/AppPart.cpp | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 7a40dc7be..d127e13bb 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -30,6 +30,9 @@ # include # include # include +# include +# include +# include #endif #include "Splashscreen.h" @@ -347,6 +350,14 @@ void AboutDialog::on_copyButton_clicked() it = config.find("BuildRevisionHash"); if (it != config.end()) str << "Hash: " << it->second.c_str() << endl; + // report also the version numbers of the most important libraries in FreeCAD + str << "Python version: " << PY_VERSION << endl; + str << "Qt version: " << QT_VERSION_STR << endl; + str << "Coin version: " << COIN_VERSION << endl; + str << "SoQt version: " << SOQT_VERSION << endl; + it = config.find("OCC_VERSION"); + if (it != config.end()) + str << "OCC version: " << it->second.c_str() << endl; QClipboard* cb = QApplication::clipboard(); cb->setText(data); diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index 4980b0be1..4e521342c 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -13,6 +13,7 @@ #ifndef _PreComp_ # include # include +# include #endif #include @@ -86,6 +87,10 @@ PyDoc_STRVAR(module_part_doc, extern "C" { void PartExport initPart() { + std::stringstream str; + str << OCC_VERSION_MAJOR << "." << OCC_VERSION_MINOR << "." << OCC_VERSION_MAINTENANCE; + App::Application::Config()["OCC_VERSION"] = str.str(); + PyObject* partModule = Py_InitModule3("Part", Part_methods, module_part_doc); /* mod name, table ptr */ Base::Console().Log("Loading Part module... done\n");