Skip to content

Commit

Permalink
Do not show 'revision unknown' for non-git builds (such as linux rpm …
Browse files Browse the repository at this point in the history
…build).
  • Loading branch information
amorilia committed Oct 28, 2012
1 parent 156e999 commit 303c054
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion NifSkope.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ DEFINES += NIFSKOPE_VERSION=\\\"$$cat(VERSION)\\\"

# build NIFSKOPE_REVISION macro
exists(.git/config):DEFINES += NIFSKOPE_REVISION=\\\"$$system(git log -1 --pretty=format:%h)\\\"
else:DEFINES += NIFSKOPE_REVISION=\\\"unknown\\\"

HEADERS += \
basemodel.h \
Expand Down
5 changes: 5 additions & 0 deletions nifskope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ void NifSkope::about()
"See Qhull_COPYING.txt for details."
);

#ifdef NIFSKOPE_REVISION
QMessageBox mb( tr("About NifSkope %1 (revision %2)").arg(NIFSKOPE_VERSION).arg(NIFSKOPE_REVISION), text, QMessageBox::Information,
QMessageBox::Ok + QMessageBox::Default, 0, 0, this);
#else
QMessageBox mb( tr("About NifSkope %1").arg(NIFSKOPE_VERSION), text, QMessageBox::Information,
QMessageBox::Ok + QMessageBox::Default, 0, 0, this);
#endif
mb.setIconPixmap( QPixmap( ":/res/nifskope.png" ) );
mb.exec();
}
Expand Down

0 comments on commit 303c054

Please sign in to comment.