Пример #1
0
void FvUpdater::decideWhatToDoWithCurrentUpdateProposal()
{
	QString policy = settings->value(FV_NEW_VERSION_POLICY_KEY).toString();
	if(policy == "install")
		InstallUpdate();
	else if(policy == "skip")
		SkipUpdate();
	else
		RemindMeLater();
}
Пример #2
0
FvUpdateWindow::FvUpdateWindow (QWidget *parent) :
    QWidget (parent),
    m_ui (new Ui::FvUpdateWindow) {
    m_ui->setupUi (this);

    m_appIconScene = 0;

    // Delete on close
    setAttribute (Qt::WA_DeleteOnClose, true);

    // Set the "new version is available" string
    QString newVersString = m_ui->newVersionIsAvailableLabel->text().arg (QString::fromUtf8 (FV_APP_NAME));
    m_ui->newVersionIsAvailableLabel->setText (newVersString);

    // Connect buttons
    connect (m_ui->installUpdateButton, SIGNAL (clicked()),
             FvUpdater::sharedUpdater(), SLOT (InstallUpdate()));
    connect (m_ui->skipThisVersionButton, SIGNAL (clicked()),
             FvUpdater::sharedUpdater(), SLOT (SkipUpdate()));
    connect (m_ui->remindMeLaterButton, SIGNAL (clicked()),
             FvUpdater::sharedUpdater(), SLOT (RemindMeLater()));
}
Пример #3
0
void QtTestApp::initUpdater()
{
	createUpdaterWindow();
	
	FvUpdater::sharedUpdater()->SetFeedURL("https://raw.github.com/ershovdz/WebMounter_Builds/master/Appcast.xml");

	// signals from WINDOW
	connect(m_updaterWindow, SIGNAL(installRequested()), FvUpdater::sharedUpdater(), SLOT(InstallUpdate()));
	connect(m_updaterWindow, SIGNAL(skipInstallRequested()), FvUpdater::sharedUpdater(), SLOT(SkipUpdate()));
	connect(m_updaterWindow, SIGNAL(remindLaterRequested()), FvUpdater::sharedUpdater(), SLOT(RemindMeLater()));
	connect(m_updaterWindow, SIGNAL(cancelRequested()), FvUpdater::sharedUpdater(), SLOT(CancelUpdate()));

	// signals from UPDATER
	connect(FvUpdater::sharedUpdater(), SIGNAL(finished()), m_updaterWindow, SLOT(onFinished()));
	connect(FvUpdater::sharedUpdater(), SIGNAL(failed(QString)), m_updaterWindow, SLOT(onFailed(QString)));
	connect(FvUpdater::sharedUpdater(), SIGNAL(progress(uint)), m_updaterWindow, SLOT(onProgress(uint)));
	connect(FvUpdater::sharedUpdater(), SIGNAL(updateAvailable(FvAvailableUpdate*)), this, SLOT(onUpdates(FvAvailableUpdate*)));
	connect(FvUpdater::sharedUpdater(), SIGNAL(noUpdates()), this, SLOT(onNoUpdates()));
	connect(FvUpdater::sharedUpdater(), SIGNAL(closeAppToRunInstaller()), this, SLOT(onCloseApp()));
}