Use expiry_date field to check for evaluation timespan
Use the new dedicated field instead of just assuming that the evaluation timespan is buildtime + 30 days. Change-Id: Ibf4078f030ea609d823fe01889a106a5da345817 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
This commit is contained in:
parent
50e1733dfa
commit
3cae7dcc5a
@ -119,9 +119,11 @@ static EvaluationStatus qt_eval_is_supported()
|
|||||||
|
|
||||||
static int qt_eval_days_left()
|
static int qt_eval_days_left()
|
||||||
{
|
{
|
||||||
|
const char *expiry_date = const_cast<const char*>(qt_eval_expiry_date + 12);
|
||||||
|
|
||||||
QDate today = QDate::currentDate();
|
QDate today = QDate::currentDate();
|
||||||
QDate build = QLibraryInfo::buildDate();
|
QDate lastday = QDate::fromString(QString::fromLatin1(expiry_date), Qt::ISODate);
|
||||||
return qMax<qint64>(-1, today.daysTo(build) + 30);
|
return today.daysTo(lastday);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool qt_eval_is_expired()
|
static bool qt_eval_is_expired()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user