refactor: Un-singletonize Paths & Updates (#5092)

This commit is contained in:
pajlada
2024-01-16 21:56:43 +01:00
committed by GitHub
parent 7f935665f9
commit 718696db53
60 changed files with 237 additions and 165 deletions
+9 -4
View File
@@ -5,11 +5,19 @@
namespace chatterino {
class Paths;
/**
* To check for updates, use the `checkForUpdates` method.
* The class by itself does not start any automatic updates.
*/
class Updates
{
Updates();
const Paths &paths;
public:
explicit Updates(const Paths &paths_);
enum Status {
None,
Searching,
@@ -21,9 +29,6 @@ public:
WriteFileFailed,
};
// fourtf: don't add this class to the application class
static Updates &instance();
static bool isDowngradeOf(const QString &online, const QString &current);
void checkForUpdates();