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;
}
Esempio n. 2
0
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();
}