diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-12-31 23:08:24 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-12-31 23:08:24 +0000 |
| commit | d07b4f7ff00b1113809c7824e7cd17518d92dc6b (patch) | |
| tree | 157ded41c8f7147b0622aeab87ae05dcac71b8a7 /src | |
| parent | 197c49e996ba6f1284a7b7369b294000450b4453 (diff) | |
Fixes an issue with doing connect for download cancel at the wrong time
Also cleaned up header usage per include-what-you-use
Diffstat (limited to 'src')
| -rw-r--r-- | src/selfupdater.cpp | 32 | ||||
| -rw-r--r-- | src/selfupdater.h | 17 |
2 files changed, 37 insertions, 12 deletions
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index 11478fbc..e402d03c 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -19,6 +19,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "selfupdater.h"
+#include "archive.h"
+#include "callback.h"
#include "utility.h"
#include "installationmanager.h"
#include "iplugingame.h"
@@ -30,15 +32,36 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <report.h>
#include <util.h>
+#include <QApplication>
+#include <QCoreApplication>
+#include <QDir>
+#include <QFileInfo>
+#include <QLibrary>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
-#include <QDir>
-#include <QLibrary>
+#include <QNetworkReply>
#include <QProcess>
-#include <QApplication>
+#include <QProgressDialog>
+#include <QRegExp>
+#include <QStringList>
+#include <QTimer>
+#include <QUrl>
+#include <QVariantList>
+#include <QVariantMap>
+
+#include <Qt>
+#include <QtDebug>
+#include <QtAlgorithms>
+
#include <boost/bind.hpp>
+#include <Windows.h> //for VS_FIXEDFILEINFO, GetLastError
+
+#include <exception>
+#include <map>
+#include <stddef.h> //for size_t
+#include <stdexcept>
using namespace MOBase;
using namespace MOShared;
@@ -77,8 +100,6 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface) throw MyException(InstallationManager::getErrorString(m_ArchiveHandler->getLastError()));
}
- connect(m_Progress, SIGNAL(canceled()), this, SLOT(downloadCancel()));
-
VS_FIXEDFILEINFO version = GetFileVersion(ToWString(QApplication::applicationFilePath()));
m_MOVersion = VersionInfo(version.dwFileVersionMS >> 16,
@@ -135,6 +156,7 @@ void SelfUpdater::showProgress() {
if (m_Progress == nullptr) {
m_Progress = new QProgressDialog(m_Parent, Qt::Dialog);
+ connect(m_Progress, SIGNAL(canceled()), this, SLOT(downloadCancel()));
}
m_Progress->setModal(true);
m_Progress->show();
diff --git a/src/selfupdater.h b/src/selfupdater.h index 446778fb..37021b42 100644 --- a/src/selfupdater.h +++ b/src/selfupdater.h @@ -21,17 +21,20 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #define SELFUPDATER_H
-#include <archive.h>
#include <versioninfo.h>
-#include <QObject>
-#include <QNetworkReply>
-#include <QFile>
-#include <QProgressDialog>
-
+class Archive;
+class NexusInterface;
namespace MOBase { class IPluginGame; }
-class NexusInterface;
+#include <QFile>
+#include <QObject>
+#include <QString>
+#include <QVariant>
+#include <QtGlobal> //for qint64
+
+class QNetworkReply;
+class QProgressDialog;
/**
|
