mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 16:10:04 +00:00 
			
		
		
		
	Update manager and test
This commit is contained in:
		
							parent
							
								
									6412c77a9d
								
							
						
					
					
						commit
						08654bb7b0
					
				
					 5 changed files with 345 additions and 3 deletions
				
			
		
							
								
								
									
										43
									
								
								scwx-qt/source/scwx/qt/manager/update_manager.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								scwx-qt/source/scwx/qt/manager/update_manager.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/qt/types/github_types.hpp> | ||||
| 
 | ||||
| #include <memory> | ||||
| #include <string> | ||||
| 
 | ||||
| #include <QObject> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace manager | ||||
| { | ||||
| 
 | ||||
| class UpdateManager : public QObject | ||||
| { | ||||
|    Q_OBJECT | ||||
| 
 | ||||
| public: | ||||
|    explicit UpdateManager(); | ||||
|    ~UpdateManager(); | ||||
| 
 | ||||
|    types::gh::Release latest_release() const; | ||||
|    std::string        latest_version() const; | ||||
| 
 | ||||
|    bool CheckForUpdates(const std::string& currentVersion = {}); | ||||
| 
 | ||||
|    static std::shared_ptr<UpdateManager> Instance(); | ||||
| 
 | ||||
| signals: | ||||
|    void UpdateAvailable(const std::string&        latestVersion, | ||||
|                         const types::gh::Release& latestRelease); | ||||
| 
 | ||||
| private: | ||||
|    class Impl; | ||||
|    std::unique_ptr<Impl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace manager
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat