There is very convenient way to encode identification of builds into applications. Then, for instance, you can show in about dialog something like: Version 20100609. Here is snippet of code:
QString buildId()
{
QString embeddedDate(__DATE__);
QString m = embeddedDate.left(3);
QStringList months;
months << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun"
<< "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec";
int month = months.indexOf(m) + 1;
int day = embeddedDate.mid(4, 2).trimmed().toInt();
int year = embeddedDate.mid(7, 4).trimmed().toInt();
return QString::number(year*10000+month*100+day);
}
Encode BuildId or Version into Application
There is very convenient way to encode identification of builds into applications. Then, for instance, you can show in about dialog something like: Version 20100609. Here is snippet of code: