goldendict-ng/src/version.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
623 B
C++
Raw Normal View History

#include "version.hh"
#include <QFile>
namespace Version {
QString version()
{
QFile versionFile( ":/version.txt" );
if ( !versionFile.open( QFile::ReadOnly ) ) {
return QStringLiteral( "[Unknown Version]" );
}
else {
return versionFile.readAll().trimmed();
}
}
QString everything()
{
return QStringLiteral( "Goldendict-ng " ) + Version::version() + "\n" + "Qt " + QLatin1String( qVersion() ) + " "
+ Version::compiler + QSysInfo::productType() + " " + QSysInfo::kernelType() + " " + QSysInfo::kernelVersion() + " "
+ QSysInfo::buildAbi() + "\n" + "Flags:" + flags;
}
} // namespace Version