From d07b4f7ff00b1113809c7824e7cd17518d92dc6b Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 31 Dec 2015 23:08:24 +0000 Subject: Fixes an issue with doing connect for download cancel at the wrong time Also cleaned up header usage per include-what-you-use --- src/selfupdater.cpp | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'src/selfupdater.cpp') 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 . #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 . #include #include +#include +#include +#include +#include +#include #include #include #include -#include -#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + #include +#include //for VS_FIXEDFILEINFO, GetLastError + +#include +#include +#include //for size_t +#include 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(); -- cgit v1.3.1