Exemplo n.º 1
0
void FvUpdater::RemindMeLater()
{
	qDebug() << "Remind me later";

	hideUpdaterWindow();
	hideUpdateConfirmationDialog();	// if any; shouldn't be shown at this point, but who knows
}
Exemplo n.º 2
0
void QUPDUpdater::skipUpdate()
{
    qDebug() << "Skip update";
    if (proposedUpdate()) {
        QUPDIgnoredVersions::ignoreVersion(proposedUpdate()->enclosureVersion());
        hideUpdaterWindow();
    }
}
Exemplo n.º 3
0
void FvUpdater::RemindMeLater()
{
	//qDebug() << "Remind me later";

#ifdef FV_GUI
	hideUpdaterWindow();
#endif
}
Exemplo n.º 4
0
void FvUpdater::showUpdaterWindowUpdatedWithCurrentUpdateProposal()
{
	// Destroy window if already exists
	hideUpdaterWindow();

	// Create a new window
	m_updaterWindow = new FvUpdateWindow();
	m_updaterWindow->UpdateWindowWithCurrentProposedUpdate();
	m_updaterWindow->show();
}
Exemplo n.º 5
0
FvUpdater::~FvUpdater()
{
	if (m_proposedUpdate) {
		delete m_proposedUpdate;
		m_proposedUpdate = 0;
	}

	hideUpdateConfirmationDialog();
	hideUpdaterWindow();
}
Exemplo n.º 6
0
void FvUpdater::showUpdaterWindowUpdatedWithCurrentUpdateProposal()
{
	// Destroy window if already exists
	hideUpdaterWindow();

	// Create a new window
	m_updaterWindow = new FvUpdateWindow(NULL, skipVersionAllowed, remindLaterAllowed);
	m_updaterWindow->UpdateWindowWithCurrentProposedUpdate();
	m_updaterWindow->show();
}
Exemplo n.º 7
0
// UpdaterWindow
void QUPDUpdater::showUpdaterWindowUpdatedWithCurrentUpdateProposal()
{
    hideUpdaterWindow();

    _updaterDialog = new QUPDUpdaterDialogFull(parentWidget());
    connect(this, SIGNAL(downloadChangelogSuccess()),
            _updaterDialog, SLOT(changelogDownloaded()));
    startDownloadChangelog();
    _updaterDialog->show();
}
Exemplo n.º 8
0
FvUpdater::~FvUpdater()
{
	if (m_proposedUpdate) {
		delete m_proposedUpdate;
		m_proposedUpdate = 0;
	}

#ifdef FV_GUI
	hideUpdaterWindow();
#endif
}
Exemplo n.º 9
0
QUPDUpdater::~QUPDUpdater()
{
    if (_proposedUpdate) {
        delete _proposedUpdate;
        _proposedUpdate = 0;
    }

    _qnam->deleteLater();

    hideDownloadUpdateDialog();
    hideUpdaterWindow();
}
Exemplo n.º 10
0
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
}
Exemplo n.º 11
0
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
}
Exemplo n.º 12
0
void FvUpdater::InstallUpdate()
{
	if(m_proposedUpdate==NULL)
	{
		qWarning() << "Abort Update: No update prososed! This should not happen.";
		return;
	}

	// Prepare download
	QUrl url = m_proposedUpdate->GetEnclosureUrl();

	// Check SSL Fingerprint if required
	if(url.scheme()=="https" && !m_requiredSslFingerprint.isEmpty())
		if( !checkSslFingerPrint(url) )	// check failed
		{	
			qWarning() << "Update aborted.";
			return;
		}

	// Start Download
	QNetworkReply* reply = m_qnam.get(QNetworkRequest(url));
	connect(reply, SIGNAL(finished()), this, SLOT(httpUpdateDownloadFinished()));

	// Maybe Check request 's return value
	if (reply->error() != QNetworkReply::NoError)
	{
		qDebug()<<"Unable to download the update: "<<reply->errorString();
		return;
	}
	else
		qDebug()<<"OK";

	// Show download Window
#ifdef FV_GUI
	FvUpdateDownloadProgress* dlwindow = new FvUpdateDownloadProgress(NULL);
	connect(reply, SIGNAL(downloadProgress(qint64, qint64)), dlwindow, SLOT(downloadProgress(qint64, qint64) ));
	connect(&m_qnam, SIGNAL(finished(QNetworkReply*)), dlwindow, SLOT(close()));
	dlwindow->show();
#endif

	emit (updatedFinishedSuccessfully());

#ifdef FV_GUI
	hideUpdaterWindow();
#endif
}
Exemplo n.º 13
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();
}
Exemplo n.º 14
0
FvUpdater::~FvUpdater()
{
	if (m_proposedUpdate) {
		delete m_proposedUpdate;
		m_proposedUpdate = 0;
	}

	hideUpdateConfirmationDialog();
	hideUpdaterWindow();
    hideAutoUpdateConfirmationDialog();
    hideUpdateCheckingDialog();

    delete m_autoUpdater;
    m_autoUpdater = 0;

    // freeing the auto update timer
    m_updateTimer->stop();
    delete m_updateTimer;
    m_updateTimer = 0;
}
Exemplo n.º 15
0
void QUPDUpdater::remindMeLater()
{
    qDebug() << "Remind me later";
    hideUpdaterWindow();
}