MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / updaterDone

Method updaterDone

lightscreenwindow.cpp:741–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739}
740
741void LightscreenWindow::updaterDone(bool result)
742{
743 mUpdater->deleteLater();
744
745 settings()->setValue("lastUpdateCheck", QDate::currentDate().dayOfYear());
746
747 if (!result) {
748 return;
749 }
750
751 QMessageBox msgBox;
752 msgBox.setWindowTitle(tr("Lightscreen"));
753 msgBox.setText(tr("There's a new version of Lightscreen available.<br>Would you like to see more information?<br>(<em>You can turn this notification off</em>)"));
754 msgBox.setIcon(QMessageBox::Information);
755
756 QPushButton *yesButton = msgBox.addButton(QMessageBox::Yes);
757 QPushButton *turnOffButton = msgBox.addButton(tr("Turn Off"), QMessageBox::ActionRole);
758 QPushButton *remindButton = msgBox.addButton(tr("Remind Me Later"), QMessageBox::RejectRole);
759
760 Q_UNUSED(remindButton);
761
762 msgBox.exec();
763
764 if (msgBox.clickedButton() == yesButton) {
765 QDesktopServices::openUrl(QUrl("https://lightscreen.com.ar/whatsnew?from=" + qApp->applicationVersion()));
766 } else if (msgBox.clickedButton() == turnOffButton) {
767 settings()->setValue("options/disableUpdater", true);
768 }
769}
770
771void LightscreenWindow::upload(const QString &fileName)
772{

Callers

nothing calls this directly

Calls 1

QUrlClass · 0.85

Tested by

no test coverage detected