Show continuous build in the About Dialog.

This commit is contained in:
Leonardo Zide 2019-03-17 12:10:08 -07:00
parent 8497f07dea
commit 7c267c91d3
2 changed files with 14 additions and 0 deletions

View file

@ -59,6 +59,16 @@ isEmpty(QMAKE_LRELEASE) {
}
}
TRAVIS_COMMIT = $$(TRAVIS_COMMIT)
!isEmpty(TRAVIS_COMMIT) {
DEFINES += "LC_CONTINUOUS_BUILD=$$TRAVIS_COMMIT"
}
APPVEYOR_REPO_COMMIT = $$(APPVEYOR_REPO_COMMIT)
!isEmpty(APPVEYOR_REPO_COMMIT) {
DEFINES += "LC_CONTINUOUS_BUILD=$$APPVEYOR_REPO_COMMIT"
}
TSFILES = resources/leocad_fr.ts resources/leocad_pt.ts resources/leocad_de.ts
lrelease.input = TSFILES
lrelease.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm

View file

@ -11,7 +11,11 @@ lcQAboutDialog::lcQAboutDialog(QWidget *parent) :
{
ui->setupUi(this);
#ifdef LC_CONTINUOUS_BUILD
ui->version->setText(tr("LeoCAD Continuous Build\nfrom commit %1").arg(QString::fromLatin1(LC_CONTINUOUS_BUILD)));
#else
ui->version->setText(tr("LeoCAD Version %1").arg(QString::fromLatin1(LC_VERSION_TEXT)));
#endif
QGLWidget* Widget = (QGLWidget*)gMainWindow->GetActiveView()->mWidget;
QGLFormat Format = Widget->context()->format();