mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Only display git revision when available
This commit is contained in:
committed by
Laurent Trinques
parent
15282292c9
commit
880bd8f7bd
@@ -74,7 +74,7 @@ include(sources/QWidgetAnimation/QWidgetAnimation.pri)
|
|||||||
|
|
||||||
DEFINES += QAPPLICATION_CLASS=QApplication
|
DEFINES += QAPPLICATION_CLASS=QApplication
|
||||||
DEFINES += QT_MESSAGELOGCONTEXT
|
DEFINES += QT_MESSAGELOGCONTEXT
|
||||||
DEFINES += GIT_COMMIT_SHA="\\\"$(shell git -C \""$$_PRO_FILE_PWD_"\" rev-parse --verify HEAD)\\\""
|
DEFINES += GIT_COMMIT_SHA="\\\"$(shell git -C \""$$_PRO_FILE_PWD_"\" rev-parse --verify HEAD 2>/dev/null || true)\\\""
|
||||||
|
|
||||||
# You can make your code fail to compile if it uses deprecated APIs.
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
|
|||||||
@@ -122,7 +122,9 @@ void MachineInfo::send_info_to_debug()
|
|||||||
<< QLibraryInfo::path(QLibraryInfo::SettingsPath);
|
<< QLibraryInfo::path(QLibraryInfo::SettingsPath);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
if (strlen(GIT_COMMIT_SHA)) {
|
||||||
qInfo() << "GitRevision " + QString(GIT_COMMIT_SHA);
|
qInfo() << "GitRevision " + QString(GIT_COMMIT_SHA);
|
||||||
|
}
|
||||||
qInfo()<< "QElectroTech V " + QetVersion::displayedVersion();
|
qInfo()<< "QElectroTech V " + QetVersion::displayedVersion();
|
||||||
qInfo()<< QObject::tr("Compilation : ") + pc.built.version;
|
qInfo()<< QObject::tr("Compilation : ") + pc.built.version;
|
||||||
qInfo()<< "Built with Qt " + pc.built.QT
|
qInfo()<< "Built with Qt " + pc.built.QT
|
||||||
@@ -383,7 +385,9 @@ QString MachineInfo::compilation_info()
|
|||||||
compilation_info += " - " + pc.built.arch;
|
compilation_info += " - " + pc.built.arch;
|
||||||
compilation_info += " - Date : " + pc.built.date;
|
compilation_info += " - Date : " + pc.built.date;
|
||||||
compilation_info += " : " + pc.built.time;
|
compilation_info += " : " + pc.built.time;
|
||||||
|
if (strlen(GIT_COMMIT_SHA)) {
|
||||||
compilation_info += "<br> Git Revision : " + QString(GIT_COMMIT_SHA);
|
compilation_info += "<br> Git Revision : " + QString(GIT_COMMIT_SHA);
|
||||||
|
}
|
||||||
compilation_info += " <br>Run with Qt " + QString(qVersion());
|
compilation_info += " <br>Run with Qt " + QString(qVersion());
|
||||||
compilation_info += " using"
|
compilation_info += " using"
|
||||||
+ QString(" %1 thread(s)").arg(pc.cpu.ThreadCount);
|
+ QString(" %1 thread(s)").arg(pc.cpu.ThreadCount);
|
||||||
|
|||||||
Reference in New Issue
Block a user