bool FvUpdateConfirmDialog::UpdateWindowWithCurrentProposedUpdate() { FvAvailableUpdate* proposedUpdate = FvUpdater::sharedUpdater()->GetProposedUpdate(); if (! proposedUpdate) { return false; } QString downloadLinkString = m_ui->updateFileLinkLabel->text() .arg(proposedUpdate->GetEnclosureUrl().toString()); m_ui->updateFileLinkLabel->setText(downloadLinkString); return true; }
bool FvUpdateWindow::UpdateWindowWithCurrentProposedUpdate() { FvAvailableUpdate *proposedUpdate = FvUpdater::sharedUpdater()->GetProposedUpdate(); if (! proposedUpdate) return false; QString downloadString = m_ui->wouldYouLikeToDownloadLabel->text() .arg (QString::fromUtf8 (FV_APP_NAME), proposedUpdate->GetEnclosureVersion(), QString::fromUtf8 (FV_APP_VERSION)); m_ui->wouldYouLikeToDownloadLabel->setText (downloadString); m_ui->releaseNotesWebView->stop(); m_ui->releaseNotesWebView->load (proposedUpdate->GetReleaseNotesLink()); return true; }
void FvUpdater::SkipUpdate() { qDebug() << "Skip update"; FvAvailableUpdate* proposedUpdate = GetProposedUpdate(); if (! proposedUpdate) { qWarning() << "Proposed update is NULL (shouldn't be at this point)"; return; } // Start ignoring this particular version FVIgnoredVersions::IgnoreVersion(proposedUpdate->GetEnclosureVersion()); hideUpdaterWindow(); hideUpdateConfirmationDialog(); // if any; shouldn't be shown at this point, but who knows }
void FvUpdater::SkipUpdate() { qDebug() << "Skip update"; FvAvailableUpdate* proposedUpdate = GetProposedUpdate(); if (! proposedUpdate) { qWarning() << "Proposed update is NULL (shouldn't be at this point)"; return; } // Start ignoring this particular version FVIgnoredVersions::IgnoreVersion(proposedUpdate->GetEnclosureVersion()); #ifdef FV_GUI hideUpdaterWindow(); #endif }
void FvUpdater::UpdateInstallationConfirmed() { qDebug() << "Confirm update installation"; FvAvailableUpdate* proposedUpdate = GetProposedUpdate(); if (! proposedUpdate) { qWarning() << "Proposed update is NULL (shouldn't be at this point)"; return; } // Open a link if (! QDesktopServices::openUrl(proposedUpdate->GetEnclosureUrl())) { showErrorDialog(tr("Unable to open this link in a browser. Please do it manually."), true); return; } hideUpdaterWindow(); hideUpdateConfirmationDialog(); }