Create helper function to get boost version

This commit is contained in:
Chocobo1 2016-02-27 08:27:56 +08:00
parent 498f5e3877
commit 12627bbc10
4 changed files with 18 additions and 12 deletions

View file

@ -38,6 +38,7 @@
#include <QSettings>
#include <QThread>
#include <QSysInfo>
#include <boost/version.hpp>
#ifdef DISABLE_GUI
#include <QCoreApplication>
@ -650,3 +651,13 @@ QString Utils::Misc::osName()
#endif
return name;
}
QString Utils::Misc::boostVersionString()
{
// static initialization for usage in signal handler
static const QString ver = QString("%1.%2.%3")
.arg(BOOST_VERSION / 100000)
.arg((BOOST_VERSION / 100) % 1000)
.arg(BOOST_VERSION % 100);
return ver;
}