diff options
author | Tobias Markmann <tm@ayena.de> | 2017-02-21 13:27:42 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-02-22 11:15:00 (GMT) |
commit | 996ca9ecf4f226a033d161419f11e715a3f892c3 (patch) | |
tree | e332db1edf3e9ea2282814154473e3a5e57d362d /Swift/QtUI/QtSwift.h | |
parent | eea861301be0bf3e3f5db6cfc3cada38d133fef2 (diff) | |
download | swift-996ca9ecf4f226a033d161419f11e715a3f892c3.zip swift-996ca9ecf4f226a033d161419f11e715a3f892c3.tar.bz2 |
Improve Swift about window regarding auto update UX
The dialog will automatically initiate a check for updates
when opened.
It will show the current state of the auto updater backend,
e.g. whether it is downloading or already at the latest
version.
This also fixes update channel selection being shown
on Windows and Linux.
Test-Information:
Ran Swift and opening the dialog shows a short progress bar
indicating it checking for updates. Afterwards it shows that
it is already running the latest version, which is sensible
for a dev build.
Change-Id: Ie08cd2a8852e468d6007122604b532fedc24bcfe
Diffstat (limited to 'Swift/QtUI/QtSwift.h')
-rw-r--r-- | Swift/QtUI/QtSwift.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h index 3ad5714..a7dc3cf 100644 --- a/Swift/QtUI/QtSwift.h +++ b/Swift/QtUI/QtSwift.h @@ -1,29 +1,34 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include <boost/program_options/variables_map.hpp> +#include <string> + #include <boost/program_options/options_description.hpp> +#include <boost/program_options/variables_map.hpp> -#include <Swiften/TLS/PlatformTLSFactories.h> +#include <Swiften/Base/Platform.h> +#include <Swiften/EventLoop/Qt/QtEventLoop.h> #include <Swiften/Network/BoostNetworkFactories.h> -#include <string> -#include "Swiften/Base/Platform.h" -#include "Swiften/EventLoop/Qt/QtEventLoop.h" -#include "QtSettingsProvider.h" +#include <Swiften/TLS/PlatformTLSFactories.h> + +#include <SwifTools/AutoUpdater/AutoUpdater.h> +#include <SwifTools/Idle/ActualIdleDetector.h> +#include <SwifTools/Idle/PlatformIdleQuerier.h> + +#include <Swift/QtUI/QtSettingsProvider.h> + #if defined(SWIFTEN_PLATFORM_MACOSX) -#include "SwifTools/Application/CocoaApplication.h" -#include "CocoaApplicationActivateHelper.h" +#include <SwifTools/Application/CocoaApplication.h> +#include <CocoaApplicationActivateHelper.h> #endif #if defined(SWIFTEN_PLATFORM_WINDOWS) -#include "WindowsNotifier.h" +#include <WindowsNotifier.h> #endif -#include "SwifTools/Idle/PlatformIdleQuerier.h" -#include "SwifTools/Idle/ActualIdleDetector.h" namespace po = boost::program_options; @@ -35,7 +40,6 @@ namespace Swift { class Dock; class Notifier; class StoragesFactory; - class AutoUpdater; class ApplicationPathProvider; class AvatarStorage; class CapsStorage; @@ -62,7 +66,7 @@ namespace Swift { private slots: void handleAboutToQuit(); - void handleRecommendRestartToInstallUpdate(); + void handleAutoUpdaterStateChanged(AutoUpdater::State updatedState); private: XMLSettingsProvider* loadSettingsFile(const QString& fileName); @@ -88,7 +92,7 @@ namespace Swift { ApplicationPathProvider* applicationPathProvider_; StoragesFactory* storagesFactory_; CertificateStorageFactory* certificateStorageFactory_; - AutoUpdater* autoUpdater_; + AutoUpdater* autoUpdater_ = nullptr; Notifier* notifier_; StatusCache* statusCache_; PlatformIdleQuerier idleQuerier_; |