Skip to content

Commit ba6661c

Browse files
author
Petros Koutsolampros
authored
Merge pull request #98 from orange-vertex/master
Change the versioning scheme to major.minor.revision
2 parents 378d217 + c747a24 commit ba6661c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

depthmapX/AboutDlg.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CAboutDlg::CAboutDlg(QWidget *parent)
2121
{
2222
setupUi(this);
2323
QString m_version_info;
24-
m_version_info = QString(tr("Version %1%2")).arg(DEPTHMAPX_VERSION).arg(DEPTHMAPX_MINOR_VERSION);
24+
m_version_info = QString(tr("Version %1.%2.%3")).arg(DEPTHMAPX_MAJOR_VERSION).arg(DEPTHMAPX_MINOR_VERSION).arg(DEPTHMAPX_REVISION_VERSION);
2525
QString m_copyright;
2626
m_copyright = QString(tr("(C) 2000-2010 University College London, Alasdair Turner, Eva Friedrich\n(C) 2011-2014 Tasos Varoudis\n(C) 2017 Christian Sailer, Petros Koutsolampros"));
2727
QString m_agreement;

depthmapX/GraphDoc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ QGraphDoc::QGraphDoc(const QString &author, const QString &organisation)
8787
m_num_records = 0;
8888

8989
std::string date = ViewHelpers::getCurrentDate();
90-
QString version = QString("depthmapX v%1.%2").arg(DEPTHMAPX_VERSION).arg(DEPTHMAPX_MINOR_VERSION);
90+
QString version = QString(TITLE_BASE);
9191

9292
m_meta_graph->setProperties(author.toStdString(),organisation.toStdString(),date,version.toStdString());
9393

depthmapX/depthmapView.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ void QDepthmapView::OutputEPS( ofstream& stream, QGraphDoc *pDoc, bool includeSc
16881688

16891689
stream << "%!PS-Adobe-3.0 EPSF-3.0\n"
16901690
<< "%%BoundingBox: 0 0 " << clrect.width() << " " << clrect.height() << "\n"
1691-
<< "%%Creator: depthmapX " << DEPTHMAPX_VERSION << "." << DEPTHMAPX_MINOR_VERSION << endl;
1691+
<< "%%Creator: " << TITLE_BASE << endl;
16921692

16931693
// temporarily inflate resolution for EPS draw
16941694
rect = QRect(clrect.left() * 10, clrect.top() * 10, clrect.width() * 10, clrect.height() * 10);
@@ -2495,7 +2495,7 @@ void QDepthmapView::OutputSVG( ofstream& stream, QGraphDoc *pDoc )
24952495
stream << "\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" << endl;
24962496
stream << "<svg width=\"24cm\" height=\"" << (h/200) << "cm\" viewBox=\"0 0 4800 " << h << "\"" << endl;
24972497
stream << "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\">" << endl;
2498-
stream << "<desc>depthmapX " << DEPTHMAPX_VERSION << "." << DEPTHMAPX_MINOR_VERSION << "</desc>" << endl;
2498+
stream << "<desc>" << TITLE_BASE << "</desc>" << endl;
24992499

25002500
// note, SVG draw completely overrides standard draw physical units to achieve hi-res output
25012501
// (EPS should probably follow this model too)

depthmapX/version.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
#define VERSION_H
1919

2020
// use these to define the depthmap versions
21-
#define DEPTHMAPX_VERSION 0
22-
#define DEPTHMAPX_MINOR_VERSION_RAW 60 // b Beta version, r is standard release, s is stable release, W - M - L for single OS
21+
#define DEPTHMAPX_MAJOR_VERSION 0
22+
#define DEPTHMAPX_MINOR_VERSION 6
23+
#define DEPTHMAPX_REVISION_VERSION 0
24+
2325
#define DEPTHMAP_MODULE_VERSION 10.04
2426

2527
// leave these alone - C Preprocessor magic to get stuff to the right format
2628
#define STRINGIFY(v) #v
27-
#define DEPTHMAPX_MINOR_VERSION_FORMAT(minor) STRINGIFY(minor)
28-
#define DEPTHMAPX_MINOR_VERSION DEPTHMAPX_MINOR_VERSION_FORMAT(DEPTHMAPX_MINOR_VERSION_RAW)
29-
#define TITLE_BASE_FORMAT(version, minor) "depthmapX " STRINGIFY(version) "." STRINGIFY(minor)
30-
#define TITLE_BASE TITLE_BASE_FORMAT(DEPTHMAPX_VERSION, DEPTHMAPX_MINOR_VERSION_RAW)
29+
#define TITLE_BASE_FORMAT(version, minor, revision) "depthmapX " STRINGIFY(version) "." STRINGIFY(minor) "." STRINGIFY(revision)
30+
#define TITLE_BASE TITLE_BASE_FORMAT(DEPTHMAPX_MAJOR_VERSION, DEPTHMAPX_MINOR_VERSION, DEPTHMAPX_REVISION_VERSION)
3131

3232
#endif // VERSION_H

0 commit comments

Comments
 (0)