Skip to content

Commit

Permalink
in sample, check for updates automatically too
Browse files Browse the repository at this point in the history
  • Loading branch information
pypt committed Jun 2, 2012
1 parent 6c5d8cc commit 6b16dce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions sample/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <QtGui/QApplication>
#include "mainwindow.h"
#include "fvupdater.h"

int main(int argc, char *argv[])
{
Expand All @@ -9,6 +10,13 @@ int main(int argc, char *argv[])
QApplication::setOrganizationName("pypt");
QApplication::setOrganizationDomain("pypt.lt");

// Set feed URL before doing anything else
FvUpdater::sharedUpdater()->SetFeedURL("https://raw.github.com/pypt/fervor/master/sample/Appcast.xml");

// Check for updates automatically
FvUpdater::sharedUpdater()->CheckForUpdatesSilent();

// Show main window
MainWindow w;
w.show();

Expand Down
2 changes: 1 addition & 1 deletion sample/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);

// Connect the "check for updates" button with the autoupdater
// Connect the "check for updates manually" button with the autoupdater
connect(ui->updateButton, SIGNAL(clicked()),
FvUpdater::sharedUpdater(), SLOT(CheckForUpdatesNotSilent()));
}
Expand Down
4 changes: 2 additions & 2 deletions sample/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<widget class="QPushButton" name="updateButton">
<property name="maximumSize">
<size>
<width>200</width>
<width>240</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Check for updates</string>
<string>Check for updates manually</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 6b16dce

Please sign in to comment.