Copy version numbers of libraries in About dialog

This commit is contained in:
wmayer 2012-06-14 15:03:21 +02:00
parent 4fcc518eb8
commit f7b200c204
2 changed files with 16 additions and 0 deletions

View File

@ -30,6 +30,9 @@
# include <QSysInfo>
# include <QTextStream>
# include <QWaitCondition>
# include <Python.h>
# include <Inventor/C/basic.h>
# include <Inventor/Qt/SoQtBasic.h>
#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);

View File

@ -13,6 +13,7 @@
#ifndef _PreComp_
# include <Python.h>
# include <Interface_Static.hxx>
# include <sstream>
#endif
#include <Base/Console.h>
@ -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");