1
0
mirror of https://github.com/jaredtao/TaoQuick.git synced 2025-01-19 20:22:56 +08:00

36 lines
834 B
C++
Raw Normal View History

2020-07-05 02:12:59 +08:00
#include "AppInfo.h"
#include <QQmlContext>
2020-11-10 00:41:40 +08:00
#include <QSysInfo>
2020-07-05 02:12:59 +08:00
#include "Ver-u8.h"
AppInfo::AppInfo(QObject *parent) : QObject(parent)
{
m_appName = VER_PRODUCTNAME_STR;
2020-11-10 00:41:40 +08:00
m_appVersion = TaoVer;
m_latestVersion = TaoVer;
m_buildDateTime = TaoDATETIME;
m_buildRevision = TaoREVISIONSTR;
m_copyRight = VER_LEGALCOPYRIGHT_STR;
m_descript = QString::fromLocal8Bit(VER_FILEDESCRIPTION_STR);
m_compilerVendor = QString("%1(%2 %3)").arg(QT_VERSION_STR).arg(CXX_COMPILER_ID).arg(QSysInfo::buildCpuArchitecture());
2020-07-05 02:12:59 +08:00
}
void AppInfo::beforeUiReady(QQmlContext *ctx)
{
ctx->setContextProperty("appInfo", this);
}
2020-11-13 15:16:31 +08:00
void AppInfo::afterUiReady()
{
// auto json = QJsonDocument(*this).toJson(QJsonDocument::Indented);
// json.replace("\\n\\r","\\\n");
// qWarning() << json;
}
2020-07-05 02:12:59 +08:00
2020-11-13 15:16:31 +08:00
AppInfo::~AppInfo()
{
}