summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 7e204e9..4c7eabb 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -15,14 +15,24 @@
#include "Swiften/Application/Application.h"
#include "Swiften/Application/Platform/PlatformApplication.h"
#include "Swiften/Base/String.h"
+#include "Swiften/Base/Platform.h"
#include "Swiften/Elements/Presence.h"
#include "Swiften/Client/Client.h"
#include "Swift/Controllers/ChatController.h"
#include "Swift/Controllers/MainController.h"
#include "Swift/QtUI/BuildVersion.h"
+#include "SwifTools/AutoUpdater/AutoUpdater.h"
+#include "SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.h"
namespace Swift{
+#if defined(SWIFTEN_PLATFORM_MACOSX)
+#define SWIFT_APPCAST_URL "http://swift.im/appcast/psi-mac.xml"
+#else
+#define SWIFT_APPCAST_URL ""
+#endif
+
+
QtSwift::QtSwift(bool netbookMode) {
if (netbookMode) {
splitter_ = new QSplitter();
@@ -48,9 +58,13 @@ QtSwift::QtSwift(bool netbookMode) {
splitter_->show();
}
mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_, soundPlayer_, xmlConsoleWidgetFactory_);
+
+ autoUpdater_ = PlatformAutoUpdaterFactory().createAutoUpdater(SWIFT_APPCAST_URL);
+ autoUpdater_->checkForUpdates();
}
QtSwift::~QtSwift() {
+ delete autoUpdater_;
delete chatWindowFactory_;
delete rosterWindowFactory_;
delete loginWindowFactory_;