2023-06-17 06:20:22 +00:00
|
|
|
#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() ) + " "
|
2023-07-30 05:21:14 +00:00
|
|
|
+ Version::compiler + " " + QSysInfo::productType() + " " + QSysInfo::kernelType() + " " + QSysInfo::kernelVersion()
|
|
|
|
+ " " + QSysInfo::buildAbi() + "\n" + "Flags:" + flags;
|
2023-06-17 06:20:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Version
|