diff --git a/src/app/app.pro b/src/app/app.pro
index 4a352dff5..212216cce 100644
--- a/src/app/app.pro
+++ b/src/app/app.pro
@@ -102,9 +102,10 @@ CONFIG(debug, debug|release){
}
}
- #Calculate revision number only in release mode. Change revision number each time requare recompilation
- #precompiled headers file.
- DEFINES += "LOC_REV=0"
+ #Calculate latest tag distance and build revision only in release mode. Change number each time requare
+ #recompilation precompiled headers file.
+ DEFINES += "LATEST_TAG_DISTANCE=0"
+ DEFINES += "BUILD_REVISION=\\\"uknown\\\""
}else{
# Release mode
DEFINES += V_NO_ASSERT
@@ -120,12 +121,19 @@ CONFIG(debug, debug|release){
QMAKE_LFLAGS_RELEASE =
}
- #local revision number for using in version
- HG_REV=$$system(hg parents --template '{rev}')
- isEmpty(HG_REV){
- HG_REV = 0 # if we can't find local revision left 0.
+ #latest tag distance number for using in version
+ HG_DISTANCE=$$system(hg log -r tip --template '{latesttagdistance}')
+ isEmpty(HG_DISTANCE){
+ HG_DISTANCE = 0 # if we can't find local revision left 0.
}
- DEFINES += "LOC_REV=$${HG_REV}" # Make available local revision number in sources.
+ DEFINES += "LATEST_TAG_DISTANCE=$${HG_DISTANCE}" # Make available latest tag distance number in sources.
+
+ #build revision number for using in version
+ HG_HESH=$$system("hg log -r tip --template '{node|short}'")
+ isEmpty(HG_HESH){
+ HG_HESH = "unknown" # if we can't find build revision left unknown.
+ }
+ DEFINES += "BUILD_REVISION=\\\"$${HG_HESH}\\\"" # Make available build revision number in sources.
}
# Some extra information about Qt. Can be usefull.
diff --git a/src/app/dialogs/app/dialogaboutapp.cpp b/src/app/dialogs/app/dialogaboutapp.cpp
index b392c9a5f..6e3878c41 100644
--- a/src/app/dialogs/app/dialogaboutapp.cpp
+++ b/src/app/dialogs/app/dialogaboutapp.cpp
@@ -41,7 +41,8 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) :
ui->setupUi(this);
ui->label_Valentina_Version->setText(QString("Valentina %1").arg(APP_VERSION));
- ui->label_QT_Version->setText(tr("Based on Qt %2 (32 bit)").arg(QT_VERSION_STR));
+ ui->labelBuildRevision->setText(QString("Build revision: %1").arg(BUILD_REVISION));
+ ui->label_QT_Version->setText(buildCompatibilityString());
QDate date = QLocale(QLocale::C).toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
ui->label_Valentina_Built->setText(tr("Built on %3 at %4").arg(date.toString()).arg(__TIME__));
diff --git a/src/app/dialogs/app/dialogaboutapp.ui b/src/app/dialogs/app/dialogaboutapp.ui
index b14244843..a63cbb4d7 100644
--- a/src/app/dialogs/app/dialogaboutapp.ui
+++ b/src/app/dialogs/app/dialogaboutapp.ui
@@ -9,8 +9,8 @@
0
0
- 393
- 356
+ 583
+ 480
@@ -21,14 +21,14 @@
- 393
- 356
+ 573
+ 480
- 393
- 356
+ 583
+ 480
@@ -100,6 +100,19 @@
+ -
+
+
+
+ 75
+ true
+
+
+
+ Build revision:
+
+
+
-
@@ -175,35 +188,32 @@
-
-
+
0
0
+
+
+ 12
+
+
Qt::ScrollBarAlwaysOff
Qt::ScrollBarAlwaysOff
-
- QTextEdit::AutoNone
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">dismine Sabine Schmaltz</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Susan Spencer grumpi</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Roman Telezhinsky Steve Conklin</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">luzpazB cosina</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Christine</span></p></body></html>
-
-
- false
+
+ Roman Telezhinskyi
+Susan Spencer
+luzpazB
+Christine Neupert
+Sabine Schmaltz
+grumpi
+Steve Conklin
@@ -220,6 +230,19 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
-
@@ -233,6 +256,19 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 45
+
+
+
+
-
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 8ed310767..fc19562e5 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -71,7 +71,8 @@ int main(int argc, char *argv[])
app.StartLogging();
qDebug()<<"Version:"<= 1800) // 1800: MSVC 2013 (yearly release cycle)
+ return QLatin1String("MSVC ") + QString::number(2008 + ((_MSC_VER / 100) - 13));
+ if (_MSC_VER >= 1500) // 1500: MSVC 2008, 1600: MSVC 2010, ... (2-year release cycle)
+ return QLatin1String("MSVC ") + QString::number(2008 + 2 * ((_MSC_VER / 100) - 15));
+#endif
+ return QLatin1String("");
+}
+
+//---------------------------------------------------------------------------------------------------------------------
+QString buildCompatibilityString()
+{
+ return QCoreApplication::tr("Based on Qt %1 (%2, %3 bit)").arg(QLatin1String(qVersion()), compilerString(),
+ QString::number(QSysInfo::WordSize));
+}
diff --git a/src/app/version.h b/src/app/version.h
index f9653698d..6404d8878 100644
--- a/src/app/version.h
+++ b/src/app/version.h
@@ -26,6 +26,9 @@
**
*************************************************************************/
+#include
+#include
+
#ifndef VERSION_H
#define VERSION_H
@@ -56,4 +59,7 @@ extern const QString APP_VERSION;
#define VER_COMPANYDOMAIN_STR "www.valentina-project.org"
+QString compilerString();
+QString buildCompatibilityString();
+
#endif // VERSION_H