From 37c3bea7dd5a562a97c00b740103cc2868b3013b Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 06:58:29 +0000 Subject: Removes all uses of GameInfo::getShortName, replaced by IPluginGame::getNexustName --- src/downloadmanager.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/downloadmanager.cpp') diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index e0d76765..588b8bb9 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -18,10 +18,11 @@ along with Mod Organizer. If not, see . */ #include "downloadmanager.h" + #include "nxmurl.h" #include "nexusinterface.h" #include "nxmaccessmanager.h" -#include +#include "iplugingame.h" #include #include #include "utility.h" @@ -30,6 +31,7 @@ along with Mod Organizer. If not, see . #include "bbcode.h" #include #include + #include #include #include @@ -37,6 +39,7 @@ along with Mod Organizer. If not, see . #include #include #include + #include #include @@ -447,7 +450,7 @@ void DownloadManager::addNXMDownload(const QString &url) { NXMUrl nxmInfo(url); - QString managedGame = ToQString(MOShared::GameInfo::instance().getGameShortName()); + QString managedGame = m_ManagedGame->getNexusName(); qDebug("add nxm download: %s", qPrintable(url)); if (nxmInfo.game().compare(managedGame, Qt::CaseInsensitive) != 0) { qDebug("download requested for wrong game (game: %s, url: %s)", qPrintable(managedGame), qPrintable(nxmInfo.game())); @@ -1462,3 +1465,7 @@ void DownloadManager::directoryChanged(const QString&) refreshList(); } +void DownloadManager::managedGameChanged(MOBase::IPluginGame *managedGame) +{ + m_ManagedGame = managedGame; +} -- cgit v1.3.1