Skip to content

Instantly share code, notes, and snippets.

@Code-Share
Created August 6, 2012 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Code-Share/3269152 to your computer and use it in GitHub Desktop.
Save Code-Share/3269152 to your computer and use it in GitHub Desktop.
Launchy donate page
// Launchy_QT/src/main.cpp 1491:1506
void LaunchyWidget::shouldDonate()
{
QDateTime time = QDateTime::currentDateTime();
QDateTime donateTime = gSettings->value("donateTime",time.addDays(21)).toDateTime();
if (donateTime.isNull()) return;
gSettings->setValue("donateTime", donateTime);
if (donateTime <= time)
{
#ifdef Q_WS_WIN
runProgram("http://www.launchy.net/donate.html", "");
#endif
QDateTime def;
gSettings->setValue("donateTime", def);
}
}
// Launchy_QT/src/main.cpp 1531:1533
void LaunchyWidget::showLaunchy(bool noFade)
{
shouldDonate();
// ...
}
// 早上被噪音吵醒...心情烦躁看漏眼了...只在安装后第21天弹一次...挺合理的.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment