1
0

mac-update.hpp 859 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef MAC_UPDATER_H
  2. #define MAC_UPDATER_H
  3. #include <string>
  4. #include <QThread>
  5. #include <QString>
  6. #include <QObject>
  7. class QAction;
  8. class MacUpdateThread : public QThread {
  9. Q_OBJECT
  10. bool manualUpdate;
  11. virtual void run() override;
  12. void info(const QString &title, const QString &text);
  13. signals:
  14. void Result(const QString &branch, bool manual);
  15. private slots:
  16. void infoMsg(const QString &title, const QString &text);
  17. public:
  18. MacUpdateThread(bool manual) : manualUpdate(manual) {}
  19. };
  20. #ifdef __OBJC__
  21. @class OBSUpdateDelegate;
  22. #endif
  23. class OBSSparkle : public QObject {
  24. Q_OBJECT
  25. public:
  26. OBSSparkle(const char *branch, QAction *checkForUpdatesAction);
  27. void setBranch(const char *branch);
  28. void checkForUpdates(bool manualCheck);
  29. private:
  30. #ifdef __OBJC__
  31. OBSUpdateDelegate *updaterDelegate;
  32. #else
  33. void *updaterDelegate;
  34. #endif
  35. };
  36. #endif