summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 370d7c3..383e5ca 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -30,13 +30,13 @@ namespace Swift{
#define SWIFT_APPCAST_URL "http://swift.im/appcast/psi-mac-dev.xml"
#else
#define SWIFT_APPCAST_URL ""
#endif
-QtSwift::QtSwift(bool netbookMode) {
+QtSwift::QtSwift(bool netbookMode) : autoUpdater_(NULL) {
if (netbookMode) {
splitter_ = new QSplitter();
} else {
splitter_ = NULL;
}
QCoreApplication::setApplicationName("Swift");
@@ -56,14 +56,17 @@ QtSwift::QtSwift(bool netbookMode) {
soundPlayer_ = new QtSoundPlayer();
if (splitter_) {
splitter_->show();
}
mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_, soundPlayer_, xmlConsoleWidgetFactory_);
- autoUpdater_ = PlatformAutoUpdaterFactory().createAutoUpdater(SWIFT_APPCAST_URL);
- autoUpdater_->checkForUpdates();
+ PlatformAutoUpdaterFactory autoUpdaterFactory;
+ if (autoUpdaterFactory.isSupported()) {
+ autoUpdater_ = autoUpdaterFactory.createAutoUpdater(SWIFT_APPCAST_URL);
+ autoUpdater_->checkForUpdates();
+ }
}
QtSwift::~QtSwift() {
delete autoUpdater_;
delete chatWindowFactory_;
delete rosterWindowFactory_;