win-update.hpp 697 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <QThread>
  3. #include <QString>
  4. class AutoUpdateThread : public QThread {
  5. Q_OBJECT
  6. bool manualUpdate;
  7. bool user_confirmed = false;
  8. virtual void run() override;
  9. void info(const QString &title, const QString &text);
  10. int queryUpdate(bool manualUpdate, const char *text_utf8);
  11. private slots:
  12. void infoMsg(const QString &title, const QString &text);
  13. int queryUpdateSlot(bool manualUpdate, const QString &text);
  14. public:
  15. AutoUpdateThread(bool manualUpdate_) : manualUpdate(manualUpdate_) {}
  16. };
  17. class WhatsNewInfoThread : public QThread {
  18. Q_OBJECT
  19. virtual void run() override;
  20. signals:
  21. void Result(const QString &text);
  22. public:
  23. inline WhatsNewInfoThread() {}
  24. };