| 157 | } |
| 158 | |
| 159 | void LightscreenWindow::checkForUpdates() |
| 160 | { |
| 161 | if (settings()->value("options/disableUpdater", false).toBool()) { |
| 162 | return; |
| 163 | } |
| 164 | |
| 165 | if (settings()->value("lastUpdateCheck").toInt() + 7 |
| 166 | > QDate::currentDate().dayOfYear()) { |
| 167 | return; // If 7 days have not passed since the last update check. |
| 168 | } |
| 169 | |
| 170 | mUpdater = new Updater(this); |
| 171 | |
| 172 | connect(mUpdater, &Updater::done, this, &LightscreenWindow::updaterDone); |
| 173 | mUpdater->check(); |
| 174 | } |
| 175 | |
| 176 | void LightscreenWindow::cleanup(const Screenshot::Options &options) |
| 177 | { |