OSDN Git Service

Updated cURL binary to v7.70.0 (2020-04-29).
[x264-launcher/x264-launcher.git] / src / win_updater.h
index 58332e5..9f94e21 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Simple x264 Launcher
-// Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2020 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 #pragma once
 
 #include <QDialog>
+#include <QMap>
 
 class QMovie;
-class UpdateCheckThread;
+class QFile;
+class QElapsedTimer;
 class SysinfoModel;
 
 namespace Ui
@@ -32,6 +34,11 @@ namespace Ui
        class UpdaterDialog;
 }
 
+namespace MUtils
+{
+       class UpdateChecker;
+}
+
 class UpdaterDialog : public QDialog
 {
        Q_OBJECT
@@ -72,7 +79,7 @@ private slots:
 private:
        Ui::UpdaterDialog *const ui;
 
-       bool checkBinaries(QString &wgetBin, QString &gpgvBin);
+       bool checkBinaries();
        bool checkFileHash(const QString &filePath, const char *expectedHash);
 
        const SysinfoModel *const m_sysinfo;
@@ -81,11 +88,12 @@ private:
        bool m_firstShow;
        bool m_success;
 
-       QMovie *m_animator;
-       UpdateCheckThread *m_thread;
+       QScopedPointer<QMovie> m_animator;
+       QScopedPointer<MUtils::UpdateChecker> m_thread;
+       QScopedPointer<QElapsedTimer> m_elapsed;
+
        unsigned long m_updaterProcess;
        QStringList m_logFile;
-       QString m_keysFile;
-       QString m_wupdFile;
+       QMap<QString, QSharedPointer<QFile>> m_binaries;
        int m_status;
 };