Increase expire interval for pre-release version to 30 days (was 14 before).

This commit is contained in:
LoRd_MuldeR 2011-01-20 22:06:59 +01:00
parent 42fb4743c4
commit cedb9c21a8
4 changed files with 9 additions and 5 deletions

View File

@ -600,12 +600,11 @@ void MainWindow::windowShown(void)
//Check for expiration
if(lamexp_version_demo())
{
QDate expireDate = lamexp_version_date().addDays(14);
if(QDate::currentDate() >= expireDate)
if(QDate::currentDate() >= lamexp_version_expires())
{
qWarning("Binary has expired !!!");
PlaySound(MAKEINTRESOURCE(IDR_WAVE_WHAMMY), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
if(QMessageBox::warning(this, tr("LameXP - Expired"), QString("<nobr>%1<br>%2</nobr>").arg(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(expireDate.toString(Qt::ISODate)), tr("LameXP is free software and release versions won't expire.")), tr("Check for Updates"), tr("Exit Program")) == 0)
if(QMessageBox::warning(this, tr("LameXP - Expired"), QString("<nobr>%1<br>%2</nobr>").arg(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(lamexp_version_expires().toString(Qt::ISODate)), tr("LameXP is free software and release versions won't expire.")), tr("Check for Updates"), tr("Exit Program")) == 0)
{
checkUpdatesActionActivated();
}

View File

@ -160,6 +160,11 @@ bool lamexp_version_demo(void)
return LAMEXP_DEBUG || !(strstr(g_lamexp_version_release, "Final") || strstr(g_lamexp_version_release, "Hotfix"));
}
QDate lamexp_version_expires(void)
{
return lamexp_version_date().addDays(30);
}
/*
* Get build date date
*/

View File

@ -74,6 +74,7 @@ const QDate &lamexp_version_date(void);
const char *lamexp_version_release(void);
bool lamexp_version_demo(void);
const char *lamexp_version_compiler(void);
QDate lamexp_version_expires(void);
unsigned int lamexp_toolver_neroaac(void);
//Public functions

View File

@ -81,8 +81,7 @@ int lamexp_main(int argc, char* argv[])
//Check for expiration
if(lamexp_version_demo())
{
QDate expireDate = lamexp_version_date().addDays(14);
qWarning(QString("Note: This demo (pre-release) version of LameXP will expire at %1.\n").arg(expireDate.toString(Qt::ISODate)).toLatin1().constData());
qWarning(QString("Note: This demo (pre-release) version of LameXP will expire at %1.\n").arg(lamexp_version_expires().toString(Qt::ISODate)).toLatin1().constData());
}
//Check for multiple instances of LameXP